diff --git a/owl-bot-staging/dlp/v2/.OwlBot.yaml b/owl-bot-staging/dlp/v2/.OwlBot.yaml new file mode 100644 index 000000000..ec5105fb1 --- /dev/null +++ b/owl-bot-staging/dlp/v2/.OwlBot.yaml @@ -0,0 +1,19 @@ +# Copyright 2025 Google LLC +# +# 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. + +deep-copy-regex: + - source: /google/privacy/dlp/google-privacy-dlp-nodejs + dest: /owl-bot-staging/google-privacy-dlp + +api-name: dlp \ No newline at end of file diff --git a/owl-bot-staging/dlp/v2/.gitignore b/owl-bot-staging/dlp/v2/.gitignore new file mode 100644 index 000000000..d4f03a0df --- /dev/null +++ b/owl-bot-staging/dlp/v2/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/owl-bot-staging/dlp/v2/.jsdoc.js b/owl-bot-staging/dlp/v2/.jsdoc.js new file mode 100644 index 000000000..ce33171f6 --- /dev/null +++ b/owl-bot-staging/dlp/v2/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2026 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/dlp', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/dlp/v2/.nycrc b/owl-bot-staging/dlp/v2/.nycrc new file mode 100644 index 000000000..81a95fc94 --- /dev/null +++ b/owl-bot-staging/dlp/v2/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} \ No newline at end of file diff --git a/owl-bot-staging/dlp/v2/README.md b/owl-bot-staging/dlp/v2/README.md new file mode 100644 index 000000000..10c4bfd90 --- /dev/null +++ b/owl-bot-staging/dlp/v2/README.md @@ -0,0 +1,108 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "The comments you see below are used to generate those parts of the template in later states." +Google Cloud Platform logo + +# [Sensitive Data Protection (DLP): Nodejs Client][homepage] + +[//]: # "releaseLevel" + +[![npm version](https://img.shields.io/npm/v/@google-cloud/dlp.svg)](https://www.npmjs.org/package/@google-cloud/dlp) + +Sensitive Data Protection (DLP) client for Node.js + +[//]: # "partials.introduction" + +A comprehensive list of changes in each version may be found in +[the CHANGELOG][homepage_changelog]. + +* [Sensitive Data Protection (DLP) Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/dlp/latest) + + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Sensitive Data Protection (DLP) API][enable_api]. +1. [Set up authentication][auth] so you can access the + API from your local workstation. +### Installing the client library + +```bash +npm install @google-cloud/dlp +``` + +[//]: # "partials.body" + +## Samples + +Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample. + +[//]: # "samples" + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. + +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: + +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/dlp@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). + +Please note that this `README.md` +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=dlp.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local +[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-privacy-dlp/samples +[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-privacy-dlp/CHANGELOG.md +[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-privacy-dlp diff --git a/owl-bot-staging/dlp/v2/package.json b/owl-bot-staging/dlp/v2/package.json new file mode 100644 index 000000000..3b76cecc4 --- /dev/null +++ b/owl-bot-staging/dlp/v2/package.json @@ -0,0 +1,58 @@ +{ + "name": "@google-cloud/dlp", + "version": "0.1.0", + "description": "Dlp client for Node.js", + "repository": "googleapis/nodejs-dlp", + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google dlp", + "dlp", + "dlp service" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha --config ../../.mocharc.cjs --no-parallel build/system-test", + "test": "c8 mocha --config ../../.mocharc.cjs build/test" + }, + "dependencies": { + "google-gax": "^5.1.1-rc.1" + }, + "devDependencies": { + "@types/mocha": "^10.0.10", + "@types/node": "^22.18.12", + "@types/sinon": "^20.0.0", + "c8": "^10.1.3", + "gapic-tools": "^1.0.3", + "gts": "^6.0.2", + "jsdoc": "^4.0.5", + "jsdoc-fresh": "^5.0.2", + "jsdoc-region-tag": "^4.0.1", + "mocha": "^11.7.4", + "pack-n-play": "^4.2.1", + "typescript": "5.8.3", + "sinon": "^20.0.0" + }, + "engines": { + "node": ">=v18" + } +} diff --git a/owl-bot-staging/dlp/v2/protos/google/privacy/dlp/v2/dlp.proto b/owl-bot-staging/dlp/v2/protos/google/privacy/dlp/v2/dlp.proto new file mode 100644 index 000000000..8d5c1422d --- /dev/null +++ b/owl-bot-staging/dlp/v2/protos/google/privacy/dlp/v2/dlp.proto @@ -0,0 +1,9255 @@ +// Copyright 2026 Google LLC +// +// 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. + +syntax = "proto3"; + +package google.privacy.dlp.v2; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/privacy/dlp/v2/storage.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; +import "google/type/date.proto"; +import "google/type/dayofweek.proto"; +import "google/type/timeofday.proto"; + +option csharp_namespace = "Google.Cloud.Dlp.V2"; +option go_package = "cloud.google.com/go/dlp/apiv2/dlppb;dlppb"; +option java_multiple_files = true; +option java_outer_classname = "DlpProto"; +option java_package = "com.google.privacy.dlp.v2"; +option php_namespace = "Google\\Cloud\\Dlp\\V2"; +option ruby_package = "Google::Cloud::Dlp::V2"; +option (google.api.resource_definition) = { + type: "dlp.googleapis.com/DlpContent" + pattern: "projects/{project}/dlpContent" + pattern: "projects/{project}/locations/{location}/dlpContent" +}; +option (google.api.resource_definition) = { + type: "dlp.googleapis.com/OrganizationLocation" + pattern: "organizations/{organization}/locations/{location}" +}; + +// Sensitive Data Protection provides access to a powerful sensitive data +// inspection, classification, and de-identification platform that works +// on text, images, and Google Cloud storage repositories. +// To learn more about concepts and find how-to guides see +// https://cloud.google.com/sensitive-data-protection/docs/. +service DlpService { + option (google.api.default_host) = "dlp.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Finds potentially sensitive info in content. + // This method has limits on input size, processing time, and output size. + // + // When no InfoTypes or CustomInfoTypes are specified in this request, the + // system will automatically choose what detectors to run. By default this may + // be all types, but may change over time as detectors are updated. + // + // For how to guides, see + // https://cloud.google.com/sensitive-data-protection/docs/inspecting-images + // and + // https://cloud.google.com/sensitive-data-protection/docs/inspecting-text, + rpc InspectContent(InspectContentRequest) returns (InspectContentResponse) { + option (google.api.http) = { + post: "/v2/{parent=projects/*}/content:inspect" + body: "*" + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/content:inspect" + body: "*" + } + }; + } + + // Redacts potentially sensitive info from an image. + // This method has limits on input size, processing time, and output size. + // See + // https://cloud.google.com/sensitive-data-protection/docs/redacting-sensitive-data-images + // to learn more. + // + // When no InfoTypes or CustomInfoTypes are specified in this request, the + // system will automatically choose what detectors to run. By default this may + // be all types, but may change over time as detectors are updated. + // + // Only the first frame of each multiframe image is redacted. Metadata and + // other frames are omitted in the response. + rpc RedactImage(RedactImageRequest) returns (RedactImageResponse) { + option (google.api.http) = { + post: "/v2/{parent=projects/*}/image:redact" + body: "*" + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/image:redact" + body: "*" + } + }; + } + + // De-identifies potentially sensitive info from a ContentItem. + // This method has limits on input size and output size. + // See + // https://cloud.google.com/sensitive-data-protection/docs/deidentify-sensitive-data + // to learn more. + // + // When no InfoTypes or CustomInfoTypes are specified in this request, the + // system will automatically choose what detectors to run. By default this may + // be all types, but may change over time as detectors are updated. + rpc DeidentifyContent(DeidentifyContentRequest) + returns (DeidentifyContentResponse) { + option (google.api.http) = { + post: "/v2/{parent=projects/*}/content:deidentify" + body: "*" + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/content:deidentify" + body: "*" + } + }; + } + + // Re-identifies content that has been de-identified. + // See + // https://cloud.google.com/sensitive-data-protection/docs/pseudonymization#re-identification_in_free_text_code_example + // to learn more. + rpc ReidentifyContent(ReidentifyContentRequest) + returns (ReidentifyContentResponse) { + option (google.api.http) = { + post: "/v2/{parent=projects/*}/content:reidentify" + body: "*" + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/content:reidentify" + body: "*" + } + }; + } + + // Returns a list of the sensitive information types that the DLP API + // supports. See + // https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference + // to learn more. + rpc ListInfoTypes(ListInfoTypesRequest) returns (ListInfoTypesResponse) { + option (google.api.http) = { + get: "/v2/infoTypes" + additional_bindings { get: "/v2/{parent=locations/*}/infoTypes" } + additional_bindings { + get: "/v2/{parent=projects/*/locations/*}/infoTypes" + } + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*}/infoTypes" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Creates an InspectTemplate for reusing frequently used configuration + // for inspecting content, images, and storage. + // See + // https://cloud.google.com/sensitive-data-protection/docs/creating-templates + // to learn more. + rpc CreateInspectTemplate(CreateInspectTemplateRequest) + returns (InspectTemplate) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/locations/*}/inspectTemplates" + body: "*" + additional_bindings { + post: "/v2/{parent=organizations/*/locations/*}/inspectTemplates" + body: "*" + } + additional_bindings { + post: "/v2/{parent=projects/*}/inspectTemplates" + body: "*" + } + additional_bindings { + post: "/v2/{parent=organizations/*}/inspectTemplates" + body: "*" + } + }; + option (google.api.method_signature) = "parent,inspect_template"; + } + + // Updates the InspectTemplate. + // See + // https://cloud.google.com/sensitive-data-protection/docs/creating-templates + // to learn more. + rpc UpdateInspectTemplate(UpdateInspectTemplateRequest) + returns (InspectTemplate) { + option (google.api.http) = { + patch: "/v2/{name=projects/*/locations/*/inspectTemplates/*}" + body: "*" + additional_bindings { + patch: "/v2/{name=organizations/*/locations/*/inspectTemplates/*}" + body: "*" + } + additional_bindings { + patch: "/v2/{name=projects/*/inspectTemplates/*}" + body: "*" + } + additional_bindings { + patch: "/v2/{name=organizations/*/inspectTemplates/*}" + body: "*" + } + }; + option (google.api.method_signature) = "name,inspect_template,update_mask"; + } + + // Gets an InspectTemplate. + // See + // https://cloud.google.com/sensitive-data-protection/docs/creating-templates + // to learn more. + rpc GetInspectTemplate(GetInspectTemplateRequest) returns (InspectTemplate) { + option (google.api.http) = { + get: "/v2/{name=projects/*/locations/*/inspectTemplates/*}" + additional_bindings { + get: "/v2/{name=organizations/*/locations/*/inspectTemplates/*}" + } + additional_bindings { get: "/v2/{name=projects/*/inspectTemplates/*}" } + additional_bindings { + get: "/v2/{name=organizations/*/inspectTemplates/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists InspectTemplates. + // See + // https://cloud.google.com/sensitive-data-protection/docs/creating-templates + // to learn more. + rpc ListInspectTemplates(ListInspectTemplatesRequest) + returns (ListInspectTemplatesResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/locations/*}/inspectTemplates" + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*}/inspectTemplates" + } + additional_bindings { get: "/v2/{parent=projects/*}/inspectTemplates" } + additional_bindings { + get: "/v2/{parent=organizations/*}/inspectTemplates" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes an InspectTemplate. + // See + // https://cloud.google.com/sensitive-data-protection/docs/creating-templates + // to learn more. + rpc DeleteInspectTemplate(DeleteInspectTemplateRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/locations/*/inspectTemplates/*}" + additional_bindings { + delete: "/v2/{name=organizations/*/locations/*/inspectTemplates/*}" + } + additional_bindings { delete: "/v2/{name=projects/*/inspectTemplates/*}" } + additional_bindings { + delete: "/v2/{name=organizations/*/inspectTemplates/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Creates a DeidentifyTemplate for reusing frequently used configuration + // for de-identifying content, images, and storage. + // See + // https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid + // to learn more. + rpc CreateDeidentifyTemplate(CreateDeidentifyTemplateRequest) + returns (DeidentifyTemplate) { + option (google.api.http) = { + post: "/v2/{parent=organizations/*}/deidentifyTemplates" + body: "*" + additional_bindings { + post: "/v2/{parent=organizations/*/locations/*}/deidentifyTemplates" + body: "*" + } + additional_bindings { + post: "/v2/{parent=projects/*}/deidentifyTemplates" + body: "*" + } + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/deidentifyTemplates" + body: "*" + } + }; + option (google.api.method_signature) = "parent,deidentify_template"; + } + + // Updates the DeidentifyTemplate. + // See + // https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid + // to learn more. + rpc UpdateDeidentifyTemplate(UpdateDeidentifyTemplateRequest) + returns (DeidentifyTemplate) { + option (google.api.http) = { + patch: "/v2/{name=organizations/*/deidentifyTemplates/*}" + body: "*" + additional_bindings { + patch: "/v2/{name=organizations/*/locations/*/deidentifyTemplates/*}" + body: "*" + } + additional_bindings { + patch: "/v2/{name=projects/*/deidentifyTemplates/*}" + body: "*" + } + additional_bindings { + patch: "/v2/{name=projects/*/locations/*/deidentifyTemplates/*}" + body: "*" + } + }; + option (google.api.method_signature) = + "name,deidentify_template,update_mask"; + } + + // Gets a DeidentifyTemplate. + // See + // https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid + // to learn more. + rpc GetDeidentifyTemplate(GetDeidentifyTemplateRequest) + returns (DeidentifyTemplate) { + option (google.api.http) = { + get: "/v2/{name=organizations/*/deidentifyTemplates/*}" + additional_bindings { + get: "/v2/{name=organizations/*/locations/*/deidentifyTemplates/*}" + } + additional_bindings { get: "/v2/{name=projects/*/deidentifyTemplates/*}" } + additional_bindings { + get: "/v2/{name=projects/*/locations/*/deidentifyTemplates/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists DeidentifyTemplates. + // See + // https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid + // to learn more. + rpc ListDeidentifyTemplates(ListDeidentifyTemplatesRequest) + returns (ListDeidentifyTemplatesResponse) { + option (google.api.http) = { + get: "/v2/{parent=organizations/*}/deidentifyTemplates" + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*}/deidentifyTemplates" + } + additional_bindings { get: "/v2/{parent=projects/*}/deidentifyTemplates" } + additional_bindings { + get: "/v2/{parent=projects/*/locations/*}/deidentifyTemplates" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a DeidentifyTemplate. + // See + // https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid + // to learn more. + rpc DeleteDeidentifyTemplate(DeleteDeidentifyTemplateRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=organizations/*/deidentifyTemplates/*}" + additional_bindings { + delete: "/v2/{name=organizations/*/locations/*/deidentifyTemplates/*}" + } + additional_bindings { + delete: "/v2/{name=projects/*/deidentifyTemplates/*}" + } + additional_bindings { + delete: "/v2/{name=projects/*/locations/*/deidentifyTemplates/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Creates a job trigger to run DLP actions such as scanning storage for + // sensitive information on a set schedule. + // See + // https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers + // to learn more. + rpc CreateJobTrigger(CreateJobTriggerRequest) returns (JobTrigger) { + option (google.api.http) = { + post: "/v2/{parent=projects/*}/jobTriggers" + body: "*" + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/jobTriggers" + body: "*" + } + additional_bindings { + post: "/v2/{parent=organizations/*/locations/*}/jobTriggers" + body: "*" + } + }; + option (google.api.method_signature) = "parent,job_trigger"; + } + + // Updates a job trigger. + // See + // https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers + // to learn more. + rpc UpdateJobTrigger(UpdateJobTriggerRequest) returns (JobTrigger) { + option (google.api.http) = { + patch: "/v2/{name=projects/*/jobTriggers/*}" + body: "*" + additional_bindings { + patch: "/v2/{name=projects/*/locations/*/jobTriggers/*}" + body: "*" + } + additional_bindings { + patch: "/v2/{name=organizations/*/locations/*/jobTriggers/*}" + body: "*" + } + }; + option (google.api.method_signature) = "name,job_trigger,update_mask"; + } + + // Inspect hybrid content and store findings to a trigger. The inspection + // will be processed asynchronously. To review the findings monitor the + // jobs within the trigger. + rpc HybridInspectJobTrigger(HybridInspectJobTriggerRequest) + returns (HybridInspectResponse) { + option (google.api.http) = { + post: "/v2/{name=projects/*/locations/*/jobTriggers/*}:hybridInspect" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Gets a job trigger. + // See + // https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers + // to learn more. + rpc GetJobTrigger(GetJobTriggerRequest) returns (JobTrigger) { + option (google.api.http) = { + get: "/v2/{name=projects/*/jobTriggers/*}" + additional_bindings { + get: "/v2/{name=projects/*/locations/*/jobTriggers/*}" + } + additional_bindings { + get: "/v2/{name=organizations/*/locations/*/jobTriggers/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists job triggers. + // See + // https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers + // to learn more. + rpc ListJobTriggers(ListJobTriggersRequest) + returns (ListJobTriggersResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*}/jobTriggers" + additional_bindings { + get: "/v2/{parent=projects/*/locations/*}/jobTriggers" + } + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*}/jobTriggers" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a job trigger. + // See + // https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers + // to learn more. + rpc DeleteJobTrigger(DeleteJobTriggerRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/jobTriggers/*}" + additional_bindings { + delete: "/v2/{name=projects/*/locations/*/jobTriggers/*}" + } + additional_bindings { + delete: "/v2/{name=organizations/*/locations/*/jobTriggers/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Activate a job trigger. Causes the immediate execute of a trigger + // instead of waiting on the trigger event to occur. + rpc ActivateJobTrigger(ActivateJobTriggerRequest) returns (DlpJob) { + option (google.api.http) = { + post: "/v2/{name=projects/*/jobTriggers/*}:activate" + body: "*" + additional_bindings { + post: "/v2/{name=projects/*/locations/*/jobTriggers/*}:activate" + body: "*" + } + }; + } + + // Creates a config for discovery to scan and profile storage. + rpc CreateDiscoveryConfig(CreateDiscoveryConfigRequest) + returns (DiscoveryConfig) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/locations/*}/discoveryConfigs" + body: "*" + additional_bindings { + post: "/v2/{parent=organizations/*/locations/*}/discoveryConfigs" + body: "*" + } + }; + option (google.api.method_signature) = "parent,discovery_config"; + } + + // Updates a discovery configuration. + rpc UpdateDiscoveryConfig(UpdateDiscoveryConfigRequest) + returns (DiscoveryConfig) { + option (google.api.http) = { + patch: "/v2/{name=projects/*/locations/*/discoveryConfigs/*}" + body: "*" + additional_bindings { + patch: "/v2/{name=organizations/*/locations/*/discoveryConfigs/*}" + body: "*" + } + }; + option (google.api.method_signature) = "name,discovery_config,update_mask"; + } + + // Gets a discovery configuration. + rpc GetDiscoveryConfig(GetDiscoveryConfigRequest) returns (DiscoveryConfig) { + option (google.api.http) = { + get: "/v2/{name=projects/*/locations/*/discoveryConfigs/*}" + additional_bindings { + get: "/v2/{name=organizations/*/locations/*/discoveryConfigs/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists discovery configurations. + rpc ListDiscoveryConfigs(ListDiscoveryConfigsRequest) + returns (ListDiscoveryConfigsResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/locations/*}/discoveryConfigs" + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*}/discoveryConfigs" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a discovery configuration. + rpc DeleteDiscoveryConfig(DeleteDiscoveryConfigRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/locations/*/discoveryConfigs/*}" + additional_bindings { + delete: "/v2/{name=organizations/*/locations/*/discoveryConfigs/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Creates a new job to inspect storage or calculate risk metrics. + // See + // https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage + // and + // https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis + // to learn more. + // + // When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the + // system will automatically choose what detectors to run. By default this may + // be all types, but may change over time as detectors are updated. + rpc CreateDlpJob(CreateDlpJobRequest) returns (DlpJob) { + option (google.api.http) = { + post: "/v2/{parent=projects/*}/dlpJobs" + body: "*" + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/dlpJobs" + body: "*" + } + }; + option (google.api.method_signature) = "parent,inspect_job"; + option (google.api.method_signature) = "parent,risk_job"; + } + + // Lists DlpJobs that match the specified filter in the request. + // See + // https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage + // and + // https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis + // to learn more. + rpc ListDlpJobs(ListDlpJobsRequest) returns (ListDlpJobsResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*}/dlpJobs" + additional_bindings { get: "/v2/{parent=projects/*/locations/*}/dlpJobs" } + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*}/dlpJobs" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Gets the latest state of a long-running DlpJob. + // See + // https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage + // and + // https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis + // to learn more. + rpc GetDlpJob(GetDlpJobRequest) returns (DlpJob) { + option (google.api.http) = { + get: "/v2/{name=projects/*/dlpJobs/*}" + additional_bindings { get: "/v2/{name=projects/*/locations/*/dlpJobs/*}" } + }; + option (google.api.method_signature) = "name"; + } + + // Deletes a long-running DlpJob. This method indicates that the client is + // no longer interested in the DlpJob result. The job will be canceled if + // possible. + // See + // https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage + // and + // https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis + // to learn more. + rpc DeleteDlpJob(DeleteDlpJobRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/dlpJobs/*}" + additional_bindings { + delete: "/v2/{name=projects/*/locations/*/dlpJobs/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Starts asynchronous cancellation on a long-running DlpJob. The server + // makes a best effort to cancel the DlpJob, but success is not + // guaranteed. + // See + // https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage + // and + // https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis + // to learn more. + rpc CancelDlpJob(CancelDlpJobRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v2/{name=projects/*/dlpJobs/*}:cancel" + body: "*" + additional_bindings { + post: "/v2/{name=projects/*/locations/*/dlpJobs/*}:cancel" + body: "*" + } + }; + } + + // Creates a pre-built stored infoType to be used for inspection. + // See + // https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes + // to learn more. + rpc CreateStoredInfoType(CreateStoredInfoTypeRequest) + returns (StoredInfoType) { + option (google.api.http) = { + post: "/v2/{parent=organizations/*}/storedInfoTypes" + body: "*" + additional_bindings { + post: "/v2/{parent=organizations/*/locations/*}/storedInfoTypes" + body: "*" + } + additional_bindings { + post: "/v2/{parent=projects/*}/storedInfoTypes" + body: "*" + } + additional_bindings { + post: "/v2/{parent=projects/*/locations/*}/storedInfoTypes" + body: "*" + } + }; + option (google.api.method_signature) = "parent,config"; + } + + // Updates the stored infoType by creating a new version. The existing version + // will continue to be used until the new version is ready. + // See + // https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes + // to learn more. + rpc UpdateStoredInfoType(UpdateStoredInfoTypeRequest) + returns (StoredInfoType) { + option (google.api.http) = { + patch: "/v2/{name=organizations/*/storedInfoTypes/*}" + body: "*" + additional_bindings { + patch: "/v2/{name=organizations/*/locations/*/storedInfoTypes/*}" + body: "*" + } + additional_bindings { + patch: "/v2/{name=projects/*/storedInfoTypes/*}" + body: "*" + } + additional_bindings { + patch: "/v2/{name=projects/*/locations/*/storedInfoTypes/*}" + body: "*" + } + }; + option (google.api.method_signature) = "name,config,update_mask"; + } + + // Gets a stored infoType. + // See + // https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes + // to learn more. + rpc GetStoredInfoType(GetStoredInfoTypeRequest) returns (StoredInfoType) { + option (google.api.http) = { + get: "/v2/{name=organizations/*/storedInfoTypes/*}" + additional_bindings { + get: "/v2/{name=organizations/*/locations/*/storedInfoTypes/*}" + } + additional_bindings { get: "/v2/{name=projects/*/storedInfoTypes/*}" } + additional_bindings { + get: "/v2/{name=projects/*/locations/*/storedInfoTypes/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists stored infoTypes. + // See + // https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes + // to learn more. + rpc ListStoredInfoTypes(ListStoredInfoTypesRequest) + returns (ListStoredInfoTypesResponse) { + option (google.api.http) = { + get: "/v2/{parent=organizations/*}/storedInfoTypes" + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*}/storedInfoTypes" + } + additional_bindings { get: "/v2/{parent=projects/*}/storedInfoTypes" } + additional_bindings { + get: "/v2/{parent=projects/*/locations/*}/storedInfoTypes" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a stored infoType. + // See + // https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes + // to learn more. + rpc DeleteStoredInfoType(DeleteStoredInfoTypeRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=organizations/*/storedInfoTypes/*}" + additional_bindings { + delete: "/v2/{name=organizations/*/locations/*/storedInfoTypes/*}" + } + additional_bindings { delete: "/v2/{name=projects/*/storedInfoTypes/*}" } + additional_bindings { + delete: "/v2/{name=projects/*/locations/*/storedInfoTypes/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists project data profiles for an organization. + rpc ListProjectDataProfiles(ListProjectDataProfilesRequest) + returns (ListProjectDataProfilesResponse) { + option (google.api.http) = { + get: "/v2/{parent=organizations/*/locations/*}/projectDataProfiles" + additional_bindings { + get: "/v2/{parent=projects/*/locations/*}/projectDataProfiles" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Lists table data profiles for an organization. + rpc ListTableDataProfiles(ListTableDataProfilesRequest) + returns (ListTableDataProfilesResponse) { + option (google.api.http) = { + get: "/v2/{parent=organizations/*/locations/*}/tableDataProfiles" + additional_bindings { + get: "/v2/{parent=projects/*/locations/*}/tableDataProfiles" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Lists column data profiles for an organization. + rpc ListColumnDataProfiles(ListColumnDataProfilesRequest) + returns (ListColumnDataProfilesResponse) { + option (google.api.http) = { + get: "/v2/{parent=organizations/*/locations/*}/columnDataProfiles" + additional_bindings { + get: "/v2/{parent=projects/*/locations/*}/columnDataProfiles" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a project data profile. + rpc GetProjectDataProfile(GetProjectDataProfileRequest) + returns (ProjectDataProfile) { + option (google.api.http) = { + get: "/v2/{name=organizations/*/locations/*/projectDataProfiles/*}" + additional_bindings { + get: "/v2/{name=projects/*/locations/*/projectDataProfiles/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists file store data profiles for an organization. + rpc ListFileStoreDataProfiles(ListFileStoreDataProfilesRequest) + returns (ListFileStoreDataProfilesResponse) { + option (google.api.http) = { + get: "/v2/{parent=organizations/*/locations/*}/fileStoreDataProfiles" + additional_bindings { + get: "/v2/{parent=projects/*/locations/*}/fileStoreDataProfiles" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Gets a file store data profile. + rpc GetFileStoreDataProfile(GetFileStoreDataProfileRequest) + returns (FileStoreDataProfile) { + option (google.api.http) = { + get: "/v2/{name=organizations/*/locations/*/fileStoreDataProfiles/*}" + additional_bindings { + get: "/v2/{name=projects/*/locations/*/fileStoreDataProfiles/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Delete a FileStoreDataProfile. Will not prevent the profile from being + // regenerated if the resource is still included in a discovery configuration. + rpc DeleteFileStoreDataProfile(DeleteFileStoreDataProfileRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=organizations/*/locations/*/fileStoreDataProfiles/*}" + additional_bindings { + delete: "/v2/{name=projects/*/locations/*/fileStoreDataProfiles/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Gets a table data profile. + rpc GetTableDataProfile(GetTableDataProfileRequest) + returns (TableDataProfile) { + option (google.api.http) = { + get: "/v2/{name=organizations/*/locations/*/tableDataProfiles/*}" + additional_bindings { + get: "/v2/{name=projects/*/locations/*/tableDataProfiles/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Gets a column data profile. + rpc GetColumnDataProfile(GetColumnDataProfileRequest) + returns (ColumnDataProfile) { + option (google.api.http) = { + get: "/v2/{name=organizations/*/locations/*/columnDataProfiles/*}" + additional_bindings { + get: "/v2/{name=projects/*/locations/*/columnDataProfiles/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Delete a TableDataProfile. Will not prevent the profile from being + // regenerated if the table is still included in a discovery configuration. + rpc DeleteTableDataProfile(DeleteTableDataProfileRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=organizations/*/locations/*/tableDataProfiles/*}" + additional_bindings { + delete: "/v2/{name=projects/*/locations/*/tableDataProfiles/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Inspect hybrid content and store findings to a job. + // To review the findings, inspect the job. Inspection will occur + // asynchronously. + rpc HybridInspectDlpJob(HybridInspectDlpJobRequest) + returns (HybridInspectResponse) { + option (google.api.http) = { + post: "/v2/{name=projects/*/locations/*/dlpJobs/*}:hybridInspect" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Finish a running hybrid DlpJob. Triggers the finalization steps and running + // of any enabled actions that have not yet run. + rpc FinishDlpJob(FinishDlpJobRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v2/{name=projects/*/locations/*/dlpJobs/*}:finish" + body: "*" + }; + } + + // Create a Connection to an external data source. + rpc CreateConnection(CreateConnectionRequest) returns (Connection) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/locations/*}/connections" + body: "*" + additional_bindings { + post: "/v2/{parent=organizations/*/locations/*}/connections" + body: "*" + } + }; + option (google.api.method_signature) = "parent, connection"; + } + + // Get a Connection by name. + rpc GetConnection(GetConnectionRequest) returns (Connection) { + option (google.api.http) = { + get: "/v2/{name=projects/*/locations/*/connections/*}" + additional_bindings { + get: "/v2/{name=organizations/*/locations/*/connections/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Lists Connections in a parent. Use SearchConnections to see all connections + // within an organization. + rpc ListConnections(ListConnectionsRequest) + returns (ListConnectionsResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/locations/*}/connections" + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*}/connections" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Searches for Connections in a parent. + rpc SearchConnections(SearchConnectionsRequest) + returns (SearchConnectionsResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/locations/*}/connections:search" + additional_bindings { + get: "/v2/{parent=organizations/*/locations/*}/connections:search" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Delete a Connection. + rpc DeleteConnection(DeleteConnectionRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/locations/*/connections/*}" + additional_bindings { + delete: "/v2/{name=organizations/*/locations/*/connections/*}" + } + }; + option (google.api.method_signature) = "name"; + } + + // Update a Connection. + rpc UpdateConnection(UpdateConnectionRequest) returns (Connection) { + option (google.api.http) = { + patch: "/v2/{name=projects/*/locations/*/connections/*}" + body: "*" + additional_bindings { + patch: "/v2/{name=organizations/*/locations/*/connections/*}" + body: "*" + } + }; + option (google.api.method_signature) = "name"; + } +} + +// List of excluded infoTypes. +message ExcludeInfoTypes { + // InfoType list in ExclusionRule rule drops a finding when it overlaps or + // contained within with a finding of an infoType from this list. For + // example, for `InspectionRuleSet.info_types` containing "PHONE_NUMBER"` and + // `exclusion_rule` containing `exclude_info_types.info_types` with + // "EMAIL_ADDRESS" the phone number findings are dropped if they overlap + // with EMAIL_ADDRESS finding. + // That leads to "555-222-2222@example.org" to generate only a single + // finding, namely email address. + repeated InfoType info_types = 1; +} + +// The rule to exclude findings based on a hotword. For record inspection of +// tables, column names are considered hotwords. An example of this is to +// exclude a finding if it belongs to a BigQuery column that matches a specific +// pattern. +message ExcludeByHotword { + // Regular expression pattern defining what qualifies as a hotword. + CustomInfoType.Regex hotword_regex = 1; + + // Range of characters within which the entire hotword must reside. + // The total length of the window cannot exceed 1000 characters. + // The windowBefore property in proximity should be set to 1 if the hotword + // needs to be included in a column header. + CustomInfoType.DetectionRule.Proximity proximity = 2; +} + +// The rule to exclude image findings based on spatial relationships with +// other image findings. For example, exclude an image finding if it overlaps +// with another image finding. +// This rule is silently ignored if the content being inspected is not an image. +message ExcludeByImageFindings { + // A list of image-supported infoTypes—excluding [document + // infoTypes](https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference#documents)—to + // be used as context for the exclusion rule. A finding is excluded if + // its bounding box has the specified spatial relationship (defined by + // `image_containment_type`) with a finding of an infoType in this list. + // + // For example, if `InspectionRuleSet.info_types` includes + // `OBJECT_TYPE/PERSON` and this `exclusion_rule` specifies `info_types` as + // `OBJECT_TYPE/PERSON/PASSPORT` with `image_containment_type` set to + // `encloses`, then `OBJECT_TYPE/PERSON` findings will be excluded if they + // are fully contained within the bounding box of an + // `OBJECT_TYPE/PERSON/PASSPORT` finding. + repeated InfoType info_types = 1; + + // Specifies the required spatial relationship between the bounding boxes + // of the target finding and the context infoType findings. + ImageContainmentType image_containment_type = 2; +} + +// The rule that specifies conditions when findings of infoTypes specified in +// `InspectionRuleSet` are removed from results. +message ExclusionRule { + // Exclusion rule types. + oneof type { + // Dictionary which defines the rule. + CustomInfoType.Dictionary dictionary = 1; + + // Regular expression which defines the rule. + CustomInfoType.Regex regex = 2; + + // Set of infoTypes for which findings would affect this rule. + ExcludeInfoTypes exclude_info_types = 3; + + // Drop if the hotword rule is contained in the proximate context. For + // tabular data, the context includes the column name. + ExcludeByHotword exclude_by_hotword = 5; + + // Exclude findings based on image containment rules. For example, exclude + // an image finding if it overlaps with another image finding. + ExcludeByImageFindings exclude_by_image_findings = 6; + } + + // How the rule is applied, see MatchingType documentation for details. + MatchingType matching_type = 4; +} + +// AdjustmentRule condition for matching infoTypes. +message AdjustByMatchingInfoTypes { + // Sensitive Data Protection adjusts the likelihood of a finding if that + // finding also matches one of these infoTypes. + // + // For example, you can create a rule to adjust the likelihood of a + // `PHONE_NUMBER` finding if the string is found within a document that is + // classified as `DOCUMENT_TYPE/HR/RESUME`. To configure this, set + // `PHONE_NUMBER` in `InspectionRuleSet.info_types`. Add an `adjustment_rule` + // with an `adjust_by_matching_info_types.info_types` that contains + // `DOCUMENT_TYPE/HR/RESUME`. In this case, the likelihood of the + // `PHONE_NUMBER` finding is adjusted, but the likelihood of the + // `DOCUMENT_TYPE/HR/RESUME` finding is not. + repeated InfoType info_types = 1; + + // Required. Minimum likelihood of the + // `adjust_by_matching_info_types.info_types` finding. If the likelihood is + // lower than this value, Sensitive Data Protection doesn't adjust the + // likelihood of the `InspectionRuleSet.info_types` finding. + Likelihood min_likelihood = 2; + + // How the adjustment rule is applied. + // + // Only `MATCHING_TYPE_PARTIAL_MATCH` is supported: + // + // - Partial match: adjusts the findings of infoTypes specified in the + // inspection rule when they have a nonempty intersection with a finding of an + // infoType specified in this adjustment rule. + MatchingType matching_type = 3; +} + +// AdjustmentRule condition for image findings. +// This rule is silently ignored if the content being inspected is not an image. +message AdjustByImageFindings { + // A list of image-supported infoTypes—excluding [document + // infoTypes](https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference#documents)—to + // be used as context for the adjustment rule. Sensitive Data Protection + // adjusts the likelihood of an image finding if its bounding box has the + // specified spatial relationship (defined by `image_containment_type`) with a + // finding of an infoType in this list. + // + // For example, you can create a rule to adjust the likelihood of a + // `US_PASSPORT` finding if it is enclosed by a finding of + // `OBJECT_TYPE/PERSON/PASSPORT`. To configure this, set `US_PASSPORT` in + // `InspectionRuleSet.info_types`. Add an `adjustment_rule` with an + // `adjust_by_image_findings.info_types` that contains + // `OBJECT_TYPE/PERSON/PASSPORT` and `image_containment_type` set + // to `encloses`. In this case, the likelihood of the `US_PASSPORT` finding is + // adjusted, but the likelihood of the `OBJECT_TYPE/PERSON/PASSPORT` + // finding is not. + repeated InfoType info_types = 1; + + // Required. Minimum likelihood of the + // `adjust_by_image_findings.info_types` finding. If the likelihood is + // lower than this value, Sensitive Data Protection doesn't adjust the + // likelihood of the `InspectionRuleSet.info_types` finding. + Likelihood min_likelihood = 2; + + // Specifies the required spatial relationship between the bounding boxes + // of the target finding and the context infoType findings. + ImageContainmentType image_containment_type = 3; +} + +// Rule that specifies conditions when a certain infoType's finding details +// should be adjusted. +message AdjustmentRule { + // Condition under which the adjustment rule is applied. + oneof conditions { + // Set of infoTypes for which findings would affect this rule. + AdjustByMatchingInfoTypes adjust_by_matching_info_types = 1; + + // AdjustmentRule condition for image findings. + AdjustByImageFindings adjust_by_image_findings = 3; + } + + // Likelihood adjustment to apply to the infoType. + CustomInfoType.DetectionRule.LikelihoodAdjustment likelihood_adjustment = 2; +} + +// A single inspection rule to be applied to infoTypes, specified in +// `InspectionRuleSet`. +message InspectionRule { + // Inspection rule types. + oneof type { + // Hotword-based detection rule. + CustomInfoType.DetectionRule.HotwordRule hotword_rule = 1; + + // Exclusion rule. + ExclusionRule exclusion_rule = 2; + + // Adjustment rule. + AdjustmentRule adjustment_rule = 3; + } +} + +// Rule set for modifying a set of infoTypes to alter behavior under certain +// circumstances, depending on the specific details of the rules within the set. +message InspectionRuleSet { + // List of infoTypes this rule set is applied to. + repeated InfoType info_types = 1; + + // Set of rules to be applied to infoTypes. The rules are applied in order. + repeated InspectionRule rules = 2; +} + +// Configuration description of the scanning process. +// When used with redactContent only info_types and min_likelihood are currently +// used. +message InspectConfig { + // Configuration for setting a minimum likelihood per infotype. Used to + // customize the minimum likelihood level for specific infotypes in the + // request. For example, use this if you want to lower the precision for + // PERSON_NAME without lowering the precision for the other infotypes in the + // request. + message InfoTypeLikelihood { + // Type of information the likelihood threshold applies to. Only one + // likelihood per info_type should be provided. If InfoTypeLikelihood does + // not have an info_type, the configuration fails. + InfoType info_type = 1; + + // Only returns findings equal to or above this threshold. This field is + // required or else the configuration fails. + Likelihood min_likelihood = 2; + } + + // Configuration to control the number of findings returned for inspection. + // This is not used for de-identification or data profiling. + // + // When redacting sensitive data from images, finding limits don't apply. They + // can cause unexpected or inconsistent results, where only some data is + // redacted. Don't include finding limits in + // [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage] + // requests. Otherwise, Cloud DLP returns an error. + message FindingLimits { + // Max findings configuration per infoType, per content item or long + // running DlpJob. + message InfoTypeLimit { + // Type of information the findings limit applies to. Only one limit per + // info_type should be provided. If InfoTypeLimit does not have an + // info_type, the DLP API applies the limit against all info_types that + // are found but not specified in another InfoTypeLimit. + InfoType info_type = 1; + + // Max findings limit for the given infoType. + int32 max_findings = 2; + } + + // Max number of findings that are returned for each item scanned. + // + // When set within an + // [InspectContentRequest][google.privacy.dlp.v2.InspectContentRequest], + // this field is ignored. + // + // This value isn't a hard limit. If the number of findings for an item + // reaches this limit, the inspection of that item ends gradually, not + // abruptly. Therefore, the actual number of findings that Cloud DLP returns + // for the item can be multiple times higher than this value. + int32 max_findings_per_item = 1; + + // Max number of findings that are returned per request or job. + // + // If you set this field in an + // [InspectContentRequest][google.privacy.dlp.v2.InspectContentRequest], the + // resulting maximum value is the value that you set or 3,000, whichever is + // lower. + // + // This value isn't a hard limit. If an inspection reaches this limit, the + // inspection ends gradually, not abruptly. Therefore, the actual number of + // findings that Cloud DLP returns can be multiple times higher than this + // value. + int32 max_findings_per_request = 2; + + // Configuration of findings limit given for specified infoTypes. + repeated InfoTypeLimit max_findings_per_info_type = 3; + } + + // Restricts what info_types to look for. The values must correspond to + // InfoType values returned by ListInfoTypes or listed at + // https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference. + // + // When no InfoTypes or CustomInfoTypes are specified in a request, the + // system may automatically choose a default list of detectors to run, which + // may change over time. + // + // If you need precise control and predictability as to what detectors are + // run you should specify specific InfoTypes listed in the reference, + // otherwise a default list will be used, which may change over time. + repeated InfoType info_types = 1; + + // Only returns findings equal to or above this threshold. The default is + // POSSIBLE. + // + // In general, the highest likelihood setting yields the fewest findings in + // results and the lowest chance of a false positive. For more information, + // see [Match + // likelihood](https://cloud.google.com/sensitive-data-protection/docs/likelihood). + Likelihood min_likelihood = 2; + + // Minimum likelihood per infotype. For each infotype, a user can specify a + // minimum likelihood. The system only returns a finding if its likelihood is + // above this threshold. If this field is not set, the system uses the + // InspectConfig min_likelihood. + repeated InfoTypeLikelihood min_likelihood_per_info_type = 11; + + // Configuration to control the number of findings returned. + // This is not used for data profiling. + // + // When redacting sensitive data from images, finding limits don't apply. They + // can cause unexpected or inconsistent results, where only some data is + // redacted. Don't include finding limits in + // [RedactImage][google.privacy.dlp.v2.DlpService.RedactImage] + // requests. Otherwise, Cloud DLP returns an error. + // + // When set within an + // [InspectJobConfig][google.privacy.dlp.v2.InspectJobConfig], the specified + // maximum values aren't hard limits. If an inspection job reaches these + // limits, the job ends gradually, not abruptly. Therefore, the actual number + // of findings that Cloud DLP returns can be multiple times higher than these + // maximum values. + FindingLimits limits = 3; + + // When true, a contextual quote from the data that triggered a finding is + // included in the response; see + // [Finding.quote][google.privacy.dlp.v2.Finding.quote]. This is not used for + // data profiling. + bool include_quote = 4; + + // When true, excludes type information of the findings. + // This is not used for data profiling. + bool exclude_info_types = 5; + + // CustomInfoTypes provided by the user. See + // https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes + // to learn more. + repeated CustomInfoType custom_info_types = 6; + + // Deprecated and unused. + repeated ContentOption content_options = 8; + + // Set of rules to apply to the findings for this InspectConfig. + // Exclusion rules, contained in the set are executed in the end, other + // rules are executed in the order they are specified for each info type. Not + // supported for the `metadata_key_value_expression` CustomInfoType. + repeated InspectionRuleSet rule_set = 10; +} + +// Container for bytes to inspect or redact. +message ByteContentItem { + // The type of data being sent for inspection. To learn more, see + // [Supported file + // types](https://cloud.google.com/sensitive-data-protection/docs/supported-file-types). + // + // Only the first frame of each multiframe image is inspected. Metadata and + // other frames aren't inspected. + enum BytesType { + // Unused + BYTES_TYPE_UNSPECIFIED = 0; + + // Any image type. + IMAGE = 6; + + // jpeg + IMAGE_JPEG = 1; + + // bmp + IMAGE_BMP = 2; + + // png + IMAGE_PNG = 3; + + // svg + IMAGE_SVG = 4; + + // plain text + TEXT_UTF8 = 5; + + // docx, docm, dotx, dotm + WORD_DOCUMENT = 7; + + // pdf + PDF = 8; + + // pptx, pptm, potx, potm, pot + POWERPOINT_DOCUMENT = 9; + + // xlsx, xlsm, xltx, xltm + EXCEL_DOCUMENT = 10; + + // avro + AVRO = 11; + + // csv + CSV = 12; + + // tsv + TSV = 13; + + // Audio file types. Only used for profiling. + AUDIO = 15; + + // Video file types. Only used for profiling. + VIDEO = 16; + + // Executable file types. Only used for profiling. + EXECUTABLE = 17; + + // AI model file types. Only used for profiling. + AI_MODEL = 18; + } + + // The type of data stored in the bytes string. Default will be TEXT_UTF8. + BytesType type = 1; + + // Content data to inspect or redact. + bytes data = 2; +} + +// Type of content to inspect. +message ContentItem { + // Data of the item either in the byte array or UTF-8 string form, or table. + oneof data_item { + // String data to inspect or redact. + string value = 3; + + // Structured content for inspection. See + // https://cloud.google.com/sensitive-data-protection/docs/inspecting-text#inspecting_a_table + // to learn more. + Table table = 4; + + // Content data to inspect or redact. Replaces `type` and `data`. + ByteContentItem byte_item = 5; + + // Represents a conversation (either complete or a slice). + // It is assumed that all included messages are contiguous and ordered in + // chronological order. + Conversation conversation = 7; + + // Represents a batch of items to inspect. + BatchContentItem batch_content_item = 8; + } + + // User provided metadata for the content. + ContentMetadata content_metadata = 6; +} + +// Metadata on content to be scanned. +message ContentMetadata { + // User provided key-value pairs of content metadata. + repeated KeyValueMetadataProperty properties = 2; +} + +// Complete conversation or slice of a conversation. +// It is assumed that all included messages are contiguous and ordered in +// chronological order. +message Conversation { + // Messages exchanged within this conversation. + // The maximum number of messages allowed is 50k. + // The order of the messages is assumed to be chronological and will be used + // to index findings in the response. + repeated ConversationMessage messages = 1; +} + +// Single message in a conversation. +message ConversationMessage { + // The type of message. + // New values may be added in the future. + enum MessageType { + // Unused. + MESSAGE_TYPE_UNSPECIFIED = 0; + + // Message contains content to be inspected. + CONTENT = 1; + + // Message contains context only and will not have findings reported from + // it during inspection or redacted from it during de-identification. + CONTEXT = 2; + } + + // The contents of this message. + string content = 1; + + // The type of message. + MessageType message_type = 2; + + // Optional. The identifier of the participant, + // for example 'test-user' or 'gemini'. + // The participant ID can contain lowercase letters, numbers, and hyphens; + // that is, it must match the regular expression: + // `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + // The maximum length is 63 characters. + string participant_id = 3; +} + +// Represents a batch of content to inspect or redact. +message BatchContentItem { + // Represents the batch to inspect or redact. + oneof batch { + // Optional. Represents a batch of string values to inspect or redact. + StringValueBatch string_value_batch = 1 + [(google.api.field_behavior) = OPTIONAL]; + } +} + +// Represents a batch of string values to inspect or redact. +message StringValueBatch { + // Optional. Represents string data to inspect or redact. + repeated string values = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Structured content to inspect. Up to 50,000 `Value`s per request allowed. See +// https://cloud.google.com/sensitive-data-protection/docs/inspecting-structured-text#inspecting_a_table +// to learn more. +message Table { + // Values of the row. + message Row { + // Individual cells. + repeated Value values = 1; + } + + // Headers of the table. + repeated FieldId headers = 1; + + // Rows of the table. + repeated Row rows = 2; +} + +// A key-value pair in the Metadata. +message KeyValueMetadataProperty { + // The key of the property. + string key = 1; + + // The value of the property. + string value = 2; +} + +// All the findings for a single scanned item. +message InspectResult { + // List of findings for an item. + repeated Finding findings = 1; + + // 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. + bool findings_truncated = 2; +} + +// Represents a piece of potentially sensitive content. +message Finding { + option (google.api.resource) = { + type: "dlp.googleapis.com/Finding" + pattern: "projects/{project}/locations/{location}/findings/{finding}" + }; + + // Resource name in format + // projects/{project}/locations/{location}/findings/{finding} Populated only + // when viewing persisted findings. + string name = 14; + + // The content that was found. Even if the content is not textual, it + // may be converted to a textual representation here. + // Provided if `include_quote` is true and the finding is + // less than or equal to 4096 bytes long. If the finding exceeds 4096 bytes + // in length, the quote may be omitted. + string quote = 1; + + // The type of content that might have been found. + // Provided if `excluded_types` is false. + InfoType info_type = 2; + + // Confidence of how likely it is that the `info_type` is correct. + Likelihood likelihood = 3; + + // Where the content was found. + Location location = 4; + + // Timestamp when finding was detected. + google.protobuf.Timestamp create_time = 6; + + // Contains data parsed from quotes. Only populated if include_quote was set + // to true and a supported infoType was requested. Currently supported + // infoTypes: DATE, DATE_OF_BIRTH and TIME. + QuoteInfo quote_info = 7; + + // The job that stored the finding. + string resource_name = 8 + [(google.api.resource_reference) = { type: "dlp.googleapis.com/DlpJob" }]; + + // Job trigger name, if applicable, for this finding. + string trigger_name = 9 [ + (google.api.resource_reference) = { type: "dlp.googleapis.com/JobTrigger" } + ]; + + // The labels associated with this `Finding`. + // + // Label keys must be between 1 and 63 characters long and must conform + // to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. + // + // Label values must be between 0 and 63 characters long and must conform + // to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. + // + // No more than 10 labels can be associated with a given finding. + // + // Examples: + // + // * `"environment" : "production"` + // * `"pipeline" : "etl"` + map labels = 10; + + // Time the job started that produced this finding. + google.protobuf.Timestamp job_create_time = 11; + + // The job that stored the finding. + string job_name = 13 + [(google.api.resource_reference) = { type: "dlp.googleapis.com/DlpJob" }]; + + // The unique finding id. + string finding_id = 15; +} + +// Specifies the location of the finding. +message Location { + // Zero-based byte offsets delimiting the finding. + // These are relative to the finding's containing element. + // Note that when the content is not textual, this references + // the UTF-8 encoded textual representation of the content. + // Omitted if content is an image. + Range byte_range = 1; + + // Unicode character offsets delimiting the finding. + // These are relative to the finding's containing element. + // Provided when the content is text. + Range codepoint_range = 2; + + // List of nested objects pointing to the precise location of the finding + // within the file or record. + repeated ContentLocation content_locations = 7; + + // Information about the container where this finding occurred, if available. + Container container = 8; +} + +// Precise location of the finding within a document, record, image, or metadata +// container. +message ContentLocation { + // Name of the container where the finding is located. + // The top level name is the source file name or table name. Names of some + // common storage containers are formatted as follows: + // + // * BigQuery tables: `{project_id}:{dataset_id}.{table_id}` + // * Cloud Storage files: `gs://{bucket}/{path}` + // * Datastore namespace: {namespace} + // + // Nested names could be absent if the embedded object has no string + // identifier (for example, an image contained within a document). + string container_name = 1; + + // Type of the container within the file with location of the finding. + oneof location { + // Location within a row or record of a database table. + RecordLocation record_location = 2; + + // Location within an image's pixels. + ImageLocation image_location = 3; + + // Location data for document files. + DocumentLocation document_location = 5; + + // Location within the metadata for inspected content. + MetadataLocation metadata_location = 8; + + // Location within a conversation. + ConversationLocation conversation_location = 10; + + // Location within a batch of content. + BatchContentLocation batch_content_location = 11; + } + + // Finding container modification timestamp, if applicable. For Cloud Storage, + // this field contains the last file modification timestamp. For a BigQuery + // table, this field contains the last_modified_time property. For Datastore, + // this field isn't populated. + google.protobuf.Timestamp container_timestamp = 6; + + // Finding container version, if available + // ("generation" for Cloud Storage). + string container_version = 7; +} + +// Location within a conversation. +message ConversationLocation { + // If set, indicates that the finding applies to all messages in the + // conversation. + message AllMessages {} + + // The location of the finding within a conversation. + oneof location { + // Matches an index of a message in the conversation provided in the + // request. + int32 message_index = 1; + + // If set, indicates that the finding applies to all messages in the + // conversation. + AllMessages all_messages = 2; + } +} + +// Location within a batch of content. +message BatchContentLocation { + // Matches an index of a batch item in the batch provided in the request. + int32 item_index = 1; +} + +// Metadata Location +message MetadataLocation { + // Type of metadata containing the finding. + MetadataType type = 1; + + // Label of the piece of metadata containing the finding, for example - + // latitude, author, caption. + oneof label { + // Storage metadata. + StorageMetadataLabel storage_label = 3; + + // Metadata key that contains the finding. + KeyValueMetadataLabel key_value_metadata_label = 4; + } +} + +// Storage metadata label to indicate which metadata entry contains findings. +message StorageMetadataLabel { + // Label name. + string key = 1; +} + +// The metadata key that contains a finding. +message KeyValueMetadataLabel { + // The metadata key. The format depends on the source of the metadata. + // + // Example: + // + // - `MSIP_Label_122709e3-8f6b-4860-985f-7f722a94f61e_Enabled` (a Microsoft + // Purview Information Protection key example) + string key = 1; +} + +// Location of a finding within a document. +message DocumentLocation { + // Offset of the line, from the beginning of the file, where the finding + // is located. + int64 file_offset = 1; +} + +// Location of a finding within a row or record. +message RecordLocation { + // Key of the finding. + RecordKey record_key = 1; + + // Field id of the field containing the finding. + FieldId field_id = 2; + + // Location within a `ContentItem.Table`. + TableLocation table_location = 3; +} + +// Location of a finding within a table. +message TableLocation { + // The zero-based index of the row where the finding is located. Only + // populated for resources that have a natural ordering, not BigQuery. In + // BigQuery, to identify the row a finding came from, populate + // BigQueryOptions.identifying_fields with your primary key column names and + // when you store the findings the value of those columns will be stored + // inside of Finding. + int64 row_index = 1; +} + +// Represents a container that may contain DLP findings. +// Examples of a container include a file, table, or database record. +message Container { + // Container type, for example BigQuery or Cloud Storage. + string type = 1; + + // Project where the finding was found. + // Can be different from the project that owns the finding. + string project_id = 2; + + // A string representation of the full container name. + // Examples: + // - BigQuery: 'Project:DataSetId.TableId' + // - Cloud Storage: 'gs://Bucket/folders/filename.txt' + string full_path = 3; + + // The root of the container. + // Examples: + // + // - For BigQuery table `project_id:dataset_id.table_id`, the root is + // `dataset_id` + // - For Cloud Storage file `gs://bucket/folder/filename.txt`, the root + // is `gs://bucket` + string root_path = 4; + + // The rest of the path after the root. + // Examples: + // + // - For BigQuery table `project_id:dataset_id.table_id`, the relative path is + // `table_id` + // - For Cloud Storage file `gs://bucket/folder/filename.txt`, the relative + // path is `folder/filename.txt` + string relative_path = 5; + + // Findings container modification timestamp, if applicable. For Cloud + // Storage, this field contains the last file modification timestamp. For a + // BigQuery table, this field contains the last_modified_time property. For + // Datastore, this field isn't populated. + google.protobuf.Timestamp update_time = 6; + + // Findings container version, if available + // ("generation" for Cloud Storage). + string version = 7; +} + +// Generic half-open interval [start, end) +message Range { + // Index of the first character of the range (inclusive). + int64 start = 1; + + // Index of the last character of the range (exclusive). + int64 end = 2; +} + +// Location of the finding within an image. +message ImageLocation { + // Bounding boxes locating the pixels within the image containing the finding. + repeated BoundingBox bounding_boxes = 1; +} + +// Bounding box encompassing detected text within an image. +message BoundingBox { + // Top coordinate of the bounding box. (0,0) is upper left. + int32 top = 1; + + // Left coordinate of the bounding box. (0,0) is upper left. + int32 left = 2; + + // Width of the bounding box in pixels. + int32 width = 3; + + // Height of the bounding box in pixels. + int32 height = 4; +} + +// Request to search for potentially sensitive info in an image and redact it +// by covering it with a colored rectangle. +message RedactImageRequest { + // Configuration for determining how redaction of images should occur. + message ImageRedactionConfig { + // Type of information to redact from images. + oneof target { + // Only one per info_type should be provided per request. If not + // specified, and redact_all_text is false, the DLP API will redact all + // text that it matches against all info_types that are found, but not + // specified in another ImageRedactionConfig. + InfoType info_type = 1; + + // If true, all text found in the image, regardless whether it matches an + // info_type, is redacted. Only one should be provided. + bool redact_all_text = 2; + } + + // The color to use when redacting content from an image. If not specified, + // the default is black. + Color redaction_color = 3; + } + + // Parent resource name. + // + // The format of this value varies depending on whether you have [specified a + // processing + // location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + // + // + Projects scope, location specified: + // `projects/{project_id}/locations/{location_id}` + // + Projects scope, no location specified (defaults to global): + // `projects/{project_id}` + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [(google.api.resource_reference) = { + child_type: "dlp.googleapis.com/DlpContent" + }]; + + // Deprecated. This field has no effect. + string location_id = 8; + + // Configuration for the inspector. + InspectConfig inspect_config = 2; + + // The configuration for specifying what content to redact from images. + repeated ImageRedactionConfig image_redaction_configs = 5; + + // Whether the response should include findings along with the redacted + // image. + bool include_findings = 6; + + // The content must be PNG, JPEG, SVG or BMP. + ByteContentItem byte_item = 7; + + // The full resource name of the inspection template to use. Settings in the + // main `inspect_config` field override the corresponding settings in this + // inspection template. + // + // The merge behavior is as follows: + // + // - Singular field: The main field's value replaces the value of the + // corresponding field in the template. + // - Repeated fields: The field values are appended to the list defined in + // the template. + // - Sub-messages and groups: The fields are recursively merged. + string inspect_template = 9; + + // The full resource name of the de-identification template to use. Settings + // in the main `image_redaction_configs` field override the corresponding + // settings in this de-identification template. The request fails if the + // type of the template's deidentify_config is not image_transformations. + string deidentify_template = 10; +} + +// Represents a color in the RGB color space. +message Color { + // The amount of red in the color as a value in the interval [0, 1]. + float red = 1; + + // The amount of green in the color as a value in the interval [0, 1]. + float green = 2; + + // The amount of blue in the color as a value in the interval [0, 1]. + float blue = 3; +} + +// Results of redacting an image. +message RedactImageResponse { + // The redacted image. The type will be the same as the original image. + bytes redacted_image = 1; + + // If an image was being inspected and the InspectConfig's include_quote was + // set to true, then this field will include all text, if any, that was found + // in the image. + string extracted_text = 2; + + // The findings. Populated when include_findings in the request is true. + InspectResult inspect_result = 3; +} + +// Request to de-identify a ContentItem. +message DeidentifyContentRequest { + // Parent resource name. + // + // The format of this value varies depending on whether you have [specified a + // processing + // location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + // + // + Projects scope, location specified: + // `projects/{project_id}/locations/{location_id}` + // + Projects scope, no location specified (defaults to global): + // `projects/{project_id}` + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [(google.api.resource_reference) = { + child_type: "dlp.googleapis.com/DlpContent" + }]; + + // Configuration for the de-identification of the content item. + // Items specified here will override the template referenced by the + // deidentify_template_name argument. + DeidentifyConfig deidentify_config = 2; + + // Configuration for the inspector. + // Items specified here will override the template referenced by the + // inspect_template_name argument. + InspectConfig inspect_config = 3; + + // The item to de-identify. Will be treated as text. + // + // This value must be of type + // [Table][google.privacy.dlp.v2.Table] if your + // [deidentify_config][google.privacy.dlp.v2.DeidentifyContentRequest.deidentify_config] + // is a + // [RecordTransformations][google.privacy.dlp.v2.RecordTransformations] + // object. + ContentItem item = 4; + + // Template to use. Any configuration directly specified in + // inspect_config will override those set in the template. Singular fields + // that are set in this request will replace their corresponding fields in the + // template. Repeated fields are appended. Singular sub-messages and groups + // are recursively merged. + string inspect_template_name = 5; + + // Template to use. Any configuration directly specified in + // deidentify_config will override those set in the template. Singular fields + // that are set in this request will replace their corresponding fields in the + // template. Repeated fields are appended. Singular sub-messages and groups + // are recursively merged. + string deidentify_template_name = 6; + + // Deprecated. This field has no effect. + string location_id = 7; +} + +// Results of de-identifying a ContentItem. +message DeidentifyContentResponse { + // The de-identified item. + ContentItem item = 1; + + // An overview of the changes that were made on the `item`. + TransformationOverview overview = 2; +} + +// Request to re-identify an item. +message ReidentifyContentRequest { + // Required. Parent resource name. + // + // The format of this value varies depending on whether you have [specified a + // processing + // location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + // + // + Projects scope, location specified: + // `projects/{project_id}/locations/{location_id}` + // + Projects scope, no location specified (defaults to global): + // `projects/{project_id}` + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/DlpContent" + } + ]; + + // Configuration for the re-identification of the content item. + // This field shares the same proto message type that is used for + // de-identification, however its usage here is for the reversal of the + // previous de-identification. Re-identification is performed by examining + // the transformations used to de-identify the items and executing the + // reverse. This requires that only reversible transformations + // be provided here. The reversible transformations are: + // + // - `CryptoDeterministicConfig` + // - `CryptoReplaceFfxFpeConfig` + DeidentifyConfig reidentify_config = 2; + + // Configuration for the inspector. + InspectConfig inspect_config = 3; + + // The item to re-identify. Will be treated as text. + ContentItem item = 4; + + // Template to use. Any configuration directly specified in + // `inspect_config` will override those set in the template. Singular fields + // that are set in this request will replace their corresponding fields in the + // template. Repeated fields are appended. Singular sub-messages and groups + // are recursively merged. + string inspect_template_name = 5; + + // Template to use. References an instance of `DeidentifyTemplate`. + // Any configuration directly specified in `reidentify_config` or + // `inspect_config` will override those set in the template. The + // `DeidentifyTemplate` used must include only reversible transformations. + // Singular fields that are set in this request will replace their + // corresponding fields in the template. Repeated fields are appended. + // Singular sub-messages and groups are recursively merged. + string reidentify_template_name = 6; + + // Deprecated. This field has no effect. + string location_id = 7; +} + +// Results of re-identifying an item. +message ReidentifyContentResponse { + // The re-identified item. + ContentItem item = 1; + + // An overview of the changes that were made to the `item`. + TransformationOverview overview = 2; +} + +// Request to search for potentially sensitive info in a ContentItem. +message InspectContentRequest { + // Parent resource name. + // + // The format of this value varies depending on whether you have [specified a + // processing + // location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + // + // + Projects scope, location specified: + // `projects/{project_id}/locations/{location_id}` + // + Projects scope, no location specified (defaults to global): + // `projects/{project_id}` + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [(google.api.resource_reference) = { + child_type: "dlp.googleapis.com/DlpContent" + }]; + + // Configuration for the inspector. What specified here will override + // the template referenced by the inspect_template_name argument. + InspectConfig inspect_config = 2; + + // The item to inspect. + ContentItem item = 3; + + // Template to use. Any configuration directly specified in + // inspect_config will override those set in the template. Singular fields + // that are set in this request will replace their corresponding fields in the + // template. Repeated fields are appended. Singular sub-messages and groups + // are recursively merged. + string inspect_template_name = 4; + + // Deprecated. This field has no effect. + string location_id = 5; +} + +// Results of inspecting an item. +message InspectContentResponse { + // The findings. + InspectResult result = 1; +} + +// Cloud repository for storing output. +message OutputStorageConfig { + // Predefined schemas for storing findings. + // Only for use with external storage. + enum OutputSchema { + // Unused. + OUTPUT_SCHEMA_UNSPECIFIED = 0; + + // Basic schema including only `info_type`, `quote`, `certainty`, and + // `timestamp`. + BASIC_COLUMNS = 1; + + // Schema tailored to findings from scanning Cloud Storage. + GCS_COLUMNS = 2; + + // Schema tailored to findings from scanning Google Datastore. + DATASTORE_COLUMNS = 3; + + // Schema tailored to findings from scanning Google BigQuery. + BIG_QUERY_COLUMNS = 4; + + // Schema containing all columns. + ALL_COLUMNS = 5; + } + + // Output storage types. + // * + oneof type { + // Store findings in an existing table or a new table in an existing + // dataset. If table_id is not set a new one will be generated + // for you with the following format: + // dlp_googleapis_yyyy_mm_dd_[dlp_job_id]. Pacific time zone will be used + // for generating the date details. + // + // For Inspect, each column in an existing output table must have the same + // name, type, and mode of a field in the `Finding` object. + // + // For Risk, an existing output table should be the output of a previous + // Risk analysis job run on the same source table, with the same privacy + // metric and quasi-identifiers. Risk jobs that analyze the same table but + // compute a different privacy metric, or use different sets of + // quasi-identifiers, cannot store their results in the same table. + BigQueryTable table = 1; + + // Store findings in an existing Cloud Storage bucket. Files will be + // generated with the job ID and file part number as the filename and will + // contain findings in textproto format as + // [SaveToGcsFindingsOutput][google.privacy.dlp.v2.SaveToGcsFindingsOutput]. + // The filename will follow the naming convention `-`. + // Example: `my-job-id-2`. + // + // Supported for [Inspect jobs][google.privacy.dlp.v2.InspectJobConfig]. The + // bucket must not be the same as the bucket being inspected. If storing + // findings to Cloud Storage, the output schema field should not be set. If + // set, it will be ignored. + CloudStoragePath storage_path = 5; + } + + // Schema used for writing the findings for Inspect jobs. This field is only + // used for Inspect and must be unspecified for Risk jobs. Columns are derived + // from the `Finding` object. If appending to an existing table, any columns + // from the predefined schema that are missing will be added. No columns in + // the existing table will be deleted. + // + // If unspecified, then all available columns will be used for a new table or + // an (existing) table with no schema, and no changes will be made to an + // existing table that has a schema. + // Only for use with external storage. + OutputSchema output_schema = 3; +} + +// Statistics regarding a specific InfoType. +message InfoTypeStats { + // The type of finding this stat is for. + InfoType info_type = 1; + + // Number of findings for this infoType. + int64 count = 2; +} + +// The results of an inspect DataSource job. +message InspectDataSourceDetails { + // Snapshot of the inspection configuration. + message RequestedOptions { + // If run with an InspectTemplate, a snapshot of its state at the time of + // this run. + InspectTemplate snapshot_inspect_template = 1; + + // Inspect config. + InspectJobConfig job_config = 3; + } + + // All Result fields are updated while the job is processing. + message Result { + // Total size in bytes that were processed. + int64 processed_bytes = 1; + + // Estimate of the number of bytes to process. + int64 total_estimated_bytes = 2; + + // Statistics of how many instances of each info type were found during + // inspect job. + repeated InfoTypeStats info_type_stats = 3; + + // Number of rows scanned after sampling and time filtering (applicable for + // row based stores such as BigQuery). + int64 num_rows_processed = 5; + + // Statistics related to the processing of hybrid inspect. + HybridInspectStatistics hybrid_stats = 7; + } + + // The configuration used for this job. + RequestedOptions requested_options = 2; + + // A summary of the outcome of this inspection job. + Result result = 3; +} + +// The schema of data to be saved to the BigQuery table when the +// `DataProfileAction` is enabled. +message DataProfileBigQueryRowSchema { + // Data profile type. + oneof data_profile { + // Table data profile column + TableDataProfile table_profile = 1; + + // Column data profile column + ColumnDataProfile column_profile = 2; + + // File store data profile column. + FileStoreDataProfile file_store_profile = 3; + } +} + +// Statistics related to processing hybrid inspect requests. +message HybridInspectStatistics { + // The number of hybrid inspection requests processed within this job. + int64 processed_count = 1; + + // The number of hybrid inspection requests aborted because the job ran + // out of quota or was ended before they could be processed. + int64 aborted_count = 2; + + // The number of hybrid requests currently being processed. Only populated + // when called via method `getDlpJob`. + // A burst of traffic may cause hybrid inspect requests to be enqueued. + // Processing will take place as quickly as possible, but resource limitations + // may impact how long a request is enqueued for. + int64 pending_count = 3; +} + +// The results of an [Action][google.privacy.dlp.v2.Action]. +message ActionDetails { + // Summary of what occurred in the actions. + oneof details { + // Outcome of a de-identification action. + DeidentifyDataSourceDetails deidentify_details = 1; + } +} + +// Summary of what was modified during a transformation. +message DeidentifyDataSourceStats { + // Total size in bytes that were transformed in some way. + int64 transformed_bytes = 1; + + // Number of successfully applied transformations. + int64 transformation_count = 2; + + // Number of errors encountered while trying to apply transformations. + int64 transformation_error_count = 3; +} + +// The results of a [Deidentify][google.privacy.dlp.v2.Action.Deidentify] action +// from an inspect job. +message DeidentifyDataSourceDetails { + // De-identification options. + message RequestedDeidentifyOptions { + // Snapshot of the state of the `DeidentifyTemplate` from the + // [Deidentify][google.privacy.dlp.v2.Action.Deidentify] action at the time + // this job was run. + DeidentifyTemplate snapshot_deidentify_template = 1; + + // Snapshot of the state of the structured `DeidentifyTemplate` from the + // `Deidentify` action at the time this job was run. + DeidentifyTemplate snapshot_structured_deidentify_template = 2; + + // Snapshot of the state of the image transformation `DeidentifyTemplate` + // from the `Deidentify` action at the time this job was run. + DeidentifyTemplate snapshot_image_redact_template = 3; + } + + // De-identification config used for the request. + RequestedDeidentifyOptions requested_options = 1; + + // Stats about the de-identification operation. + DeidentifyDataSourceStats deidentify_stats = 2; +} + +// Locations at which a feature can be used. +message LocationSupport { + // The location scope for a feature. + enum RegionalizationScope { + // Invalid. + REGIONALIZATION_SCOPE_UNSPECIFIED = 0; + + // Feature may be used with one or more regions. See locations for details. + REGIONAL = 1; + + // Feature may be used anywhere. Default value. + ANY_LOCATION = 2; + } + + // The current scope for location on this feature. This may expand over time. + RegionalizationScope regionalization_scope = 1; + + // Specific locations where the feature may be used. + // Examples: us-central1, us, asia, global + // If scope is ANY_LOCATION, no regions will be listed. + repeated string locations = 2; +} + +// InfoType description. +message InfoTypeDescription { + // The launch status of an infoType. + enum InfoTypeLaunchStatus { + // Unspecified. + INFO_TYPE_LAUNCH_STATUS_UNSPECIFIED = 0; + + // InfoType is generally available. + GENERAL_AVAILABILITY = 1; + + // InfoType is in public preview. + PUBLIC_PREVIEW = 2; + + // InfoType is in private preview. + PRIVATE_PREVIEW = 3; + } + + // Internal name of the infoType. + string name = 1; + + // Human readable form of the infoType name. + string display_name = 2; + + // Which parts of the API supports this InfoType. + repeated InfoTypeSupportedBy supported_by = 3; + + // Description of the infotype. Translated when language is provided in the + // request. + string description = 4; + + // Locations at which this feature can be used. May change over time. + LocationSupport location_support = 6; + + // A sample that is a true positive for this infoType. + string example = 8; + + // A list of available versions for the infotype. + repeated VersionDescription versions = 9; + + // The category of the infoType. + repeated InfoTypeCategory categories = 10; + + // The default sensitivity of the infoType. + SensitivityScore sensitivity_score = 11; + + // If this field is set, this infoType is a general infoType and these + // specific infoTypes are contained within it. + // General infoTypes are infoTypes that encompass multiple specific infoTypes. + // For example, the "GEOGRAPHIC_DATA" general infoType would have set for this + // field "LOCATION", "LOCATION_COORDINATES", and "STREET_ADDRESS". + repeated string specific_info_types = 12; + + // The launch status of the infoType. + InfoTypeLaunchStatus launch_status = 13; +} + +// Classification of infoTypes to organize them according to geographic +// location, industry, and data type. +message InfoTypeCategory { + // Enum of the current locations. + // We might add more locations in the future. + enum LocationCategory { + // Unused location + LOCATION_UNSPECIFIED = 0; + + // The infoType is not issued by or tied to a specific region, but is used + // almost everywhere. + GLOBAL = 1; + + // The infoType is typically used in Argentina. + ARGENTINA = 2; + + // The infoType is typically used in Armenia. + ARMENIA = 51; + + // The infoType is typically used in Australia. + AUSTRALIA = 3; + + // The infoType is typically used in Austria. + AUSTRIA = 53; + + // The infoType is typically used in Azerbaijan. + AZERBAIJAN = 48; + + // The infoType is typically used in Belarus. + BELARUS = 50; + + // The infoType is typically used in Belgium. + BELGIUM = 4; + + // The infoType is typically used in Brazil. + BRAZIL = 5; + + // The infoType is typically used in Canada. + CANADA = 6; + + // The infoType is typically used in Chile. + CHILE = 7; + + // The infoType is typically used in China. + CHINA = 8; + + // The infoType is typically used in Colombia. + COLOMBIA = 9; + + // The infoType is typically used in Croatia. + CROATIA = 42; + + // The infoType is typically used in Czechia. + CZECHIA = 52; + + // The infoType is typically used in Denmark. + DENMARK = 10; + + // The infoType is typically used in France. + FRANCE = 11; + + // The infoType is typically used in Finland. + FINLAND = 12; + + // The infoType is typically used in Germany. + GERMANY = 13; + + // The infoType is typically used in Hong Kong. + HONG_KONG = 14; + + // The infoType is typically used in India. + INDIA = 15; + + // The infoType is typically used in Indonesia. + INDONESIA = 16; + + // The infoType is typically used in Ireland. + IRELAND = 17; + + // The infoType is typically used in Israel. + ISRAEL = 18; + + // The infoType is typically used in Italy. + ITALY = 19; + + // The infoType is typically used in Japan. + JAPAN = 20; + + // The infoType is typically used in Kazakhstan. + KAZAKHSTAN = 47; + + // The infoType is typically used in Korea. + KOREA = 21; + + // The infoType is typically used in Mexico. + MEXICO = 22; + + // The infoType is typically used in the Netherlands. + THE_NETHERLANDS = 23; + + // The infoType is typically used in New Zealand. + NEW_ZEALAND = 41; + + // The infoType is typically used in Norway. + NORWAY = 24; + + // The infoType is typically used in Paraguay. + PARAGUAY = 25; + + // The infoType is typically used in Peru. + PERU = 26; + + // The infoType is typically used in Poland. + POLAND = 27; + + // The infoType is typically used in Portugal. + PORTUGAL = 28; + + // The infoType is typically used in Russia. + RUSSIA = 44; + + // The infoType is typically used in Singapore. + SINGAPORE = 29; + + // The infoType is typically used in South Africa. + SOUTH_AFRICA = 30; + + // The infoType is typically used in Spain. + SPAIN = 31; + + // The infoType is typically used in Sweden. + SWEDEN = 32; + + // The infoType is typically used in Switzerland. + SWITZERLAND = 43; + + // The infoType is typically used in Taiwan. + TAIWAN = 33; + + // The infoType is typically used in Thailand. + THAILAND = 34; + + // The infoType is typically used in Turkey. + TURKEY = 35; + + // The infoType is typically used in Ukraine. + UKRAINE = 45; + + // The infoType is typically used in the United Kingdom. + UNITED_KINGDOM = 36; + + // The infoType is typically used in the United States. + UNITED_STATES = 37; + + // The infoType is typically used in Uruguay. + URUGUAY = 38; + + // The infoType is typically used in Uzbekistan. + UZBEKISTAN = 46; + + // The infoType is typically used in Venezuela. + VENEZUELA = 39; + + // The infoType is typically used in Google internally. + INTERNAL = 40; + } + + // Enum of the current industries in the category. + // We might add more industries in the future. + enum IndustryCategory { + // Unused industry + INDUSTRY_UNSPECIFIED = 0; + + // The infoType is typically used in the finance industry. + FINANCE = 1; + + // The infoType is typically used in the health industry. + HEALTH = 2; + + // The infoType is typically used in the telecommunications industry. + TELECOMMUNICATIONS = 3; + } + + // Enum of the current types in the category. + // We might add more types in the future. + enum TypeCategory { + // Unused type + TYPE_UNSPECIFIED = 0; + + // Personally identifiable information, for example, a + // name or phone number + PII = 1; + + // Personally identifiable information that is especially sensitive, for + // example, a passport number. + SPII = 2; + + // Attributes that can partially identify someone, especially in + // combination with other attributes, like age, height, and gender. + DEMOGRAPHIC = 3; + + // Confidential or secret information, for example, a password. + CREDENTIAL = 4; + + // An identification document issued by a government. + GOVERNMENT_ID = 5; + + // A document, for example, a resume or source code. + DOCUMENT = 6; + + // Information that is not sensitive on its own, but provides details about + // the circumstances surrounding an entity or an event. + CONTEXTUAL_INFORMATION = 7; + + // Category for `CustomInfoType` types. + CUSTOM = 8; + } + + // Categories of infotypes. + oneof category { + // The region or country that issued the ID or document represented by the + // infoType. + LocationCategory location_category = 1; + + // The group of relevant businesses where this infoType is commonly used + IndustryCategory industry_category = 2; + + // The class of identifiers where this infoType belongs + TypeCategory type_category = 3; + } +} + +// Details about each available version for an infotype. +message VersionDescription { + // Name of the version + string version = 1; + + // Description of the version. + string description = 2; +} + +// Request for the list of infoTypes. +message ListInfoTypesRequest { + // The parent resource name. + // + // The format of this value is as follows: + // + // `locations/{location_id}` + string parent = 4; + + // BCP-47 language code for localized infoType friendly + // names. If omitted, or if localized strings are not available, + // en-US strings will be returned. + string language_code = 1; + + // filter to only return infoTypes supported by certain parts of the + // API. Defaults to supported_by=INSPECT. + string filter = 2; + + // Deprecated. This field has no effect. + string location_id = 3; +} + +// Response to the ListInfoTypes request. +message ListInfoTypesResponse { + // Set of sensitive infoTypes. + repeated InfoTypeDescription info_types = 1; +} + +// Configuration for a risk analysis job. See +// https://cloud.google.com/sensitive-data-protection/docs/concepts-risk-analysis +// to learn more. +message RiskAnalysisJobConfig { + // Privacy metric to compute. + PrivacyMetric privacy_metric = 1; + + // Input dataset to compute metrics over. + BigQueryTable source_table = 2; + + // Actions to execute at the completion of the job. Are executed in the order + // provided. + repeated Action actions = 3; +} + +// A column with a semantic tag attached. +message QuasiId { + // Required. Identifies the column. + FieldId field = 1 [(google.api.field_behavior) = REQUIRED]; + + // Semantic tag that identifies what a column contains, to determine which + // statistical model to use to estimate the reidentifiability of each + // value. [required] + oneof tag { + // A column can be tagged with a InfoType to use the relevant public + // dataset as a statistical model of population, if available. We + // currently support US ZIP codes, region codes, ages and genders. + // To programmatically obtain the list of supported InfoTypes, use + // ListInfoTypes with the supported_by=RISK_ANALYSIS filter. + InfoType info_type = 2; + + // A column can be tagged with a custom tag. In this case, the user must + // indicate an auxiliary table that contains statistical information on + // the possible values of this column. + string custom_tag = 3; + + // If no semantic tag is indicated, we infer the statistical model from + // the distribution of values in the input data + google.protobuf.Empty inferred = 4; + } +} + +// An auxiliary table containing statistical information on the relative +// frequency of different quasi-identifiers values. It has one or several +// quasi-identifiers columns, and one column that indicates the relative +// frequency of each quasi-identifier tuple. +// If a tuple is present in the data but not in the auxiliary table, the +// corresponding relative frequency is assumed to be zero (and thus, the +// tuple is highly reidentifiable). +message StatisticalTable { + // A quasi-identifier column has a custom_tag, used to know which column + // in the data corresponds to which column in the statistical model. + message QuasiIdentifierField { + // Identifies the column. + FieldId field = 1; + + // A column can be tagged with a custom tag. In this case, the user must + // indicate an auxiliary table that contains statistical information on + // the possible values of this column. + string custom_tag = 2; + } + + // Required. Auxiliary table location. + BigQueryTable table = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Quasi-identifier columns. + repeated QuasiIdentifierField quasi_ids = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The relative frequency column must contain a floating-point + // number between 0 and 1 (inclusive). Null values are assumed to be zero. + FieldId relative_frequency = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Privacy metric to compute for reidentification risk analysis. +message PrivacyMetric { + // Compute numerical stats over an individual column, including + // min, max, and quantiles. + message NumericalStatsConfig { + // Field to compute numerical stats on. Supported types are + // integer, float, date, datetime, timestamp, time. + FieldId field = 1; + } + + // Compute numerical stats over an individual column, including + // number of distinct values and value count distribution. + message CategoricalStatsConfig { + // Field to compute categorical stats on. All column types are + // supported except for arrays and structs. However, it may be more + // informative to use NumericalStats when the field type is supported, + // depending on the data. + FieldId field = 1; + } + + // k-anonymity metric, used for analysis of reidentification risk. + message KAnonymityConfig { + // Set of fields to compute k-anonymity over. When multiple fields are + // specified, they are considered a single composite key. Structs and + // repeated data types are not supported; however, nested fields are + // supported so long as they are not structs themselves or nested within + // a repeated field. + repeated FieldId quasi_ids = 1; + + // Message indicating that multiple rows might be associated to a + // single individual. If the same entity_id is associated to multiple + // quasi-identifier tuples over distinct rows, we consider the entire + // collection of tuples as the composite quasi-identifier. This collection + // is a multiset: the order in which the different tuples appear in the + // dataset is ignored, but their frequency is taken into account. + // + // Important note: a maximum of 1000 rows can be associated to a single + // entity ID. If more rows are associated with the same entity ID, some + // might be ignored. + EntityId entity_id = 2; + } + + // l-diversity metric, used for analysis of reidentification risk. + message LDiversityConfig { + // Set of quasi-identifiers indicating how equivalence classes are + // defined for the l-diversity computation. When multiple fields are + // specified, they are considered a single composite key. + repeated FieldId quasi_ids = 1; + + // Sensitive field for computing the l-value. + FieldId sensitive_attribute = 2; + } + + // Reidentifiability metric. This corresponds to a risk model similar to what + // is called "journalist risk" in the literature, except the attack dataset is + // statistically modeled instead of being perfectly known. This can be done + // using publicly available data (like the US Census), or using a custom + // statistical model (indicated as one or several BigQuery tables), or by + // extrapolating from the distribution of values in the input dataset. + message KMapEstimationConfig { + // A column with a semantic tag attached. + message TaggedField { + // Required. Identifies the column. + FieldId field = 1 [(google.api.field_behavior) = REQUIRED]; + + // Semantic tag that identifies what a column contains, to determine which + // statistical model to use to estimate the reidentifiability of each + // value. [required] + oneof tag { + // A column can be tagged with a InfoType to use the relevant public + // dataset as a statistical model of population, if available. We + // currently support US ZIP codes, region codes, ages and genders. + // To programmatically obtain the list of supported InfoTypes, use + // ListInfoTypes with the supported_by=RISK_ANALYSIS filter. + InfoType info_type = 2; + + // A column can be tagged with a custom tag. In this case, the user must + // indicate an auxiliary table that contains statistical information on + // the possible values of this column. + string custom_tag = 3; + + // If no semantic tag is indicated, we infer the statistical model from + // the distribution of values in the input data + google.protobuf.Empty inferred = 4; + } + } + + // An auxiliary table contains statistical information on the relative + // frequency of different quasi-identifiers values. It has one or several + // quasi-identifiers columns, and one column that indicates the relative + // frequency of each quasi-identifier tuple. + // If a tuple is present in the data but not in the auxiliary table, the + // corresponding relative frequency is assumed to be zero (and thus, the + // tuple is highly reidentifiable). + message AuxiliaryTable { + // A quasi-identifier column has a custom_tag, used to know which column + // in the data corresponds to which column in the statistical model. + message QuasiIdField { + // Identifies the column. + FieldId field = 1; + + // A auxiliary field. + string custom_tag = 2; + } + + // Required. Auxiliary table location. + BigQueryTable table = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Quasi-identifier columns. + repeated QuasiIdField quasi_ids = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The relative frequency column must contain a floating-point + // number between 0 and 1 (inclusive). Null values are assumed to be zero. + FieldId relative_frequency = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Required. Fields considered to be quasi-identifiers. No two columns can + // have the same tag. + repeated TaggedField quasi_ids = 1 [(google.api.field_behavior) = REQUIRED]; + + // ISO 3166-1 alpha-2 region code to use in the statistical modeling. + // Set if no column is tagged with a region-specific InfoType (like + // US_ZIP_5) or a region code. + string region_code = 2; + + // Several auxiliary tables can be used in the analysis. Each custom_tag + // used to tag a quasi-identifiers column must appear in exactly one column + // of one auxiliary table. + repeated AuxiliaryTable auxiliary_tables = 3; + } + + // δ-presence metric, used to estimate how likely it is for an attacker to + // figure out that one given individual appears in a de-identified dataset. + // Similarly to the k-map metric, we cannot compute δ-presence exactly without + // knowing the attack dataset, so we use a statistical model instead. + message DeltaPresenceEstimationConfig { + // Required. Fields considered to be quasi-identifiers. No two fields can + // have the same tag. + repeated QuasiId quasi_ids = 1 [(google.api.field_behavior) = REQUIRED]; + + // ISO 3166-1 alpha-2 region code to use in the statistical modeling. + // Set if no column is tagged with a region-specific InfoType (like + // US_ZIP_5) or a region code. + string region_code = 2; + + // Several auxiliary tables can be used in the analysis. Each custom_tag + // used to tag a quasi-identifiers field must appear in exactly one + // field of one auxiliary table. + repeated StatisticalTable auxiliary_tables = 3; + } + + // Types of analysis. + oneof type { + // Numerical stats + NumericalStatsConfig numerical_stats_config = 1; + + // Categorical stats + CategoricalStatsConfig categorical_stats_config = 2; + + // K-anonymity + KAnonymityConfig k_anonymity_config = 3; + + // l-diversity + LDiversityConfig l_diversity_config = 4; + + // k-map + KMapEstimationConfig k_map_estimation_config = 5; + + // delta-presence + DeltaPresenceEstimationConfig delta_presence_estimation_config = 6; + } +} + +// Result of a risk analysis operation request. +message AnalyzeDataSourceRiskDetails { + // Result of the numerical stats computation. + message NumericalStatsResult { + // Minimum value appearing in the column. + Value min_value = 1; + + // Maximum value appearing in the column. + Value max_value = 2; + + // List of 99 values that partition the set of field values into 100 equal + // sized buckets. + repeated Value quantile_values = 4; + } + + // Result of the categorical stats computation. + message CategoricalStatsResult { + // Histogram of value frequencies in the column. + message CategoricalStatsHistogramBucket { + // Lower bound on the value frequency of the values in this bucket. + int64 value_frequency_lower_bound = 1; + + // Upper bound on the value frequency of the values in this bucket. + int64 value_frequency_upper_bound = 2; + + // Total number of values in this bucket. + int64 bucket_size = 3; + + // Sample of value frequencies in this bucket. The total number of + // values returned per bucket is capped at 20. + repeated ValueFrequency bucket_values = 4; + + // Total number of distinct values in this bucket. + int64 bucket_value_count = 5; + } + + // Histogram of value frequencies in the column. + repeated CategoricalStatsHistogramBucket value_frequency_histogram_buckets = + 5; + } + + // Result of the k-anonymity computation. + message KAnonymityResult { + // The set of columns' values that share the same ldiversity value + message KAnonymityEquivalenceClass { + // Set of values defining the equivalence class. One value per + // quasi-identifier column in the original KAnonymity metric message. + // The order is always the same as the original request. + repeated Value quasi_ids_values = 1; + + // Size of the equivalence class, for example number of rows with the + // above set of values. + int64 equivalence_class_size = 2; + } + + // Histogram of k-anonymity equivalence classes. + message KAnonymityHistogramBucket { + // Lower bound on the size of the equivalence classes in this bucket. + int64 equivalence_class_size_lower_bound = 1; + + // Upper bound on the size of the equivalence classes in this bucket. + int64 equivalence_class_size_upper_bound = 2; + + // Total number of equivalence classes in this bucket. + int64 bucket_size = 3; + + // Sample of equivalence classes in this bucket. The total number of + // classes returned per bucket is capped at 20. + repeated KAnonymityEquivalenceClass bucket_values = 4; + + // Total number of distinct equivalence classes in this bucket. + int64 bucket_value_count = 5; + } + + // Histogram of k-anonymity equivalence classes. + repeated KAnonymityHistogramBucket equivalence_class_histogram_buckets = 5; + } + + // Result of the l-diversity computation. + message LDiversityResult { + // The set of columns' values that share the same ldiversity value. + message LDiversityEquivalenceClass { + // Quasi-identifier values defining the k-anonymity equivalence + // class. The order is always the same as the original request. + repeated Value quasi_ids_values = 1; + + // Size of the k-anonymity equivalence class. + int64 equivalence_class_size = 2; + + // Number of distinct sensitive values in this equivalence class. + int64 num_distinct_sensitive_values = 3; + + // Estimated frequencies of top sensitive values. + repeated ValueFrequency top_sensitive_values = 4; + } + + // Histogram of l-diversity equivalence class sensitive value frequencies. + message LDiversityHistogramBucket { + // Lower bound on the sensitive value frequencies of the equivalence + // classes in this bucket. + int64 sensitive_value_frequency_lower_bound = 1; + + // Upper bound on the sensitive value frequencies of the equivalence + // classes in this bucket. + int64 sensitive_value_frequency_upper_bound = 2; + + // Total number of equivalence classes in this bucket. + int64 bucket_size = 3; + + // Sample of equivalence classes in this bucket. The total number of + // classes returned per bucket is capped at 20. + repeated LDiversityEquivalenceClass bucket_values = 4; + + // Total number of distinct equivalence classes in this bucket. + int64 bucket_value_count = 5; + } + + // Histogram of l-diversity equivalence class sensitive value frequencies. + repeated LDiversityHistogramBucket + sensitive_value_frequency_histogram_buckets = 5; + } + + // Result of the reidentifiability analysis. Note that these results are an + // estimation, not exact values. + message KMapEstimationResult { + // A tuple of values for the quasi-identifier columns. + message KMapEstimationQuasiIdValues { + // The quasi-identifier values. + repeated Value quasi_ids_values = 1; + + // The estimated anonymity for these quasi-identifier values. + int64 estimated_anonymity = 2; + } + + // A KMapEstimationHistogramBucket message with the following values: + // min_anonymity: 3 + // max_anonymity: 5 + // frequency: 42 + // means that there are 42 records whose quasi-identifier values correspond + // to 3, 4 or 5 people in the overlying population. An important particular + // case is when min_anonymity = max_anonymity = 1: the frequency field then + // corresponds to the number of uniquely identifiable records. + message KMapEstimationHistogramBucket { + // Always positive. + int64 min_anonymity = 1; + + // Always greater than or equal to min_anonymity. + int64 max_anonymity = 2; + + // Number of records within these anonymity bounds. + int64 bucket_size = 5; + + // Sample of quasi-identifier tuple values in this bucket. The total + // number of classes returned per bucket is capped at 20. + repeated KMapEstimationQuasiIdValues bucket_values = 6; + + // Total number of distinct quasi-identifier tuple values in this bucket. + int64 bucket_value_count = 7; + } + + // The intervals [min_anonymity, max_anonymity] do not overlap. If a value + // doesn't correspond to any such interval, the associated frequency is + // zero. For example, the following records: + // {min_anonymity: 1, max_anonymity: 1, frequency: 17} + // {min_anonymity: 2, max_anonymity: 3, frequency: 42} + // {min_anonymity: 5, max_anonymity: 10, frequency: 99} + // mean that there are no record with an estimated anonymity of 4, 5, or + // larger than 10. + repeated KMapEstimationHistogramBucket k_map_estimation_histogram = 1; + } + + // Result of the δ-presence computation. Note that these results are an + // estimation, not exact values. + message DeltaPresenceEstimationResult { + // A tuple of values for the quasi-identifier columns. + message DeltaPresenceEstimationQuasiIdValues { + // The quasi-identifier values. + repeated Value quasi_ids_values = 1; + + // The estimated probability that a given individual sharing these + // quasi-identifier values is in the dataset. This value, typically + // called δ, is the ratio between the number of records in the dataset + // with these quasi-identifier values, and the total number of individuals + // (inside *and* outside the dataset) with these quasi-identifier values. + // For example, if there are 15 individuals in the dataset who share the + // same quasi-identifier values, and an estimated 100 people in the entire + // population with these values, then δ is 0.15. + double estimated_probability = 2; + } + + // A DeltaPresenceEstimationHistogramBucket message with the following + // values: + // min_probability: 0.1 + // max_probability: 0.2 + // frequency: 42 + // means that there are 42 records for which δ is in [0.1, 0.2). An + // important particular case is when min_probability = max_probability = 1: + // then, every individual who shares this quasi-identifier combination is in + // the dataset. + message DeltaPresenceEstimationHistogramBucket { + // Between 0 and 1. + double min_probability = 1; + + // Always greater than or equal to min_probability. + double max_probability = 2; + + // Number of records within these probability bounds. + int64 bucket_size = 5; + + // Sample of quasi-identifier tuple values in this bucket. The total + // number of classes returned per bucket is capped at 20. + repeated DeltaPresenceEstimationQuasiIdValues bucket_values = 6; + + // Total number of distinct quasi-identifier tuple values in this bucket. + int64 bucket_value_count = 7; + } + + // The intervals [min_probability, max_probability) do not overlap. If a + // value doesn't correspond to any such interval, the associated frequency + // is zero. For example, the following records: + // {min_probability: 0, max_probability: 0.1, frequency: 17} + // {min_probability: 0.2, max_probability: 0.3, frequency: 42} + // {min_probability: 0.3, max_probability: 0.4, frequency: 99} + // mean that there are no record with an estimated probability in [0.1, 0.2) + // nor larger or equal to 0.4. + repeated DeltaPresenceEstimationHistogramBucket + delta_presence_estimation_histogram = 1; + } + + // Risk analysis options. + message RequestedRiskAnalysisOptions { + // The job config for the risk job. + RiskAnalysisJobConfig job_config = 1; + } + + // Privacy metric to compute. + PrivacyMetric requested_privacy_metric = 1; + + // Input dataset to compute metrics over. + BigQueryTable requested_source_table = 2; + + // Values associated with this metric. + oneof result { + // Numerical stats result + NumericalStatsResult numerical_stats_result = 3; + + // Categorical stats result + CategoricalStatsResult categorical_stats_result = 4; + + // K-anonymity result + KAnonymityResult k_anonymity_result = 5; + + // L-divesity result + LDiversityResult l_diversity_result = 6; + + // K-map result + KMapEstimationResult k_map_estimation_result = 7; + + // Delta-presence result + DeltaPresenceEstimationResult delta_presence_estimation_result = 9; + } + + // The configuration used for this job. + RequestedRiskAnalysisOptions requested_options = 10; +} + +// A value of a field, including its frequency. +message ValueFrequency { + // A value contained in the field in question. + Value value = 1; + + // How many times the value is contained in the field. + int64 count = 2; +} + +// Set of primitive values supported by the system. +// Note that for the purposes of inspection or transformation, the number +// of bytes considered to comprise a 'Value' is based on its representation +// as a UTF-8 encoded string. For example, if 'integer_value' is set to +// 123456789, the number of bytes would be counted as 9, even though an +// int64 only holds up to 8 bytes of data. +message Value { + // Value types + oneof type { + // integer + int64 integer_value = 1; + + // float + double float_value = 2; + + // string + string string_value = 3; + + // boolean + bool boolean_value = 4; + + // timestamp + google.protobuf.Timestamp timestamp_value = 5; + + // time of day + google.type.TimeOfDay time_value = 6; + + // date + google.type.Date date_value = 7; + + // day of week + google.type.DayOfWeek day_of_week_value = 8; + } +} + +// Message for infoType-dependent details parsed from quote. +message QuoteInfo { + // Object representation of the quote. + oneof parsed_quote { + // The date time indicated by the quote. + DateTime date_time = 2; + } +} + +// Message for a date time object. +// e.g. 2018-01-01, 5th August. +message DateTime { + // Time zone of the date time object. + message TimeZone { + // Set only if the offset can be determined. Positive for time ahead of UTC. + // E.g. For "UTC-9", this value is -540. + int32 offset_minutes = 1; + } + + // One or more of the following must be set. + // Must be a valid date or time value. + google.type.Date date = 1; + + // Day of week + google.type.DayOfWeek day_of_week = 2; + + // Time of day + google.type.TimeOfDay time = 3; + + // Time zone + TimeZone time_zone = 4; +} + +// The configuration that controls how the data will change. +message DeidentifyConfig { + // Type of transformation + oneof transformation { + // Treat the dataset as free-form text and apply the same free text + // transformation everywhere. + InfoTypeTransformations info_type_transformations = 1; + + // Treat the dataset as structured. Transformations can be applied to + // specific locations within structured datasets, such as transforming + // a column within a table. + RecordTransformations record_transformations = 2; + + // Treat the dataset as an image and redact. + ImageTransformations image_transformations = 4; + } + + // Mode for handling transformation errors. If left unspecified, the default + // mode is `TransformationErrorHandling.ThrowError`. + TransformationErrorHandling transformation_error_handling = 3; +} + +// A type of transformation that is applied over images. +message ImageTransformations { + // Configuration for determining how redaction of images should occur. + message ImageTransformation { + // Apply transformation to the selected info_types. + message SelectedInfoTypes { + // Required. InfoTypes to apply the transformation to. Required. Provided + // InfoType must be unique within the ImageTransformations message. + repeated InfoType info_types = 5 [(google.api.field_behavior) = REQUIRED]; + } + + // Apply transformation to all findings. + message AllInfoTypes {} + + // Apply to all text. + message AllText {} + + // Part of the image to transform. + oneof target { + // Apply transformation to the selected info_types. + SelectedInfoTypes selected_info_types = 4; + + // Apply transformation to all findings not specified in other + // ImageTransformation's selected_info_types. Only one instance is allowed + // within the ImageTransformations message. + AllInfoTypes all_info_types = 5; + + // Apply transformation to all text that doesn't match an infoType. Only + // one instance is allowed within the ImageTransformations message. + AllText all_text = 6; + } + + // The color to use when redacting content from an image. If not + // specified, the default is black. + Color redaction_color = 3; + } + + // List of transforms to make. + repeated ImageTransformation transforms = 2; +} + +// How to handle transformation errors during de-identification. A +// transformation error occurs when the requested transformation is incompatible +// with the data. For example, trying to de-identify an IP address using a +// `DateShift` transformation would result in a transformation error, since date +// info cannot be extracted from an IP address. +// Information about any incompatible transformations, and how they were +// handled, is returned in the response as part of the +// `TransformationOverviews`. +message TransformationErrorHandling { + // Throw an error and fail the request when a transformation error occurs. + message ThrowError {} + + // Skips the data without modifying it if the requested transformation would + // cause an error. For example, if a `DateShift` transformation were applied + // an an IP address, this mode would leave the IP address unchanged in the + // response. + message LeaveUntransformed {} + + // How transformation errors should be handled. + oneof mode { + // Throw an error + ThrowError throw_error = 1; + + // Ignore errors + LeaveUntransformed leave_untransformed = 2; + } +} + +// A rule for transforming a value. +message PrimitiveTransformation { + // Type of transformation. + oneof transformation { + // Replace with a specified value. + ReplaceValueConfig replace_config = 1; + + // Redact + RedactConfig redact_config = 2; + + // Mask + CharacterMaskConfig character_mask_config = 3; + + // Ffx-Fpe. Strongly discouraged, consider using CryptoDeterministicConfig + // instead. Fpe is computationally expensive incurring latency costs. + CryptoReplaceFfxFpeConfig crypto_replace_ffx_fpe_config = 4; + + // Fixed size bucketing + FixedSizeBucketingConfig fixed_size_bucketing_config = 5; + + // Bucketing + BucketingConfig bucketing_config = 6; + + // Replace with infotype + ReplaceWithInfoTypeConfig replace_with_info_type_config = 7; + + // Time extraction + TimePartConfig time_part_config = 8; + + // Crypto + CryptoHashConfig crypto_hash_config = 9; + + // Date Shift + DateShiftConfig date_shift_config = 11; + + // Deterministic Crypto + CryptoDeterministicConfig crypto_deterministic_config = 12; + + // Replace with a value randomly drawn (with replacement) from a dictionary. + ReplaceDictionaryConfig replace_dictionary_config = 13; + } +} + +// For use with `Date`, `Timestamp`, and `TimeOfDay`, extract or preserve a +// portion of the value. +message TimePartConfig { + // Components that make up time. + enum TimePart { + // Unused + TIME_PART_UNSPECIFIED = 0; + + // [0-9999] + YEAR = 1; + + // [1-12] + MONTH = 2; + + // [1-31] + DAY_OF_MONTH = 3; + + // [1-7] + DAY_OF_WEEK = 4; + + // [1-53] + WEEK_OF_YEAR = 5; + + // [0-23] + HOUR_OF_DAY = 6; + } + + // The part of the time to keep. + TimePart part_to_extract = 1; +} + +// Pseudonymization method that generates surrogates via cryptographic hashing. +// Uses SHA-256. +// The key size must be either 32 or 64 bytes. +// Outputs a base64 encoded representation of the hashed output +// (for example, L7k0BHmF1ha5U3NfGykjro4xWi1MPVQPjhMAZbSV9mM=). +// Currently, only string and integer values can be hashed. +// See https://cloud.google.com/sensitive-data-protection/docs/pseudonymization +// to learn more. +message CryptoHashConfig { + // The key used by the hash function. + CryptoKey crypto_key = 1; +} + +// Pseudonymization method that generates deterministic encryption for the given +// input. Outputs a base64 encoded representation of the encrypted output. +// Uses AES-SIV based on the RFC https://tools.ietf.org/html/rfc5297. +message CryptoDeterministicConfig { + // The key used by the encryption function. For deterministic encryption + // using AES-SIV, the provided key is internally expanded to 64 bytes prior to + // use. + CryptoKey crypto_key = 1; + + // The custom info type to annotate the surrogate with. + // This annotation will be applied to the surrogate by prefixing it with + // the name of the custom info type followed by the number of + // characters comprising the surrogate. The following scheme defines the + // format: {info type name}({surrogate character count}):{surrogate} + // + // For example, if the name of custom info type is 'MY_TOKEN_INFO_TYPE' and + // the surrogate is 'abc', the full replacement value + // will be: 'MY_TOKEN_INFO_TYPE(3):abc' + // + // This annotation identifies the surrogate when inspecting content using the + // custom info type 'Surrogate'. This facilitates reversal of the + // surrogate when it occurs in free text. + // + // Note: For record transformations where the entire cell in a table is being + // transformed, surrogates are not mandatory. Surrogates are used to denote + // the location of the token and are necessary for re-identification in free + // form text. + // + // In order for inspection to work properly, the name of this info type must + // not occur naturally anywhere in your data; otherwise, inspection may either + // + // - reverse a surrogate that does not correspond to an actual identifier + // - be unable to parse the surrogate and result in an error + // + // Therefore, choose your custom info type name carefully after considering + // what your data looks like. One way to select a name that has a high chance + // of yielding reliable detection is to include one or more unicode characters + // that are highly improbable to exist in your data. + // For example, assuming your data is entered from a regular ASCII keyboard, + // the symbol with the hex code point 29DD might be used like so: + // ⧝MY_TOKEN_TYPE. + InfoType surrogate_info_type = 2; + + // A context may be used for higher security and maintaining + // referential integrity such that the same identifier in two different + // contexts will be given a distinct surrogate. The context is appended to + // plaintext value being encrypted. On decryption the provided context is + // validated against the value used during encryption. If a context was + // provided during encryption, same context must be provided during decryption + // as well. + // + // If the context is not set, plaintext would be used as is for encryption. + // If the context is set but: + // + // 1. there is no record present when transforming a given value or + // 2. the field is not present when transforming a given value, + // + // plaintext would be used as is for encryption. + // + // Note that case (1) is expected when an `InfoTypeTransformation` is + // applied to both structured and unstructured `ContentItem`s. + FieldId context = 3; +} + +// Replace each input value with a given `Value`. +message ReplaceValueConfig { + // Value to replace it with. + Value new_value = 1; +} + +// Replace each input value with a value randomly selected from the dictionary. +message ReplaceDictionaryConfig { + // Type of dictionary. + oneof type { + // A list of words to select from for random replacement. The + // [limits](https://cloud.google.com/sensitive-data-protection/limits) page + // contains details about the size limits of dictionaries. + CustomInfoType.Dictionary.WordList word_list = 1; + } +} + +// Replace each matching finding with the name of the info_type. +message ReplaceWithInfoTypeConfig {} + +// Redact a given value. For example, if used with an `InfoTypeTransformation` +// transforming PHONE_NUMBER, and input 'My phone number is 206-555-0123', the +// output would be 'My phone number is '. +message RedactConfig {} + +// Characters to skip when doing deidentification of a value. These will be left +// alone and skipped. +message CharsToIgnore { + // Convenience enum for indicating common characters to not transform. + enum CommonCharsToIgnore { + // Unused. + COMMON_CHARS_TO_IGNORE_UNSPECIFIED = 0; + + // 0-9 + NUMERIC = 1; + + // A-Z + ALPHA_UPPER_CASE = 2; + + // a-z + ALPHA_LOWER_CASE = 3; + + // US Punctuation, one of !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ + PUNCTUATION = 4; + + // Whitespace character, one of [ \t\n\x0B\f\r] + WHITESPACE = 5; + } + + // Type of characters to skip. + oneof characters { + // Characters to not transform when masking. + string characters_to_skip = 1; + + // Common characters to not transform when masking. Useful to avoid removing + // punctuation. + CommonCharsToIgnore common_characters_to_ignore = 2; + } +} + +// Partially mask a string by replacing a given number of characters with a +// fixed character. Masking can start from the beginning or end of the string. +// This can be used on data of any type (numbers, longs, and so on) and when +// de-identifying structured data we'll attempt to preserve the original data's +// type. (This allows you to take a long like 123 and modify it to a string like +// **3. +message CharacterMaskConfig { + // Character to use to mask the sensitive values—for example, `*` for an + // alphabetic string such as a name, or `0` for a numeric string such as ZIP + // code or credit card number. This string must have a length of 1. If not + // supplied, this value defaults to `*` for strings, and `0` for digits. + string masking_character = 1; + + // Number of characters to mask. If not set, all matching chars will be + // masked. Skipped characters do not count towards this tally. + // + // If `number_to_mask` is negative, this denotes inverse masking. Cloud DLP + // masks all but a number of characters. + // For example, suppose you have the following values: + // + // - `masking_character` is `*` + // - `number_to_mask` is `-4` + // - `reverse_order` is `false` + // - `CharsToIgnore` includes `-` + // - Input string is `1234-5678-9012-3456` + // + // The resulting de-identified string is + // `****-****-****-3456`. Cloud DLP masks all but the last four characters. + // If `reverse_order` is `true`, all but the first four characters are masked + // as `1234-****-****-****`. + int32 number_to_mask = 2; + + // Mask characters in reverse order. For example, if `masking_character` is + // `0`, `number_to_mask` is `14`, and `reverse_order` is `false`, then the + // input string `1234-5678-9012-3456` is masked as `00000000000000-3456`. + // If `masking_character` is `*`, `number_to_mask` is `3`, and `reverse_order` + // is `true`, then the string `12345` is masked as `12***`. + bool reverse_order = 3; + + // When masking a string, items in this list will be skipped when replacing + // characters. For example, if the input string is `555-555-5555` and you + // instruct Cloud DLP to skip `-` and mask 5 characters with `*`, Cloud DLP + // returns `***-**5-5555`. + repeated CharsToIgnore characters_to_ignore = 4; +} + +// Buckets values based on fixed size ranges. The +// Bucketing transformation can provide all of this functionality, +// but requires more configuration. This message is provided as a convenience to +// the user for simple bucketing strategies. +// +// The transformed value will be a hyphenated string of +// {lower_bound}-{upper_bound}. For example, if lower_bound = 10 and upper_bound +// = 20, all values that are within this bucket will be replaced with "10-20". +// +// This can be used on data of type: double, long. +// +// If the bound Value type differs from the type of data +// being transformed, we will first attempt converting the type of the data to +// be transformed to match the type of the bound before comparing. +// +// See +// https://cloud.google.com/sensitive-data-protection/docs/concepts-bucketing to +// learn more. +message FixedSizeBucketingConfig { + // Required. Lower bound value of buckets. All values less than `lower_bound` + // are grouped together into a single bucket; for example if `lower_bound` = + // 10, then all values less than 10 are replaced with the value "-10". + Value lower_bound = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Upper bound value of buckets. All values greater than upper_bound + // are grouped together into a single bucket; for example if `upper_bound` = + // 89, then all values greater than 89 are replaced with the value "89+". + Value upper_bound = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Size of each bucket (except for minimum and maximum buckets). So + // if `lower_bound` = 10, `upper_bound` = 89, and `bucket_size` = 10, then the + // following buckets would be used: -10, 10-20, 20-30, 30-40, 40-50, 50-60, + // 60-70, 70-80, 80-89, 89+. Precision up to 2 decimals works. + double bucket_size = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Generalization function that buckets values based on ranges. The ranges and +// replacement values are dynamically provided by the user for custom behavior, +// such as 1-30 -> LOW, 31-65 -> MEDIUM, 66-100 -> HIGH. +// +// This can be used on data of type: number, long, string, timestamp. +// +// If the bound `Value` type differs from the type of data being transformed, we +// will first attempt converting the type of the data to be transformed to match +// the type of the bound before comparing. +// See +// https://cloud.google.com/sensitive-data-protection/docs/concepts-bucketing to +// learn more. +message BucketingConfig { + // Bucket is represented as a range, along with replacement values. + message Bucket { + // Lower bound of the range, inclusive. Type should be the same as max if + // used. + Value min = 1; + + // Upper bound of the range, exclusive; type must match min. + Value max = 2; + + // Required. Replacement value for this bucket. + Value replacement_value = 3 [(google.api.field_behavior) = REQUIRED]; + } + + // Set of buckets. Ranges must be non-overlapping. + repeated Bucket buckets = 1; +} + +// Replaces an identifier with a surrogate using Format Preserving Encryption +// (FPE) with the FFX mode of operation; however when used in the +// `ReidentifyContent` API method, it serves the opposite function by reversing +// the surrogate back into the original identifier. The identifier must be +// encoded as ASCII. For a given crypto key and context, the same identifier +// will be replaced with the same surrogate. Identifiers must be at least two +// characters long. In the case that the identifier is the empty string, it will +// be skipped. See +// https://cloud.google.com/sensitive-data-protection/docs/pseudonymization to +// learn more. +// +// Note: We recommend using CryptoDeterministicConfig for all use cases which +// do not require preserving the input alphabet space and size, plus warrant +// referential integrity. FPE incurs significant latency costs. +message CryptoReplaceFfxFpeConfig { + // These are commonly used subsets of the alphabet that the FFX mode + // natively supports. In the algorithm, the alphabet is selected using + // the "radix". Therefore each corresponds to a particular radix. + enum FfxCommonNativeAlphabet { + // Unused. + FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED = 0; + + // `[0-9]` (radix of 10) + NUMERIC = 1; + + // `[0-9A-F]` (radix of 16) + HEXADECIMAL = 2; + + // `[0-9A-Z]` (radix of 36) + UPPER_CASE_ALPHA_NUMERIC = 3; + + // `[0-9A-Za-z]` (radix of 62) + ALPHA_NUMERIC = 4; + } + + // Required. The key used by the encryption algorithm. + CryptoKey crypto_key = 1 [(google.api.field_behavior) = REQUIRED]; + + // The 'tweak', a context may be used for higher security since the same + // identifier in two different contexts won't be given the same surrogate. If + // the context is not set, a default tweak will be used. + // + // If the context is set but: + // + // 1. there is no record present when transforming a given value or + // 1. the field is not present when transforming a given value, + // + // a default tweak will be used. + // + // Note that case (1) is expected when an `InfoTypeTransformation` is + // applied to both structured and unstructured `ContentItem`s. + // Currently, the referenced field may be of value type integer or string. + // + // The tweak is constructed as a sequence of bytes in big endian byte order + // such that: + // + // - a 64 bit integer is encoded followed by a single byte of value 1 + // - a string is encoded in UTF-8 format followed by a single byte of value 2 + FieldId context = 2; + + // Choose an alphabet which the data being transformed will be made up of. + oneof alphabet { + // Common alphabets. + FfxCommonNativeAlphabet common_alphabet = 4; + + // This is supported by mapping these to the alphanumeric characters + // that the FFX mode natively supports. This happens before/after + // encryption/decryption. + // Each character listed must appear only once. + // Number of characters must be in the range [2, 95]. + // This must be encoded as ASCII. + // The order of characters does not matter. + // The full list of allowed characters is: + // ``0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz~`!@#$%^&*()_-+={[}]|\:;"'<,>.?/`` + string custom_alphabet = 5; + + // The native way to select the alphabet. Must be in the range [2, 95]. + int32 radix = 6; + } + + // The custom infoType to annotate the surrogate with. + // This annotation will be applied to the surrogate by prefixing it with + // the name of the custom infoType followed by the number of + // characters comprising the surrogate. The following scheme defines the + // format: info_type_name(surrogate_character_count):surrogate + // + // For example, if the name of custom infoType is 'MY_TOKEN_INFO_TYPE' and + // the surrogate is 'abc', the full replacement value + // will be: 'MY_TOKEN_INFO_TYPE(3):abc' + // + // This annotation identifies the surrogate when inspecting content using the + // custom infoType + // [`SurrogateType`](https://cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/InspectConfig#surrogatetype). + // This facilitates reversal of the surrogate when it occurs in free text. + // + // In order for inspection to work properly, the name of this infoType must + // not occur naturally anywhere in your data; otherwise, inspection may + // find a surrogate that does not correspond to an actual identifier. + // Therefore, choose your custom infoType name carefully after considering + // what your data looks like. One way to select a name that has a high chance + // of yielding reliable detection is to include one or more unicode characters + // that are highly improbable to exist in your data. + // For example, assuming your data is entered from a regular ASCII keyboard, + // the symbol with the hex code point 29DD might be used like so: + // ⧝MY_TOKEN_TYPE + InfoType surrogate_info_type = 8; +} + +// This is a data encryption key (DEK) (as opposed to +// a key encryption key (KEK) stored by Cloud Key Management Service +// (Cloud KMS). +// When using Cloud KMS to wrap or unwrap a DEK, be sure to set an appropriate +// IAM policy on the KEK to ensure an attacker cannot +// unwrap the DEK. +message CryptoKey { + // Sources of crypto keys. + oneof source { + // Transient crypto key + TransientCryptoKey transient = 1; + + // Unwrapped crypto key + UnwrappedCryptoKey unwrapped = 2; + + // Key wrapped using Cloud KMS + KmsWrappedCryptoKey kms_wrapped = 3; + } +} + +// Use this to have a random data crypto key generated. +// It will be discarded after the request finishes. +message TransientCryptoKey { + // Required. Name of the key. + // This is an arbitrary string used to differentiate different keys. + // A unique key is generated per name: two separate `TransientCryptoKey` + // protos share the same generated key if their names are the same. + // When the data crypto key is generated, this name is not used in any way + // (repeating the api call will result in a different key being generated). + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Using raw keys is prone to security risks due to accidentally +// leaking the key. Choose another type of key if possible. +message UnwrappedCryptoKey { + // Required. A 128/192/256 bit key. + bytes key = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Include to use an existing data crypto key wrapped by KMS. +// The wrapped key must be a 128-, 192-, or 256-bit key. +// Authorization requires the following IAM permissions when sending a request +// to perform a crypto transformation using a KMS-wrapped crypto key: +// dlp.kms.encrypt +// +// For more information, see [Creating a wrapped key] +// (https://cloud.google.com/sensitive-data-protection/docs/create-wrapped-key). +// +// Note: When you use Cloud KMS for cryptographic operations, +// [charges apply](https://cloud.google.com/kms/pricing). +message KmsWrappedCryptoKey { + // Required. The wrapped data crypto key. + bytes wrapped_key = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource name of the KMS CryptoKey to use for unwrapping. + string crypto_key_name = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Shifts dates by random number of days, with option to be consistent for the +// same context. See +// https://cloud.google.com/sensitive-data-protection/docs/concepts-date-shifting +// to learn more. +message DateShiftConfig { + // Required. Range of shift in days. Actual shift will be selected at random + // within this range (inclusive ends). Negative means shift to earlier in + // time. Must not be more than 365250 days (1000 years) each direction. + // + // For example, 3 means shift date to at most 3 days into the future. + int32 upper_bound_days = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. For example, -5 means shift date to at most 5 days back in the + // past. + int32 lower_bound_days = 2 [(google.api.field_behavior) = REQUIRED]; + + // Points to the field that contains the context, for example, an entity id. + // If set, must also set cryptoKey. If set, shift will be consistent for the + // given context. + FieldId context = 3; + + // Method for calculating shift that takes context into consideration. If + // set, must also set context. Can only be applied to table items. + oneof method { + // Causes the shift to be computed based on this key and the context. This + // results in the same shift for the same context and crypto_key. If + // set, must also set context. Can only be applied to table items. + CryptoKey crypto_key = 4; + } +} + +// A type of transformation that will scan unstructured text and +// apply various `PrimitiveTransformation`s to each finding, where the +// transformation is applied to only values that were identified as a specific +// info_type. +message InfoTypeTransformations { + // A transformation to apply to text that is identified as a specific + // info_type. + message InfoTypeTransformation { + // InfoTypes to apply the transformation to. An empty list will cause + // this transformation to apply to all findings that correspond to + // infoTypes that were requested in `InspectConfig`. + repeated InfoType info_types = 1; + + // Required. Primitive transformation to apply to the infoType. + PrimitiveTransformation primitive_transformation = 2 + [(google.api.field_behavior) = REQUIRED]; + } + + // Required. Transformation for each infoType. Cannot specify more than one + // for a given infoType. + repeated InfoTypeTransformation transformations = 1 + [(google.api.field_behavior) = REQUIRED]; +} + +// The transformation to apply to the field. +message FieldTransformation { + // Required. Input field(s) to apply the transformation to. + // When you have columns that reference their position within a list, + // omit the index from the FieldId. FieldId name matching ignores the index. + // For example, instead of "contact.nums[0].type", use "contact.nums.type". + repeated FieldId fields = 1 [(google.api.field_behavior) = REQUIRED]; + + // Only apply the transformation if the condition evaluates to true for the + // given `RecordCondition`. The conditions are allowed to reference fields + // that are not used in the actual transformation. + // + // Example Use Cases: + // + // - Apply a different bucket transformation to an age column if the zip code + // column for the same record is within a specific range. + // - Redact a field if the date of birth field is greater than 85. + RecordCondition condition = 3; + + // Transformation to apply. [required] + oneof transformation { + // Apply the transformation to the entire field. + PrimitiveTransformation primitive_transformation = 4; + + // Treat the contents of the field as free text, and selectively + // transform content that matches an `InfoType`. + InfoTypeTransformations info_type_transformations = 5; + } +} + +// A type of transformation that is applied over structured data such as a +// table. +message RecordTransformations { + // Transform the record by applying various field transformations. + repeated FieldTransformation field_transformations = 1; + + // Configuration defining which records get suppressed entirely. Records that + // match any suppression rule are omitted from the output. + repeated RecordSuppression record_suppressions = 2; +} + +// Configuration to suppress records whose suppression conditions evaluate to +// true. +message RecordSuppression { + // A condition that when it evaluates to true will result in the record being + // evaluated to be suppressed from the transformed content. + RecordCondition condition = 1; +} + +// A condition for determining whether a transformation should be applied to +// a field. +message RecordCondition { + // The field type of `value` and `field` do not need to match to be + // considered equal, but not all comparisons are possible. + // EQUAL_TO and NOT_EQUAL_TO attempt to compare even with incompatible types, + // but all other comparisons are invalid with incompatible types. + // A `value` of type: + // + // - `string` can be compared against all other types + // - `boolean` can only be compared against other booleans + // - `integer` can be compared against doubles or a string if the string value + // can be parsed as an integer. + // - `double` can be compared against integers or a string if the string can + // be parsed as a double. + // - `Timestamp` can be compared against strings in RFC 3339 date string + // format. + // - `TimeOfDay` can be compared against timestamps and strings in the format + // of 'HH:mm:ss'. + // + // If we fail to compare do to type mismatch, a warning will be given and + // the condition will evaluate to false. + message Condition { + // Required. Field within the record this condition is evaluated against. + FieldId field = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Operator used to compare the field or infoType to the value. + RelationalOperator operator = 3 [(google.api.field_behavior) = REQUIRED]; + + // Value to compare against. [Mandatory, except for `EXISTS` tests.] + Value value = 4; + } + + // A collection of conditions. + message Conditions { + // A collection of conditions. + repeated Condition conditions = 1; + } + + // An expression, consisting of an operator and conditions. + message Expressions { + // Logical operators for conditional checks. + enum LogicalOperator { + // Unused + LOGICAL_OPERATOR_UNSPECIFIED = 0; + + // Conditional AND + AND = 1; + } + + // The operator to apply to the result of conditions. Default and currently + // only supported value is `AND`. + LogicalOperator logical_operator = 1; + + // Expression types. + oneof type { + // Conditions to apply to the expression. + Conditions conditions = 3; + } + } + + // An expression. + Expressions expressions = 3; +} + +// Overview of the modifications that occurred. +message TransformationOverview { + // Total size in bytes that were transformed in some way. + int64 transformed_bytes = 2; + + // Transformations applied to the dataset. + repeated TransformationSummary transformation_summaries = 3; +} + +// Summary of a single transformation. +// Only one of 'transformation', 'field_transformation', or 'record_suppress' +// will be set. +message TransformationSummary { + // Possible outcomes of transformations. + enum TransformationResultCode { + // Unused + TRANSFORMATION_RESULT_CODE_UNSPECIFIED = 0; + + // Transformation completed without an error. + SUCCESS = 1; + + // Transformation had an error. + ERROR = 2; + } + + // A collection that informs the user the number of times a particular + // `TransformationResultCode` and error details occurred. + message SummaryResult { + // Number of transformations counted by this result. + int64 count = 1; + + // Outcome of the transformation. + TransformationResultCode code = 2; + + // A place for warnings or errors to show up if a transformation didn't + // work as expected. + string details = 3; + } + + // Set if the transformation was limited to a specific InfoType. + InfoType info_type = 1; + + // Set if the transformation was limited to a specific FieldId. + FieldId field = 2; + + // The specific transformation these stats apply to. + PrimitiveTransformation transformation = 3; + + // The field transformation that was applied. + // If multiple field transformations are requested for a single field, + // this list will contain all of them; otherwise, only one is supplied. + repeated FieldTransformation field_transformations = 5; + + // The specific suppression option these stats apply to. + RecordSuppression record_suppress = 6; + + // Collection of all transformations that took place or had an error. + repeated SummaryResult results = 4; + + // Total size in bytes that were transformed in some way. + int64 transformed_bytes = 7; +} + +// A flattened description of a `PrimitiveTransformation` or +// `RecordSuppression`. +message TransformationDescription { + // The transformation type. + TransformationType type = 1; + + // A description of the transformation. This is empty for a + // RECORD_SUPPRESSION, or is the output of calling toString() on the + // `PrimitiveTransformation` protocol buffer message for any other type of + // transformation. + string description = 2; + + // A human-readable string representation of the `RecordCondition` + // corresponding to this transformation. Set if a `RecordCondition` was used + // to determine whether or not to apply this transformation. + // + // Examples: + // * (age_field > 85) + // * (age_field <= 18) + // * (zip_field exists) + // * (zip_field == 01234) && (city_field != "Springville") + // * (zip_field == 01234) && (age_field <= 18) && (city_field exists) + string condition = 3; + + // Set if the transformation was limited to a specific `InfoType`. + InfoType info_type = 4; +} + +// Details about a single transformation. This object contains a description of +// the transformation, information about whether the transformation was +// successfully applied, and the precise location where the transformation +// occurred. These details are stored in a user-specified BigQuery table. +message TransformationDetails { + // The name of the job that completed the transformation. + string resource_name = 1; + + // The top level name of the container where the transformation is located + // (this will be the source file name or table name). + string container_name = 2; + + // Description of transformation. This would only contain more than one + // element if there were multiple matching transformations and which one to + // apply was ambiguous. Not set for states that contain no transformation, + // currently only state that contains no transformation is + // TransformationResultStateType.METADATA_UNRETRIEVABLE. + repeated TransformationDescription transformation = 3; + + // Status of the transformation, if transformation was not successful, this + // will specify what caused it to fail, otherwise it will show that the + // transformation was successful. + TransformationResultStatus status_details = 4; + + // The number of bytes that were transformed. If transformation was + // unsuccessful or did not take place because there was no content to + // transform, this will be zero. + int64 transformed_bytes = 5; + + // The precise location of the transformed content in the original container. + TransformationLocation transformation_location = 6; +} + +// Specifies the location of a transformation. +message TransformationLocation { + // Location type. + oneof location_type { + // For infotype transformations, link to the corresponding findings ID so + // that location information does not need to be duplicated. Each findings + // ID correlates to an entry in the findings output table, this table only + // gets created when users specify to save findings (add the save findings + // action to the request). + string finding_id = 1; + + // For record transformations, provide a field and container information. + RecordTransformation record_transformation = 2; + } + + // Information about the functionality of the container where this finding + // occurred, if available. + TransformationContainerType container_type = 3; +} + +// The field in a record to transform. +message RecordTransformation { + // For record transformations, provide a field. + FieldId field_id = 1; + + // Findings container modification timestamp, if applicable. + google.protobuf.Timestamp container_timestamp = 2; + + // Container version, if available ("generation" for Cloud Storage). + string container_version = 3; +} + +// The outcome of a transformation. +message TransformationResultStatus { + // Transformation result status type, this will be either SUCCESS, or it will + // be the reason for why the transformation was not completely successful. + TransformationResultStatusType result_status_type = 1; + + // Detailed error codes and messages + google.rpc.Status details = 2; +} + +// Enum of possible outcomes of transformations. SUCCESS if transformation and +// storing of transformation was successful, otherwise, reason for not +// transforming. +enum TransformationResultStatusType { + // Unused. + STATE_TYPE_UNSPECIFIED = 0; + + // This is set when a finding cannot be transformed (i.e. outside user + // set bucket range). + INVALID_TRANSFORM = 1; + + // This is set when a transformation is successful but cannot be stored in + // BigQuery because the transformed row exceeds BigQuery's max row size. + BIGQUERY_MAX_ROW_SIZE_EXCEEDED = 2; + + // This is set when there is a finding in the custom metadata of a file, + // but at the write time of the transformed file, this key / value pair is + // unretrievable. + METADATA_UNRETRIEVABLE = 3; + + // This is set when the transformation and its storage are successful. + SUCCESS = 4; +} + +// Describes functionality of a given container in its original format. +enum TransformationContainerType { + // Unused. + TRANSFORM_UNKNOWN_CONTAINER = 0; + + // Body of a file. + TRANSFORM_BODY = 1; + + // Metadata for a file. + TRANSFORM_METADATA = 2; + + // A table. + TRANSFORM_TABLE = 3; +} + +// An enum of rules that can be used to transform a value. Can be a +// record suppression, or one of the transformation rules specified under +// `PrimitiveTransformation`. +enum TransformationType { + // Unused + TRANSFORMATION_TYPE_UNSPECIFIED = 0; + + // Record suppression + RECORD_SUPPRESSION = 1; + + // Replace value + REPLACE_VALUE = 2; + + // Replace value using a dictionary. + REPLACE_DICTIONARY = 15; + + // Redact + REDACT = 3; + + // Character mask + CHARACTER_MASK = 4; + + // FFX-FPE + CRYPTO_REPLACE_FFX_FPE = 5; + + // Fixed size bucketing + FIXED_SIZE_BUCKETING = 6; + + // Bucketing + BUCKETING = 7; + + // Replace with info type + REPLACE_WITH_INFO_TYPE = 8; + + // Time part + TIME_PART = 9; + + // Crypto hash + CRYPTO_HASH = 10; + + // Date shift + DATE_SHIFT = 12; + + // Deterministic crypto + CRYPTO_DETERMINISTIC_CONFIG = 13; + + // Redact image + REDACT_IMAGE = 14; +} + +// Config for storing transformation details. +message TransformationDetailsStorageConfig { + // Location to store the transformation summary. + oneof type { + // The BigQuery table in which to store the output. This may be an existing + // table or in a new table in an existing dataset. + // If table_id is not set a new one will be generated for you with the + // following format: + // dlp_googleapis_transformation_details_yyyy_mm_dd_[dlp_job_id]. Pacific + // time zone will be used for generating the date details. + BigQueryTable table = 1; + } +} + +// Schedule for inspect job triggers. +message Schedule { + // Type of schedule. + oneof option { + // With this option a job is started on a regular periodic basis. For + // example: every day (86400 seconds). + // + // A scheduled start time will be skipped if the previous + // execution has not ended when its scheduled time occurs. + // + // This value must be set to a time duration greater than or equal + // to 1 day and can be no longer than 60 days. + google.protobuf.Duration recurrence_period_duration = 1; + } +} + +// Job trigger option for hybrid jobs. Jobs must be manually created +// and finished. +message Manual {} + +// The inspectTemplate contains a configuration (set of types of sensitive data +// to be detected) to be used anywhere you otherwise would normally specify +// InspectConfig. See +// https://cloud.google.com/sensitive-data-protection/docs/concepts-templates to +// learn more. +message InspectTemplate { + option (google.api.resource) = { + type: "dlp.googleapis.com/InspectTemplate" + pattern: "organizations/{organization}/inspectTemplates/{inspect_template}" + pattern: "projects/{project}/inspectTemplates/{inspect_template}" + pattern: "organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}" + pattern: "projects/{project}/locations/{location}/inspectTemplates/{inspect_template}" + }; + + // Output only. The template name. + // + // The template will have one of the following formats: + // `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR + // `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`; + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Display name (max 256 chars). + string display_name = 2; + + // Short description (max 256 chars). + string description = 3; + + // Output only. The creation timestamp of an inspectTemplate. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update timestamp of an inspectTemplate. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The core content of the template. Configuration of the scanning process. + InspectConfig inspect_config = 6; +} + +// DeidentifyTemplates contains instructions on how to de-identify content. +// See +// https://cloud.google.com/sensitive-data-protection/docs/concepts-templates to +// learn more. +message DeidentifyTemplate { + option (google.api.resource) = { + type: "dlp.googleapis.com/DeidentifyTemplate" + pattern: "organizations/{organization}/deidentifyTemplates/{deidentify_template}" + pattern: "projects/{project}/deidentifyTemplates/{deidentify_template}" + pattern: "organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}" + pattern: "projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}" + }; + + // Output only. The template name. + // + // The template will have one of the following formats: + // `projects/PROJECT_ID/deidentifyTemplates/TEMPLATE_ID` OR + // `organizations/ORGANIZATION_ID/deidentifyTemplates/TEMPLATE_ID` + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Display name (max 256 chars). + string display_name = 2; + + // Short description (max 256 chars). + string description = 3; + + // Output only. The creation timestamp of an inspectTemplate. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update timestamp of an inspectTemplate. + google.protobuf.Timestamp update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The core content of the template. + DeidentifyConfig deidentify_config = 6; +} + +// Details information about an error encountered during job execution or +// the results of an unsuccessful activation of the JobTrigger. +message Error { + // Additional information about the error. + enum ErrorExtraInfo { + // Unused. + ERROR_INFO_UNSPECIFIED = 0; + + // Image scan is not available in the region. + IMAGE_SCAN_UNAVAILABLE_IN_REGION = 1; + + // File store cluster is not supported for profile generation. + FILE_STORE_CLUSTER_UNSUPPORTED = 2; + } + + // Detailed error codes and messages. + google.rpc.Status details = 1; + + // The times the error occurred. List includes the oldest timestamp and the + // last 9 timestamps. + repeated google.protobuf.Timestamp timestamps = 2; + + // Additional information about the error. + ErrorExtraInfo extra_info = 4; +} + +// Contains a configuration to make API calls on a repeating basis. +// See +// https://cloud.google.com/sensitive-data-protection/docs/concepts-job-triggers +// to learn more. +message JobTrigger { + option (google.api.resource) = { + type: "dlp.googleapis.com/JobTrigger" + pattern: "projects/{project}/jobTriggers/{job_trigger}" + pattern: "projects/{project}/locations/{location}/jobTriggers/{job_trigger}" + }; + + // What event needs to occur for a new job to be started. + message Trigger { + // What event needs to occur for a new job to be started. + oneof trigger { + // Create a job on a repeating basis based on the elapse of time. + Schedule schedule = 1; + + // For use with hybrid jobs. Jobs must be manually created and finished. + Manual manual = 2; + } + } + + // Whether the trigger is currently active. If PAUSED or CANCELLED, no jobs + // will be created with this configuration. The service may automatically + // pause triggers experiencing frequent errors. To restart a job, set the + // status to HEALTHY after correcting user errors. + enum Status { + // Unused. + STATUS_UNSPECIFIED = 0; + + // Trigger is healthy. + HEALTHY = 1; + + // Trigger is temporarily paused. + PAUSED = 2; + + // Trigger is cancelled and can not be resumed. + CANCELLED = 3; + } + + // Unique resource name for the triggeredJob, assigned by the service when the + // triggeredJob is created, for example + // `projects/dlp-test-project/jobTriggers/53234423`. + string name = 1; + + // Display name (max 100 chars) + string display_name = 2; + + // User provided description (max 256 chars) + string description = 3; + + // The configuration details for the specific type of job to run. + oneof job { + // For inspect jobs, a snapshot of the configuration. + InspectJobConfig inspect_job = 4; + } + + // A list of triggers which will be OR'ed together. Only one in the list + // needs to trigger for a job to be started. The list may contain only + // a single Schedule trigger and must have at least one object. + repeated Trigger triggers = 5; + + // Output only. A stream of errors encountered when the trigger was activated. + // Repeated errors may result in the JobTrigger automatically being paused. + // Will return the last 100 errors. Whenever the JobTrigger is modified + // this list will be cleared. + repeated Error errors = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The creation timestamp of a triggeredJob. + google.protobuf.Timestamp create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update timestamp of a triggeredJob. + google.protobuf.Timestamp update_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp of the last time this trigger executed. + google.protobuf.Timestamp last_run_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. A status for this trigger. + Status status = 10 [(google.api.field_behavior) = REQUIRED]; +} + +// A task to execute on the completion of a job. +// See https://cloud.google.com/sensitive-data-protection/docs/concepts-actions +// to learn more. +message Action { + // If set, the detailed findings will be persisted to the specified + // OutputStorageConfig. Only a single instance of this action can be + // specified. + // Compatible with: Inspect, Risk + message SaveFindings { + // Location to store findings outside of DLP. + OutputStorageConfig output_config = 1; + } + + // Publish a message into a given Pub/Sub topic when DlpJob has completed. The + // message contains a single field, `DlpJobName`, which is equal to the + // finished job's + // [`DlpJob.name`](https://cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/projects.dlpJobs#DlpJob). + // Compatible with: Inspect, Risk + message PublishToPubSub { + // Cloud Pub/Sub topic to send notifications to. The topic must have given + // publishing access rights to the DLP API service account executing + // the long running DlpJob sending the notifications. + // Format is projects/{project}/topics/{topic}. + string topic = 1; + } + + // Publish the result summary of a DlpJob to [Security Command + // Center](https://cloud.google.com/security-command-center). This action is + // available for only projects that belong to an organization. This action + // publishes the count of finding instances and their infoTypes. The summary + // of findings are persisted in Security Command Center and are governed by + // [service-specific policies for Security Command + // Center](https://cloud.google.com/terms/service-terms). Only a single + // instance of this action can be specified. Compatible with: Inspect + message PublishSummaryToCscc {} + + // Publish findings of a DlpJob to Data Catalog. In Data Catalog, tag + // templates are applied to the resource that Cloud DLP scanned. Data + // Catalog tag templates are stored in the same project and region where the + // BigQuery table exists. For Cloud DLP to create and apply the tag template, + // the Cloud DLP service agent must have the + // `roles/datacatalog.tagTemplateOwner` permission on the project. The tag + // template contains fields summarizing the results of the DlpJob. Any field + // values previously written by another DlpJob are deleted. [InfoType naming + // patterns][google.privacy.dlp.v2.InfoType] are strictly enforced when using + // this feature. + // + // Findings are persisted in Data Catalog storage and are governed by + // service-specific policies for Data Catalog. For more information, see + // [Service Specific Terms](https://cloud.google.com/terms/service-terms). + // + // Only a single instance of this action can be specified. This action is + // allowed only if all resources being scanned are BigQuery tables. + // Compatible with: Inspect + message PublishFindingsToCloudDataCatalog {} + + // Publish findings of a DlpJob to Dataplex Universal Catalog as a + // `sensitive-data-protection-job-result` aspect. For more information, + // see [Send inspection results to Dataplex Universal Catalog as + // aspects](https://cloud.google.com/sensitive-data-protection/docs/add-aspects-inspection-job). + // + // Aspects are stored in Dataplex Universal Catalog storage and are + // governed by service-specific policies for Dataplex Universal Catalog. For + // more information, see [Service Specific + // Terms](https://cloud.google.com/terms/service-terms). + // + // Only a single instance of this action can be specified. This action is + // allowed only if all resources being scanned are BigQuery tables. + // Compatible with: Inspect + message PublishFindingsToDataplexCatalog {} + + // Create a de-identified copy of a storage bucket. Only compatible + // with Cloud Storage buckets. + // + // + // A TransformationDetail will be created for each transformation. + // + // + // Compatible with: Inspection of Cloud Storage + message Deidentify { + // User specified deidentify templates and configs for structured, + // unstructured, and image files. + TransformationConfig transformation_config = 7; + + // Config for storing transformation details. + // + // This field specifies the configuration for storing detailed metadata + // about each transformation performed during a de-identification process. + // The metadata is stored separately from the de-identified content itself + // and provides a granular record of both successful transformations and any + // failures that occurred. + // + // Enabling this configuration is essential for users who need to access + // comprehensive information about the status, outcome, and specifics of + // each transformation. The details are captured in the + // [TransformationDetails][google.privacy.dlp.v2.TransformationDetails] + // message for each operation. + // + // Key use cases: + // + // * **Auditing and compliance** + // * Provides a verifiable audit trail of de-identification activities, + // which is crucial for meeting regulatory requirements and internal + // data governance policies. + // * Logs what data was transformed, what transformations were applied, + // when they occurred, and their success status. This helps + // demonstrate accountability and due diligence in protecting + // sensitive data. + // + // * **Troubleshooting and debugging** + // * Offers detailed error messages and context if a transformation + // fails. This information is useful for diagnosing and resolving + // issues in the de-identification pipeline. + // * Helps pinpoint the exact location and nature of failures, speeding + // up the debugging process. + // + // * **Process verification and quality assurance** + // * Allows users to confirm that de-identification rules and + // transformations were applied correctly and consistently across + // the dataset as intended. + // * Helps in verifying the effectiveness of the chosen + // de-identification strategies. + // + // * **Data lineage and impact analysis** + // * Creates a record of how data elements were modified, contributing + // to data lineage. This is useful for understanding the provenance + // of de-identified data. + // * Aids in assessing the potential impact of de-identification choices + // on downstream analytical processes or data usability. + // + // * **Reporting and operational insights** + // * You can analyze the metadata stored in a queryable BigQuery table + // to generate reports on transformation success rates, common + // error types, processing volumes (e.g., transformedBytes), and the + // types of transformations applied. + // * These insights can inform optimization of de-identification + // configurations and resource planning. + // + // To take advantage of these benefits, set this configuration. The stored + // details include a description of the transformation, success or + // error codes, error messages, the number of bytes transformed, the + // location of the transformed content, and identifiers for the job and + // source data. + TransformationDetailsStorageConfig transformation_details_storage_config = + 3; + + // Where to store the output. + oneof output { + // Required. User settable Cloud Storage bucket and folders to store + // de-identified files. This field must be set for Cloud Storage + // deidentification. The output Cloud Storage bucket must be different + // from the input bucket. De-identified files will overwrite files in the + // output path. + // + // Form of: gs://bucket/folder/ or gs://bucket + string cloud_storage_output = 9 [(google.api.field_behavior) = REQUIRED]; + } + + // List of user-specified file type groups to transform. If specified, only + // the files with these file types are transformed. If empty, all + // supported files are transformed. Supported types may be automatically + // added over time. Any unsupported file types that are set in this field + // are excluded from de-identification. An error is recorded for each + // unsupported file in the TransformationDetails output table. Currently the + // only file types supported are: IMAGES, TEXT_FILES, CSV, TSV. + repeated FileType file_types_to_transform = 8; + } + + // Sends an email when the job completes. The email goes to IAM project owners + // and technical [Essential + // Contacts](https://cloud.google.com/resource-manager/docs/managing-notification-contacts). + message JobNotificationEmails {} + + // Enable Stackdriver metric dlp.googleapis.com/finding_count. This + // will publish a metric to stack driver on each infotype requested and + // how many findings were found for it. CustomDetectors will be bucketed + // as 'Custom' under the Stackdriver label 'info_type'. + message PublishToStackdriver {} + + // Extra events to execute after the job has finished. + oneof action { + // Save resulting findings in a provided location. + SaveFindings save_findings = 1; + + // Publish a notification to a Pub/Sub topic. + PublishToPubSub pub_sub = 2; + + // Publish summary to Cloud Security Command Center (Alpha). + PublishSummaryToCscc publish_summary_to_cscc = 3; + + // Deprecated because Data Catalog is being turned down. Use + // publish_findings_to_dataplex_catalog to publish findings to Dataplex + // Universal Catalog. + PublishFindingsToCloudDataCatalog publish_findings_to_cloud_data_catalog = 5 + [deprecated = true]; + + // Publish findings as an aspect to Dataplex Universal Catalog. + PublishFindingsToDataplexCatalog publish_findings_to_dataplex_catalog = 10; + + // Create a de-identified copy of the input data. + Deidentify deidentify = 7; + + // Sends an email when the job completes. The email goes to IAM project + // owners and technical [Essential + // Contacts](https://cloud.google.com/resource-manager/docs/managing-notification-contacts). + JobNotificationEmails job_notification_emails = 8; + + // Enable Stackdriver metric dlp.googleapis.com/finding_count. + PublishToStackdriver publish_to_stackdriver = 9; + } +} + +// User specified templates and configs for how to deidentify structured, +// unstructures, and image files. User must provide either a unstructured +// deidentify template or at least one redact image config. +message TransformationConfig { + // De-identify template. + // If this template is specified, it will serve as the default de-identify + // template. This template cannot contain `record_transformations` since it + // can be used for unstructured content such as free-form text files. If this + // template is not set, a default `ReplaceWithInfoTypeConfig` will be used to + // de-identify unstructured content. + string deidentify_template = 1; + + // Structured de-identify template. + // If this template is specified, it will serve as the de-identify template + // for structured content such as delimited files and tables. If this template + // is not set but the `deidentify_template` is set, then `deidentify_template` + // will also apply to the structured content. If neither template is set, a + // default `ReplaceWithInfoTypeConfig` will be used to de-identify structured + // content. + string structured_deidentify_template = 2; + + // Image redact template. + // If this template is specified, it will serve as the de-identify template + // for images. If this template is not set, all findings in the image will be + // redacted with a black box. + string image_redact_template = 4; +} + +// Request message for CreateInspectTemplate. +message CreateInspectTemplateRequest { + // Required. Parent resource name. + // + // The format of this value varies depending on the scope of the request + // (project or organization) and whether you have [specified a processing + // location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + // + // + Projects scope, location specified: + // `projects/{project_id}/locations/{location_id}` + // + Projects scope, no location specified (defaults to global): + // `projects/{project_id}` + // + Organizations scope, location specified: + // `organizations/{org_id}/locations/{location_id}` + // + Organizations scope, no location specified (defaults to global): + // `organizations/{org_id}` + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/InspectTemplate" + } + ]; + + // Required. The InspectTemplate to create. + InspectTemplate inspect_template = 2 [(google.api.field_behavior) = REQUIRED]; + + // The template id can contain uppercase and lowercase letters, + // numbers, and hyphens; that is, it must match the regular + // expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + // characters. Can be empty to allow the system to generate one. + string template_id = 3; + + // Deprecated. This field has no effect. + string location_id = 4; +} + +// Request message for UpdateInspectTemplate. +message UpdateInspectTemplateRequest { + // Required. Resource name of organization and inspectTemplate to be updated, + // for example `organizations/433245324/inspectTemplates/432452342` or + // projects/project-id/inspectTemplates/432452342. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/InspectTemplate" + } + ]; + + // New InspectTemplate value. + InspectTemplate inspect_template = 2; + + // Mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 3; +} + +// Request message for GetInspectTemplate. +message GetInspectTemplateRequest { + // Required. Resource name of the organization and inspectTemplate to be read, + // for example `organizations/433245324/inspectTemplates/432452342` or + // projects/project-id/inspectTemplates/432452342. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/InspectTemplate" + } + ]; +} + +// Request message for ListInspectTemplates. +message ListInspectTemplatesRequest { + // Required. Parent resource name. + // + // The format of this value varies depending on the scope of the request + // (project or organization) and whether you have [specified a processing + // location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + // + // + Projects scope, location specified: + // `projects/{project_id}/locations/{location_id}` + // + Projects scope, no location specified (defaults to global): + // `projects/{project_id}` + // + Organizations scope, location specified: + // `organizations/{org_id}/locations/{location_id}` + // + Organizations scope, no location specified (defaults to global): + // `organizations/{org_id}` + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/InspectTemplate" + } + ]; + + // Page token to continue retrieval. Comes from the previous call + // to `ListInspectTemplates`. + string page_token = 2; + + // Size of the page. This value can be limited by the server. If zero server + // returns a page of max size 100. + int32 page_size = 3; + + // Comma-separated list of fields to order by, + // followed by `asc` or `desc` postfix. This list is case insensitive. The + // default sorting order is ascending. Redundant space characters are + // insignificant. + // + // Example: `name asc,update_time, create_time desc` + // + // Supported fields are: + // + // - `create_time`: corresponds to the time the template was created. + // - `update_time`: corresponds to the time the template was last updated. + // - `name`: corresponds to the template's name. + // - `display_name`: corresponds to the template's display name. + string order_by = 4; + + // Deprecated. This field has no effect. + string location_id = 5; +} + +// Response message for ListInspectTemplates. +message ListInspectTemplatesResponse { + // List of inspectTemplates, up to page_size in ListInspectTemplatesRequest. + repeated InspectTemplate inspect_templates = 1; + + // If the next page is available then the next page token to be used in the + // following ListInspectTemplates request. + string next_page_token = 2; +} + +// Request message for DeleteInspectTemplate. +message DeleteInspectTemplateRequest { + // Required. Resource name of the organization and inspectTemplate to be + // deleted, for example `organizations/433245324/inspectTemplates/432452342` + // or projects/project-id/inspectTemplates/432452342. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/InspectTemplate" + } + ]; +} + +// Request message for CreateJobTrigger. +message CreateJobTriggerRequest { + // Required. Parent resource name. + // + // The format of this value varies depending on whether you have [specified a + // processing + // location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + // + // + Projects scope, location specified: + // `projects/{project_id}/locations/{location_id}` + // + Projects scope, no location specified (defaults to global): + // `projects/{project_id}` + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/JobTrigger" + } + ]; + + // Required. The JobTrigger to create. + JobTrigger job_trigger = 2 [(google.api.field_behavior) = REQUIRED]; + + // The trigger id can contain uppercase and lowercase letters, + // numbers, and hyphens; that is, it must match the regular + // expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + // characters. Can be empty to allow the system to generate one. + string trigger_id = 3; + + // Deprecated. This field has no effect. + string location_id = 4; +} + +// Request message for ActivateJobTrigger. +message ActivateJobTriggerRequest { + // Required. Resource name of the trigger to activate, for example + // `projects/dlp-test-project/jobTriggers/53234423`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/JobTrigger" } + ]; +} + +// Request message for UpdateJobTrigger. +message UpdateJobTriggerRequest { + // Required. Resource name of the project and the triggeredJob, for example + // `projects/dlp-test-project/jobTriggers/53234423`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/JobTrigger" } + ]; + + // New JobTrigger value. + JobTrigger job_trigger = 2; + + // Mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 3; +} + +// Request message for GetJobTrigger. +message GetJobTriggerRequest { + // Required. Resource name of the project and the triggeredJob, for example + // `projects/dlp-test-project/jobTriggers/53234423`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/JobTrigger" } + ]; +} + +// Request message for CreateDiscoveryConfig. +message CreateDiscoveryConfigRequest { + // Required. Parent resource name. + // + // The format of this value varies depending on the scope of the request + // (project or organization): + // + // + Projects scope: + // `projects/{project_id}/locations/{location_id}` + // + Organizations scope: + // `organizations/{org_id}/locations/{location_id}` + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/DiscoveryConfig" + } + ]; + + // Required. The DiscoveryConfig to create. + DiscoveryConfig discovery_config = 2 [(google.api.field_behavior) = REQUIRED]; + + // The config ID can contain uppercase and lowercase letters, + // numbers, and hyphens; that is, it must match the regular + // expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + // characters. Can be empty to allow the system to generate one. + string config_id = 3; +} + +// Request message for UpdateDiscoveryConfig. +message UpdateDiscoveryConfigRequest { + // Required. Resource name of the project and the configuration, for example + // `projects/dlp-test-project/discoveryConfigs/53234423`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/DiscoveryConfig" + } + ]; + + // Required. New DiscoveryConfig value. + DiscoveryConfig discovery_config = 2 [(google.api.field_behavior) = REQUIRED]; + + // Mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 3; +} + +// Request message for GetDiscoveryConfig. +message GetDiscoveryConfigRequest { + // Required. Resource name of the project and the configuration, for example + // `projects/dlp-test-project/discoveryConfigs/53234423`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/DiscoveryConfig" + } + ]; +} + +// Request message for ListDiscoveryConfigs. +message ListDiscoveryConfigsRequest { + // Required. Parent resource name. + // + // The format of this value is as follows: + // `projects/{project_id}/locations/{location_id}` + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/DiscoveryConfig" + } + ]; + + // Page token to continue retrieval. Comes from the previous call + // to ListDiscoveryConfigs. `order_by` field must not + // change for subsequent calls. + string page_token = 2; + + // Size of the page. This value can be limited by a server. + int32 page_size = 3; + + // Comma-separated list of config fields to order by, + // followed by `asc` or `desc` postfix. This list is case insensitive. The + // default sorting order is ascending. Redundant space characters are + // insignificant. + // + // Example: `name asc,update_time, create_time desc` + // + // Supported fields are: + // + // - `last_run_time`: corresponds to the last time the DiscoveryConfig ran. + // - `name`: corresponds to the DiscoveryConfig's name. + // - `status`: corresponds to DiscoveryConfig's status. + string order_by = 4; +} + +// Response message for ListDiscoveryConfigs. +message ListDiscoveryConfigsResponse { + // List of configs, up to page_size in ListDiscoveryConfigsRequest. + repeated DiscoveryConfig discovery_configs = 1; + + // If the next page is available then this value is the next page token to be + // used in the following ListDiscoveryConfigs request. + string next_page_token = 2; +} + +// Request message for DeleteDiscoveryConfig. +message DeleteDiscoveryConfigRequest { + // Required. Resource name of the project and the config, for example + // `projects/dlp-test-project/discoveryConfigs/53234423`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/DiscoveryConfig" + } + ]; +} + +// Request message for CreateDlpJobRequest. Used to initiate long running +// jobs such as calculating risk metrics or inspecting Google Cloud +// Storage. +message CreateDlpJobRequest { + // Required. Parent resource name. + // + // The format of this value varies depending on whether you have [specified a + // processing + // location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + // + // + Projects scope, location specified: + // `projects/{project_id}/locations/{location_id}` + // + Projects scope, no location specified (defaults to global): + // `projects/{project_id}` + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/DlpJob" + } + ]; + + // The configuration details for the specific type of job to run. + oneof job { + // An inspection job scans a storage repository for InfoTypes. + InspectJobConfig inspect_job = 2; + + // A risk analysis job calculates re-identification risk metrics for a + // BigQuery table. + RiskAnalysisJobConfig risk_job = 3; + } + + // The job id can contain uppercase and lowercase letters, + // numbers, and hyphens; that is, it must match the regular + // expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + // characters. Can be empty to allow the system to generate one. + string job_id = 4; + + // Deprecated. This field has no effect. + string location_id = 5; +} + +// Request message for ListJobTriggers. +message ListJobTriggersRequest { + // Required. Parent resource name. + // + // The format of this value varies depending on whether you have [specified a + // processing + // location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + // + // + Projects scope, location specified: + // `projects/{project_id}/locations/{location_id}` + // + Projects scope, no location specified (defaults to global): + // `projects/{project_id}` + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/JobTrigger" + } + ]; + + // Page token to continue retrieval. Comes from the previous call + // to ListJobTriggers. `order_by` field must not + // change for subsequent calls. + string page_token = 2; + + // Size of the page. This value can be limited by a server. + int32 page_size = 3; + + // Comma-separated list of triggeredJob fields to order by, + // followed by `asc` or `desc` postfix. This list is case insensitive. The + // default sorting order is ascending. Redundant space characters are + // insignificant. + // + // Example: `name asc,update_time, create_time desc` + // + // Supported fields are: + // + // - `create_time`: corresponds to the time the JobTrigger was created. + // - `update_time`: corresponds to the time the JobTrigger was last updated. + // - `last_run_time`: corresponds to the last time the JobTrigger ran. + // - `name`: corresponds to the JobTrigger's name. + // - `display_name`: corresponds to the JobTrigger's display name. + // - `status`: corresponds to JobTrigger's status. + string order_by = 4; + + // Allows filtering. + // + // Supported syntax: + // + // * Filter expressions are made up of one or more restrictions. + // * Restrictions can be combined by `AND` or `OR` logical operators. A + // sequence of restrictions implicitly uses `AND`. + // * A restriction has the form of `{field} {operator} {value}`. + // * Supported fields/values for inspect triggers: + // - `status` - HEALTHY|PAUSED|CANCELLED + // - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY + // - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by + // quotation marks. Nanoseconds are ignored. + // - 'error_count' - Number of errors that have occurred while running. + // * The operator must be `=` or `!=` for status and inspected_storage. + // + // The syntax is based on https://google.aip.dev/160. + // + // Examples: + // + // * inspected_storage = cloud_storage AND status = HEALTHY + // * inspected_storage = cloud_storage OR inspected_storage = bigquery + // * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY) + // * last_run_time > \"2017-12-12T00:00:00+00:00\" + // + // The length of this field should be no more than 500 characters. + string filter = 5; + + // The type of jobs. Will use `DlpJobType.INSPECT` if not set. + DlpJobType type = 6; + + // Deprecated. This field has no effect. + string location_id = 7; +} + +// Response message for ListJobTriggers. +message ListJobTriggersResponse { + // List of triggeredJobs, up to page_size in ListJobTriggersRequest. + repeated JobTrigger job_triggers = 1; + + // If the next page is available then this value is the next page token to be + // used in the following ListJobTriggers request. + string next_page_token = 2; +} + +// Request message for DeleteJobTrigger. +message DeleteJobTriggerRequest { + // Required. Resource name of the project and the triggeredJob, for example + // `projects/dlp-test-project/jobTriggers/53234423`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/JobTrigger" } + ]; +} + +// Controls what and how to inspect for findings. +message InspectJobConfig { + // The data to scan. + StorageConfig storage_config = 1; + + // How and what to scan for. + InspectConfig inspect_config = 2; + + // If provided, will be used as the default for all values in InspectConfig. + // `inspect_config` will be merged into the values persisted as part of the + // template. + string inspect_template_name = 3; + + // Actions to execute at the completion of the job. + repeated Action actions = 4; +} + +// Whether a profile being created is the first generation or an update. +enum ProfileGeneration { + // Unused. + PROFILE_GENERATION_UNSPECIFIED = 0; + + // The profile is the first profile for the resource. + PROFILE_GENERATION_NEW = 1; + + // The profile is an update to a previous profile. + PROFILE_GENERATION_UPDATE = 2; +} + +// A task to execute when a data profile has been generated. +message DataProfileAction { + // If set, the detailed data profiles will be persisted to the location + // of your choice whenever updated. + message Export { + // Store all profiles to BigQuery. + // + // * The system will create a new dataset and table for you if none are + // are provided. The dataset will be named + // `sensitive_data_protection_discovery` and table will be named + // `discovery_profiles`. This table will be placed in the same project as + // the container project running the scan. After the first profile is + // generated and the dataset and table are created, the discovery scan + // configuration will be updated with the dataset and table names. + // * See [Analyze data profiles stored in + // BigQuery](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles). + // * See [Sample queries for your BigQuery + // table](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles#sample_sql_queries). + // * Data is inserted using [streaming + // insert](https://cloud.google.com/blog/products/bigquery/life-of-a-bigquery-streaming-insert) + // and so data may be in the buffer for a period of time after the + // profile has finished. + // * The Pub/Sub notification is sent before the streaming buffer is + // guaranteed to be written, so data may not be instantly + // visible to queries by the time your topic receives the Pub/Sub + // notification. + // * The best practice is to use the same table for an entire organization + // so that you can take advantage of the [provided Data Studio + // reports](https://cloud.google.com/sensitive-data-protection/docs/analyze-data-profiles#use_a_premade_report). + // If you use VPC Service Controls to define security perimeters, then + // you must use a separate table for each boundary. + BigQueryTable profile_table = 1; + + // Store sample [data profile + // findings][google.privacy.dlp.v2.DataProfileFinding] in an existing table + // or a new table in an existing dataset. Each regeneration will result in + // new rows in BigQuery. Data is inserted using [streaming + // insert](https://cloud.google.com/blog/products/bigquery/life-of-a-bigquery-streaming-insert) + // and so data may be in the buffer for a period of time after the profile + // has finished. + BigQueryTable sample_findings_table = 2; + } + + // Send a Pub/Sub message into the given Pub/Sub topic to connect other + // systems to data profile generation. The message payload data will + // be the byte serialization of `DataProfilePubSubMessage`. + message PubSubNotification { + // The levels of detail that can be included in the Pub/Sub message. + enum DetailLevel { + // Unused. + DETAIL_LEVEL_UNSPECIFIED = 0; + + // The full table data profile. + TABLE_PROFILE = 1; + + // The name of the profiled resource. + RESOURCE_NAME = 2; + + // The full file store data profile. + FILE_STORE_PROFILE = 3; + } + + // Cloud Pub/Sub topic to send notifications to. + // Format is projects/{project}/topics/{topic}. + string topic = 1; + + // The type of event that triggers a Pub/Sub. At most one + // `PubSubNotification` per EventType is permitted. + EventType event = 2; + + // Conditions (e.g., data risk or sensitivity level) for triggering a + // Pub/Sub. + DataProfilePubSubCondition pubsub_condition = 3; + + // How much data to include in the Pub/Sub message. If the user wishes to + // limit the size of the message, they can use resource_name and fetch the + // profile fields they wish to. Per table profile (not per column). + DetailLevel detail_of_message = 4; + } + + // Types of event that can trigger an action. + enum EventType { + // Unused. + EVENT_TYPE_UNSPECIFIED = 0; + + // New profile (not a re-profile). + NEW_PROFILE = 1; + + // One of the following profile metrics changed: Data risk score, + // Sensitivity score, Resource visibility, Encryption type, Predicted + // infoTypes, Other infoTypes + CHANGED_PROFILE = 2; + + // Table data risk score or sensitivity score increased. + SCORE_INCREASED = 3; + + // A user (non-internal) error occurred. + ERROR_CHANGED = 4; + } + + // Message expressing intention to publish to Google Security Operations. + message PublishToChronicle {} + + // If set, a summary finding will be created or updated in Security Command + // Center for each profile. + message PublishToSecurityCommandCenter {} + + // Create Dataplex Universal Catalog aspects for profiled resources with the + // aspect type Sensitive Data Protection Profile. To learn more about aspects, + // see https://cloud.google.com/sensitive-data-protection/docs/add-aspects. + message PublishToDataplexCatalog { + // Whether creating a Dataplex Universal Catalog aspect for a profiled + // resource should lower the risk of the profile for that resource. This + // also lowers the data risk of resources at the lower levels of the + // resource hierarchy. For example, reducing the data risk of a table data + // profile also reduces the data risk of the constituent column data + // profiles. + bool lower_data_risk_to_low = 1; + } + + // If set, attaches the [tags] + // (https://cloud.google.com/resource-manager/docs/tags/tags-overview) + // provided to profiled resources. Tags support [access + // control](https://cloud.google.com/iam/docs/tags-access-control). You can + // conditionally grant or deny access to a resource based on whether the + // resource has a specific tag. + message TagResources { + // The tag to attach to profiles matching the condition. At most one + // `TagCondition` can be specified per sensitivity level. + message TagCondition { + // The tag value to attach to resources. + TagValue tag = 1; + + // The type of condition on which attaching the tag will be predicated. + oneof type { + // Conditions attaching the tag to a resource on its profile having this + // sensitivity score. + SensitivityScore sensitivity_score = 2; + } + } + + // A value of a tag. + message TagValue { + // The format of the tag value. + oneof format { + // The namespaced name for the tag value to attach to resources. Must be + // in the format `{parent_id}/{tag_key_short_name}/{short_name}`, for + // example, "123456/environment/prod" for an organization parent, or + // "my-project/environment/prod" for a project parent. + string namespaced_value = 1; + } + } + + // The tags to associate with different conditions. + repeated TagCondition tag_conditions = 1; + + // The profile generations for which the tag should be attached to + // resources. If you attach a tag to only new profiles, then if the + // sensitivity score of a profile subsequently changes, its tag doesn't + // change. By default, this field includes only new profiles. To include + // both new and updated profiles for tagging, this field should explicitly + // include both `PROFILE_GENERATION_NEW` and `PROFILE_GENERATION_UPDATE`. + repeated ProfileGeneration profile_generations_to_tag = 2; + + // Whether applying a tag to a resource should lower the risk of the profile + // for that resource. For example, in conjunction with an [IAM deny + // policy](https://cloud.google.com/iam/docs/deny-overview), you can deny + // all principals a permission if a tag value is present, mitigating the + // risk of the resource. This also lowers the data risk of resources at the + // lower levels of the resource hierarchy. For example, reducing the data + // risk of a table data profile also reduces the data risk of the + // constituent column data profiles. + bool lower_data_risk_to_low = 3; + } + + // Type of action to execute when a profile is generated. + oneof action { + // Export data profiles into a provided location. + Export export_data = 1; + + // Publish a message into the Pub/Sub topic. + PubSubNotification pub_sub_notification = 2; + + // Publishes generated data profiles to Google Security Operations. + // For more information, see [Use Sensitive Data Protection data in + // context-aware + // analytics](https://cloud.google.com/chronicle/docs/detection/usecase-dlp-high-risk-user-download). + PublishToChronicle publish_to_chronicle = 3; + + // Publishes findings to Security Command Center for each data profile. + PublishToSecurityCommandCenter publish_to_scc = 4; + + // Tags the profiled resources with the specified tag values. + TagResources tag_resources = 8; + + // Publishes a portion of each profile to Dataplex Universal Catalog with + // the aspect type Sensitive Data Protection Profile. + PublishToDataplexCatalog publish_to_dataplex_catalog = 9; + } +} + +// Details about a piece of potentially sensitive information that was detected +// when the data resource was profiled. +message DataProfileFinding { + // The content that was found. Even if the content is not textual, it + // may be converted to a textual representation here. If the finding exceeds + // 4096 bytes in length, the quote may be omitted. + string quote = 1; + + // The [type of + // content](https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference) + // that might have been found. + InfoType infotype = 2; + + // Contains data parsed from quotes. Currently supported infoTypes: DATE, + // DATE_OF_BIRTH, and TIME. + QuoteInfo quote_info = 3; + + // Resource name of the data profile associated with the finding. + string data_profile_resource_name = 4; + + // A unique identifier for the finding. + string finding_id = 5; + + // Timestamp when the finding was detected. + google.protobuf.Timestamp timestamp = 6; + + // Where the content was found. + DataProfileFindingLocation location = 7; + + // How broadly a resource has been shared. + ResourceVisibility resource_visibility = 8; + + // The [full resource + // name](https://cloud.google.com/apis/design/resource_names#full_resource_name) + // of the resource profiled for this finding. + string full_resource_name = 9; + + // The type of the resource that was profiled. + DataSourceType data_source_type = 10; +} + +// Location of a data profile finding within a resource. +message DataProfileFindingLocation { + // Name of the container where the finding is located. + // The top-level name is the source file name or table name. Names of some + // common storage containers are formatted as follows: + // + // * BigQuery tables: `{project_id}:{dataset_id}.{table_id}` + // * Cloud Storage files: `gs://{bucket}/{path}` + string container_name = 1; + + // Additional location details that may be provided for some types of + // profiles. At this time, only findings for table data profiles include such + // details. + oneof location_extra_details { + // Location of a finding within a resource that produces a table data + // profile. + DataProfileFindingRecordLocation data_profile_finding_record_location = 2; + } +} + +// Location of a finding within a resource that produces a table data profile. +message DataProfileFindingRecordLocation { + // Field ID of the column containing the finding. + FieldId field = 1; +} + +// Configuration for setting up a job to scan resources for profile generation. +// Only one data profile configuration may exist per organization, folder, +// or project. +// +// The generated data profiles are retained according to the +// [data retention policy] +// (https://cloud.google.com/sensitive-data-protection/docs/data-profiles#retention). +message DataProfileJobConfig { + // The data to scan. + DataProfileLocation location = 1; + + // The project that will run the scan. The DLP service + // account that exists within this project must have access to all resources + // that are profiled, and the DLP API must be enabled. + string project_id = 5; + + // Must be set only when scanning other clouds. + OtherCloudDiscoveryStartingLocation other_cloud_starting_location = 8; + + // Detection logic for profile generation. + // + // Not all template features are used by profiles. FindingLimits, + // include_quote and exclude_info_types have no impact on + // data profiling. + // + // Multiple templates may be provided if there is data in multiple regions. + // At most one template must be specified per-region (including "global"). + // Each region is scanned using the applicable template. If no region-specific + // template is specified, but a "global" template is specified, it will be + // copied to that region and used instead. If no global or region-specific + // template is provided for a region with data, that region's data will not be + // scanned. + // + // For more information, see + // https://cloud.google.com/sensitive-data-protection/docs/data-profiles#data-residency. + repeated string inspect_templates = 7; + + // Actions to execute at the completion of the job. + repeated DataProfileAction data_profile_actions = 6; +} + +// A pattern to match against one or more tables, datasets, or projects that +// contain BigQuery tables. At least one pattern must be specified. +// Regular expressions use RE2 +// [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found +// under the google/re2 repository on GitHub. +message BigQueryRegex { + // For organizations, if unset, will match all projects. Has no effect + // for data profile configurations created within a project. + string project_id_regex = 1; + + // If unset, this property matches all datasets. + string dataset_id_regex = 2; + + // If unset, this property matches all tables. + string table_id_regex = 3; +} + +// A collection of regular expressions to determine what tables to match +// against. +message BigQueryRegexes { + // A single BigQuery regular expression pattern to match against one or more + // tables, datasets, or projects that contain BigQuery tables. + repeated BigQueryRegex patterns = 1; +} + +// The types of BigQuery tables supported by Cloud DLP. +message BigQueryTableTypes { + // A set of BigQuery table types. + repeated BigQueryTableType types = 1; +} + +// Over time new types may be added. Currently VIEW, MATERIALIZED_VIEW, and +// non-BigLake external tables are not supported. +enum BigQueryTableTypeCollection { + // Unused. + BIG_QUERY_COLLECTION_UNSPECIFIED = 0; + + // Automatically generate profiles for all tables, even if the table type is + // not yet fully supported for analysis. Profiles for unsupported tables will + // be generated with errors to indicate their partial support. When full + // support is added, the tables will automatically be profiled during the next + // scheduled run. + BIG_QUERY_COLLECTION_ALL_TYPES = 1; + + // Only those types fully supported will be profiled. Will expand + // automatically as Cloud DLP adds support for new table types. Unsupported + // table types will not have partial profiles generated. + BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES = 2; +} + +// Over time new types may be added. Currently VIEW, MATERIALIZED_VIEW, and +// non-BigLake external tables are not supported. +enum BigQueryTableType { + // Unused. + BIG_QUERY_TABLE_TYPE_UNSPECIFIED = 0; + + // A normal BigQuery table. + BIG_QUERY_TABLE_TYPE_TABLE = 1; + + // A table that references data stored in Cloud Storage. + BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE = 2; + + // A snapshot of a BigQuery table. + BIG_QUERY_TABLE_TYPE_SNAPSHOT = 3; +} + +// How frequently data profiles can be updated. New options can be added at a +// later time. +enum DataProfileUpdateFrequency { + // Unspecified. + UPDATE_FREQUENCY_UNSPECIFIED = 0; + + // After the data profile is created, it will never be updated. + UPDATE_FREQUENCY_NEVER = 1; + + // The data profile can be updated up to once every 24 hours. + UPDATE_FREQUENCY_DAILY = 2; + + // The data profile can be updated up to once every 30 days. Default. + UPDATE_FREQUENCY_MONTHLY = 4; +} + +// Do not profile the tables. +message Disabled {} + +// The data that will be profiled. +message DataProfileLocation { + // The location to be scanned. + oneof location { + // The ID of an organization to scan. + int64 organization_id = 1; + + // The ID of the folder within an organization to scan. + int64 folder_id = 2; + } +} + +// Configuration for discovery to scan resources for profile generation. +// Only one discovery configuration may exist per organization, folder, +// or project. +// +// The generated data profiles are retained according to the +// [data retention policy] +// (https://cloud.google.com/sensitive-data-protection/docs/data-profiles#retention). +message DiscoveryConfig { + option (google.api.resource) = { + type: "dlp.googleapis.com/DiscoveryConfig" + pattern: "projects/{project}/locations/{location}/discoveryConfigs/{discovery_config}" + }; + + // Project and scan location information. Only set when the parent is an org. + message OrgConfig { + // The data to scan: folder, org, or project + DiscoveryStartingLocation location = 1; + + // The project that will run the scan. The DLP service + // account that exists within this project must have access to all resources + // that are profiled, and the DLP API must be enabled. + string project_id = 2; + } + + // Whether the discovery config is currently active. New options may be added + // at a later time. + enum Status { + // Unused + STATUS_UNSPECIFIED = 0; + + // The discovery config is currently active. + RUNNING = 1; + + // The discovery config is paused temporarily. + PAUSED = 2; + } + + // Unique resource name for the DiscoveryConfig, assigned by the service when + // the DiscoveryConfig is created, for example + // `projects/dlp-test-project/locations/global/discoveryConfigs/53234423`. + string name = 1; + + // Display name (max 100 chars) + string display_name = 11; + + // Only set when the parent is an org. + OrgConfig org_config = 2; + + // Must be set only when scanning other clouds. + OtherCloudDiscoveryStartingLocation other_cloud_starting_location = 12; + + // Detection logic for profile generation. + // + // Not all template features are used by Discovery. FindingLimits, + // include_quote and exclude_info_types have no impact on + // Discovery. + // + // Multiple templates may be provided if there is data in multiple regions. + // At most one template must be specified per-region (including "global"). + // Each region is scanned using the applicable template. If no region-specific + // template is specified, but a "global" template is specified, it will be + // copied to that region and used instead. If no global or region-specific + // template is provided for a region with data, that region's data will not be + // scanned. + // + // For more information, see + // https://cloud.google.com/sensitive-data-protection/docs/data-profiles#data-residency. + repeated string inspect_templates = 3; + + // Actions to execute at the completion of scanning. + repeated DataProfileAction actions = 4; + + // Target to match against for determining what to scan and how frequently. + repeated DiscoveryTarget targets = 5; + + // Output only. A stream of errors encountered when the config was activated. + // Repeated errors may result in the config automatically being paused. Output + // only field. Will return the last 100 errors. Whenever the config is + // modified this list will be cleared. + repeated Error errors = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The creation timestamp of a DiscoveryConfig. + google.protobuf.Timestamp create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The last update timestamp of a DiscoveryConfig. + google.protobuf.Timestamp update_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The timestamp of the last time this config was executed. + google.protobuf.Timestamp last_run_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. A status for this configuration. + Status status = 10 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Processing location configuration. Vertex AI dataset scanning + // will set processing_location.image_fallback_type to MultiRegionProcessing + // by default. + ProcessingLocation processing_location = 13 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Target used to match against for Discovery. +message DiscoveryTarget { + // A target to match against for Discovery. + oneof target { + // BigQuery target for Discovery. The first target to match a table will be + // the one applied. + BigQueryDiscoveryTarget big_query_target = 1; + + // Cloud SQL target for Discovery. The first target to match a table will be + // the one applied. + CloudSqlDiscoveryTarget cloud_sql_target = 2; + + // Discovery target that looks for credentials and secrets stored in cloud + // resource metadata and reports them as vulnerabilities to Security Command + // Center. Only one target of this type is allowed. + SecretsDiscoveryTarget secrets_target = 3; + + // Cloud Storage target for Discovery. The first target to match a table + // will be the one applied. + CloudStorageDiscoveryTarget cloud_storage_target = 4; + + // Other clouds target for discovery. The first target to match a resource + // will be the one applied. + OtherCloudDiscoveryTarget other_cloud_target = 5; + + // Vertex AI dataset target for Discovery. The first target to match a + // dataset will be the one applied. Note that discovery for Vertex AI can + // incur Cloud Storage Class B operation charges for storage.objects.get + // operations and retrieval fees. For more information, see [Cloud Storage + // pricing](https://cloud.google.com/storage/pricing#price-tables). + // Note that discovery for Vertex AI dataset will not be able to scan images + // unless DiscoveryConfig.processing_location.image_fallback_location has + // multi_region_processing or global_processing configured. + VertexDatasetDiscoveryTarget vertex_dataset_target = 7; + } +} + +// Target used to match against for discovery with BigQuery tables +message BigQueryDiscoveryTarget { + // Required. The tables the discovery cadence applies to. The first target + // with a matching filter will be the one to apply to a table. + DiscoveryBigQueryFilter filter = 1 [(google.api.field_behavior) = REQUIRED]; + + // In addition to matching the filter, these conditions must be true + // before a profile is generated. + DiscoveryBigQueryConditions conditions = 2; + + // The generation rule includes the logic on how frequently + // to update the data profiles. If not specified, discovery will re-run and + // update no more than once a month if new columns appear in the table. + oneof frequency { + // How often and when to update profiles. New tables that match both the + // filter and conditions are scanned as quickly as possible depending on + // system capacity. + DiscoveryGenerationCadence cadence = 3; + + // Tables that match this filter will not have profiles created. + Disabled disabled = 4; + } +} + +// Determines what tables will have profiles generated within an organization +// or project. Includes the ability to filter by regular expression patterns +// on project ID, dataset ID, and table ID. +message DiscoveryBigQueryFilter { + // Catch-all for all other tables not specified by other filters. Should + // always be last, except for single-table configurations, which will only + // have a TableReference target. + message AllOtherBigQueryTables {} + + // Whether the filter applies to a specific set of tables or all other tables + // within the location being profiled. The first filter to match will be + // applied, regardless of the condition. If none is set, will default to + // `other_tables`. + oneof filter { + // A specific set of tables for this filter to apply to. A table collection + // must be specified in only one filter per config. + // If a table id or dataset is empty, Cloud DLP assumes all tables in that + // collection must be profiled. Must specify a project ID. + BigQueryTableCollection tables = 1; + + // Catch-all. This should always be the last filter in the list because + // anything above it will apply first. Should only appear once in a + // configuration. If none is specified, a default one will be added + // automatically. + AllOtherBigQueryTables other_tables = 2; + + // The table to scan. Discovery configurations including this can only + // include one DiscoveryTarget (the DiscoveryTarget with this + // TableReference). + TableReference table_reference = 3; + } +} + +// Specifies a collection of BigQuery tables. Used for Discovery. +message BigQueryTableCollection { + // Maximum of 100 entries. + // The first filter containing a pattern that matches a table will be used. + oneof pattern { + // A collection of regular expressions to match a BigQuery table against. + BigQueryRegexes include_regexes = 1; + } +} + +// Requirements that must be true before a table is scanned in discovery for the +// first time. There is an AND relationship between the top-level attributes. +// Additionally, minimum conditions with an OR relationship that must be met +// before Cloud DLP scans a table can be set (like a minimum row count or a +// minimum table age). +message DiscoveryBigQueryConditions { + // There is an OR relationship between these attributes. They are used to + // determine if a table should be scanned or not in Discovery. + message OrConditions { + // Minimum number of rows that should be present before Cloud DLP + // profiles a table + int32 min_row_count = 1; + + // Minimum age a table must have before Cloud DLP can profile it. Value must + // be 1 hour or greater. + google.protobuf.Duration min_age = 2; + } + + // BigQuery table must have been created after this date. Used to avoid + // backfilling. + google.protobuf.Timestamp created_after = 1; + + // The type of BigQuery tables to scan. If nothing is set the default + // behavior is to scan only tables of type TABLE and to give errors + // for all unsupported tables. + oneof included_types { + // Restrict discovery to specific table types. + BigQueryTableTypes types = 2; + + // Restrict discovery to categories of table types. + BigQueryTableTypeCollection type_collection = 3; + } + + // At least one of the conditions must be true for a table to be scanned. + OrConditions or_conditions = 4; +} + +// What must take place for a profile to be updated and how +// frequently it should occur. +// New tables are scanned as quickly as possible depending on system +// capacity. +message DiscoveryGenerationCadence { + // Governs when to update data profiles when a schema is modified. + DiscoverySchemaModifiedCadence schema_modified_cadence = 1; + + // Governs when to update data profiles when a table is modified. + DiscoveryTableModifiedCadence table_modified_cadence = 2; + + // Governs when to update data profiles when the inspection rules + // defined by the `InspectTemplate` change. + // If not set, changing the template will not cause a data profile to update. + DiscoveryInspectTemplateModifiedCadence inspect_template_modified_cadence = 3; + + // Frequency at which profiles should be updated, regardless of whether the + // underlying resource has changed. Defaults to never. + DataProfileUpdateFrequency refresh_frequency = 4; +} + +// The cadence at which to update data profiles when a table is modified. +message DiscoveryTableModifiedCadence { + // The type of events to consider when deciding if the table has been + // modified and should have the profile updated. Defaults to + // MODIFIED_TIMESTAMP. + repeated BigQueryTableModification types = 1; + + // How frequently data profiles can be updated when tables are modified. + // Defaults to never. + DataProfileUpdateFrequency frequency = 2; +} + +// Attributes evaluated to determine if a table has been modified. New values +// may be added at a later time. +enum BigQueryTableModification { + // Unused. + TABLE_MODIFICATION_UNSPECIFIED = 0; + + // A table will be considered modified when the last_modified_time from + // BigQuery has been updated. + TABLE_MODIFIED_TIMESTAMP = 1; +} + +// The cadence at which to update data profiles when a schema is modified. +message DiscoverySchemaModifiedCadence { + // The type of events to consider when deciding if the table's schema + // has been modified and should have the profile updated. Defaults to + // NEW_COLUMNS. + repeated BigQuerySchemaModification types = 1; + + // How frequently profiles may be updated when schemas are + // modified. Defaults to monthly. + DataProfileUpdateFrequency frequency = 2; +} + +// Attributes evaluated to determine if a schema has been modified. New values +// may be added at a later time. +enum BigQuerySchemaModification { + // Unused + SCHEMA_MODIFICATION_UNSPECIFIED = 0; + + // Profiles should be regenerated when new columns are added to the table. + // Default. + SCHEMA_NEW_COLUMNS = 1; + + // Profiles should be regenerated when columns are removed from the table. + SCHEMA_REMOVED_COLUMNS = 2; +} + +// The cadence at which to update data profiles when the inspection rules +// defined by the `InspectTemplate` change. +message DiscoveryInspectTemplateModifiedCadence { + // How frequently data profiles can be updated when the template is modified. + // Defaults to never. + DataProfileUpdateFrequency frequency = 1; +} + +// Target used to match against for discovery with Cloud SQL tables. +message CloudSqlDiscoveryTarget { + // Required. The tables the discovery cadence applies to. The first target + // with a matching filter will be the one to apply to a table. + DiscoveryCloudSqlFilter filter = 1 [(google.api.field_behavior) = REQUIRED]; + + // In addition to matching the filter, these conditions must be true + // before a profile is generated. + DiscoveryCloudSqlConditions conditions = 2; + + // Type of schedule. + oneof cadence { + // How often and when to update profiles. New tables that match both the + // filter and conditions are scanned as quickly as possible depending on + // system capacity. + DiscoveryCloudSqlGenerationCadence generation_cadence = 3; + + // Disable profiling for database resources that match this filter. + Disabled disabled = 4; + } +} + +// Determines what tables will have profiles generated within an organization +// or project. Includes the ability to filter by regular expression patterns +// on project ID, location, instance, database, and database resource name. +message DiscoveryCloudSqlFilter { + // Whether the filter applies to a specific set of database resources or all + // other database resources within the location being profiled. The first + // filter to match will be applied, regardless of the condition. If none is + // set, will default to `others`. + oneof filter { + // A specific set of database resources for this filter to apply to. + DatabaseResourceCollection collection = 1; + + // Catch-all. This should always be the last target in the list because + // anything above it will apply first. Should only appear once in a + // configuration. If none is specified, a default one will be added + // automatically. + AllOtherDatabaseResources others = 2; + + // The database resource to scan. Targets including this can only include + // one target (the target with this database resource reference). + DatabaseResourceReference database_resource_reference = 3; + } +} + +// Match database resources using regex filters. Examples of database +// resources are tables, views, and stored procedures. +message DatabaseResourceCollection { + // The first filter containing a pattern that matches a database resource will + // be used. + oneof pattern { + // A collection of regular expressions to match a database resource against. + DatabaseResourceRegexes include_regexes = 1; + } +} + +// A collection of regular expressions to determine what database resources to +// match against. +message DatabaseResourceRegexes { + // A group of regular expression patterns to match against one or more + // database resources. + // Maximum of 100 entries. The sum of all regular expression's length can't + // exceed 10 KiB. + repeated DatabaseResourceRegex patterns = 1; +} + +// A pattern to match against one or more database resources. At least one +// pattern must be specified. Regular expressions use RE2 +// [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found +// under the google/re2 repository on GitHub. +message DatabaseResourceRegex { + // For organizations, if unset, will match all projects. Has no effect + // for configurations created within a project. + string project_id_regex = 1; + + // Regex to test the instance name against. If empty, all instances match. + string instance_regex = 2; + + // Regex to test the database name against. If empty, all databases match. + string database_regex = 3; + + // Regex to test the database resource's name against. An example of a + // database resource name is a table's name. Other database resource names + // like view names could be included in the future. If empty, all database + // resources match. + string database_resource_name_regex = 4; +} + +// Match database resources not covered by any other filter. +message AllOtherDatabaseResources {} + +// Identifies a single database resource, like a table within a database. +message DatabaseResourceReference { + // Required. If within a project-level config, then this must match the + // config's project ID. + string project_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The instance where this resource is located. For example: Cloud + // SQL instance ID. + string instance = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of a database within the instance. + string database = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. Name of a database resource, for example, a table within the + // database. + string database_resource = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Requirements that must be true before a table is profiled for the +// first time. +message DiscoveryCloudSqlConditions { + // The database engines that should be profiled. + enum DatabaseEngine { + // Unused. + DATABASE_ENGINE_UNSPECIFIED = 0; + + // Include all supported database engines. + ALL_SUPPORTED_DATABASE_ENGINES = 1; + + // MySQL database. + MYSQL = 2; + + // PostgreSQL database. + POSTGRES = 3; + } + + // Cloud SQL database resource types. New values can be added at a later time. + enum DatabaseResourceType { + // Unused. + DATABASE_RESOURCE_TYPE_UNSPECIFIED = 0; + + // Includes database resource types that become supported at a later time. + DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES = 1; + + // Tables. + DATABASE_RESOURCE_TYPE_TABLE = 2; + } + + // Optional. Database engines that should be profiled. + // Optional. Defaults to ALL_SUPPORTED_DATABASE_ENGINES if unspecified. + repeated DatabaseEngine database_engines = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Data profiles will only be generated for the database resource types + // specified in this field. + // If not specified, defaults to [DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES]. + repeated DatabaseResourceType types = 3; +} + +// How often existing tables should have their profiles refreshed. +// New tables are scanned as quickly as possible depending on system +// capacity. +message DiscoveryCloudSqlGenerationCadence { + // How frequently to modify the profile when the table's schema is modified. + message SchemaModifiedCadence { + // The type of modification that causes a profile update. + enum CloudSqlSchemaModification { + // Unused. + SQL_SCHEMA_MODIFICATION_UNSPECIFIED = 0; + + // New columns have appeared. + NEW_COLUMNS = 1; + + // Columns have been removed from the table. + REMOVED_COLUMNS = 2; + } + + // The types of schema modifications to consider. + // Defaults to NEW_COLUMNS. + repeated CloudSqlSchemaModification types = 1; + + // Frequency to regenerate data profiles when the schema is modified. + // Defaults to monthly. + DataProfileUpdateFrequency frequency = 2; + } + + // When to reprofile if the schema has changed. + SchemaModifiedCadence schema_modified_cadence = 1; + + // Data changes (non-schema changes) in Cloud SQL tables can't trigger + // reprofiling. If you set this field, profiles are refreshed at this + // frequency regardless of whether the underlying tables have changed. + // Defaults to never. + DataProfileUpdateFrequency refresh_frequency = 2; + + // Governs when to update data profiles when the inspection rules + // defined by the `InspectTemplate` change. + // If not set, changing the template will not cause a data profile to update. + DiscoveryInspectTemplateModifiedCadence inspect_template_modified_cadence = 3; +} + +// Discovery target for credentials and secrets in cloud resource metadata. +// +// This target does not include any filtering or frequency controls. Cloud +// DLP will scan cloud resource metadata for secrets daily. +// +// No inspect template should be included in the discovery config for a +// security benchmarks scan. Instead, the built-in list of secrets and +// credentials infoTypes will be used (see +// https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference#credentials_and_secrets). +// +// Credentials and secrets discovered will be reported as vulnerabilities to +// Security Command Center. +message SecretsDiscoveryTarget {} + +// Target used to match against for discovery with Cloud Storage buckets. +message CloudStorageDiscoveryTarget { + // Required. The buckets the generation_cadence applies to. The first target + // with a matching filter will be the one to apply to a bucket. + DiscoveryCloudStorageFilter filter = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. In addition to matching the filter, these conditions must be true + // before a profile is generated. + DiscoveryFileStoreConditions conditions = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // How often and when to update profiles. + oneof cadence { + // Optional. How often and when to update profiles. New buckets that match + // both the filter and conditions are scanned as quickly as possible + // depending on system capacity. + DiscoveryCloudStorageGenerationCadence generation_cadence = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Disable profiling for buckets that match this filter. + Disabled disabled = 3 [(google.api.field_behavior) = OPTIONAL]; + } +} + +// Determines which buckets will have profiles generated within an organization +// or project. Includes the ability to filter by regular expression patterns +// on project ID and bucket name. +message DiscoveryCloudStorageFilter { + // Whether the filter applies to a specific set of buckets or all + // other buckets within the location being profiled. The first + // filter to match will be applied, regardless of the condition. If none is + // set, will default to `others`. + oneof filter { + // Optional. A specific set of buckets for this filter to apply to. + FileStoreCollection collection = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The bucket to scan. Targets including this can only include one + // target (the target with this bucket). This enables profiling the contents + // of a single bucket, while the other options allow for easy profiling of + // many bucets within a project or an organization. + CloudStorageResourceReference cloud_storage_resource_reference = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Catch-all. This should always be the last target in the list + // because anything above it will apply first. Should only appear once in a + // configuration. If none is specified, a default one will be added + // automatically. + AllOtherResources others = 100 [(google.api.field_behavior) = OPTIONAL]; + } +} + +// Match file stores (e.g. buckets) using filters. +message FileStoreCollection { + // The first filter containing a pattern that matches a file store will be + // used. + oneof pattern { + // Optional. A collection of regular expressions to match a file store + // against. + FileStoreRegexes include_regexes = 1 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. To be included in the collection, a resource must meet all of the + // following requirements: + // + // - If tag filters are provided, match all provided tag filters. + // - If one or more patterns are specified, match at least one pattern. + // + // For a resource to match the tag filters, the resource must have all of the + // provided tags attached. Tags refer to Resource Manager tags bound to the + // resource or its ancestors. For more information, see [Manage + // schedules](https://cloud.google.com/sensitive-data-protection/docs/profile-project-cloud-storage#manage-schedules). + TagFilters include_tags = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A collection of regular expressions to determine what file store to match +// against. +message FileStoreRegexes { + // Required. The group of regular expression patterns to match against one or + // more file stores. Maximum of 100 entries. The sum of all regular + // expression's length can't exceed 10 KiB. + repeated FileStoreRegex patterns = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// A pattern to match against one or more file stores. +message FileStoreRegex { + // The type of resource regex to use. + oneof resource_regex { + // Optional. Regex for Cloud Storage. + CloudStorageRegex cloud_storage_regex = 1 + [(google.api.field_behavior) = OPTIONAL]; + } +} + +// A pattern to match against one or more file stores. At least one +// pattern must be specified. Regular expressions use RE2 +// [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found +// under the google/re2 repository on GitHub. +message CloudStorageRegex { + // Optional. For organizations, if unset, will match all projects. + string project_id_regex = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Regex to test the bucket name against. If empty, all buckets + // match. Example: "marketing2021" or "(marketing)\d{4}" will both match the + // bucket gs://marketing2021 + string bucket_name_regex = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Identifies a single Cloud Storage bucket. +message CloudStorageResourceReference { + // Required. The bucket to scan. + string bucket_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. If within a project-level config, then this must match the + // config's project id. + string project_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// How often existing buckets should have their profiles refreshed. +// New buckets are scanned as quickly as possible depending on system +// capacity. +message DiscoveryCloudStorageGenerationCadence { + // Optional. Data changes in Cloud Storage can't trigger reprofiling. If you + // set this field, profiles are refreshed at this frequency regardless of + // whether the underlying buckets have changed. Defaults to never. + DataProfileUpdateFrequency refresh_frequency = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Governs when to update data profiles when the inspection rules + // defined by the `InspectTemplate` change. + // If not set, changing the template will not cause a data profile to update. + DiscoveryInspectTemplateModifiedCadence inspect_template_modified_cadence = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Requirements that must be true before a Cloud Storage bucket or object is +// scanned in discovery for the first time. There is an AND relationship between +// the top-level attributes. +message DiscoveryCloudStorageConditions { + // The attribute of an object. See + // https://cloud.google.com/storage/docs/storage-classes for more information + // on storage classes. + enum CloudStorageObjectAttribute { + // Unused. + CLOUD_STORAGE_OBJECT_ATTRIBUTE_UNSPECIFIED = 0; + + // Scan objects regardless of the attribute. + ALL_SUPPORTED_OBJECTS = 1; + + // Scan objects with the standard storage class. + STANDARD = 2; + + // Scan objects with the nearline storage class. This will incur retrieval + // fees. + NEARLINE = 3; + + // Scan objects with the coldline storage class. This will incur retrieval + // fees. + COLDLINE = 4; + + // Scan objects with the archive storage class. This will incur retrieval + // fees. + ARCHIVE = 5; + + // Scan objects with the regional storage class. + REGIONAL = 6; + + // Scan objects with the multi-regional storage class. + MULTI_REGIONAL = 7; + + // Scan objects with the dual-regional storage class. This will incur + // retrieval fees. + DURABLE_REDUCED_AVAILABILITY = 8; + } + + // The attribute of a bucket. + enum CloudStorageBucketAttribute { + // Unused. + CLOUD_STORAGE_BUCKET_ATTRIBUTE_UNSPECIFIED = 0; + + // Scan buckets regardless of the attribute. + ALL_SUPPORTED_BUCKETS = 1; + + // Buckets with [Autoclass](https://cloud.google.com/storage/docs/autoclass) + // disabled. Only one of + // AUTOCLASS_DISABLED or AUTOCLASS_ENABLED should be set. + AUTOCLASS_DISABLED = 2; + + // Buckets with [Autoclass](https://cloud.google.com/storage/docs/autoclass) + // enabled. Only one of + // AUTOCLASS_DISABLED or AUTOCLASS_ENABLED should be set. Scanning + // Autoclass-enabled buckets can affect object storage classes. + AUTOCLASS_ENABLED = 3; + } + + // Required. Only objects with the specified attributes will be scanned. If an + // object has one of the specified attributes but is inside an excluded + // bucket, it will not be scanned. Defaults to [ALL_SUPPORTED_OBJECTS]. A + // profile will be created even if no objects match the + // included_object_attributes. + repeated CloudStorageObjectAttribute included_object_attributes = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Only objects with the specified attributes will be scanned. + // Defaults to [ALL_SUPPORTED_BUCKETS] if unset. + repeated CloudStorageBucketAttribute included_bucket_attributes = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Requirements that must be true before a file store is scanned in discovery +// for the first time. There is an AND relationship between the top-level +// attributes. +message DiscoveryFileStoreConditions { + // Optional. File store must have been created after this date. Used to avoid + // backfilling. + google.protobuf.Timestamp created_after = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Minimum age a file store must have. If set, the value must be 1 + // hour or greater. + google.protobuf.Duration min_age = 2 [(google.api.field_behavior) = OPTIONAL]; + + // File store specific conditions. + oneof conditions { + // Optional. Cloud Storage conditions. + DiscoveryCloudStorageConditions cloud_storage_conditions = 3 + [(google.api.field_behavior) = OPTIONAL]; + } +} + +// Target used to match against for discovery of resources from other clouds. +// An [AWS connector in Security Command Center +// (Enterprise](https://cloud.google.com/security-command-center/docs/connect-scc-to-aws) +// is required to use this feature. +message OtherCloudDiscoveryTarget { + // Required. The type of data profiles generated by this discovery target. + // Supported values are: + // * aws/s3/bucket + DataSourceType data_source_type = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resources that the discovery cadence applies to. The + // first target with a matching filter will be the one to apply to a resource. + DiscoveryOtherCloudFilter filter = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. In addition to matching the filter, these conditions must be true + // before a profile is generated. + DiscoveryOtherCloudConditions conditions = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Type of cadence. + oneof cadence { + // How often and when to update data profiles. New resources that match both + // the filter and conditions are scanned as quickly as possible depending on + // system capacity. + DiscoveryOtherCloudGenerationCadence generation_cadence = 4; + + // Disable profiling for resources that match this filter. + Disabled disabled = 5; + } +} + +// Determines which resources from the other cloud will have profiles generated. +// Includes the ability to filter by resource names. +message DiscoveryOtherCloudFilter { + // Whether the filter applies to a specific set of resources or all + // other resources. The first filter to match will be applied, regardless of + // the condition. Defaults to `others` if none is set. + oneof filter { + // A collection of resources for this filter to apply to. + OtherCloudResourceCollection collection = 1; + + // The resource to scan. Configs using this filter can only have one target + // (the target with this single resource reference). + OtherCloudSingleResourceReference single_resource = 2; + + // Optional. Catch-all. This should always be the last target in the list + // because anything above it will apply first. Should only appear once in a + // configuration. If none is specified, a default one will be added + // automatically. + AllOtherResources others = 100 [(google.api.field_behavior) = OPTIONAL]; + } +} + +// Match resources using regex filters. +message OtherCloudResourceCollection { + // The first filter containing a pattern that matches a resource will be used. + oneof pattern { + // A collection of regular expressions to match a resource against. + OtherCloudResourceRegexes include_regexes = 1; + } +} + +// A collection of regular expressions to determine what resources to match +// against. +message OtherCloudResourceRegexes { + // A group of regular expression patterns to match against one or more + // resources. + // Maximum of 100 entries. The sum of all regular expression's length can't + // exceed 10 KiB. + repeated OtherCloudResourceRegex patterns = 1; +} + +// A pattern to match against one or more resources. At least one pattern must +// be specified. Regular expressions use RE2 +// [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found +// under the google/re2 repository on GitHub. +message OtherCloudResourceRegex { + // The type of resource regex to use. + oneof resource_regex { + // Regex for Amazon S3 buckets. + AmazonS3BucketRegex amazon_s3_bucket_regex = 1; + } +} + +// AWS account regex. +message AwsAccountRegex { + // Optional. Regex to test the AWS account ID against. + // If empty, all accounts match. + string account_id_regex = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Amazon S3 bucket regex. +message AmazonS3BucketRegex { + // The AWS account regex. + AwsAccountRegex aws_account_regex = 1; + + // Optional. Regex to test the bucket name against. + // If empty, all buckets match. + string bucket_name_regex = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Identifies a single resource, like a single Amazon S3 bucket. +message OtherCloudSingleResourceReference { + // The resource to scan. + oneof resource { + // Amazon S3 bucket. + AmazonS3Bucket amazon_s3_bucket = 1; + } +} + +// AWS account. +message AwsAccount { + // Required. AWS account ID. + string account_id = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Amazon S3 bucket. +message AmazonS3Bucket { + // The AWS account. + AwsAccount aws_account = 1; + + // Required. The bucket name. + string bucket_name = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Requirements that must be true before a resource is profiled for the first +// time. +message DiscoveryOtherCloudConditions { + // Minimum age a resource must be before Cloud DLP can profile it. Value must + // be 1 hour or greater. + google.protobuf.Duration min_age = 1; + + // The conditions to apply. + oneof conditions { + // Amazon S3 bucket conditions. + AmazonS3BucketConditions amazon_s3_bucket_conditions = 2; + } +} + +// Amazon S3 bucket conditions. +message AmazonS3BucketConditions { + // Supported Amazon S3 bucket types. + // Defaults to TYPE_ALL_SUPPORTED. + enum BucketType { + // Unused. + TYPE_UNSPECIFIED = 0; + + // All supported classes. + TYPE_ALL_SUPPORTED = 1; + + // A general purpose Amazon S3 bucket. + TYPE_GENERAL_PURPOSE = 2; + } + + // Supported Amazon S3 object storage classes. + // Defaults to ALL_SUPPORTED_CLASSES. + enum ObjectStorageClass { + // Unused. + UNSPECIFIED = 0; + + // All supported classes. + ALL_SUPPORTED_CLASSES = 1; + + // Standard object class. + STANDARD = 2; + + // Standard - infrequent access object class. + STANDARD_INFREQUENT_ACCESS = 4; + + // Glacier - instant retrieval object class. + GLACIER_INSTANT_RETRIEVAL = 6; + + // Objects in the S3 Intelligent-Tiering access tiers. + INTELLIGENT_TIERING = 7; + } + + // Optional. Bucket types that should be profiled. + // Optional. Defaults to TYPE_ALL_SUPPORTED if unspecified. + repeated BucketType bucket_types = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Object classes that should be profiled. + // Optional. Defaults to ALL_SUPPORTED_CLASSES if unspecified. + repeated ObjectStorageClass object_storage_classes = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// How often existing resources should have their profiles refreshed. +// New resources are scanned as quickly as possible depending on system +// capacity. +message DiscoveryOtherCloudGenerationCadence { + // Optional. Frequency to update profiles regardless of whether the underlying + // resource has changes. Defaults to never. + DataProfileUpdateFrequency refresh_frequency = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Governs when to update data profiles when the inspection rules + // defined by the `InspectTemplate` change. + // If not set, changing the template will not cause a data profile to update. + DiscoveryInspectTemplateModifiedCadence inspect_template_modified_cadence = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The location to begin a discovery scan. Denotes an organization ID or folder +// ID within an organization. +message DiscoveryStartingLocation { + // The location to be scanned. + oneof location { + // The ID of an organization to scan. + int64 organization_id = 1; + + // The ID of the folder within an organization to be scanned. + int64 folder_id = 2; + } +} + +// The other cloud starting location for discovery. +message OtherCloudDiscoveryStartingLocation { + // The AWS starting location for discovery. + message AwsDiscoveryStartingLocation { + // The scope of this starting location. + oneof scope { + // The AWS account ID that this discovery config applies to. + // Within an AWS organization, you can find the AWS account ID inside an + // AWS account ARN. Example: + // arn:{partition}:organizations::{management_account_id}:account/{org_id}/{account_id} + string account_id = 2; + + // All AWS assets stored in Asset Inventory that didn't match other AWS + // discovery configs. + bool all_asset_inventory_assets = 3; + } + } + + // The other cloud starting location for discovery. + oneof location { + // The AWS starting location for discovery. + AwsDiscoveryStartingLocation aws_location = 1; + } +} + +// Match discovery resources not covered by any other filter. +message AllOtherResources {} + +// Target used to match against for discovery with Vertex AI datasets. +message VertexDatasetDiscoveryTarget { + // Required. The datasets the discovery cadence applies to. The first target + // with a matching filter will be the one to apply to a dataset. + DiscoveryVertexDatasetFilter filter = 1 + [(google.api.field_behavior) = REQUIRED]; + + // In addition to matching the filter, these conditions must be true + // before a profile is generated. + DiscoveryVertexDatasetConditions conditions = 2; + + // Type of schedule. + oneof cadence { + // How often and when to update profiles. New datasets that match both the + // filter and conditions are scanned as quickly as possible depending on + // system capacity. + DiscoveryVertexDatasetGenerationCadence generation_cadence = 3; + + // Disable profiling for datasets that match this filter. + Disabled disabled = 4; + } +} + +// Determines what datasets will have profiles generated within an organization +// or project. Includes the ability to filter by regular expression patterns +// on project ID or dataset regex. +message DiscoveryVertexDatasetFilter { + // Whether the filter applies to a specific set of datasets or all + // other datasets within the location being profiled. The first + // filter to match will be applied, regardless of the condition. If none is + // set, this field defaults to `others`. + oneof filter { + // A specific set of Vertex AI datasets for this filter to apply to. + VertexDatasetCollection collection = 1; + + // The dataset resource to scan. Targets including this can only include + // one target (the target with this dataset resource reference). + VertexDatasetResourceReference vertex_dataset_resource_reference = 2; + + // Catch-all. This should always be the last target in the list because + // anything above it will apply first. Should only appear once in a + // configuration. If none is specified, a default one will be added + // automatically. + AllOtherResources others = 100; + } +} + +// Match dataset resources using regex filters. +message VertexDatasetCollection { + // The pattern used to filter dataset resources. + oneof pattern { + // The regex used to filter dataset resources. + VertexDatasetRegexes vertex_dataset_regexes = 1; + } +} + +// A collection of regular expressions to determine what datasets to match +// against. +message VertexDatasetRegexes { + // Required. The group of regular expression patterns to match against one or + // more datasets. Maximum of 100 entries. The sum of the lengths of all + // regular expressions can't exceed 10 KiB. + repeated VertexDatasetRegex patterns = 1 + [(google.api.field_behavior) = REQUIRED]; +} + +// A pattern to match against one or more dataset resources. +message VertexDatasetRegex { + // For organizations, if unset, will match all projects. Has no effect + // for configurations created within a project. + string project_id_regex = 1; +} + +// Identifies a single Vertex AI resource. Only datasets are +// supported. +message VertexDatasetResourceReference { + // Required. The name of the Vertex AI resource. If set within a project-level + // configuration, the specified resource must be within the project. + // Examples: + // + // * `projects/{project}/locations/{location}/datasets/{dataset}` + string dataset_resource_name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Requirements that must be true before a dataset is profiled for the +// first time. +message DiscoveryVertexDatasetConditions { + // Vertex AI dataset must have been created after this date. Used to avoid + // backfilling. + google.protobuf.Timestamp created_after = 1; + + // Minimum age a Vertex AI dataset must have. If set, the value must be 1 hour + // or greater. + google.protobuf.Duration min_age = 2; +} + +// How often existing datasets should have their profiles refreshed. +// New datasets are scanned as quickly as possible depending on system +// capacity. +message DiscoveryVertexDatasetGenerationCadence { + // If you set this field, profiles are refreshed at this + // frequency regardless of whether the underlying datasets have changed. + // Defaults to never. + DataProfileUpdateFrequency refresh_frequency = 1; + + // Governs when to update data profiles when the inspection rules + // defined by the `InspectTemplate` change. + // If not set, changing the template will not cause a data profile to be + // updated. + DiscoveryInspectTemplateModifiedCadence inspect_template_modified_cadence = 2; +} + +// Combines all of the information about a DLP job. +message DlpJob { + option (google.api.resource) = { + type: "dlp.googleapis.com/DlpJob" + pattern: "projects/{project}/dlpJobs/{dlp_job}" + pattern: "projects/{project}/locations/{location}/dlpJobs/{dlp_job}" + }; + + // Possible states of a job. New items may be added. + enum JobState { + // Unused. + JOB_STATE_UNSPECIFIED = 0; + + // The job has not yet started. + PENDING = 1; + + // The job is currently running. Once a job has finished it will transition + // to FAILED or DONE. + RUNNING = 2; + + // The job is no longer running. + DONE = 3; + + // The job was canceled before it could be completed. + CANCELED = 4; + + // The job had an error and did not complete. + FAILED = 5; + + // The job is currently accepting findings via hybridInspect. + // A hybrid job in ACTIVE state may continue to have findings added to it + // through the calling of hybridInspect. After the job has finished no more + // calls to hybridInspect may be made. ACTIVE jobs can transition to DONE. + ACTIVE = 6; + } + + // The server-assigned name. + string name = 1; + + // The type of job. + DlpJobType type = 2; + + // State of a job. + JobState state = 3; + + // Job details. + oneof details { + // Results from analyzing risk of a data source. + AnalyzeDataSourceRiskDetails risk_details = 4; + + // Results from inspecting a data source. + InspectDataSourceDetails inspect_details = 5; + } + + // Time when the job was created. + google.protobuf.Timestamp create_time = 6; + + // Time when the job started. + google.protobuf.Timestamp start_time = 7; + + // Time when the job finished. + google.protobuf.Timestamp end_time = 8; + + // Time when the job was last modified by the system. + google.protobuf.Timestamp last_modified = 15; + + // If created by a job trigger, the resource name of the trigger that + // instantiated the job. + string job_trigger_name = 10; + + // A stream of errors encountered running the job. + repeated Error errors = 11; + + // Events that should occur after the job has completed. + repeated ActionDetails action_details = 12; +} + +// The request message for +// [GetDlpJob][google.privacy.dlp.v2.DlpService.GetDlpJob]. +message GetDlpJobRequest { + // Required. The name of the DlpJob resource. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/DlpJob" } + ]; +} + +// The request message for listing DLP jobs. +message ListDlpJobsRequest { + // Required. Parent resource name. + // + // The format of this value varies depending on whether you have [specified a + // processing + // location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + // + // + Projects scope, location specified: + // `projects/{project_id}/locations/{location_id}` + // + Projects scope, no location specified (defaults to global): + // `projects/{project_id}` + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 4 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/DlpJob" + } + ]; + + // Allows filtering. + // + // Supported syntax: + // + // * Filter expressions are made up of one or more restrictions. + // * Restrictions can be combined by `AND` or `OR` logical operators. A + // sequence of restrictions implicitly uses `AND`. + // * A restriction has the form of `{field} {operator} {value}`. + // * Supported fields/values for inspect jobs: + // - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED + // - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY + // - `trigger_name` - The name of the trigger that created the job. + // - 'end_time` - Corresponds to the time the job finished. + // - 'start_time` - Corresponds to the time the job finished. + // * Supported fields for risk analysis jobs: + // - `state` - RUNNING|CANCELED|FINISHED|FAILED + // - 'end_time` - Corresponds to the time the job finished. + // - 'start_time` - Corresponds to the time the job finished. + // * The operator must be `=` or `!=`. + // + // The syntax is based on https://google.aip.dev/160. + // + // Examples: + // + // * inspected_storage = cloud_storage AND state = done + // * inspected_storage = cloud_storage OR inspected_storage = bigquery + // * inspected_storage = cloud_storage AND (state = done OR state = canceled) + // * end_time > \"2017-12-12T00:00:00+00:00\" + // + // The length of this field should be no more than 500 characters. + string filter = 1; + + // The standard list page size. + int32 page_size = 2; + + // The standard list page token. + string page_token = 3; + + // The type of job. Defaults to `DlpJobType.INSPECT` + DlpJobType type = 5; + + // Comma-separated list of fields to order by, + // followed by `asc` or `desc` postfix. This list is case insensitive. The + // default sorting order is ascending. Redundant space characters are + // insignificant. + // + // Example: `name asc, end_time asc, create_time desc` + // + // Supported fields are: + // + // - `create_time`: corresponds to the time the job was created. + // - `end_time`: corresponds to the time the job ended. + // - `name`: corresponds to the job's name. + // - `state`: corresponds to `state` + string order_by = 6; + + // Deprecated. This field has no effect. + string location_id = 7; +} + +// The response message for listing DLP jobs. +message ListDlpJobsResponse { + // A list of DlpJobs that matches the specified filter in the request. + repeated DlpJob jobs = 1; + + // The standard List next-page token. + string next_page_token = 2; +} + +// The request message for canceling a DLP job. +message CancelDlpJobRequest { + // Required. The name of the DlpJob resource to be cancelled. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/DlpJob" } + ]; +} + +// The request message for finishing a DLP hybrid job. +message FinishDlpJobRequest { + // Required. The name of the DlpJob resource to be finished. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/DlpJob" } + ]; +} + +// The request message for deleting a DLP job. +message DeleteDlpJobRequest { + // Required. The name of the DlpJob resource to be deleted. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/DlpJob" } + ]; +} + +// Request message for CreateDeidentifyTemplate. +message CreateDeidentifyTemplateRequest { + // Required. Parent resource name. + // + // The format of this value varies depending on the scope of the request + // (project or organization) and whether you have [specified a processing + // location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + // + // + Projects scope, location specified: + // `projects/{project_id}/locations/{location_id}` + // + Projects scope, no location specified (defaults to global): + // `projects/{project_id}` + // + Organizations scope, location specified: + // `organizations/{org_id}/locations/{location_id}` + // + Organizations scope, no location specified (defaults to global): + // `organizations/{org_id}` + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/DeidentifyTemplate" + } + ]; + + // Required. The DeidentifyTemplate to create. + DeidentifyTemplate deidentify_template = 2 + [(google.api.field_behavior) = REQUIRED]; + + // The template id can contain uppercase and lowercase letters, + // numbers, and hyphens; that is, it must match the regular + // expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + // characters. Can be empty to allow the system to generate one. + string template_id = 3; + + // Deprecated. This field has no effect. + string location_id = 4; +} + +// Request message for UpdateDeidentifyTemplate. +message UpdateDeidentifyTemplateRequest { + // Required. Resource name of organization and deidentify template to be + // updated, for example + // `organizations/433245324/deidentifyTemplates/432452342` or + // projects/project-id/deidentifyTemplates/432452342. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/DeidentifyTemplate" + } + ]; + + // New DeidentifyTemplate value. + DeidentifyTemplate deidentify_template = 2; + + // Mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 3; +} + +// Request message for GetDeidentifyTemplate. +message GetDeidentifyTemplateRequest { + // Required. Resource name of the organization and deidentify template to be + // read, for example `organizations/433245324/deidentifyTemplates/432452342` + // or projects/project-id/deidentifyTemplates/432452342. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/DeidentifyTemplate" + } + ]; +} + +// Request message for ListDeidentifyTemplates. +message ListDeidentifyTemplatesRequest { + // Required. Parent resource name. + // + // The format of this value varies depending on the scope of the request + // (project or organization) and whether you have [specified a processing + // location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + // + // + Projects scope, location specified: + // `projects/{project_id}/locations/{location_id}` + // + Projects scope, no location specified (defaults to global): + // `projects/{project_id}` + // + Organizations scope, location specified: + // `organizations/{org_id}/locations/{location_id}` + // + Organizations scope, no location specified (defaults to global): + // `organizations/{org_id}` + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/DeidentifyTemplate" + } + ]; + + // Page token to continue retrieval. Comes from the previous call + // to `ListDeidentifyTemplates`. + string page_token = 2; + + // Size of the page. This value can be limited by the server. If zero server + // returns a page of max size 100. + int32 page_size = 3; + + // Comma-separated list of fields to order by, + // followed by `asc` or `desc` postfix. This list is case insensitive. The + // default sorting order is ascending. Redundant space characters are + // insignificant. + // + // Example: `name asc,update_time, create_time desc` + // + // Supported fields are: + // + // - `create_time`: corresponds to the time the template was created. + // - `update_time`: corresponds to the time the template was last updated. + // - `name`: corresponds to the template's name. + // - `display_name`: corresponds to the template's display name. + string order_by = 4; + + // Deprecated. This field has no effect. + string location_id = 5; +} + +// Response message for ListDeidentifyTemplates. +message ListDeidentifyTemplatesResponse { + // List of deidentify templates, up to page_size in + // ListDeidentifyTemplatesRequest. + repeated DeidentifyTemplate deidentify_templates = 1; + + // If the next page is available then the next page token to be used in the + // following ListDeidentifyTemplates request. + string next_page_token = 2; +} + +// Request message for DeleteDeidentifyTemplate. +message DeleteDeidentifyTemplateRequest { + // Required. Resource name of the organization and deidentify template to be + // deleted, for example + // `organizations/433245324/deidentifyTemplates/432452342` or + // projects/project-id/deidentifyTemplates/432452342. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/DeidentifyTemplate" + } + ]; +} + +// Configuration for a custom dictionary created from a data source of any size +// up to the maximum size defined in the +// [limits](https://cloud.google.com/sensitive-data-protection/limits) page. The +// artifacts of dictionary creation are stored in the specified Cloud Storage +// location. Consider using `CustomInfoType.Dictionary` for smaller dictionaries +// that satisfy the size requirements. +message LargeCustomDictionaryConfig { + // Location to store dictionary artifacts in Cloud Storage. These files + // will only be accessible by project owners and the DLP API. If any of these + // artifacts are modified, the dictionary is considered invalid and can no + // longer be used. + CloudStoragePath output_path = 1; + + // Source of the dictionary. + oneof source { + // Set of files containing newline-delimited lists of dictionary phrases. + CloudStorageFileSet cloud_storage_file_set = 2; + + // Field in a BigQuery table where each cell represents a dictionary phrase. + BigQueryField big_query_field = 3; + } +} + +// Summary statistics of a custom dictionary. +message LargeCustomDictionaryStats { + // Approximate number of distinct phrases in the dictionary. + int64 approx_num_phrases = 1; +} + +// Configuration for stored infoTypes. All fields and subfield are provided +// by the user. For more information, see +// https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes. +message StoredInfoTypeConfig { + // Display name of the StoredInfoType (max 256 characters). + string display_name = 1; + + // Description of the StoredInfoType (max 256 characters). + string description = 2; + + // Stored infotype types. + oneof type { + // StoredInfoType where findings are defined by a dictionary of phrases. + LargeCustomDictionaryConfig large_custom_dictionary = 3; + + // Store dictionary-based CustomInfoType. + CustomInfoType.Dictionary dictionary = 4; + + // Store regular expression-based StoredInfoType. + CustomInfoType.Regex regex = 5; + } +} + +// Statistics for a StoredInfoType. +message StoredInfoTypeStats { + // Stat types + oneof type { + // StoredInfoType where findings are defined by a dictionary of phrases. + LargeCustomDictionaryStats large_custom_dictionary = 1; + } +} + +// Version of a StoredInfoType, including the configuration used to build it, +// create timestamp, and current state. +message StoredInfoTypeVersion { + // StoredInfoType configuration. + StoredInfoTypeConfig config = 1; + + // Create timestamp of the version. Read-only, determined by the system + // when the version is created. + google.protobuf.Timestamp create_time = 2; + + // Stored info type version state. Read-only, updated by the system + // during dictionary creation. + StoredInfoTypeState state = 3; + + // Errors that occurred when creating this storedInfoType version, or + // anomalies detected in the storedInfoType data that render it unusable. Only + // the five most recent errors will be displayed, with the most recent error + // appearing first. + // + // For example, some of the data for stored custom dictionaries is put in + // the user's Cloud Storage bucket, and if this data is modified or + // deleted by the user or another system, the dictionary becomes invalid. + // + // If any errors occur, fix the problem indicated by the error message and + // use the UpdateStoredInfoType API method to create another version of the + // storedInfoType to continue using it, reusing the same `config` if it was + // not the source of the error. + repeated Error errors = 4; + + // Statistics about this storedInfoType version. + StoredInfoTypeStats stats = 5; +} + +// StoredInfoType resource message that contains information about the current +// version and any pending updates. +message StoredInfoType { + option (google.api.resource) = { + type: "dlp.googleapis.com/StoredInfoType" + pattern: "organizations/{organization}/storedInfoTypes/{stored_info_type}" + pattern: "projects/{project}/storedInfoTypes/{stored_info_type}" + pattern: "organizations/{organization}/locations/{location}/storedInfoTypes/{stored_info_type}" + pattern: "projects/{project}/locations/{location}/storedInfoTypes/{stored_info_type}" + }; + + // Resource name. + string name = 1; + + // Current version of the stored info type. + StoredInfoTypeVersion current_version = 2; + + // Pending versions of the stored info type. Empty if no versions are + // pending. + repeated StoredInfoTypeVersion pending_versions = 3; +} + +// Request message for CreateStoredInfoType. +message CreateStoredInfoTypeRequest { + // Required. Parent resource name. + // + // The format of this value varies depending on the scope of the request + // (project or organization) and whether you have [specified a processing + // location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + // + // + Projects scope, location specified: + // `projects/{project_id}/locations/{location_id}` + // + Projects scope, no location specified (defaults to global): + // `projects/{project_id}` + // + Organizations scope, location specified: + // `organizations/{org_id}/locations/{location_id}` + // + Organizations scope, no location specified (defaults to global): + // `organizations/{org_id}` + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/StoredInfoType" + } + ]; + + // Required. Configuration of the storedInfoType to create. + StoredInfoTypeConfig config = 2 [(google.api.field_behavior) = REQUIRED]; + + // The storedInfoType ID can contain uppercase and lowercase letters, + // numbers, and hyphens; that is, it must match the regular + // expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + // characters. Can be empty to allow the system to generate one. + string stored_info_type_id = 3; + + // Deprecated. This field has no effect. + string location_id = 4; +} + +// Request message for UpdateStoredInfoType. +message UpdateStoredInfoTypeRequest { + // Required. Resource name of organization and storedInfoType to be updated, + // for example `organizations/433245324/storedInfoTypes/432452342` or + // projects/project-id/storedInfoTypes/432452342. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/StoredInfoType" + } + ]; + + // Updated configuration for the storedInfoType. If not provided, a new + // version of the storedInfoType will be created with the existing + // configuration. + StoredInfoTypeConfig config = 2; + + // Mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 3; +} + +// Request message for GetStoredInfoType. +message GetStoredInfoTypeRequest { + // Required. Resource name of the organization and storedInfoType to be read, + // for example `organizations/433245324/storedInfoTypes/432452342` or + // projects/project-id/storedInfoTypes/432452342. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/StoredInfoType" + } + ]; +} + +// Request message for ListStoredInfoTypes. +message ListStoredInfoTypesRequest { + // Required. Parent resource name. + // + // The format of this value varies depending on the scope of the request + // (project or organization) and whether you have [specified a processing + // location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + // + // + Projects scope, location specified: + // `projects/{project_id}/locations/{location_id}` + // + Projects scope, no location specified (defaults to global): + // `projects/{project_id}` + // + // The following example `parent` string specifies a parent project with the + // identifier `example-project`, and specifies the `europe-west3` location + // for processing data: + // + // parent=projects/example-project/locations/europe-west3 + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/StoredInfoType" + } + ]; + + // Page token to continue retrieval. Comes from the previous call + // to `ListStoredInfoTypes`. + string page_token = 2; + + // Size of the page. This value can be limited by the server. If zero server + // returns a page of max size 100. + int32 page_size = 3; + + // Comma-separated list of fields to order by, + // followed by `asc` or `desc` postfix. This list is case insensitive. The + // default sorting order is ascending. Redundant space characters are + // insignificant. + // + // Example: `name asc, display_name, create_time desc` + // + // Supported fields are: + // + // - `create_time`: corresponds to the time the most recent version of the + // resource was created. + // - `state`: corresponds to the state of the resource. + // - `name`: corresponds to resource name. + // - `display_name`: corresponds to info type's display name. + string order_by = 4; + + // Deprecated. This field has no effect. + string location_id = 5; +} + +// Response message for ListStoredInfoTypes. +message ListStoredInfoTypesResponse { + // List of storedInfoTypes, up to page_size in ListStoredInfoTypesRequest. + repeated StoredInfoType stored_info_types = 1; + + // If the next page is available then the next page token to be used + // in the following ListStoredInfoTypes request. + string next_page_token = 2; +} + +// Request message for DeleteStoredInfoType. +message DeleteStoredInfoTypeRequest { + // Required. Resource name of the organization and storedInfoType to be + // deleted, for example `organizations/433245324/storedInfoTypes/432452342` or + // projects/project-id/storedInfoTypes/432452342. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/StoredInfoType" + } + ]; +} + +// Request to search for potentially sensitive info in a custom location. +message HybridInspectJobTriggerRequest { + // Required. Resource name of the trigger to execute a hybrid inspect on, for + // example `projects/dlp-test-project/jobTriggers/53234423`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/JobTrigger" } + ]; + + // The item to inspect. + HybridContentItem hybrid_item = 3; +} + +// Request to search for potentially sensitive info in a custom location. +message HybridInspectDlpJobRequest { + // Required. Resource name of the job to execute a hybrid inspect on, for + // example `projects/dlp-test-project/dlpJob/53234423`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/DlpJob" } + ]; + + // The item to inspect. + HybridContentItem hybrid_item = 3; +} + +// An individual hybrid item to inspect. Will be stored temporarily during +// processing. +message HybridContentItem { + // The item to inspect. + ContentItem item = 1; + + // Supplementary information that will be added to each finding. + HybridFindingDetails finding_details = 2; +} + +// Populate to associate additional data with each finding. +message HybridFindingDetails { + // Details about the container where the content being inspected is from. + Container container_details = 1; + + // Offset in bytes of the line, from the beginning of the file, where the + // finding is located. Populate if the item being scanned is only part of a + // bigger item, such as a shard of a file and you want to track the absolute + // position of the finding. + int64 file_offset = 2; + + // Offset of the row for tables. Populate if the row(s) being scanned are + // part of a bigger dataset and you want to keep track of their absolute + // position. + int64 row_offset = 3; + + // If the container is a table, additional information to make findings + // meaningful such as the columns that are primary keys. If not known ahead + // of time, can also be set within each inspect hybrid call and the two + // will be merged. Note that identifying_fields will only be stored to + // BigQuery, and only if the BigQuery action has been included. + TableOptions table_options = 4; + + // Labels to represent user provided metadata about the data being inspected. + // If configured by the job, some key values may be required. + // The labels associated with `Finding`'s produced by hybrid + // inspection. + // + // Label keys must be between 1 and 63 characters long and must conform + // to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. + // + // Label values must be between 0 and 63 characters long and must conform + // to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. + // + // No more than 10 labels can be associated with a given finding. + // + // Examples: + // + // * `"environment" : "production"` + // * `"pipeline" : "etl"` + map labels = 5; +} + +// Quota exceeded errors will be thrown once quota has been met. +message HybridInspectResponse {} + +// Operators available for comparing the value of fields. +enum RelationalOperator { + // Unused + RELATIONAL_OPERATOR_UNSPECIFIED = 0; + + // Equal. Attempts to match even with incompatible types. + EQUAL_TO = 1; + + // Not equal to. Attempts to match even with incompatible types. + NOT_EQUAL_TO = 2; + + // Greater than. + GREATER_THAN = 3; + + // Less than. + LESS_THAN = 4; + + // Greater than or equals. + GREATER_THAN_OR_EQUALS = 5; + + // Less than or equals. + LESS_THAN_OR_EQUALS = 6; + + // Exists + EXISTS = 7; +} + +// Type of the match which can be applied to different ways of matching, like +// Dictionary, regular expression and intersecting with findings of another +// infoType. +enum MatchingType { + // Invalid. + MATCHING_TYPE_UNSPECIFIED = 0; + + // Full match. + // + // - Dictionary: join of Dictionary results matched the complete finding quote + // - Regex: all regex matches fill a finding quote from start to end + // - Exclude infoType: completely inside affecting infoTypes findings + MATCHING_TYPE_FULL_MATCH = 1; + + // Partial match. + // + // - Dictionary: at least one of the tokens in the finding matches + // - Regex: substring of the finding matches + // - Exclude infoType: intersects with affecting infoTypes findings + MATCHING_TYPE_PARTIAL_MATCH = 2; + + // Inverse match. + // + // - Dictionary: no tokens in the finding match the dictionary + // - Regex: finding doesn't match the regex + // - Exclude infoType: no intersection with affecting infoTypes findings + MATCHING_TYPE_INVERSE_MATCH = 3; + + // Rule-specific match. + // + // The matching logic is based on the specific rule being used. This is + // required for rules where the matching behavior is not a simple string + // comparison (e.g., image containment). This matching type can only be + // used with the `ExcludeByImageFindings` rule. + // + // - Exclude by image findings: The matching logic is defined within + // `ExcludeByImageFindings` based on spatial relationships between bounding + // boxes. + MATCHING_TYPE_RULE_SPECIFIC = 4; +} + +// Specifies the relationship between bounding boxes for image findings. +message ImageContainmentType { + // The type of relationship to check between the target finding and the + // context finding. + oneof type { + // The context finding's bounding box must fully contain the target + // finding's bounding box. + Encloses encloses = 1; + + // The context finding's bounding box must be fully inside the target + // finding's bounding box. + FullyInside fully_inside = 2; + + // The context finding's bounding box and the target finding's bounding box + // must have a non-zero intersection. + Overlap overlaps = 3; + } +} + +// Defines a condition for overlapping bounding boxes. +message Overlap {} + +// Defines a condition where one bounding box encloses another. +message Encloses {} + +// Defines a condition where one bounding box is fully inside another. +message FullyInside {} + +// Deprecated and unused. +enum ContentOption { + // Includes entire content of a file or a data stream. + CONTENT_UNSPECIFIED = 0; + + // Text content within the data, excluding any metadata. + CONTENT_TEXT = 1; + + // Images found in the data. + CONTENT_IMAGE = 2; +} + +// Type of metadata containing the finding. +enum MetadataType { + // Unused + METADATATYPE_UNSPECIFIED = 0; + + // General file metadata provided by Cloud Storage. + STORAGE_METADATA = 2; + + // Metadata extracted from the files. + CONTENT_METADATA = 3; + + // Metadata provided by the client. + CLIENT_PROVIDED_METADATA = 4; +} + +// Parts of the APIs which use certain infoTypes. +enum InfoTypeSupportedBy { + // Unused. + ENUM_TYPE_UNSPECIFIED = 0; + + // Supported by the inspect operations. + INSPECT = 1; + + // Supported by the risk analysis operations. + RISK_ANALYSIS = 2; +} + +// An enum to represent the various types of DLP jobs. +enum DlpJobType { + // Defaults to INSPECT_JOB. + DLP_JOB_TYPE_UNSPECIFIED = 0; + + // The job inspected Google Cloud for sensitive data. + INSPECT_JOB = 1; + + // The job executed a Risk Analysis computation. + RISK_ANALYSIS_JOB = 2; +} + +// State of a StoredInfoType version. +enum StoredInfoTypeState { + // Unused + STORED_INFO_TYPE_STATE_UNSPECIFIED = 0; + + // StoredInfoType version is being created. + PENDING = 1; + + // StoredInfoType version is ready for use. + READY = 2; + + // StoredInfoType creation failed. All relevant error messages are returned in + // the `StoredInfoTypeVersion` message. + FAILED = 3; + + // StoredInfoType is no longer valid because artifacts stored in + // user-controlled storage were modified. To fix an invalid StoredInfoType, + // use the `UpdateStoredInfoType` method to create a new version. + INVALID = 4; +} + +// Request to list the profiles generated for a given organization or project. +message ListProjectDataProfilesRequest { + // Required. organizations/{org_id}/locations/{loc_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/ProjectDataProfile" + } + ]; + + // Page token to continue retrieval. + string page_token = 2; + + // Size of the page. This value can be limited by the server. If zero, server + // returns a page of max size 100. + int32 page_size = 3; + + // Comma-separated list of fields to order by, followed by `asc` or `desc` + // postfix. This list is case insensitive. The default sorting order is + // ascending. Redundant space characters are insignificant. Only one order + // field at a time is allowed. + // + // Examples: + // * `project_id` + // * `sensitivity_level desc` + // + // Supported fields: + // + // - `project_id`: Google Cloud project ID + // - `sensitivity_level`: How sensitive the data in a project is, at most + // - `data_risk_level`: How much risk is associated with this data + // - `profile_last_generated`: Date and time (in epoch seconds) the profile + // was last generated + string order_by = 4; + + // Allows filtering. + // + // Supported syntax: + // + // * Filter expressions are made up of one or more restrictions. + // * Restrictions can be combined by `AND` or `OR` logical operators. A + // sequence of restrictions implicitly uses `AND`. + // * A restriction has the form of `{field} {operator} {value}`. + // * Supported fields: + // - `project_id`: the Google Cloud project ID + // - `sensitivity_level`: HIGH|MODERATE|LOW + // - `data_risk_level`: HIGH|MODERATE|LOW + // - `status_code`: an RPC status code as defined in + // https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + // - `profile_last_generated`: Date and time the profile was last + // generated + // * The operator must be `=` or `!=`. The `profile_last_generated` filter + // also supports `<` and `>`. + // + // The syntax is based on https://google.aip.dev/160. + // + // Examples: + // + // * `project_id = 12345 AND status_code = 1` + // * `project_id = 12345 AND sensitivity_level = HIGH` + // * `profile_last_generated < "2025-01-01T00:00:00.000Z"` + // + // The length of this field should be no more than 500 characters. + string filter = 5; +} + +// List of profiles generated for a given organization or project. +message ListProjectDataProfilesResponse { + // List of data profiles. + repeated ProjectDataProfile project_data_profiles = 1; + + // The next page token. + string next_page_token = 2; +} + +// Request to list the profiles generated for a given organization or project. +message ListTableDataProfilesRequest { + // Required. Resource name of the organization or project, for + // example `organizations/433245324/locations/europe` or + // `projects/project-id/locations/asia`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/TableDataProfile" + } + ]; + + // Page token to continue retrieval. + string page_token = 2; + + // Size of the page. This value can be limited by the server. If zero, server + // returns a page of max size 100. + int32 page_size = 3; + + // Comma-separated list of fields to order by, followed by `asc` or `desc` + // postfix. This list is case insensitive. The default sorting order is + // ascending. Redundant space characters are insignificant. Only one order + // field at a time is allowed. + // + // Examples: + // * `project_id asc` + // * `table_id` + // * `sensitivity_level desc` + // + // Supported fields are: + // + // - `project_id`: The Google Cloud project ID. + // - `dataset_id`: The ID of a BigQuery dataset. + // - `table_id`: The ID of a BigQuery table. + // - `sensitivity_level`: How sensitive the data in a table is, at most. + // - `data_risk_level`: How much risk is associated with this data. + // - `profile_last_generated`: When the profile was last updated in epoch + // seconds. + // - `last_modified`: The last time the resource was modified. + // - `resource_visibility`: Visibility restriction for this resource. + // - `row_count`: Number of rows in this resource. + string order_by = 4; + + // Allows filtering. + // + // Supported syntax: + // + // * Filter expressions are made up of one or more restrictions. + // * Restrictions can be combined by `AND` or `OR` logical operators. A + // sequence of restrictions implicitly uses `AND`. + // * A restriction has the form of `{field} {operator} {value}`. + // * Supported fields: + // - `project_id`: The Google Cloud project ID + // - `dataset_id`: The BigQuery dataset ID + // - `table_id`: The ID of the BigQuery table + // - `sensitivity_level`: HIGH|MODERATE|LOW + // - `data_risk_level`: HIGH|MODERATE|LOW + // - `resource_visibility`: PUBLIC|RESTRICTED + // - `status_code`: an RPC status code as defined in + // https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + // - `profile_last_generated`: Date and time the profile was last + // generated + // + // * The operator must be `=` or `!=`. The `profile_last_generated` filter + // also supports `<` and `>`. + // + // The syntax is based on https://google.aip.dev/160. + // + // Examples: + // + // * `project_id = 12345 AND status_code = 1` + // * `project_id = 12345 AND sensitivity_level = HIGH` + // * `project_id = 12345 AND resource_visibility = PUBLIC` + // * `profile_last_generated < "2025-01-01T00:00:00.000Z"` + // + // The length of this field should be no more than 500 characters. + string filter = 5; +} + +// List of profiles generated for a given organization or project. +message ListTableDataProfilesResponse { + // List of data profiles. + repeated TableDataProfile table_data_profiles = 1; + + // The next page token. + string next_page_token = 2; +} + +// Request to list the profiles generated for a given organization or project. +message ListColumnDataProfilesRequest { + // Required. Resource name of the organization or project, for + // example `organizations/433245324/locations/europe` or + // `projects/project-id/locations/asia`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/ColumnDataProfile" + } + ]; + + // Page token to continue retrieval. + string page_token = 2; + + // Size of the page. This value can be limited by the server. If zero, server + // returns a page of max size 100. + int32 page_size = 3; + + // Comma-separated list of fields to order by, followed by `asc` or `desc` + // postfix. This list is case insensitive. The default sorting order is + // ascending. Redundant space characters are insignificant. Only one order + // field at a time is allowed. + // + // Examples: + // + // * `project_id asc` + // * `table_id` + // * `sensitivity_level desc` + // + // Supported fields are: + // + // - `project_id`: The Google Cloud project ID. + // - `dataset_id`: The ID of a BigQuery dataset. + // - `table_id`: The ID of a BigQuery table. + // - `sensitivity_level`: How sensitive the data in a column is, at most. + // - `data_risk_level`: How much risk is associated with this data. + // - `profile_last_generated`: When the profile was last updated in epoch + // seconds. + string order_by = 4; + + // Allows filtering. + // + // Supported syntax: + // + // * Filter expressions are made up of one or more restrictions. + // * Restrictions can be combined by `AND` or `OR` logical operators. A + // sequence of restrictions implicitly uses `AND`. + // * A restriction has the form of `{field} {operator} {value}`. + // * Supported fields: + // - `table_data_profile_name`: The name of the related table data + // profile + // - `project_id`: The Google Cloud project ID (REQUIRED) + // - `dataset_id`: The BigQuery dataset ID (REQUIRED) + // - `table_id`: The BigQuery table ID (REQUIRED) + // - `field_id`: The ID of the BigQuery field + // - `info_type`: The infotype detected in the resource + // - `sensitivity_level`: HIGH|MEDIUM|LOW + // - `data_risk_level`: How much risk is associated with this data + // - `status_code`: An RPC status code as defined in + // https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + // - `profile_last_generated`: Date and time the profile was last + // generated + // * The operator must be `=` for project_id, dataset_id, and table_id. Other + // filters also support `!=`. The `profile_last_generated` filter also + // supports `<` and `>`. + // + // The syntax is based on https://google.aip.dev/160. + // + // Examples: + // + // * project_id = 12345 AND status_code = 1 + // * project_id = 12345 AND sensitivity_level = HIGH + // * project_id = 12345 AND info_type = STREET_ADDRESS + // * profile_last_generated < "2025-01-01T00:00:00.000Z" + // + // The length of this field should be no more than 500 characters. + string filter = 5; +} + +// List of profiles generated for a given organization or project. +message ListColumnDataProfilesResponse { + // List of data profiles. + repeated ColumnDataProfile column_data_profiles = 1; + + // The next page token. + string next_page_token = 2; +} + +// Score is a summary of all elements in the data profile. +// A higher number means more risk. +message DataRiskLevel { + // Various score levels for resources. + enum DataRiskLevelScore { + // Unused. + RISK_SCORE_UNSPECIFIED = 0; + + // Low risk - Lower indication of sensitive data that appears to have + // additional access restrictions in place or no indication of sensitive + // data found. + RISK_LOW = 10; + + // Unable to determine risk. + RISK_UNKNOWN = 12; + + // Medium risk - Sensitive data may be present but additional access or fine + // grain access restrictions appear to be present. Consider limiting + // access even further or transform data to mask. + RISK_MODERATE = 20; + + // High risk – SPII may be present. Access controls may include public + // ACLs. Exfiltration of data may lead to user data loss. Re-identification + // of users may be possible. Consider limiting usage and or removing SPII. + RISK_HIGH = 30; + } + + // The score applied to the resource. + DataRiskLevelScore score = 1; +} + +// An aggregated profile for this project, based on the resources profiled +// within it. +message ProjectDataProfile { + option (google.api.resource) = { + type: "dlp.googleapis.com/ProjectDataProfile" + pattern: "organizations/{organization}/locations/{location}/projectDataProfiles/{project_data_profile}" + pattern: "projects/{project}/locations/{location}/projectDataProfiles/{project_data_profile}" + }; + + // The resource name of the profile. + string name = 1; + + // Project ID or account that was profiled. + string project_id = 2; + + // The last time the profile was generated. + google.protobuf.Timestamp profile_last_generated = 3; + + // The sensitivity score of this project. + SensitivityScore sensitivity_score = 4; + + // The data risk level of this project. + DataRiskLevel data_risk_level = 5; + + // Success or error status of the last attempt to profile the project. + ProfileStatus profile_status = 7; + + // The number of table data profiles generated for this project. + int64 table_data_profile_count = 9; + + // The number of file store data profiles generated for this project. + int64 file_store_data_profile_count = 10; +} + +// How broadly the data in the resource has been shared. New items may be added +// over time. A higher number means more restricted. +enum ResourceVisibility { + // Unused. + RESOURCE_VISIBILITY_UNSPECIFIED = 0; + + // Visible to any user. + RESOURCE_VISIBILITY_PUBLIC = 10; + + // May contain public items. + // For example, if a Cloud Storage bucket has uniform bucket level access + // disabled, some objects inside it may be public, but none are known yet. + RESOURCE_VISIBILITY_INCONCLUSIVE = 15; + + // Visible only to specific users. + RESOURCE_VISIBILITY_RESTRICTED = 20; +} + +// Snapshot of the configurations used to generate the profile. +message DataProfileConfigSnapshot { + // A copy of the inspection config used to generate this profile. This + // is a copy of the inspect_template specified in `DataProfileJobConfig`. + InspectConfig inspect_config = 2; + + // A copy of the configuration used to generate this profile. This is + // deprecated, and the DiscoveryConfig field is preferred moving forward. + // DataProfileJobConfig will still be written here for Discovery in BigQuery + // for backwards compatibility, but will not be updated with new fields, while + // DiscoveryConfig will. + DataProfileJobConfig data_profile_job = 3 [deprecated = true]; + + // A copy of the configuration used to generate this profile. + DiscoveryConfig discovery_config = 4; + + // Name of the inspection template used to generate this profile + string inspect_template_name = 5; + + // Timestamp when the template was modified + google.protobuf.Timestamp inspect_template_modified_time = 6; +} + +// The profile for a scanned table. +message TableDataProfile { + option (google.api.resource) = { + type: "dlp.googleapis.com/TableDataProfile" + pattern: "organizations/{organization}/locations/{location}/tableDataProfiles/{table_data_profile}" + pattern: "projects/{project}/locations/{location}/tableDataProfiles/{table_data_profile}" + }; + + // Possible states of a profile. New items may be added. + enum State { + // Unused. + STATE_UNSPECIFIED = 0; + + // The profile is currently running. Once a profile has finished it will + // transition to DONE. + RUNNING = 1; + + // The profile is no longer generating. + // If profile_status.status.code is 0, the profile succeeded, otherwise, it + // failed. + DONE = 2; + } + + // The name of the profile. + string name = 1; + + // The resource type that was profiled. + DataSourceType data_source_type = 36; + + // The resource name of the project data profile for this table. + string project_data_profile = 2; + + // The Google Cloud project ID that owns the resource. + string dataset_project_id = 24; + + // If supported, the location where the dataset's data is stored. + // See https://cloud.google.com/bigquery/docs/locations for supported + // locations. + string dataset_location = 29; + + // If the resource is BigQuery, the dataset ID. + string dataset_id = 25; + + // The table ID. + string table_id = 26; + + // The Cloud Asset Inventory resource that was profiled in order to generate + // this TableDataProfile. + // https://cloud.google.com/apis/design/resource_names#full_resource_name + string full_resource = 3; + + // Success or error status from the most recent profile generation attempt. + // May be empty if the profile is still being generated. + ProfileStatus profile_status = 21; + + // State of a profile. This will always be set to DONE when the table data + // profile is written to another service like BigQuery or Pub/Sub. + State state = 22; + + // The sensitivity score of this table. + SensitivityScore sensitivity_score = 5; + + // The data risk level of this table. + DataRiskLevel data_risk_level = 6; + + // The infoTypes predicted from this table's data. + repeated InfoTypeSummary predicted_info_types = 27; + + // Other infoTypes found in this table's data. + repeated OtherInfoTypeSummary other_info_types = 28; + + // The snapshot of the configurations used to generate the profile. + DataProfileConfigSnapshot config_snapshot = 7; + + // The time when this table was last modified + google.protobuf.Timestamp last_modified_time = 8; + + // Optional. The time when this table expires. + google.protobuf.Timestamp expiration_time = 9; + + // The number of columns profiled in the table. + int64 scanned_column_count = 10; + + // The number of columns skipped in the table because of an error. + int64 failed_column_count = 11; + + // The size of the table when the profile was generated. + int64 table_size_bytes = 12; + + // Number of rows in the table when the profile was generated. + // This will not be populated for BigLake tables. + int64 row_count = 13; + + // How the table is encrypted. + EncryptionStatus encryption_status = 14; + + // How broadly a resource has been shared. + ResourceVisibility resource_visibility = 15; + + // The last time the profile was generated. + google.protobuf.Timestamp profile_last_generated = 16; + + // The labels applied to the resource at the time the profile was generated. + map resource_labels = 17; + + // The time at which the table was created. + google.protobuf.Timestamp create_time = 23; + + // The BigQuery table to which the sample findings are written. + BigQueryTable sample_findings_table = 37; + + // The tags attached to the table, including any tags attached during + // profiling. Because tags are attached to Cloud SQL instances rather than + // Cloud SQL tables, this field is empty for Cloud SQL table profiles. + repeated Tag tags = 39; + + // Resources related to this profile. + repeated RelatedResource related_resources = 41; + + // Domains associated with the profile. + repeated Domain domains = 47; +} + +// Success or errors for the profile generation. +message ProfileStatus { + // Profiling status code and optional message. The `status.code` value is 0 + // (default value) for OK. + google.rpc.Status status = 1; + + // Time when the profile generation status was updated + google.protobuf.Timestamp timestamp = 3; +} + +// How a resource is encrypted. +enum EncryptionStatus { + // Unused. + ENCRYPTION_STATUS_UNSPECIFIED = 0; + + // Google manages server-side encryption keys on your behalf. + ENCRYPTION_GOOGLE_MANAGED = 1; + + // Customer provides the key. + ENCRYPTION_CUSTOMER_MANAGED = 2; +} + +// The infoType details for this column. +message InfoTypeSummary { + // The infoType. + InfoType info_type = 1; + + // Not populated for predicted infotypes. + int32 estimated_prevalence = 2 [deprecated = true]; +} + +// Infotype details for other infoTypes found within a column. +message OtherInfoTypeSummary { + // The other infoType. + InfoType info_type = 1; + + // Approximate percentage of non-null rows that contained data detected by + // this infotype. + int32 estimated_prevalence = 2; + + // Whether this infoType was excluded from sensitivity and risk analysis due + // to factors such as low prevalence (subject to change). + bool excluded_from_analysis = 3; +} + +// Bucketized nullness percentage levels. A higher level means a higher +// percentage of the column is null. +enum NullPercentageLevel { + // Unused. + NULL_PERCENTAGE_LEVEL_UNSPECIFIED = 0; + + // Very few null entries. + NULL_PERCENTAGE_VERY_LOW = 1; + + // Some null entries. + NULL_PERCENTAGE_LOW = 2; + + // A few null entries. + NULL_PERCENTAGE_MEDIUM = 3; + + // A lot of null entries. + NULL_PERCENTAGE_HIGH = 4; +} + +// Bucketized uniqueness score levels. A higher uniqueness score is a strong +// signal that the column may contain a unique identifier like user id. A low +// value indicates that the column contains few unique values like booleans or +// other classifiers. +enum UniquenessScoreLevel { + // Some columns do not have estimated uniqueness. Possible reasons include + // having too few values. + UNIQUENESS_SCORE_LEVEL_UNSPECIFIED = 0; + + // Low uniqueness, possibly a boolean, enum or similiarly typed column. + UNIQUENESS_SCORE_LOW = 1; + + // Medium uniqueness. + UNIQUENESS_SCORE_MEDIUM = 2; + + // High uniqueness, possibly a column of free text or unique identifiers. + UNIQUENESS_SCORE_HIGH = 3; +} + +// The profile for a scanned column within a table. +message ColumnDataProfile { + option (google.api.resource) = { + type: "dlp.googleapis.com/ColumnDataProfile" + pattern: "organizations/{organization}/locations/{location}/columnDataProfiles/{column_data_profile}" + pattern: "projects/{project}/locations/{location}/columnDataProfiles/{column_data_profile}" + }; + + // Possible states of a profile. New items may be added. + enum State { + // Unused. + STATE_UNSPECIFIED = 0; + + // The profile is currently running. Once a profile has finished it will + // transition to DONE. + RUNNING = 1; + + // The profile is no longer generating. + // If profile_status.status.code is 0, the profile succeeded, otherwise, it + // failed. + DONE = 2; + } + + // Data types of the data in a column. Types may be added over time. + enum ColumnDataType { + // Invalid type. + COLUMN_DATA_TYPE_UNSPECIFIED = 0; + + // Encoded as a string in decimal format. + TYPE_INT64 = 1; + + // Encoded as a boolean "false" or "true". + TYPE_BOOL = 2; + + // Encoded as a number, or string "NaN", "Infinity" or "-Infinity". + TYPE_FLOAT64 = 3; + + // Encoded as a string value. + TYPE_STRING = 4; + + // Encoded as a base64 string per RFC 4648, section 4. + TYPE_BYTES = 5; + + // Encoded as an RFC 3339 timestamp with mandatory "Z" time zone string: + // 1985-04-12T23:20:50.52Z + TYPE_TIMESTAMP = 6; + + // Encoded as RFC 3339 full-date format string: 1985-04-12 + TYPE_DATE = 7; + + // Encoded as RFC 3339 partial-time format string: 23:20:50.52 + TYPE_TIME = 8; + + // Encoded as RFC 3339 full-date "T" partial-time: 1985-04-12T23:20:50.52 + TYPE_DATETIME = 9; + + // Encoded as WKT + TYPE_GEOGRAPHY = 10; + + // Encoded as a decimal string. + TYPE_NUMERIC = 11; + + // Container of ordered fields, each with a type and field name. + TYPE_RECORD = 12; + + // Decimal type. + TYPE_BIGNUMERIC = 13; + + // Json type. + TYPE_JSON = 14; + + // Interval type. + TYPE_INTERVAL = 15; + + // `Range` type. + TYPE_RANGE_DATE = 16; + + // `Range` type. + TYPE_RANGE_DATETIME = 17; + + // `Range` type. + TYPE_RANGE_TIMESTAMP = 18; + } + + // The possible policy states for a column. + enum ColumnPolicyState { + // No policy tags. + COLUMN_POLICY_STATE_UNSPECIFIED = 0; + + // Column has policy tag applied. + COLUMN_POLICY_TAGGED = 1; + } + + // The name of the profile. + string name = 1; + + // Success or error status from the most recent profile generation attempt. + // May be empty if the profile is still being generated. + ProfileStatus profile_status = 17; + + // State of a profile. + State state = 18; + + // The last time the profile was generated. + google.protobuf.Timestamp profile_last_generated = 3; + + // The resource name of the table data profile. + string table_data_profile = 4; + + // The resource name of the resource this column is within. + string table_full_resource = 5; + + // The Google Cloud project ID that owns the profiled resource. + string dataset_project_id = 19; + + // If supported, the location where the dataset's data is stored. + // See https://cloud.google.com/bigquery/docs/locations for supported + // BigQuery locations. + string dataset_location = 20; + + // The BigQuery dataset ID, if the resource profiled is a BigQuery table. + string dataset_id = 21; + + // The table ID. + string table_id = 22; + + // The name of the column. + string column = 6; + + // The sensitivity of this column. + SensitivityScore sensitivity_score = 7; + + // The data risk level for this column. + DataRiskLevel data_risk_level = 8; + + // If it's been determined this column can be identified as a single type, + // this will be set. Otherwise the column either has unidentifiable content + // or mixed types. + InfoTypeSummary column_info_type = 9; + + // Other types found within this column. List will be unordered. + repeated OtherInfoTypeSummary other_matches = 10; + + // Approximate percentage of entries being null in the column. + NullPercentageLevel estimated_null_percentage = 23; + + // Approximate uniqueness of the column. + UniquenessScoreLevel estimated_uniqueness_score = 24; + + // The likelihood that this column contains free-form text. + // A value close to 1 may indicate the column is likely to contain + // free-form or natural language text. + // Range in 0-1. + double free_text_score = 13; + + // The data type of a given column. + ColumnDataType column_type = 14; + + // Indicates if a policy tag has been applied to the column. + ColumnPolicyState policy_state = 15; +} + +// The profile for a file store. +// +// * Cloud Storage: maps 1:1 with a bucket. +// * Amazon S3: maps 1:1 with a bucket. +message FileStoreDataProfile { + option (google.api.resource) = { + type: "dlp.googleapis.com/FileStoreDataProfile" + pattern: "organizations/{organization}/locations/{location}/fileStoreDataProfiles/{file_store_data_profile}" + pattern: "projects/{project}/locations/{location}/fileStoreDataProfiles/{file_store_data_profile}" + }; + + // Possible states of a profile. New items may be added. + enum State { + // Unused. + STATE_UNSPECIFIED = 0; + + // The profile is currently running. Once a profile has finished it will + // transition to DONE. + RUNNING = 1; + + // The profile is no longer generating. + // If profile_status.status.code is 0, the profile succeeded, otherwise, it + // failed. + DONE = 2; + } + + // The name of the profile. + string name = 1; + + // The resource type that was profiled. + DataSourceType data_source_type = 2; + + // The resource name of the project data profile for this file store. + string project_data_profile = 3; + + // The Google Cloud project ID that owns the resource. + // For Amazon S3 buckets, this is the AWS Account Id. + string project_id = 4; + + // The location of the file store. + // + // * Cloud Storage: + // https://cloud.google.com/storage/docs/locations#available-locations + // * Amazon S3: + // https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints + string file_store_location = 5; + + // For resources that have multiple storage locations, these are those + // regions. For Cloud Storage this is the list of regions chosen for + // dual-region storage. `file_store_location` will normally be the + // corresponding multi-region for the list of individual locations. The first + // region is always picked as the processing and storage location for the data + // profile. + repeated string data_storage_locations = 19; + + // The location type of the file store (region, dual-region, multi-region, + // etc). If dual-region, expect data_storage_locations to be populated. + string location_type = 20; + + // The file store path. + // + // * Cloud Storage: `gs://{bucket}` + // * Amazon S3: `s3://{bucket}` + // * Vertex AI dataset: + // `projects/{project_number}/locations/{location}/datasets/{dataset_id}` + string file_store_path = 6; + + // The resource name of the resource profiled. + // https://cloud.google.com/apis/design/resource_names#full_resource_name + // + // Example format of an S3 bucket full resource name: + // `//cloudasset.googleapis.com/organizations/{org_id}/otherCloudConnections/aws/arn:aws:s3:::{bucket_name}` + string full_resource = 24; + + // The snapshot of the configurations used to generate the profile. + DataProfileConfigSnapshot config_snapshot = 7; + + // Success or error status from the most recent profile generation attempt. + // May be empty if the profile is still being generated. + ProfileStatus profile_status = 8; + + // State of a profile. + State state = 9; + + // The last time the profile was generated. + google.protobuf.Timestamp profile_last_generated = 10; + + // How broadly a resource has been shared. + ResourceVisibility resource_visibility = 11; + + // The sensitivity score of this resource. + SensitivityScore sensitivity_score = 12; + + // The data risk level of this resource. + DataRiskLevel data_risk_level = 13; + + // The time the file store was first created. + google.protobuf.Timestamp create_time = 14; + + // The time the file store was last modified. + google.protobuf.Timestamp last_modified_time = 15; + + // FileClusterSummary per each cluster. + repeated FileClusterSummary file_cluster_summaries = 16; + + // Attributes of the resource being profiled. + // Currently used attributes: + // + // * customer_managed_encryption: boolean + // - true: the resource is encrypted with a customer-managed key. + // - false: the resource is encrypted with a provider-managed key. + map resource_attributes = 17; + + // The labels applied to the resource at the time the profile was generated. + map resource_labels = 18; + + // InfoTypes detected in this file store. + repeated FileStoreInfoTypeSummary file_store_info_type_summaries = 21; + + // The BigQuery table to which the sample findings are written. + BigQueryTable sample_findings_table = 22; + + // The file store does not have any files. If the profiling operation failed, + // this is false. + bool file_store_is_empty = 23; + + // The tags attached to the resource, including any tags attached during + // profiling. + repeated Tag tags = 25; + + // Resources related to this profile. + repeated RelatedResource related_resources = 26; + + // Domains associated with the profile. + repeated Domain domains = 27; +} + +// A tag associated with a resource. +message Tag { + // The namespaced name for the tag value to attach to Google Cloud resources. + // Must be in the format `{parent_id}/{tag_key_short_name}/{short_name}`, for + // example, "123456/environment/prod" for an organization parent, or + // "my-project/environment/prod" for a project parent. This is only set for + // Google Cloud resources. + string namespaced_tag_value = 1; + + // The key of a tag key-value pair. For Google Cloud resources, this is the + // resource name of the key, for example, "tagKeys/123456". + string key = 2; + + // The value of a tag key-value pair. For Google Cloud resources, this is the + // resource name of the value, for example, "tagValues/123456". + string value = 3; +} + +// Tags to match against for filtering. +message TagFilters { + // Required. A resource must match ALL of the specified tag filters to be + // included in the collection. + repeated TagFilter tag_filters = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// A single tag to filter against. +message TagFilter { + // Tag filter formats. Tags refer to Resource Manager tags bound to the + // resource or its ancestors. + oneof format { + // The namespaced name for the tag value. Must be in the format + // `{parent_id}/{tag_key_short_name}/{short_name}`, for example, + // "123456/environment/prod" for an organization parent, or + // "my-project/environment/prod" for a project parent. + string namespaced_tag_value = 1; + + // The namespaced name for the tag key. Must be in the format + // `{parent_id}/{tag_key_short_name}`, for example, "123456/sensitive" for + // an organization parent, or "my-project/sensitive" for a project parent. + string namespaced_tag_key = 2; + } +} + +// A related resource. +// Examples: +// +// * The source BigQuery table for a Vertex AI dataset. +// * The source Cloud Storage bucket for a Vertex AI dataset. +message RelatedResource { + // The full resource name of the related resource. + string full_resource = 1; +} + +// Information regarding the discovered InfoType. +message FileStoreInfoTypeSummary { + // The InfoType seen. + InfoType info_type = 1; +} + +// Information regarding the discovered file extension. +message FileExtensionInfo { + // The file extension if set. (aka .pdf, .jpg, .txt) + string file_extension = 1; +} + +// The file cluster summary. +message FileClusterSummary { + // The file cluster type. + FileClusterType file_cluster_type = 1; + + // InfoTypes detected in this cluster. + repeated FileStoreInfoTypeSummary file_store_info_type_summaries = 2; + + // The sensitivity score of this cluster. The score will be SENSITIVITY_LOW + // if nothing has been scanned. + SensitivityScore sensitivity_score = 3; + + // The data risk level of this cluster. RISK_LOW if nothing has been + // scanned. + DataRiskLevel data_risk_level = 4; + + // A list of errors detected while scanning this cluster. The list is + // truncated to 10 per cluster. + repeated Error errors = 6; + + // A sample of file types scanned in this cluster. Empty if no files were + // scanned. File extensions can be derived from the file name or the file + // content. + repeated FileExtensionInfo file_extensions_scanned = 7; + + // A sample of file types seen in this cluster. Empty if no files were seen. + // File extensions can be derived from the file name or the file content. + repeated FileExtensionInfo file_extensions_seen = 8; + + // True if no files exist in this cluster. If the file store had more files + // than could be listed, this will be false even if no files for this cluster + // were seen and file_extensions_seen is empty. + bool no_files_exist = 9; +} + +// Request to get a project data profile. +message GetProjectDataProfileRequest { + // Required. Resource name, for example + // `organizations/12345/locations/us/projectDataProfiles/53234423`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/ProjectDataProfile" + } + ]; +} + +// Request to get a file store data profile. +message GetFileStoreDataProfileRequest { + // Required. Resource name, for example + // `organizations/12345/locations/us/fileStoreDataProfiles/53234423`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/ProjectDataProfile" + } + ]; +} + +// Request to list the file store profiles generated for a given organization or +// project. +message ListFileStoreDataProfilesRequest { + // Required. Resource name of the organization or project, for + // example `organizations/433245324/locations/europe` or + // `projects/project-id/locations/asia`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/FileStoreDataProfile" + } + ]; + + // Optional. Page token to continue retrieval. + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Size of the page. This value can be limited by the server. If + // zero, server returns a page of max size 100. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Comma-separated list of fields to order by, followed by `asc` or + // `desc` postfix. This list is case insensitive. The default sorting order is + // ascending. Redundant space characters are insignificant. Only one order + // field at a time is allowed. + // + // Examples: + // + // * `project_id asc` + // * `name` + // * `sensitivity_level desc` + // + // Supported fields are: + // + // - `project_id`: The Google Cloud project ID. + // - `sensitivity_level`: How sensitive the data in a table is, at most. + // - `data_risk_level`: How much risk is associated with this data. + // - `profile_last_generated`: When the profile was last updated in epoch + // seconds. + // - `last_modified`: The last time the resource was modified. + // - `resource_visibility`: Visibility restriction for this resource. + // - `name`: The name of the profile. + // - `create_time`: The time the file store was first created. + string order_by = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Allows filtering. + // + // Supported syntax: + // + // * Filter expressions are made up of one or more restrictions. + // * Restrictions can be combined by `AND` or `OR` logical operators. A + // sequence of restrictions implicitly uses `AND`. + // * A restriction has the form of `{field} {operator} {value}`. + // * Supported fields: + // - `project_id`: The Google Cloud project ID + // - `account_id`: The AWS account ID + // - `file_store_path`: The path like "gs://bucket" + // - `data_source_type`: The profile's data source type, like + // "google/storage/bucket" + // - `data_storage_location`: The location where the file store's data is + // stored, like "us-central1" + // - `sensitivity_level`: HIGH|MODERATE|LOW + // - `data_risk_level`: HIGH|MODERATE|LOW + // - `resource_visibility`: PUBLIC|RESTRICTED + // - `status_code`: an RPC status code as defined in + // https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + // - `profile_last_generated`: Date and time the profile was last + // generated + // + // * The operator must be `=` or `!=`. The `profile_last_generated` filter + // also supports `<` and `>`. + // + // The syntax is based on https://google.aip.dev/160. + // + // Examples: + // + // * `project_id = 12345 AND status_code = 1` + // * `project_id = 12345 AND sensitivity_level = HIGH` + // * `project_id = 12345 AND resource_visibility = PUBLIC` + // * `file_store_path = "gs://mybucket"` + // * `profile_last_generated < "2025-01-01T00:00:00.000Z"` + // + // The length of this field should be no more than 500 characters. + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// List of file store data profiles generated for a given organization or +// project. +message ListFileStoreDataProfilesResponse { + // List of data profiles. + repeated FileStoreDataProfile file_store_data_profiles = 1; + + // The next page token. + string next_page_token = 2; +} + +// Request message for DeleteFileStoreProfile. +message DeleteFileStoreDataProfileRequest { + // Required. Resource name of the file store data profile. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/FileStoreDataProfile" + } + ]; +} + +// Request to get a table data profile. +message GetTableDataProfileRequest { + // Required. Resource name, for example + // `organizations/12345/locations/us/tableDataProfiles/53234423`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/TableDataProfile" + } + ]; +} + +// Request to get a column data profile. +message GetColumnDataProfileRequest { + // Required. Resource name, for example + // `organizations/12345/locations/us/columnDataProfiles/53234423`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/ColumnDataProfile" + } + ]; +} + +// A condition for determining whether a Pub/Sub should be triggered. +message DataProfilePubSubCondition { + // Various score levels for resources. + enum ProfileScoreBucket { + // Unused. + PROFILE_SCORE_BUCKET_UNSPECIFIED = 0; + + // High risk/sensitivity detected. + HIGH = 1; + + // Medium or high risk/sensitivity detected. + MEDIUM_OR_HIGH = 2; + } + + // A condition consisting of a value. + message PubSubCondition { + // The value for the condition to trigger. + oneof value { + // The minimum data risk score that triggers the condition. + ProfileScoreBucket minimum_risk_score = 1; + + // The minimum sensitivity level that triggers the condition. + ProfileScoreBucket minimum_sensitivity_score = 2; + } + } + + // An expression, consisting of an operator and conditions. + message PubSubExpressions { + // Logical operators for conditional checks. + enum PubSubLogicalOperator { + // Unused. + LOGICAL_OPERATOR_UNSPECIFIED = 0; + + // Conditional OR. + OR = 1; + + // Conditional AND. + AND = 2; + } + + // The operator to apply to the collection of conditions. + PubSubLogicalOperator logical_operator = 1; + + // Conditions to apply to the expression. + repeated PubSubCondition conditions = 2; + } + + // An expression. + PubSubExpressions expressions = 1; +} + +// Pub/Sub topic message for a DataProfileAction.PubSubNotification event. +// To receive a message of protocol buffer schema type, convert the message data +// to an object of this proto class. +message DataProfilePubSubMessage { + // If `DetailLevel` is `TABLE_PROFILE` this will be fully populated. + // Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and + // `full_resource` will be populated. + TableDataProfile profile = 1; + + // If `DetailLevel` is `FILE_STORE_PROFILE` this will be fully populated. + // Otherwise, if `DetailLevel` is `RESOURCE_NAME`, then only `name` and + // `file_store_path` will be populated. + FileStoreDataProfile file_store_profile = 3; + + // The event that caused the Pub/Sub message to be sent. + DataProfileAction.EventType event = 2; +} + +// Request message for CreateConnection. +message CreateConnectionRequest { + // Required. Parent resource name. + // + // The format of this value varies depending on the scope of the request + // (project or organization): + // + // + Projects scope: + // `projects/{project_id}/locations/{location_id}` + // + Organizations scope: + // `organizations/{org_id}/locations/{location_id}` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/Connection" + } + ]; + + // Required. The connection resource. + Connection connection = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for GetConnection. +message GetConnectionRequest { + // Required. Resource name in the format: + // `projects/{project}/locations/{location}/connections/{connection}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/Connection" } + ]; +} + +// Request message for ListConnections. +message ListConnectionsRequest { + // Required. Resource name of the organization or project, for + // example, `organizations/433245324/locations/europe` or + // `projects/project-id/locations/asia`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/Connection" + } + ]; + + // Optional. Number of results per page, max 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token from a previous page to return the next set of + // results. If set, all other request fields must match the original request. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Supported field/value: `state` - MISSING|AVAILABLE|ERROR + // + // The syntax is based on https://google.aip.dev/160. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for SearchConnections. +message SearchConnectionsRequest { + // Required. Resource name of the organization or project with a wildcard + // location, for example, `organizations/433245324/locations/-` or + // `projects/project-id/locations/-`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "dlp.googleapis.com/Connection" + } + ]; + + // Optional. Number of results per page, max 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Page token from a previous page to return the next set of + // results. If set, all other request fields must match the original request. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Supported field/value: - `state` - MISSING|AVAILABLE|ERROR + // + // The syntax is based on https://google.aip.dev/160. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListConnections. +message ListConnectionsResponse { + // List of connections. + repeated Connection connections = 1; + + // Token to retrieve the next page of results. An empty value means there are + // no more results. + string next_page_token = 2; +} + +// Response message for SearchConnections. +message SearchConnectionsResponse { + // List of connections that match the search query. Note that only a subset + // of the fields will be populated, and only "name" is guaranteed to be set. + // For full details of a Connection, call GetConnection with the name. + repeated Connection connections = 1; + + // Token to retrieve the next page of results. An empty value means there are + // no more results. + string next_page_token = 2; +} + +// Request message for UpdateConnection. +message UpdateConnectionRequest { + // Required. Resource name in the format: + // `projects/{project}/locations/{location}/connections/{connection}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/Connection" } + ]; + + // Required. The connection with new values for the relevant fields. + Connection connection = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Mask to control which fields get updated. + google.protobuf.FieldMask update_mask = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for DeleteConnection. +message DeleteConnectionRequest { + // Required. Resource name of the Connection to be deleted, in the format: + // `projects/{project}/locations/{location}/connections/{connection}`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "dlp.googleapis.com/Connection" } + ]; +} + +// A data connection to allow the DLP API to profile data in locations that +// require additional configuration. +message Connection { + option (google.api.resource) = { + type: "dlp.googleapis.com/Connection" + pattern: "projects/{project}/locations/{location}/connections/{connection}" + pattern: "organizations/{organization}/locations/{location}/connections/{connection}" + }; + + // Output only. Name of the connection: + // `projects/{project}/locations/{location}/connections/{name}`. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The connection's state in its lifecycle. + ConnectionState state = 2 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Set if status == ERROR, to provide additional details. Will + // store the last 10 errors sorted with the most recent first. + repeated Error errors = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Type of connection. + oneof properties { + // Connect to a Cloud SQL instance. + CloudSqlProperties cloud_sql = 4; + } +} + +// State of the connection. +// New values may be added over time. +enum ConnectionState { + // Unused + CONNECTION_STATE_UNSPECIFIED = 0; + + // The DLP API automatically created this connection during an initial scan, + // and it is awaiting full configuration by a user. + MISSING_CREDENTIALS = 1; + + // A configured connection that has not encountered any errors. + AVAILABLE = 2; + + // A configured connection that encountered errors during its last use. It + // will not be used again until it is set to AVAILABLE. + // + // If the resolution requires external action, then the client must send a + // request to set the status to AVAILABLE when the connection is ready for + // use. If the resolution doesn't require external action, then any changes to + // the connection properties will automatically mark it as AVAILABLE. + ERROR = 3; +} + +// A credential consisting of a username and password, where the password is +// stored in a Secret Manager resource. +// Note: Secret Manager [charges +// apply](https://cloud.google.com/secret-manager/pricing). +message SecretManagerCredential { + // Required. The username. + string username = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The name of the Secret Manager resource that stores the password, + // in the form `projects/project-id/secrets/secret-name/versions/version`. + string password_secret_version_name = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Use IAM authentication to connect. This requires the Cloud SQL IAM feature +// to be enabled on the instance, which is not the default for Cloud SQL. +// See https://cloud.google.com/sql/docs/postgres/authentication and +// https://cloud.google.com/sql/docs/mysql/authentication. +message CloudSqlIamCredential {} + +// Cloud SQL connection properties. +message CloudSqlProperties { + // Database engine of a Cloud SQL instance. + // New values may be added over time. + enum DatabaseEngine { + // An engine that is not currently supported by Sensitive Data Protection. + DATABASE_ENGINE_UNKNOWN = 0; + + // Cloud SQL for MySQL instance. + DATABASE_ENGINE_MYSQL = 1; + + // Cloud SQL for PostgreSQL instance. + DATABASE_ENGINE_POSTGRES = 2; + } + + // Optional. Immutable. The Cloud SQL instance for which the connection is + // defined. Only one connection per instance is allowed. This can only be set + // at creation time, and cannot be updated. + // + // It is an error to use a connection_name from different project or region + // than the one that holds the connection. + // For example, a Connection resource for Cloud SQL connection_name + // `project-id:us-central1:sql-instance` + // must be created under the parent + // `projects/project-id/locations/us-central1` + string connection_name = 1 [ + (google.api.field_behavior) = IMMUTABLE, + (google.api.field_behavior) = OPTIONAL + ]; + + // How to authenticate to the instance. + oneof credential { + // A username and password stored in Secret Manager. + SecretManagerCredential username_password = 2; + + // Built-in IAM authentication (must be configured in Cloud SQL). + CloudSqlIamCredential cloud_sql_iam = 3; + } + + // Required. The DLP API will limit its connections to max_connections. + // Must be 2 or greater. + int32 max_connections = 4 [(google.api.field_behavior) = REQUIRED]; + + // Required. The database engine used by the Cloud SQL instance that this + // connection configures. + DatabaseEngine database_engine = 7 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteTableProfile. +message DeleteTableDataProfileRequest { + // Required. Resource name of the table data profile. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dlp.googleapis.com/TableDataProfile" + } + ]; +} + +// Message used to identify the type of resource being profiled. +message DataSourceType { + // A string that identifies the type of resource being profiled. + // Current values: + // + // * google/bigquery/table + // * google/project + // * google/sql/table + // * google/gcs/bucket + string data_source = 1; +} + +// Message used to identify file cluster type being profiled. +message FileClusterType { + // Cluster type. Each cluster corresponds to a set of file types. + // Over time, new types may be added and files may move between clusters. + enum Cluster { + // Unused. + CLUSTER_UNSPECIFIED = 0; + + // Unsupported files. + CLUSTER_UNKNOWN = 1; + + // Plain text. + CLUSTER_TEXT = 2; + + // Structured data like CSV, TSV etc. + CLUSTER_STRUCTURED_DATA = 3; + + // Source code. + CLUSTER_SOURCE_CODE = 4; + + // Rich document like docx, xlsx etc. + CLUSTER_RICH_DOCUMENT = 5; + + // Images like jpeg, bmp. + CLUSTER_IMAGE = 6; + + // Archives and containers like .zip, .tar etc. + CLUSTER_ARCHIVE = 7; + + // Multimedia like .mp4, .avi etc. + CLUSTER_MULTIMEDIA = 8; + + // Executable files like .exe, .class, .apk etc. + CLUSTER_EXECUTABLE = 9; + + // AI models like .tflite etc. + CLUSTER_AI_MODEL = 10; + } + + // File cluster type. + oneof file_cluster_type { + // Cluster type. + Cluster cluster = 1; + } +} + +// Configure processing location for discovery and inspection. For example, +// image OCR is only provided in limited regions but configuring +// ProcessingLocation will redirect OCR to a location where OCR is provided. +message ProcessingLocation { + // Processing occurs in a multi-region that contains the current region + // if available. + message MultiRegionProcessing {} + + // Processing occurs in the global region. + message GlobalProcessing {} + + // Configure image processing to fall back to any of the following processing + // options if image processing is unavailable in the original request + // location. + message ImageFallbackLocation { + // Processing occurs in a multi-region that contains the current region + // if available. + MultiRegionProcessing multi_region_processing = 100; + + // Processing occurs in the global region. + GlobalProcessing global_processing = 200; + } + + // Configure document processing to fall back to any of the following + // processing options if document processing is unavailable in the original + // request location. + message DocumentFallbackLocation { + // Processing occurs in a multi-region that contains the current region + // if available. + MultiRegionProcessing multi_region_processing = 100; + + // Processing occurs in the global region. + GlobalProcessing global_processing = 200; + } + + // Image processing falls back using this configuration. + ImageFallbackLocation image_fallback_location = 1; + + // Document processing falls back using this configuration. + DocumentFallbackLocation document_fallback_location = 2; +} + +// Collection of findings saved to a Cloud Storage bucket. This is used as the +// proto schema for textproto files created when specifying a cloud storage +// path to save Inspect findings. +message SaveToGcsFindingsOutput { + // List of findings. + repeated Finding findings = 1; +} + +// A domain represents a thematic category that a data profile can fall under. +message Domain { + // This enum defines the various domain categories a data profile can fall + // under. + enum Category { + // Category unspecified. + CATEGORY_UNSPECIFIED = 0; + + // Indicates that the data profile is related to artificial intelligence. + // When set, all findings stored to Security Command Center will set the + // corresponding AI domain field of `Finding` objects. + AI = 1; + + // Indicates that the data profile is related to code. + CODE = 2; + } + + // The signal used to determine the category. + // New values may be added in the future. + enum Signal { + // Unused. + SIGNAL_UNSPECIFIED = 0; + + // One or more machine learning models are present. + MODEL = 1; + + // A table appears to contain text embeddings. + TEXT_EMBEDDING = 2; + + // A table appears to contain embeddings of any type (for example, text, + // image, multimodal). The `TEXT_EMBEDDING` signal might also be present if + // the table contains text embeddings. + EMBEDDING = 7; + + // The [Cloud SQL Vertex + // AI](https://cloud.google.com/sql/docs/postgres/integrate-cloud-sql-with-vertex-ai) + // plugin is installed on the database. + VERTEX_PLUGIN = 3; + + // Support for [Cloud SQL vector + // embeddings](https://cloud.google.com/sql/docs/mysql/enable-vector-search) + // is enabled on the database. + VECTOR_PLUGIN = 4; + + // Source code is present. + SOURCE_CODE = 5; + + // If the service determines the category type. For example, Vertex AI + // assets would always have a `Category` of `AI`. + SERVICE = 6; + } + + // A domain category that this profile is related to. + Category category = 1; + + // The collection of signals that influenced selection of the category. + repeated Signal signals = 2; +} diff --git a/owl-bot-staging/dlp/v2/protos/google/privacy/dlp/v2/storage.proto b/owl-bot-staging/dlp/v2/protos/google/privacy/dlp/v2/storage.proto new file mode 100644 index 000000000..4bfa1b929 --- /dev/null +++ b/owl-bot-staging/dlp/v2/protos/google/privacy/dlp/v2/storage.proto @@ -0,0 +1,919 @@ +// Copyright 2026 Google LLC +// +// 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. + +syntax = "proto3"; + +package google.privacy.dlp.v2; + +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Dlp.V2"; +option go_package = "cloud.google.com/go/dlp/apiv2/dlppb;dlppb"; +option java_multiple_files = true; +option java_outer_classname = "DlpStorage"; +option java_package = "com.google.privacy.dlp.v2"; +option php_namespace = "Google\\Cloud\\Dlp\\V2"; +option ruby_package = "Google::Cloud::Dlp::V2"; + +// Type of information detected by the API. +message InfoType { + // Name of the information type. Either a name of your choosing when + // creating a CustomInfoType, or one of the names listed + // at + // https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference + // when specifying a built-in type. When sending Cloud DLP results to Data + // Catalog, infoType names should conform to the pattern + // `[A-Za-z0-9$_-]{1,64}`. + string name = 1; + + // Optional version name for this InfoType. + string version = 2; + + // Optional custom sensitivity for this InfoType. + // This only applies to data profiling. + SensitivityScore sensitivity_score = 3; +} + +// Score is calculated from of all elements in the data profile. +// A higher level means the data is more sensitive. +message SensitivityScore { + // Various sensitivity score levels for resources. + enum SensitivityScoreLevel { + // Unused. + SENSITIVITY_SCORE_UNSPECIFIED = 0; + + // No sensitive information detected. The resource isn't publicly + // accessible. + SENSITIVITY_LOW = 10; + + // Unable to determine sensitivity. + SENSITIVITY_UNKNOWN = 12; + + // Medium risk. Contains personally identifiable information (PII), + // potentially sensitive data, or fields with free-text data that are at a + // higher risk of having intermittent sensitive data. Consider limiting + // access. + SENSITIVITY_MODERATE = 20; + + // High risk. Sensitive personally identifiable information (SPII) can be + // present. Exfiltration of data can lead to user data loss. + // Re-identification of users might be possible. Consider limiting usage and + // or removing SPII. + SENSITIVITY_HIGH = 30; + } + + // The sensitivity score applied to the resource. + SensitivityScoreLevel score = 1; +} + +// Coarse-grained confidence level of how well a particular finding +// satisfies the criteria to match a particular infoType. +// +// Likelihood is calculated based on the number of signals a +// finding has that implies that the finding matches the infoType. For +// example, a string that has an '@' and a '.com' is more likely to be a +// match for an email address than a string that only has an '@'. +// +// In general, the highest likelihood level has the strongest signals that +// indicate a match. That is, a finding with a high likelihood has a low chance +// of being a false positive. +// +// For more information about each likelihood level +// and how likelihood works, see [Match +// likelihood](https://cloud.google.com/sensitive-data-protection/docs/likelihood). +enum Likelihood { + // Default value; same as POSSIBLE. + LIKELIHOOD_UNSPECIFIED = 0; + + // Highest chance of a false positive. + VERY_UNLIKELY = 1; + + // High chance of a false positive. + UNLIKELY = 2; + + // Some matching signals. The default value. + POSSIBLE = 3; + + // Low chance of a false positive. + LIKELY = 4; + + // Confidence level is high. Lowest chance of a false positive. + VERY_LIKELY = 5; +} + +// A reference to a StoredInfoType to use with scanning. +message StoredType { + // Resource name of the requested `StoredInfoType`, for example + // `organizations/433245324/storedInfoTypes/432452342` or + // `projects/project-id/storedInfoTypes/432452342`. + string name = 1; + + // Timestamp indicating when the version of the `StoredInfoType` used for + // inspection was created. Output-only field, populated by the system. + google.protobuf.Timestamp create_time = 2; +} + +// Custom information type provided by the user. Used to find domain-specific +// sensitive information configurable to the data in question. +message CustomInfoType { + // Custom information type based on a dictionary of words or phrases. This can + // be used to match sensitive information specific to the data, such as a list + // of employee IDs or job titles. + // + // Dictionary words are case-insensitive and all characters other than letters + // and digits in the unicode [Basic Multilingual + // Plane](https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane) + // will be replaced with whitespace when scanning for matches, so the + // dictionary phrase "Sam Johnson" will match all three phrases "sam johnson", + // "Sam, Johnson", and "Sam (Johnson)". Additionally, the characters + // surrounding any match must be of a different type than the adjacent + // characters within the word, so letters must be next to non-letters and + // digits next to non-digits. For example, the dictionary word "jen" will + // match the first three letters of the text "jen123" but will return no + // matches for "jennifer". + // + // Dictionary words containing a large number of characters that are not + // letters or digits may result in unexpected findings because such characters + // are treated as whitespace. The + // [limits](https://cloud.google.com/sensitive-data-protection/limits) page + // contains details about the size limits of dictionaries. For dictionaries + // that do not fit within these constraints, consider using + // `LargeCustomDictionaryConfig` in the `StoredInfoType` API. + message Dictionary { + // Message defining a list of words or phrases to search for in the data. + message WordList { + // Words or phrases defining the dictionary. The dictionary must contain + // at least one phrase and every phrase must contain at least 2 characters + // that are letters or digits. [required] + repeated string words = 1; + } + + // The potential places the data can be read from. + oneof source { + // List of words or phrases to search for. + WordList word_list = 1; + + // Newline-delimited file of words in Cloud Storage. Only a single file + // is accepted. + CloudStoragePath cloud_storage_path = 3; + } + } + + // Message defining a custom regular expression. + message Regex { + // Pattern defining the regular expression. Its syntax + // (https://github.com/google/re2/wiki/Syntax) can be found under the + // google/re2 repository on GitHub. + string pattern = 1; + + // The index of the submatch to extract as findings. When not + // specified, the entire match is returned. No more than 3 may be included. + repeated int32 group_indexes = 2; + } + + // Message for detecting output from deidentification transformations + // such as + // [`CryptoReplaceFfxFpeConfig`](https://cloud.google.com/sensitive-data-protection/docs/reference/rest/v2/organizations.deidentifyTemplates#cryptoreplaceffxfpeconfig). + // These types of transformations are + // those that perform pseudonymization, thereby producing a "surrogate" as + // output. This should be used in conjunction with a field on the + // transformation such as `surrogate_info_type`. This CustomInfoType does + // not support the use of `detection_rules`. + message SurrogateType {} + + // Configuration for a custom infoType that detects key-value pairs in the + // metadata matching the specified regular expressions. + message MetadataKeyValueExpression { + // The regular expression for the key. Key should be + // non-empty. + string key_regex = 1; + + // The regular expression for the value. Value should be non-empty. + string value_regex = 2; + } + + // Deprecated; use `InspectionRuleSet` instead. Rule for modifying a + // `CustomInfoType` to alter behavior under certain circumstances, depending + // on the specific details of the rule. Not supported for the `surrogate_type` + // custom infoType. + message DetectionRule { + // Message for specifying a window around a finding to apply a detection + // rule. + message Proximity { + // Number of characters before the finding to consider. For tabular data, + // if you want to modify the likelihood of an entire column of findngs, + // set this to 1. For more information, see + // [Hotword example: Set the match likelihood of a table column] + // (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values). + int32 window_before = 1; + + // Number of characters after the finding to consider. + int32 window_after = 2; + } + + // Message for specifying an adjustment to the likelihood of a finding as + // part of a detection rule. + message LikelihoodAdjustment { + // How the likelihood will be modified. + oneof adjustment { + // Set the likelihood of a finding to a fixed value. + Likelihood fixed_likelihood = 1; + + // Increase or decrease the likelihood by the specified number of + // levels. For example, if a finding would be `POSSIBLE` without the + // detection rule and `relative_likelihood` is 1, then it is upgraded to + // `LIKELY`, while a value of -1 would downgrade it to `UNLIKELY`. + // Likelihood may never drop below `VERY_UNLIKELY` or exceed + // `VERY_LIKELY`, so applying an adjustment of 1 followed by an + // adjustment of -1 when base likelihood is `VERY_LIKELY` will result in + // a final likelihood of `LIKELY`. + int32 relative_likelihood = 2; + } + } + + // The rule that adjusts the likelihood of findings within a certain + // proximity of hotwords. + message HotwordRule { + // Regular expression pattern defining what qualifies as a hotword. + Regex hotword_regex = 1; + + // Range of characters within which the entire hotword must reside. + // The total length of the window cannot exceed 1000 characters. + // The finding itself will be included in the window, so that hotwords can + // be used to match substrings of the finding itself. Suppose you + // want Cloud DLP to promote the likelihood of the phone number + // regex "\(\d{3}\) \d{3}-\d{4}" if the area code is known to be the + // area code of a company's office. In this case, use the hotword regex + // "\(xxx\)", where "xxx" is the area code in question. + // + // For tabular data, if you want to modify the likelihood of an entire + // column of findngs, see + // [Hotword example: Set the match likelihood of a table column] + // (https://cloud.google.com/sensitive-data-protection/docs/creating-custom-infotypes-likelihood#match-column-values). + Proximity proximity = 2; + + // Likelihood adjustment to apply to all matching findings. + LikelihoodAdjustment likelihood_adjustment = 3; + } + + // Type of hotword rule. + oneof type { + // Hotword-based detection rule. + HotwordRule hotword_rule = 1; + } + } + + // Type of exclusion rule. + enum ExclusionType { + // A finding of this custom info type will not be excluded from results. + EXCLUSION_TYPE_UNSPECIFIED = 0; + + // A finding of this custom info type will be excluded from final results, + // but can still affect rule execution. + EXCLUSION_TYPE_EXCLUDE = 1; + } + + // CustomInfoType can either be a new infoType, or an extension of built-in + // infoType, when the name matches one of existing infoTypes and that infoType + // is specified in `InspectContent.info_types` field. Specifying the latter + // adds findings to the one detected by the system. If built-in info type is + // not specified in `InspectContent.info_types` list then the name is treated + // as a custom info type. + InfoType info_type = 1; + + // Likelihood to return for this CustomInfoType. This base value can be + // altered by a detection rule if the finding meets the criteria specified by + // the rule. Defaults to `VERY_LIKELY` if not specified. + Likelihood likelihood = 6; + + // Type of custom detector. + oneof type { + // A list of phrases to detect as a CustomInfoType. + Dictionary dictionary = 2; + + // Regular expression based CustomInfoType. + Regex regex = 3; + + // Message for detecting output from deidentification transformations that + // support reversing. + SurrogateType surrogate_type = 4; + + // Loads an existing `StoredInfoType` resource. + StoredType stored_type = 5; + + // Key-value pair to detect in the metadata. + MetadataKeyValueExpression metadata_key_value_expression = 10; + } + + // Set of detection rules to apply to all findings of this CustomInfoType. + // Rules are applied in the order that they are specified. Only supported + // for the `dictionary`, `regex`, and `stored_type` CustomInfoTypes. + repeated DetectionRule detection_rules = 7; + + // If set to EXCLUSION_TYPE_EXCLUDE this infoType will not cause a finding + // to be returned. It still can be used for rules matching. Only supported + // for the `dictionary`, `regex`, and `stored_type` CustomInfoTypes. + ExclusionType exclusion_type = 8; + + // Sensitivity for this CustomInfoType. If this CustomInfoType extends an + // existing InfoType, the sensitivity here will take precedence over that of + // the original InfoType. If unset for a CustomInfoType, it will default to + // HIGH. + // This only applies to data profiling. + SensitivityScore sensitivity_score = 9; +} + +// General identifier of a data field in a storage service. +message FieldId { + // Name describing the field. + string name = 1; +} + +// 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. +message PartitionId { + // The ID of the project to which the entities belong. + string project_id = 2; + + // If not empty, the ID of the namespace to which the entities belong. + string namespace_id = 4; +} + +// A representation of a Datastore kind. +message KindExpression { + // The name of the kind. + string name = 1; +} + +// Options defining a data set within Google Cloud Datastore. +message DatastoreOptions { + // A partition ID identifies a grouping of entities. The grouping is always + // by project and namespace, however the namespace ID may be empty. + PartitionId partition_id = 1; + + // The kind to process. + KindExpression kind = 2; +} + +// Definitions of file type groups to scan. New types will be added to this +// list. +enum FileType { + // Includes all files. + FILE_TYPE_UNSPECIFIED = 0; + + // Includes all file extensions not covered by another entry. Binary + // scanning attempts to convert the content of the file to utf_8 to scan + // the file. + // If you wish to avoid this fall back, specify one or more of the other + // file types in your storage scan. + BINARY_FILE = 1; + + // Included file extensions: + // asc,asp, aspx, brf, c, cc,cfm, cgi, cpp, csv, cxx, c++, cs, css, dart, + // dat, dot, eml,, epbub, ged, go, h, hh, hpp, hxx, h++, hs, html, htm, + // mkd, markdown, m, ml, mli, perl, pl, plist, pm, php, phtml, pht, + // properties, py, pyw, rb, rbw, rs, rss, rc, scala, sh, sql, swift, tex, + // shtml, shtm, xhtml, lhs, ics, ini, java, js, json, jsonl, kix, kml, + // ocaml, md, txt, text, tsv, vb, vcard, vcs, wml, xcodeproj, xml, xsl, xsd, + // yml, yaml. + TEXT_FILE = 2; + + // Included file extensions: + // bmp, gif, jpg, jpeg, jpe, png. Setting + // [bytes_limit_per_file][google.privacy.dlp.v2.CloudStorageOptions.bytes_limit_per_file] + // or + // [bytes_limit_per_file_percent][google.privacy.dlp.v2.CloudStorageOptions.bytes_limit_per_file] + // has no effect on image files. Image inspection is restricted to the + // `global`, `us`, `asia`, and `europe` regions. + IMAGE = 3; + + // Microsoft Word files larger than 30 MB will be scanned as binary files. + // Included file extensions: + // docx, dotx, docm, dotm. Setting `bytes_limit_per_file` or + // `bytes_limit_per_file_percent` has no effect on Word files. + WORD = 5; + + // PDF files larger than 30 MB will be scanned as binary files. + // Included file extensions: + // pdf. Setting `bytes_limit_per_file` or `bytes_limit_per_file_percent` + // has no effect on PDF files. + PDF = 6; + + // Included file extensions: + // avro + AVRO = 7; + + // Included file extensions: + // csv + CSV = 8; + + // Included file extensions: + // tsv + TSV = 9; + + // Microsoft PowerPoint files larger than 30 MB will be scanned as binary + // files. Included file extensions: + // pptx, pptm, potx, potm, pot. Setting `bytes_limit_per_file` or + // `bytes_limit_per_file_percent` has no effect on PowerPoint files. + POWERPOINT = 11; + + // Microsoft Excel files larger than 30 MB will be scanned as binary files. + // Included file extensions: + // xlsx, xlsm, xltx, xltm. Setting `bytes_limit_per_file` or + // `bytes_limit_per_file_percent` has no effect on Excel files. + EXCEL = 12; +} + +// Message representing a set of files in a Cloud Storage bucket. Regular +// expressions are used to allow fine-grained control over which files in the +// bucket to include. +// +// Included files are those that match at least one item in `include_regex` and +// do not match any items in `exclude_regex`. Note that a file that matches +// items from both lists will _not_ be included. For a match to occur, the +// entire file path (i.e., everything in the url after the bucket name) must +// match the regular expression. +// +// For example, given the input `{bucket_name: "mybucket", include_regex: +// ["directory1/.*"], exclude_regex: +// ["directory1/excluded.*"]}`: +// +// * `gs://mybucket/directory1/myfile` will be included +// * `gs://mybucket/directory1/directory2/myfile` will be included (`.*` matches +// across `/`) +// * `gs://mybucket/directory0/directory1/myfile` will _not_ be included (the +// full path doesn't match any items in `include_regex`) +// * `gs://mybucket/directory1/excludedfile` will _not_ be included (the path +// matches an item in `exclude_regex`) +// +// If `include_regex` is left empty, it will match all files by default +// (this is equivalent to setting `include_regex: [".*"]`). +// +// Some other common use cases: +// +// * `{bucket_name: "mybucket", exclude_regex: [".*\.pdf"]}` will include all +// files in `mybucket` except for .pdf files +// * `{bucket_name: "mybucket", include_regex: ["directory/[^/]+"]}` will +// include all files directly under `gs://mybucket/directory/`, without matching +// across `/` +message CloudStorageRegexFileSet { + // The name of a Cloud Storage bucket. Required. + string bucket_name = 1; + + // A list of regular expressions matching file paths to include. All files in + // the bucket that match at least one of these regular expressions will be + // included in the set of files, except for those that also match an item in + // `exclude_regex`. Leaving this field empty will match all files by default + // (this is equivalent to including `.*` in the list). + // + // Regular expressions use RE2 + // [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found + // under the google/re2 repository on GitHub. + repeated string include_regex = 2; + + // A list of regular expressions matching file paths to exclude. All files in + // the bucket that match at least one of these regular expressions will be + // excluded from the scan. + // + // Regular expressions use RE2 + // [syntax](https://github.com/google/re2/wiki/Syntax); a guide can be found + // under the google/re2 repository on GitHub. + repeated string exclude_regex = 3; +} + +// Options defining a file or a set of files within a Cloud Storage +// bucket. +message CloudStorageOptions { + // Set of files to scan. + message FileSet { + // The Cloud Storage url of the file(s) to scan, in the format + // `gs:///`. Trailing wildcard in the path is allowed. + // + // If the url ends in a trailing slash, the bucket or directory represented + // by the url will be scanned non-recursively (content in sub-directories + // will not be scanned). This means that `gs://mybucket/` is equivalent to + // `gs://mybucket/*`, and `gs://mybucket/directory/` is equivalent to + // `gs://mybucket/directory/*`. + // + // Exactly one of `url` or `regex_file_set` must be set. + string url = 1; + + // The regex-filtered set of files to scan. Exactly one of `url` or + // `regex_file_set` must be set. + CloudStorageRegexFileSet regex_file_set = 2; + } + + // How to sample bytes if not all bytes are scanned. Meaningful only when used + // in conjunction with bytes_limit_per_file. If not specified, scanning would + // start from the top. + enum SampleMethod { + // No sampling. + SAMPLE_METHOD_UNSPECIFIED = 0; + + // Scan from the top (default). + TOP = 1; + + // For each file larger than bytes_limit_per_file, randomly pick the offset + // to start scanning. The scanned bytes are contiguous. + RANDOM_START = 2; + } + + // The set of one or more files to scan. + FileSet file_set = 1; + + // Max number of bytes to scan from a file. If a scanned file's size is bigger + // than this value then the rest of the bytes are omitted. Only one of + // `bytes_limit_per_file` and `bytes_limit_per_file_percent` can be specified. + // This field can't be set if de-identification is requested. For certain file + // types, setting this field has no effect. For more information, see [Limits + // on bytes scanned per + // file](https://cloud.google.com/sensitive-data-protection/docs/supported-file-types#max-byte-size-per-file). + int64 bytes_limit_per_file = 4; + + // Max percentage of bytes to scan from a file. The rest are omitted. The + // number of bytes scanned is rounded down. Must be between 0 and 100, + // inclusively. Both 0 and 100 means no limit. Defaults to 0. Only one of + // bytes_limit_per_file and bytes_limit_per_file_percent can be specified. + // This field can't be set if de-identification is requested. For certain file + // types, setting this field has no effect. For more information, see [Limits + // on bytes scanned per + // file](https://cloud.google.com/sensitive-data-protection/docs/supported-file-types#max-byte-size-per-file). + int32 bytes_limit_per_file_percent = 8; + + // List of file type groups to include in the scan. + // If empty, all files are scanned and available data format processors + // are applied. In addition, the binary content of the selected files + // is always scanned as well. + // Images are scanned only as binary if the specified region + // does not support image inspection and no file_types were specified. + // Image inspection is restricted to 'global', 'us', 'asia', and 'europe'. + repeated FileType file_types = 5; + + // How to sample the data. + SampleMethod sample_method = 6; + + // Limits the number of files to scan to this percentage of the input FileSet. + // Number of files scanned is rounded down. Must be between 0 and 100, + // inclusively. Both 0 and 100 means no limit. Defaults to 0. + int32 files_limit_percent = 7; +} + +// Message representing a set of files in Cloud Storage. +message CloudStorageFileSet { + // The url, in the format `gs:///`. Trailing wildcard in the + // path is allowed. + string url = 1; +} + +// Message representing a single file or path in Cloud Storage. +message CloudStoragePath { + // A URL representing a file or path (no wildcards) in Cloud Storage. + // Example: `gs://[BUCKET_NAME]/dictionary.txt` + string path = 1; +} + +// Options defining BigQuery table and row identifiers. +message BigQueryOptions { + // How to sample rows if not all rows are scanned. Meaningful only when used + // in conjunction with either rows_limit or rows_limit_percent. If not + // specified, rows are scanned in the order BigQuery reads them. + enum SampleMethod { + // No sampling. + SAMPLE_METHOD_UNSPECIFIED = 0; + + // Scan groups of rows in the order BigQuery provides (default). Multiple + // groups of rows may be scanned in parallel, so results may not appear in + // the same order the rows are read. + TOP = 1; + + // Randomly pick groups of rows to scan. + RANDOM_START = 2; + } + + // Complete BigQuery table reference. + BigQueryTable table_reference = 1; + + // Table fields that may uniquely identify a row within the table. When + // `actions.saveFindings.outputConfig.table` is specified, the values of + // columns specified here are available in the output table under + // `location.content_locations.record_location.record_key.id_values`. Nested + // fields such as `person.birthdate.year` are allowed. + repeated FieldId identifying_fields = 2; + + // Max number of rows to scan. If the table has more rows than this value, the + // rest of the rows are omitted. If not set, or if set to 0, all rows will be + // scanned. Only one of rows_limit and rows_limit_percent can be specified. + // Cannot be used in conjunction with TimespanConfig. + int64 rows_limit = 3; + + // Max percentage of rows to scan. The rest are omitted. The number of rows + // scanned is rounded down. Must be between 0 and 100, inclusively. Both 0 and + // 100 means no limit. Defaults to 0. Only one of rows_limit and + // rows_limit_percent can be specified. Cannot be used in conjunction with + // TimespanConfig. + // + // Caution: A [known + // issue](https://cloud.google.com/sensitive-data-protection/docs/known-issues#bq-sampling) + // is causing the `rowsLimitPercent` field to behave unexpectedly. We + // recommend using `rowsLimit` instead. + int32 rows_limit_percent = 6; + + // How to sample the data. + SampleMethod sample_method = 4; + + // References to fields excluded from scanning. This allows you to skip + // inspection of entire columns which you know have no findings. + // When inspecting a table, we recommend that you inspect all columns. + // Otherwise, findings might be affected because hints from excluded columns + // will not be used. + repeated FieldId excluded_fields = 5; + + // Limit scanning only to these fields. + // When inspecting a table, we recommend that you inspect all columns. + // Otherwise, findings might be affected because hints from excluded columns + // will not be used. + repeated FieldId included_fields = 7; +} + +// Shared message indicating Cloud storage type. +message StorageConfig { + // Configuration of the timespan of the items to include in scanning. + // Currently only supported when inspecting Cloud Storage and BigQuery. + message TimespanConfig { + // Exclude files, tables, or rows older than this value. + // If not set, no lower time limit is applied. + google.protobuf.Timestamp start_time = 1; + + // Exclude files, tables, or rows newer than this value. + // If not set, no upper time limit is applied. + google.protobuf.Timestamp end_time = 2; + + // Specification of the field containing the timestamp of scanned items. + // Used for data sources like Datastore and BigQuery. + // + // **For BigQuery** + // + // If this value is not specified and the table was modified between the + // given start and end times, the entire table will be scanned. If this + // value is specified, then rows are filtered based on the given start and + // end times. Rows with a `NULL` value in the provided BigQuery column are + // skipped. + // Valid data types of the provided BigQuery column are: `INTEGER`, `DATE`, + // `TIMESTAMP`, and `DATETIME`. + // + // If your BigQuery table is [partitioned at ingestion + // time](https://cloud.google.com/bigquery/docs/partitioned-tables#ingestion_time), + // you can use any of the following pseudo-columns as your timestamp field. + // When used with Cloud DLP, these pseudo-column names are case sensitive. + // + // - `_PARTITIONTIME` + // - `_PARTITIONDATE` + // - `_PARTITION_LOAD_TIME` + // + // **For Datastore** + // + // If this value is specified, then entities are filtered based on the given + // start and end times. If an entity does not contain the provided timestamp + // property or contains empty or invalid values, then it is included. + // Valid data types of the provided timestamp property are: `TIMESTAMP`. + // + // See the + // [known + // issue](https://cloud.google.com/sensitive-data-protection/docs/known-issues#bq-timespan) + // related to this operation. + FieldId timestamp_field = 3; + + // When the job is started by a JobTrigger we will automatically figure out + // a valid start_time to avoid scanning files that have not been modified + // since the last time the JobTrigger executed. This will be based on the + // time of the execution of the last run of the JobTrigger or the timespan + // end_time used in the last run of the JobTrigger. + // + // **For BigQuery** + // + // Inspect jobs triggered by automatic population will scan data that is at + // least three hours old when the job starts. This is because streaming + // buffer rows are not read during inspection and reading up to the current + // timestamp will result in skipped rows. + // + // See the [known + // issue](https://cloud.google.com/sensitive-data-protection/docs/known-issues#recently-streamed-data) + // related to this operation. + bool enable_auto_population_of_timespan_config = 4; + } + + // Type of storage system to inspect. + oneof type { + // Google Cloud Datastore options. + DatastoreOptions datastore_options = 2; + + // Cloud Storage options. + CloudStorageOptions cloud_storage_options = 3; + + // BigQuery options. + BigQueryOptions big_query_options = 4; + + // Hybrid inspection options. + HybridOptions hybrid_options = 9; + } + + // Configuration of the timespan of the items to include in scanning. + TimespanConfig timespan_config = 6; +} + +// Configuration to control jobs where the content being inspected is outside +// of Google Cloud Platform. +message HybridOptions { + // A short description of where the data is coming from. Will be stored once + // in the job. 256 max length. + string description = 1; + + // These are labels that each inspection request must include within their + // 'finding_labels' map. Request may contain others, but any missing one of + // these will be rejected. + // + // Label keys must be between 1 and 63 characters long and must conform + // to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. + // + // No more than 10 keys can be required. + repeated string required_finding_label_keys = 2; + + // To organize findings, these labels will be added to each finding. + // + // Label keys must be between 1 and 63 characters long and must conform + // to the following regular expression: `[a-z]([-a-z0-9]*[a-z0-9])?`. + // + // Label values must be between 0 and 63 characters long and must conform + // to the regular expression `([a-z]([-a-z0-9]*[a-z0-9])?)?`. + // + // No more than 10 labels can be associated with a given finding. + // + // Examples: + // + // * `"environment" : "production"` + // * `"pipeline" : "etl"` + map labels = 3; + + // If the container is a table, additional information to make findings + // meaningful such as the columns that are primary keys. + TableOptions table_options = 4; +} + +// Row key for identifying a record in BigQuery table. +message BigQueryKey { + // Complete BigQuery table reference. + BigQueryTable table_reference = 1; + + // Row number inferred at the time the table was scanned. This value is + // nondeterministic, cannot be queried, and may be null for inspection + // jobs. To locate findings within a table, specify + // `inspect_job.storage_config.big_query_options.identifying_fields` in + // `CreateDlpJobRequest`. + int64 row_number = 2; +} + +// Record key for a finding in Cloud Datastore. +message DatastoreKey { + // Datastore entity key. + Key entity_key = 1; +} + +// 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. +message Key { + // 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. + message PathElement { + // 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 `""`. + string kind = 1; + + // The type of ID. + oneof id_type { + // 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. + int64 id = 2; + + // 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 `""`. + string name = 3; + } + } + + // Entities are partitioned into subsets, currently identified by a project + // ID and namespace ID. + // Queries are scoped to a single partition. + PartitionId partition_id = 1; + + // 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. + repeated PathElement path = 2; +} + +// Message for a unique key indicating a record that contains a finding. +message RecordKey { + // Type of key + oneof type { + // BigQuery key + DatastoreKey datastore_key = 2; + + // Datastore key + BigQueryKey big_query_key = 3; + } + + // Values of identifying columns in the given row. Order of values matches + // the order of `identifying_fields` specified in the scanning request. + repeated string id_values = 5; +} + +// Message defining the location of a BigQuery table. A table is uniquely +// identified by its project_id, dataset_id, and table_name. Within a query +// a table is often referenced with a string in the format of: +// `:.` or +// `..`. +message BigQueryTable { + // The Google Cloud project ID of the project containing the table. + // If omitted, project ID is inferred from the API call. + string project_id = 1; + + // Dataset ID of the table. + string dataset_id = 2; + + // Name of the table. + string table_id = 3; +} + +// Message defining the location of a BigQuery table with the projectId inferred +// from the parent project. +message TableReference { + // Dataset ID of the table. + string dataset_id = 1; + + // Name of the table. + string table_id = 2; + + // The Google Cloud project ID of the project containing the table. + // If omitted, the project ID is inferred from the parent project. This field + // is required if the parent resource is an organization. + string project_id = 3; +} + +// Message defining a field of a BigQuery table. +message BigQueryField { + // Source table of the field. + BigQueryTable table = 1; + + // Designated field in the BigQuery table. + FieldId field = 2; +} + +// An entity in a dataset is a field or set of fields that correspond to a +// single person. For example, in medical records the `EntityId` might be a +// patient identifier, or for financial records it might be an account +// identifier. This message is used when generalizations or analysis must take +// into account that multiple rows correspond to the same entity. +message EntityId { + // Composite key indicating which field contains the entity identifier. + FieldId field = 1; +} + +// Instructions regarding the table content being inspected. +message TableOptions { + // The columns that are the primary keys for table objects included in + // ContentItem. A copy of this cell's value will stored alongside alongside + // each finding so that the finding can be traced to the specific row it came + // from. No more than 3 may be provided. + repeated FieldId identifying_fields = 1; +} diff --git a/owl-bot-staging/dlp/v2/protos/protos.d.ts b/owl-bot-staging/dlp/v2/protos/protos.d.ts new file mode 100644 index 000000000..0d80e2d01 --- /dev/null +++ b/owl-bot-staging/dlp/v2/protos/protos.d.ts @@ -0,0 +1,51807 @@ +// Copyright 2026 Google LLC +// +// 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. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace privacy. */ + namespace privacy { + + /** Namespace dlp. */ + namespace dlp { + + /** Namespace v2. */ + namespace v2 { + + /** Represents a DlpService */ + class DlpService extends $protobuf.rpc.Service { + + /** + * Constructs a new DlpService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new DlpService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): DlpService; + + /** + * Calls InspectContent. + * @param request InspectContentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and InspectContentResponse + */ + public inspectContent(request: google.privacy.dlp.v2.IInspectContentRequest, callback: google.privacy.dlp.v2.DlpService.InspectContentCallback): void; + + /** + * Calls InspectContent. + * @param request InspectContentRequest message or plain object + * @returns Promise + */ + public inspectContent(request: google.privacy.dlp.v2.IInspectContentRequest): Promise; + + /** + * Calls RedactImage. + * @param request RedactImageRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RedactImageResponse + */ + public redactImage(request: google.privacy.dlp.v2.IRedactImageRequest, callback: google.privacy.dlp.v2.DlpService.RedactImageCallback): void; + + /** + * Calls RedactImage. + * @param request RedactImageRequest message or plain object + * @returns Promise + */ + public redactImage(request: google.privacy.dlp.v2.IRedactImageRequest): Promise; + + /** + * Calls DeidentifyContent. + * @param request DeidentifyContentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DeidentifyContentResponse + */ + public deidentifyContent(request: google.privacy.dlp.v2.IDeidentifyContentRequest, callback: google.privacy.dlp.v2.DlpService.DeidentifyContentCallback): void; + + /** + * Calls DeidentifyContent. + * @param request DeidentifyContentRequest message or plain object + * @returns Promise + */ + public deidentifyContent(request: google.privacy.dlp.v2.IDeidentifyContentRequest): Promise; + + /** + * Calls ReidentifyContent. + * @param request ReidentifyContentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ReidentifyContentResponse + */ + public reidentifyContent(request: google.privacy.dlp.v2.IReidentifyContentRequest, callback: google.privacy.dlp.v2.DlpService.ReidentifyContentCallback): void; + + /** + * Calls ReidentifyContent. + * @param request ReidentifyContentRequest message or plain object + * @returns Promise + */ + public reidentifyContent(request: google.privacy.dlp.v2.IReidentifyContentRequest): Promise; + + /** + * Calls ListInfoTypes. + * @param request ListInfoTypesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListInfoTypesResponse + */ + public listInfoTypes(request: google.privacy.dlp.v2.IListInfoTypesRequest, callback: google.privacy.dlp.v2.DlpService.ListInfoTypesCallback): void; + + /** + * Calls ListInfoTypes. + * @param request ListInfoTypesRequest message or plain object + * @returns Promise + */ + public listInfoTypes(request: google.privacy.dlp.v2.IListInfoTypesRequest): Promise; + + /** + * Calls CreateInspectTemplate. + * @param request CreateInspectTemplateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and InspectTemplate + */ + public createInspectTemplate(request: google.privacy.dlp.v2.ICreateInspectTemplateRequest, callback: google.privacy.dlp.v2.DlpService.CreateInspectTemplateCallback): void; + + /** + * Calls CreateInspectTemplate. + * @param request CreateInspectTemplateRequest message or plain object + * @returns Promise + */ + public createInspectTemplate(request: google.privacy.dlp.v2.ICreateInspectTemplateRequest): Promise; + + /** + * Calls UpdateInspectTemplate. + * @param request UpdateInspectTemplateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and InspectTemplate + */ + public updateInspectTemplate(request: google.privacy.dlp.v2.IUpdateInspectTemplateRequest, callback: google.privacy.dlp.v2.DlpService.UpdateInspectTemplateCallback): void; + + /** + * Calls UpdateInspectTemplate. + * @param request UpdateInspectTemplateRequest message or plain object + * @returns Promise + */ + public updateInspectTemplate(request: google.privacy.dlp.v2.IUpdateInspectTemplateRequest): Promise; + + /** + * Calls GetInspectTemplate. + * @param request GetInspectTemplateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and InspectTemplate + */ + public getInspectTemplate(request: google.privacy.dlp.v2.IGetInspectTemplateRequest, callback: google.privacy.dlp.v2.DlpService.GetInspectTemplateCallback): void; + + /** + * Calls GetInspectTemplate. + * @param request GetInspectTemplateRequest message or plain object + * @returns Promise + */ + public getInspectTemplate(request: google.privacy.dlp.v2.IGetInspectTemplateRequest): Promise; + + /** + * Calls ListInspectTemplates. + * @param request ListInspectTemplatesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListInspectTemplatesResponse + */ + public listInspectTemplates(request: google.privacy.dlp.v2.IListInspectTemplatesRequest, callback: google.privacy.dlp.v2.DlpService.ListInspectTemplatesCallback): void; + + /** + * Calls ListInspectTemplates. + * @param request ListInspectTemplatesRequest message or plain object + * @returns Promise + */ + public listInspectTemplates(request: google.privacy.dlp.v2.IListInspectTemplatesRequest): Promise; + + /** + * Calls DeleteInspectTemplate. + * @param request DeleteInspectTemplateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteInspectTemplate(request: google.privacy.dlp.v2.IDeleteInspectTemplateRequest, callback: google.privacy.dlp.v2.DlpService.DeleteInspectTemplateCallback): void; + + /** + * Calls DeleteInspectTemplate. + * @param request DeleteInspectTemplateRequest message or plain object + * @returns Promise + */ + public deleteInspectTemplate(request: google.privacy.dlp.v2.IDeleteInspectTemplateRequest): Promise; + + /** + * Calls CreateDeidentifyTemplate. + * @param request CreateDeidentifyTemplateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DeidentifyTemplate + */ + public createDeidentifyTemplate(request: google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest, callback: google.privacy.dlp.v2.DlpService.CreateDeidentifyTemplateCallback): void; + + /** + * Calls CreateDeidentifyTemplate. + * @param request CreateDeidentifyTemplateRequest message or plain object + * @returns Promise + */ + public createDeidentifyTemplate(request: google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest): Promise; + + /** + * Calls UpdateDeidentifyTemplate. + * @param request UpdateDeidentifyTemplateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DeidentifyTemplate + */ + public updateDeidentifyTemplate(request: google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest, callback: google.privacy.dlp.v2.DlpService.UpdateDeidentifyTemplateCallback): void; + + /** + * Calls UpdateDeidentifyTemplate. + * @param request UpdateDeidentifyTemplateRequest message or plain object + * @returns Promise + */ + public updateDeidentifyTemplate(request: google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest): Promise; + + /** + * Calls GetDeidentifyTemplate. + * @param request GetDeidentifyTemplateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DeidentifyTemplate + */ + public getDeidentifyTemplate(request: google.privacy.dlp.v2.IGetDeidentifyTemplateRequest, callback: google.privacy.dlp.v2.DlpService.GetDeidentifyTemplateCallback): void; + + /** + * Calls GetDeidentifyTemplate. + * @param request GetDeidentifyTemplateRequest message or plain object + * @returns Promise + */ + public getDeidentifyTemplate(request: google.privacy.dlp.v2.IGetDeidentifyTemplateRequest): Promise; + + /** + * Calls ListDeidentifyTemplates. + * @param request ListDeidentifyTemplatesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDeidentifyTemplatesResponse + */ + public listDeidentifyTemplates(request: google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, callback: google.privacy.dlp.v2.DlpService.ListDeidentifyTemplatesCallback): void; + + /** + * Calls ListDeidentifyTemplates. + * @param request ListDeidentifyTemplatesRequest message or plain object + * @returns Promise + */ + public listDeidentifyTemplates(request: google.privacy.dlp.v2.IListDeidentifyTemplatesRequest): Promise; + + /** + * Calls DeleteDeidentifyTemplate. + * @param request DeleteDeidentifyTemplateRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteDeidentifyTemplate(request: google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest, callback: google.privacy.dlp.v2.DlpService.DeleteDeidentifyTemplateCallback): void; + + /** + * Calls DeleteDeidentifyTemplate. + * @param request DeleteDeidentifyTemplateRequest message or plain object + * @returns Promise + */ + public deleteDeidentifyTemplate(request: google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest): Promise; + + /** + * Calls CreateJobTrigger. + * @param request CreateJobTriggerRequest message or plain object + * @param callback Node-style callback called with the error, if any, and JobTrigger + */ + public createJobTrigger(request: google.privacy.dlp.v2.ICreateJobTriggerRequest, callback: google.privacy.dlp.v2.DlpService.CreateJobTriggerCallback): void; + + /** + * Calls CreateJobTrigger. + * @param request CreateJobTriggerRequest message or plain object + * @returns Promise + */ + public createJobTrigger(request: google.privacy.dlp.v2.ICreateJobTriggerRequest): Promise; + + /** + * Calls UpdateJobTrigger. + * @param request UpdateJobTriggerRequest message or plain object + * @param callback Node-style callback called with the error, if any, and JobTrigger + */ + public updateJobTrigger(request: google.privacy.dlp.v2.IUpdateJobTriggerRequest, callback: google.privacy.dlp.v2.DlpService.UpdateJobTriggerCallback): void; + + /** + * Calls UpdateJobTrigger. + * @param request UpdateJobTriggerRequest message or plain object + * @returns Promise + */ + public updateJobTrigger(request: google.privacy.dlp.v2.IUpdateJobTriggerRequest): Promise; + + /** + * Calls HybridInspectJobTrigger. + * @param request HybridInspectJobTriggerRequest message or plain object + * @param callback Node-style callback called with the error, if any, and HybridInspectResponse + */ + public hybridInspectJobTrigger(request: google.privacy.dlp.v2.IHybridInspectJobTriggerRequest, callback: google.privacy.dlp.v2.DlpService.HybridInspectJobTriggerCallback): void; + + /** + * Calls HybridInspectJobTrigger. + * @param request HybridInspectJobTriggerRequest message or plain object + * @returns Promise + */ + public hybridInspectJobTrigger(request: google.privacy.dlp.v2.IHybridInspectJobTriggerRequest): Promise; + + /** + * Calls GetJobTrigger. + * @param request GetJobTriggerRequest message or plain object + * @param callback Node-style callback called with the error, if any, and JobTrigger + */ + public getJobTrigger(request: google.privacy.dlp.v2.IGetJobTriggerRequest, callback: google.privacy.dlp.v2.DlpService.GetJobTriggerCallback): void; + + /** + * Calls GetJobTrigger. + * @param request GetJobTriggerRequest message or plain object + * @returns Promise + */ + public getJobTrigger(request: google.privacy.dlp.v2.IGetJobTriggerRequest): Promise; + + /** + * Calls ListJobTriggers. + * @param request ListJobTriggersRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListJobTriggersResponse + */ + public listJobTriggers(request: google.privacy.dlp.v2.IListJobTriggersRequest, callback: google.privacy.dlp.v2.DlpService.ListJobTriggersCallback): void; + + /** + * Calls ListJobTriggers. + * @param request ListJobTriggersRequest message or plain object + * @returns Promise + */ + public listJobTriggers(request: google.privacy.dlp.v2.IListJobTriggersRequest): Promise; + + /** + * Calls DeleteJobTrigger. + * @param request DeleteJobTriggerRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteJobTrigger(request: google.privacy.dlp.v2.IDeleteJobTriggerRequest, callback: google.privacy.dlp.v2.DlpService.DeleteJobTriggerCallback): void; + + /** + * Calls DeleteJobTrigger. + * @param request DeleteJobTriggerRequest message or plain object + * @returns Promise + */ + public deleteJobTrigger(request: google.privacy.dlp.v2.IDeleteJobTriggerRequest): Promise; + + /** + * Calls ActivateJobTrigger. + * @param request ActivateJobTriggerRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DlpJob + */ + public activateJobTrigger(request: google.privacy.dlp.v2.IActivateJobTriggerRequest, callback: google.privacy.dlp.v2.DlpService.ActivateJobTriggerCallback): void; + + /** + * Calls ActivateJobTrigger. + * @param request ActivateJobTriggerRequest message or plain object + * @returns Promise + */ + public activateJobTrigger(request: google.privacy.dlp.v2.IActivateJobTriggerRequest): Promise; + + /** + * Calls CreateDiscoveryConfig. + * @param request CreateDiscoveryConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DiscoveryConfig + */ + public createDiscoveryConfig(request: google.privacy.dlp.v2.ICreateDiscoveryConfigRequest, callback: google.privacy.dlp.v2.DlpService.CreateDiscoveryConfigCallback): void; + + /** + * Calls CreateDiscoveryConfig. + * @param request CreateDiscoveryConfigRequest message or plain object + * @returns Promise + */ + public createDiscoveryConfig(request: google.privacy.dlp.v2.ICreateDiscoveryConfigRequest): Promise; + + /** + * Calls UpdateDiscoveryConfig. + * @param request UpdateDiscoveryConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DiscoveryConfig + */ + public updateDiscoveryConfig(request: google.privacy.dlp.v2.IUpdateDiscoveryConfigRequest, callback: google.privacy.dlp.v2.DlpService.UpdateDiscoveryConfigCallback): void; + + /** + * Calls UpdateDiscoveryConfig. + * @param request UpdateDiscoveryConfigRequest message or plain object + * @returns Promise + */ + public updateDiscoveryConfig(request: google.privacy.dlp.v2.IUpdateDiscoveryConfigRequest): Promise; + + /** + * Calls GetDiscoveryConfig. + * @param request GetDiscoveryConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DiscoveryConfig + */ + public getDiscoveryConfig(request: google.privacy.dlp.v2.IGetDiscoveryConfigRequest, callback: google.privacy.dlp.v2.DlpService.GetDiscoveryConfigCallback): void; + + /** + * Calls GetDiscoveryConfig. + * @param request GetDiscoveryConfigRequest message or plain object + * @returns Promise + */ + public getDiscoveryConfig(request: google.privacy.dlp.v2.IGetDiscoveryConfigRequest): Promise; + + /** + * Calls ListDiscoveryConfigs. + * @param request ListDiscoveryConfigsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDiscoveryConfigsResponse + */ + public listDiscoveryConfigs(request: google.privacy.dlp.v2.IListDiscoveryConfigsRequest, callback: google.privacy.dlp.v2.DlpService.ListDiscoveryConfigsCallback): void; + + /** + * Calls ListDiscoveryConfigs. + * @param request ListDiscoveryConfigsRequest message or plain object + * @returns Promise + */ + public listDiscoveryConfigs(request: google.privacy.dlp.v2.IListDiscoveryConfigsRequest): Promise; + + /** + * Calls DeleteDiscoveryConfig. + * @param request DeleteDiscoveryConfigRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteDiscoveryConfig(request: google.privacy.dlp.v2.IDeleteDiscoveryConfigRequest, callback: google.privacy.dlp.v2.DlpService.DeleteDiscoveryConfigCallback): void; + + /** + * Calls DeleteDiscoveryConfig. + * @param request DeleteDiscoveryConfigRequest message or plain object + * @returns Promise + */ + public deleteDiscoveryConfig(request: google.privacy.dlp.v2.IDeleteDiscoveryConfigRequest): Promise; + + /** + * Calls CreateDlpJob. + * @param request CreateDlpJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DlpJob + */ + public createDlpJob(request: google.privacy.dlp.v2.ICreateDlpJobRequest, callback: google.privacy.dlp.v2.DlpService.CreateDlpJobCallback): void; + + /** + * Calls CreateDlpJob. + * @param request CreateDlpJobRequest message or plain object + * @returns Promise + */ + public createDlpJob(request: google.privacy.dlp.v2.ICreateDlpJobRequest): Promise; + + /** + * Calls ListDlpJobs. + * @param request ListDlpJobsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListDlpJobsResponse + */ + public listDlpJobs(request: google.privacy.dlp.v2.IListDlpJobsRequest, callback: google.privacy.dlp.v2.DlpService.ListDlpJobsCallback): void; + + /** + * Calls ListDlpJobs. + * @param request ListDlpJobsRequest message or plain object + * @returns Promise + */ + public listDlpJobs(request: google.privacy.dlp.v2.IListDlpJobsRequest): Promise; + + /** + * Calls GetDlpJob. + * @param request GetDlpJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and DlpJob + */ + public getDlpJob(request: google.privacy.dlp.v2.IGetDlpJobRequest, callback: google.privacy.dlp.v2.DlpService.GetDlpJobCallback): void; + + /** + * Calls GetDlpJob. + * @param request GetDlpJobRequest message or plain object + * @returns Promise + */ + public getDlpJob(request: google.privacy.dlp.v2.IGetDlpJobRequest): Promise; + + /** + * Calls DeleteDlpJob. + * @param request DeleteDlpJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteDlpJob(request: google.privacy.dlp.v2.IDeleteDlpJobRequest, callback: google.privacy.dlp.v2.DlpService.DeleteDlpJobCallback): void; + + /** + * Calls DeleteDlpJob. + * @param request DeleteDlpJobRequest message or plain object + * @returns Promise + */ + public deleteDlpJob(request: google.privacy.dlp.v2.IDeleteDlpJobRequest): Promise; + + /** + * Calls CancelDlpJob. + * @param request CancelDlpJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public cancelDlpJob(request: google.privacy.dlp.v2.ICancelDlpJobRequest, callback: google.privacy.dlp.v2.DlpService.CancelDlpJobCallback): void; + + /** + * Calls CancelDlpJob. + * @param request CancelDlpJobRequest message or plain object + * @returns Promise + */ + public cancelDlpJob(request: google.privacy.dlp.v2.ICancelDlpJobRequest): Promise; + + /** + * Calls CreateStoredInfoType. + * @param request CreateStoredInfoTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and StoredInfoType + */ + public createStoredInfoType(request: google.privacy.dlp.v2.ICreateStoredInfoTypeRequest, callback: google.privacy.dlp.v2.DlpService.CreateStoredInfoTypeCallback): void; + + /** + * Calls CreateStoredInfoType. + * @param request CreateStoredInfoTypeRequest message or plain object + * @returns Promise + */ + public createStoredInfoType(request: google.privacy.dlp.v2.ICreateStoredInfoTypeRequest): Promise; + + /** + * Calls UpdateStoredInfoType. + * @param request UpdateStoredInfoTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and StoredInfoType + */ + public updateStoredInfoType(request: google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest, callback: google.privacy.dlp.v2.DlpService.UpdateStoredInfoTypeCallback): void; + + /** + * Calls UpdateStoredInfoType. + * @param request UpdateStoredInfoTypeRequest message or plain object + * @returns Promise + */ + public updateStoredInfoType(request: google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest): Promise; + + /** + * Calls GetStoredInfoType. + * @param request GetStoredInfoTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and StoredInfoType + */ + public getStoredInfoType(request: google.privacy.dlp.v2.IGetStoredInfoTypeRequest, callback: google.privacy.dlp.v2.DlpService.GetStoredInfoTypeCallback): void; + + /** + * Calls GetStoredInfoType. + * @param request GetStoredInfoTypeRequest message or plain object + * @returns Promise + */ + public getStoredInfoType(request: google.privacy.dlp.v2.IGetStoredInfoTypeRequest): Promise; + + /** + * Calls ListStoredInfoTypes. + * @param request ListStoredInfoTypesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListStoredInfoTypesResponse + */ + public listStoredInfoTypes(request: google.privacy.dlp.v2.IListStoredInfoTypesRequest, callback: google.privacy.dlp.v2.DlpService.ListStoredInfoTypesCallback): void; + + /** + * Calls ListStoredInfoTypes. + * @param request ListStoredInfoTypesRequest message or plain object + * @returns Promise + */ + public listStoredInfoTypes(request: google.privacy.dlp.v2.IListStoredInfoTypesRequest): Promise; + + /** + * Calls DeleteStoredInfoType. + * @param request DeleteStoredInfoTypeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteStoredInfoType(request: google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest, callback: google.privacy.dlp.v2.DlpService.DeleteStoredInfoTypeCallback): void; + + /** + * Calls DeleteStoredInfoType. + * @param request DeleteStoredInfoTypeRequest message or plain object + * @returns Promise + */ + public deleteStoredInfoType(request: google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest): Promise; + + /** + * Calls ListProjectDataProfiles. + * @param request ListProjectDataProfilesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListProjectDataProfilesResponse + */ + public listProjectDataProfiles(request: google.privacy.dlp.v2.IListProjectDataProfilesRequest, callback: google.privacy.dlp.v2.DlpService.ListProjectDataProfilesCallback): void; + + /** + * Calls ListProjectDataProfiles. + * @param request ListProjectDataProfilesRequest message or plain object + * @returns Promise + */ + public listProjectDataProfiles(request: google.privacy.dlp.v2.IListProjectDataProfilesRequest): Promise; + + /** + * Calls ListTableDataProfiles. + * @param request ListTableDataProfilesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListTableDataProfilesResponse + */ + public listTableDataProfiles(request: google.privacy.dlp.v2.IListTableDataProfilesRequest, callback: google.privacy.dlp.v2.DlpService.ListTableDataProfilesCallback): void; + + /** + * Calls ListTableDataProfiles. + * @param request ListTableDataProfilesRequest message or plain object + * @returns Promise + */ + public listTableDataProfiles(request: google.privacy.dlp.v2.IListTableDataProfilesRequest): Promise; + + /** + * Calls ListColumnDataProfiles. + * @param request ListColumnDataProfilesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListColumnDataProfilesResponse + */ + public listColumnDataProfiles(request: google.privacy.dlp.v2.IListColumnDataProfilesRequest, callback: google.privacy.dlp.v2.DlpService.ListColumnDataProfilesCallback): void; + + /** + * Calls ListColumnDataProfiles. + * @param request ListColumnDataProfilesRequest message or plain object + * @returns Promise + */ + public listColumnDataProfiles(request: google.privacy.dlp.v2.IListColumnDataProfilesRequest): Promise; + + /** + * Calls GetProjectDataProfile. + * @param request GetProjectDataProfileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ProjectDataProfile + */ + public getProjectDataProfile(request: google.privacy.dlp.v2.IGetProjectDataProfileRequest, callback: google.privacy.dlp.v2.DlpService.GetProjectDataProfileCallback): void; + + /** + * Calls GetProjectDataProfile. + * @param request GetProjectDataProfileRequest message or plain object + * @returns Promise + */ + public getProjectDataProfile(request: google.privacy.dlp.v2.IGetProjectDataProfileRequest): Promise; + + /** + * Calls ListFileStoreDataProfiles. + * @param request ListFileStoreDataProfilesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFileStoreDataProfilesResponse + */ + public listFileStoreDataProfiles(request: google.privacy.dlp.v2.IListFileStoreDataProfilesRequest, callback: google.privacy.dlp.v2.DlpService.ListFileStoreDataProfilesCallback): void; + + /** + * Calls ListFileStoreDataProfiles. + * @param request ListFileStoreDataProfilesRequest message or plain object + * @returns Promise + */ + public listFileStoreDataProfiles(request: google.privacy.dlp.v2.IListFileStoreDataProfilesRequest): Promise; + + /** + * Calls GetFileStoreDataProfile. + * @param request GetFileStoreDataProfileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FileStoreDataProfile + */ + public getFileStoreDataProfile(request: google.privacy.dlp.v2.IGetFileStoreDataProfileRequest, callback: google.privacy.dlp.v2.DlpService.GetFileStoreDataProfileCallback): void; + + /** + * Calls GetFileStoreDataProfile. + * @param request GetFileStoreDataProfileRequest message or plain object + * @returns Promise + */ + public getFileStoreDataProfile(request: google.privacy.dlp.v2.IGetFileStoreDataProfileRequest): Promise; + + /** + * Calls DeleteFileStoreDataProfile. + * @param request DeleteFileStoreDataProfileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteFileStoreDataProfile(request: google.privacy.dlp.v2.IDeleteFileStoreDataProfileRequest, callback: google.privacy.dlp.v2.DlpService.DeleteFileStoreDataProfileCallback): void; + + /** + * Calls DeleteFileStoreDataProfile. + * @param request DeleteFileStoreDataProfileRequest message or plain object + * @returns Promise + */ + public deleteFileStoreDataProfile(request: google.privacy.dlp.v2.IDeleteFileStoreDataProfileRequest): Promise; + + /** + * Calls GetTableDataProfile. + * @param request GetTableDataProfileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TableDataProfile + */ + public getTableDataProfile(request: google.privacy.dlp.v2.IGetTableDataProfileRequest, callback: google.privacy.dlp.v2.DlpService.GetTableDataProfileCallback): void; + + /** + * Calls GetTableDataProfile. + * @param request GetTableDataProfileRequest message or plain object + * @returns Promise + */ + public getTableDataProfile(request: google.privacy.dlp.v2.IGetTableDataProfileRequest): Promise; + + /** + * Calls GetColumnDataProfile. + * @param request GetColumnDataProfileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ColumnDataProfile + */ + public getColumnDataProfile(request: google.privacy.dlp.v2.IGetColumnDataProfileRequest, callback: google.privacy.dlp.v2.DlpService.GetColumnDataProfileCallback): void; + + /** + * Calls GetColumnDataProfile. + * @param request GetColumnDataProfileRequest message or plain object + * @returns Promise + */ + public getColumnDataProfile(request: google.privacy.dlp.v2.IGetColumnDataProfileRequest): Promise; + + /** + * Calls DeleteTableDataProfile. + * @param request DeleteTableDataProfileRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteTableDataProfile(request: google.privacy.dlp.v2.IDeleteTableDataProfileRequest, callback: google.privacy.dlp.v2.DlpService.DeleteTableDataProfileCallback): void; + + /** + * Calls DeleteTableDataProfile. + * @param request DeleteTableDataProfileRequest message or plain object + * @returns Promise + */ + public deleteTableDataProfile(request: google.privacy.dlp.v2.IDeleteTableDataProfileRequest): Promise; + + /** + * Calls HybridInspectDlpJob. + * @param request HybridInspectDlpJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and HybridInspectResponse + */ + public hybridInspectDlpJob(request: google.privacy.dlp.v2.IHybridInspectDlpJobRequest, callback: google.privacy.dlp.v2.DlpService.HybridInspectDlpJobCallback): void; + + /** + * Calls HybridInspectDlpJob. + * @param request HybridInspectDlpJobRequest message or plain object + * @returns Promise + */ + public hybridInspectDlpJob(request: google.privacy.dlp.v2.IHybridInspectDlpJobRequest): Promise; + + /** + * Calls FinishDlpJob. + * @param request FinishDlpJobRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public finishDlpJob(request: google.privacy.dlp.v2.IFinishDlpJobRequest, callback: google.privacy.dlp.v2.DlpService.FinishDlpJobCallback): void; + + /** + * Calls FinishDlpJob. + * @param request FinishDlpJobRequest message or plain object + * @returns Promise + */ + public finishDlpJob(request: google.privacy.dlp.v2.IFinishDlpJobRequest): Promise; + + /** + * Calls CreateConnection. + * @param request CreateConnectionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Connection + */ + public createConnection(request: google.privacy.dlp.v2.ICreateConnectionRequest, callback: google.privacy.dlp.v2.DlpService.CreateConnectionCallback): void; + + /** + * Calls CreateConnection. + * @param request CreateConnectionRequest message or plain object + * @returns Promise + */ + public createConnection(request: google.privacy.dlp.v2.ICreateConnectionRequest): Promise; + + /** + * Calls GetConnection. + * @param request GetConnectionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Connection + */ + public getConnection(request: google.privacy.dlp.v2.IGetConnectionRequest, callback: google.privacy.dlp.v2.DlpService.GetConnectionCallback): void; + + /** + * Calls GetConnection. + * @param request GetConnectionRequest message or plain object + * @returns Promise + */ + public getConnection(request: google.privacy.dlp.v2.IGetConnectionRequest): Promise; + + /** + * Calls ListConnections. + * @param request ListConnectionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListConnectionsResponse + */ + public listConnections(request: google.privacy.dlp.v2.IListConnectionsRequest, callback: google.privacy.dlp.v2.DlpService.ListConnectionsCallback): void; + + /** + * Calls ListConnections. + * @param request ListConnectionsRequest message or plain object + * @returns Promise + */ + public listConnections(request: google.privacy.dlp.v2.IListConnectionsRequest): Promise; + + /** + * Calls SearchConnections. + * @param request SearchConnectionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SearchConnectionsResponse + */ + public searchConnections(request: google.privacy.dlp.v2.ISearchConnectionsRequest, callback: google.privacy.dlp.v2.DlpService.SearchConnectionsCallback): void; + + /** + * Calls SearchConnections. + * @param request SearchConnectionsRequest message or plain object + * @returns Promise + */ + public searchConnections(request: google.privacy.dlp.v2.ISearchConnectionsRequest): Promise; + + /** + * Calls DeleteConnection. + * @param request DeleteConnectionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteConnection(request: google.privacy.dlp.v2.IDeleteConnectionRequest, callback: google.privacy.dlp.v2.DlpService.DeleteConnectionCallback): void; + + /** + * Calls DeleteConnection. + * @param request DeleteConnectionRequest message or plain object + * @returns Promise + */ + public deleteConnection(request: google.privacy.dlp.v2.IDeleteConnectionRequest): Promise; + + /** + * Calls UpdateConnection. + * @param request UpdateConnectionRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Connection + */ + public updateConnection(request: google.privacy.dlp.v2.IUpdateConnectionRequest, callback: google.privacy.dlp.v2.DlpService.UpdateConnectionCallback): void; + + /** + * Calls UpdateConnection. + * @param request UpdateConnectionRequest message or plain object + * @returns Promise + */ + public updateConnection(request: google.privacy.dlp.v2.IUpdateConnectionRequest): Promise; + } + + namespace DlpService { + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|inspectContent}. + * @param error Error, if any + * @param [response] InspectContentResponse + */ + type InspectContentCallback = (error: (Error|null), response?: google.privacy.dlp.v2.InspectContentResponse) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|redactImage}. + * @param error Error, if any + * @param [response] RedactImageResponse + */ + type RedactImageCallback = (error: (Error|null), response?: google.privacy.dlp.v2.RedactImageResponse) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|deidentifyContent}. + * @param error Error, if any + * @param [response] DeidentifyContentResponse + */ + type DeidentifyContentCallback = (error: (Error|null), response?: google.privacy.dlp.v2.DeidentifyContentResponse) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|reidentifyContent}. + * @param error Error, if any + * @param [response] ReidentifyContentResponse + */ + type ReidentifyContentCallback = (error: (Error|null), response?: google.privacy.dlp.v2.ReidentifyContentResponse) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|listInfoTypes}. + * @param error Error, if any + * @param [response] ListInfoTypesResponse + */ + type ListInfoTypesCallback = (error: (Error|null), response?: google.privacy.dlp.v2.ListInfoTypesResponse) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|createInspectTemplate}. + * @param error Error, if any + * @param [response] InspectTemplate + */ + type CreateInspectTemplateCallback = (error: (Error|null), response?: google.privacy.dlp.v2.InspectTemplate) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|updateInspectTemplate}. + * @param error Error, if any + * @param [response] InspectTemplate + */ + type UpdateInspectTemplateCallback = (error: (Error|null), response?: google.privacy.dlp.v2.InspectTemplate) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|getInspectTemplate}. + * @param error Error, if any + * @param [response] InspectTemplate + */ + type GetInspectTemplateCallback = (error: (Error|null), response?: google.privacy.dlp.v2.InspectTemplate) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|listInspectTemplates}. + * @param error Error, if any + * @param [response] ListInspectTemplatesResponse + */ + type ListInspectTemplatesCallback = (error: (Error|null), response?: google.privacy.dlp.v2.ListInspectTemplatesResponse) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|deleteInspectTemplate}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteInspectTemplateCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|createDeidentifyTemplate}. + * @param error Error, if any + * @param [response] DeidentifyTemplate + */ + type CreateDeidentifyTemplateCallback = (error: (Error|null), response?: google.privacy.dlp.v2.DeidentifyTemplate) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|updateDeidentifyTemplate}. + * @param error Error, if any + * @param [response] DeidentifyTemplate + */ + type UpdateDeidentifyTemplateCallback = (error: (Error|null), response?: google.privacy.dlp.v2.DeidentifyTemplate) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|getDeidentifyTemplate}. + * @param error Error, if any + * @param [response] DeidentifyTemplate + */ + type GetDeidentifyTemplateCallback = (error: (Error|null), response?: google.privacy.dlp.v2.DeidentifyTemplate) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|listDeidentifyTemplates}. + * @param error Error, if any + * @param [response] ListDeidentifyTemplatesResponse + */ + type ListDeidentifyTemplatesCallback = (error: (Error|null), response?: google.privacy.dlp.v2.ListDeidentifyTemplatesResponse) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|deleteDeidentifyTemplate}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteDeidentifyTemplateCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|createJobTrigger}. + * @param error Error, if any + * @param [response] JobTrigger + */ + type CreateJobTriggerCallback = (error: (Error|null), response?: google.privacy.dlp.v2.JobTrigger) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|updateJobTrigger}. + * @param error Error, if any + * @param [response] JobTrigger + */ + type UpdateJobTriggerCallback = (error: (Error|null), response?: google.privacy.dlp.v2.JobTrigger) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|hybridInspectJobTrigger}. + * @param error Error, if any + * @param [response] HybridInspectResponse + */ + type HybridInspectJobTriggerCallback = (error: (Error|null), response?: google.privacy.dlp.v2.HybridInspectResponse) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|getJobTrigger}. + * @param error Error, if any + * @param [response] JobTrigger + */ + type GetJobTriggerCallback = (error: (Error|null), response?: google.privacy.dlp.v2.JobTrigger) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|listJobTriggers}. + * @param error Error, if any + * @param [response] ListJobTriggersResponse + */ + type ListJobTriggersCallback = (error: (Error|null), response?: google.privacy.dlp.v2.ListJobTriggersResponse) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|deleteJobTrigger}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteJobTriggerCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|activateJobTrigger}. + * @param error Error, if any + * @param [response] DlpJob + */ + type ActivateJobTriggerCallback = (error: (Error|null), response?: google.privacy.dlp.v2.DlpJob) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|createDiscoveryConfig}. + * @param error Error, if any + * @param [response] DiscoveryConfig + */ + type CreateDiscoveryConfigCallback = (error: (Error|null), response?: google.privacy.dlp.v2.DiscoveryConfig) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|updateDiscoveryConfig}. + * @param error Error, if any + * @param [response] DiscoveryConfig + */ + type UpdateDiscoveryConfigCallback = (error: (Error|null), response?: google.privacy.dlp.v2.DiscoveryConfig) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|getDiscoveryConfig}. + * @param error Error, if any + * @param [response] DiscoveryConfig + */ + type GetDiscoveryConfigCallback = (error: (Error|null), response?: google.privacy.dlp.v2.DiscoveryConfig) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|listDiscoveryConfigs}. + * @param error Error, if any + * @param [response] ListDiscoveryConfigsResponse + */ + type ListDiscoveryConfigsCallback = (error: (Error|null), response?: google.privacy.dlp.v2.ListDiscoveryConfigsResponse) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|deleteDiscoveryConfig}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteDiscoveryConfigCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|createDlpJob}. + * @param error Error, if any + * @param [response] DlpJob + */ + type CreateDlpJobCallback = (error: (Error|null), response?: google.privacy.dlp.v2.DlpJob) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|listDlpJobs}. + * @param error Error, if any + * @param [response] ListDlpJobsResponse + */ + type ListDlpJobsCallback = (error: (Error|null), response?: google.privacy.dlp.v2.ListDlpJobsResponse) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|getDlpJob}. + * @param error Error, if any + * @param [response] DlpJob + */ + type GetDlpJobCallback = (error: (Error|null), response?: google.privacy.dlp.v2.DlpJob) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|deleteDlpJob}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteDlpJobCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|cancelDlpJob}. + * @param error Error, if any + * @param [response] Empty + */ + type CancelDlpJobCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|createStoredInfoType}. + * @param error Error, if any + * @param [response] StoredInfoType + */ + type CreateStoredInfoTypeCallback = (error: (Error|null), response?: google.privacy.dlp.v2.StoredInfoType) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|updateStoredInfoType}. + * @param error Error, if any + * @param [response] StoredInfoType + */ + type UpdateStoredInfoTypeCallback = (error: (Error|null), response?: google.privacy.dlp.v2.StoredInfoType) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|getStoredInfoType}. + * @param error Error, if any + * @param [response] StoredInfoType + */ + type GetStoredInfoTypeCallback = (error: (Error|null), response?: google.privacy.dlp.v2.StoredInfoType) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|listStoredInfoTypes}. + * @param error Error, if any + * @param [response] ListStoredInfoTypesResponse + */ + type ListStoredInfoTypesCallback = (error: (Error|null), response?: google.privacy.dlp.v2.ListStoredInfoTypesResponse) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|deleteStoredInfoType}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteStoredInfoTypeCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|listProjectDataProfiles}. + * @param error Error, if any + * @param [response] ListProjectDataProfilesResponse + */ + type ListProjectDataProfilesCallback = (error: (Error|null), response?: google.privacy.dlp.v2.ListProjectDataProfilesResponse) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|listTableDataProfiles}. + * @param error Error, if any + * @param [response] ListTableDataProfilesResponse + */ + type ListTableDataProfilesCallback = (error: (Error|null), response?: google.privacy.dlp.v2.ListTableDataProfilesResponse) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|listColumnDataProfiles}. + * @param error Error, if any + * @param [response] ListColumnDataProfilesResponse + */ + type ListColumnDataProfilesCallback = (error: (Error|null), response?: google.privacy.dlp.v2.ListColumnDataProfilesResponse) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|getProjectDataProfile}. + * @param error Error, if any + * @param [response] ProjectDataProfile + */ + type GetProjectDataProfileCallback = (error: (Error|null), response?: google.privacy.dlp.v2.ProjectDataProfile) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|listFileStoreDataProfiles}. + * @param error Error, if any + * @param [response] ListFileStoreDataProfilesResponse + */ + type ListFileStoreDataProfilesCallback = (error: (Error|null), response?: google.privacy.dlp.v2.ListFileStoreDataProfilesResponse) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|getFileStoreDataProfile}. + * @param error Error, if any + * @param [response] FileStoreDataProfile + */ + type GetFileStoreDataProfileCallback = (error: (Error|null), response?: google.privacy.dlp.v2.FileStoreDataProfile) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|deleteFileStoreDataProfile}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteFileStoreDataProfileCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|getTableDataProfile}. + * @param error Error, if any + * @param [response] TableDataProfile + */ + type GetTableDataProfileCallback = (error: (Error|null), response?: google.privacy.dlp.v2.TableDataProfile) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|getColumnDataProfile}. + * @param error Error, if any + * @param [response] ColumnDataProfile + */ + type GetColumnDataProfileCallback = (error: (Error|null), response?: google.privacy.dlp.v2.ColumnDataProfile) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|deleteTableDataProfile}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteTableDataProfileCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|hybridInspectDlpJob}. + * @param error Error, if any + * @param [response] HybridInspectResponse + */ + type HybridInspectDlpJobCallback = (error: (Error|null), response?: google.privacy.dlp.v2.HybridInspectResponse) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|finishDlpJob}. + * @param error Error, if any + * @param [response] Empty + */ + type FinishDlpJobCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|createConnection}. + * @param error Error, if any + * @param [response] Connection + */ + type CreateConnectionCallback = (error: (Error|null), response?: google.privacy.dlp.v2.Connection) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|getConnection}. + * @param error Error, if any + * @param [response] Connection + */ + type GetConnectionCallback = (error: (Error|null), response?: google.privacy.dlp.v2.Connection) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|listConnections}. + * @param error Error, if any + * @param [response] ListConnectionsResponse + */ + type ListConnectionsCallback = (error: (Error|null), response?: google.privacy.dlp.v2.ListConnectionsResponse) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|searchConnections}. + * @param error Error, if any + * @param [response] SearchConnectionsResponse + */ + type SearchConnectionsCallback = (error: (Error|null), response?: google.privacy.dlp.v2.SearchConnectionsResponse) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|deleteConnection}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteConnectionCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|updateConnection}. + * @param error Error, if any + * @param [response] Connection + */ + type UpdateConnectionCallback = (error: (Error|null), response?: google.privacy.dlp.v2.Connection) => void; + } + + /** Properties of an ExcludeInfoTypes. */ + interface IExcludeInfoTypes { + + /** ExcludeInfoTypes infoTypes */ + infoTypes?: (google.privacy.dlp.v2.IInfoType[]|null); + } + + /** Represents an ExcludeInfoTypes. */ + class ExcludeInfoTypes implements IExcludeInfoTypes { + + /** + * Constructs a new ExcludeInfoTypes. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IExcludeInfoTypes); + + /** ExcludeInfoTypes infoTypes. */ + public infoTypes: google.privacy.dlp.v2.IInfoType[]; + + /** + * Creates a new ExcludeInfoTypes instance using the specified properties. + * @param [properties] Properties to set + * @returns ExcludeInfoTypes instance + */ + public static create(properties?: google.privacy.dlp.v2.IExcludeInfoTypes): google.privacy.dlp.v2.ExcludeInfoTypes; + + /** + * Encodes the specified ExcludeInfoTypes message. Does not implicitly {@link google.privacy.dlp.v2.ExcludeInfoTypes.verify|verify} messages. + * @param message ExcludeInfoTypes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IExcludeInfoTypes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExcludeInfoTypes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ExcludeInfoTypes.verify|verify} messages. + * @param message ExcludeInfoTypes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IExcludeInfoTypes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExcludeInfoTypes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExcludeInfoTypes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ExcludeInfoTypes; + + /** + * Decodes an ExcludeInfoTypes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExcludeInfoTypes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ExcludeInfoTypes; + + /** + * Verifies an ExcludeInfoTypes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExcludeInfoTypes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExcludeInfoTypes + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ExcludeInfoTypes; + + /** + * Creates a plain object from an ExcludeInfoTypes message. Also converts values to other types if specified. + * @param message ExcludeInfoTypes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ExcludeInfoTypes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExcludeInfoTypes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExcludeInfoTypes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExcludeByHotword. */ + interface IExcludeByHotword { + + /** ExcludeByHotword hotwordRegex */ + hotwordRegex?: (google.privacy.dlp.v2.CustomInfoType.IRegex|null); + + /** ExcludeByHotword proximity */ + proximity?: (google.privacy.dlp.v2.CustomInfoType.DetectionRule.IProximity|null); + } + + /** Represents an ExcludeByHotword. */ + class ExcludeByHotword implements IExcludeByHotword { + + /** + * Constructs a new ExcludeByHotword. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IExcludeByHotword); + + /** ExcludeByHotword hotwordRegex. */ + public hotwordRegex?: (google.privacy.dlp.v2.CustomInfoType.IRegex|null); + + /** ExcludeByHotword proximity. */ + public proximity?: (google.privacy.dlp.v2.CustomInfoType.DetectionRule.IProximity|null); + + /** + * Creates a new ExcludeByHotword instance using the specified properties. + * @param [properties] Properties to set + * @returns ExcludeByHotword instance + */ + public static create(properties?: google.privacy.dlp.v2.IExcludeByHotword): google.privacy.dlp.v2.ExcludeByHotword; + + /** + * Encodes the specified ExcludeByHotword message. Does not implicitly {@link google.privacy.dlp.v2.ExcludeByHotword.verify|verify} messages. + * @param message ExcludeByHotword message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IExcludeByHotword, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExcludeByHotword message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ExcludeByHotword.verify|verify} messages. + * @param message ExcludeByHotword message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IExcludeByHotword, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExcludeByHotword message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExcludeByHotword + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ExcludeByHotword; + + /** + * Decodes an ExcludeByHotword message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExcludeByHotword + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ExcludeByHotword; + + /** + * Verifies an ExcludeByHotword message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExcludeByHotword message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExcludeByHotword + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ExcludeByHotword; + + /** + * Creates a plain object from an ExcludeByHotword message. Also converts values to other types if specified. + * @param message ExcludeByHotword + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ExcludeByHotword, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExcludeByHotword to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExcludeByHotword + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExcludeByImageFindings. */ + interface IExcludeByImageFindings { + + /** ExcludeByImageFindings infoTypes */ + infoTypes?: (google.privacy.dlp.v2.IInfoType[]|null); + + /** ExcludeByImageFindings imageContainmentType */ + imageContainmentType?: (google.privacy.dlp.v2.IImageContainmentType|null); + } + + /** Represents an ExcludeByImageFindings. */ + class ExcludeByImageFindings implements IExcludeByImageFindings { + + /** + * Constructs a new ExcludeByImageFindings. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IExcludeByImageFindings); + + /** ExcludeByImageFindings infoTypes. */ + public infoTypes: google.privacy.dlp.v2.IInfoType[]; + + /** ExcludeByImageFindings imageContainmentType. */ + public imageContainmentType?: (google.privacy.dlp.v2.IImageContainmentType|null); + + /** + * Creates a new ExcludeByImageFindings instance using the specified properties. + * @param [properties] Properties to set + * @returns ExcludeByImageFindings instance + */ + public static create(properties?: google.privacy.dlp.v2.IExcludeByImageFindings): google.privacy.dlp.v2.ExcludeByImageFindings; + + /** + * Encodes the specified ExcludeByImageFindings message. Does not implicitly {@link google.privacy.dlp.v2.ExcludeByImageFindings.verify|verify} messages. + * @param message ExcludeByImageFindings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IExcludeByImageFindings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExcludeByImageFindings message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ExcludeByImageFindings.verify|verify} messages. + * @param message ExcludeByImageFindings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IExcludeByImageFindings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExcludeByImageFindings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExcludeByImageFindings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ExcludeByImageFindings; + + /** + * Decodes an ExcludeByImageFindings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExcludeByImageFindings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ExcludeByImageFindings; + + /** + * Verifies an ExcludeByImageFindings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExcludeByImageFindings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExcludeByImageFindings + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ExcludeByImageFindings; + + /** + * Creates a plain object from an ExcludeByImageFindings message. Also converts values to other types if specified. + * @param message ExcludeByImageFindings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ExcludeByImageFindings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExcludeByImageFindings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExcludeByImageFindings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExclusionRule. */ + interface IExclusionRule { + + /** ExclusionRule dictionary */ + dictionary?: (google.privacy.dlp.v2.CustomInfoType.IDictionary|null); + + /** ExclusionRule regex */ + regex?: (google.privacy.dlp.v2.CustomInfoType.IRegex|null); + + /** ExclusionRule excludeInfoTypes */ + excludeInfoTypes?: (google.privacy.dlp.v2.IExcludeInfoTypes|null); + + /** ExclusionRule excludeByHotword */ + excludeByHotword?: (google.privacy.dlp.v2.IExcludeByHotword|null); + + /** ExclusionRule excludeByImageFindings */ + excludeByImageFindings?: (google.privacy.dlp.v2.IExcludeByImageFindings|null); + + /** ExclusionRule matchingType */ + matchingType?: (google.privacy.dlp.v2.MatchingType|keyof typeof google.privacy.dlp.v2.MatchingType|null); + } + + /** Represents an ExclusionRule. */ + class ExclusionRule implements IExclusionRule { + + /** + * Constructs a new ExclusionRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IExclusionRule); + + /** ExclusionRule dictionary. */ + public dictionary?: (google.privacy.dlp.v2.CustomInfoType.IDictionary|null); + + /** ExclusionRule regex. */ + public regex?: (google.privacy.dlp.v2.CustomInfoType.IRegex|null); + + /** ExclusionRule excludeInfoTypes. */ + public excludeInfoTypes?: (google.privacy.dlp.v2.IExcludeInfoTypes|null); + + /** ExclusionRule excludeByHotword. */ + public excludeByHotword?: (google.privacy.dlp.v2.IExcludeByHotword|null); + + /** ExclusionRule excludeByImageFindings. */ + public excludeByImageFindings?: (google.privacy.dlp.v2.IExcludeByImageFindings|null); + + /** ExclusionRule matchingType. */ + public matchingType: (google.privacy.dlp.v2.MatchingType|keyof typeof google.privacy.dlp.v2.MatchingType); + + /** ExclusionRule type. */ + public type?: ("dictionary"|"regex"|"excludeInfoTypes"|"excludeByHotword"|"excludeByImageFindings"); + + /** + * Creates a new ExclusionRule instance using the specified properties. + * @param [properties] Properties to set + * @returns ExclusionRule instance + */ + public static create(properties?: google.privacy.dlp.v2.IExclusionRule): google.privacy.dlp.v2.ExclusionRule; + + /** + * Encodes the specified ExclusionRule message. Does not implicitly {@link google.privacy.dlp.v2.ExclusionRule.verify|verify} messages. + * @param message ExclusionRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IExclusionRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExclusionRule message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ExclusionRule.verify|verify} messages. + * @param message ExclusionRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IExclusionRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExclusionRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExclusionRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ExclusionRule; + + /** + * Decodes an ExclusionRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExclusionRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ExclusionRule; + + /** + * Verifies an ExclusionRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExclusionRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExclusionRule + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ExclusionRule; + + /** + * Creates a plain object from an ExclusionRule message. Also converts values to other types if specified. + * @param message ExclusionRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ExclusionRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExclusionRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExclusionRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AdjustByMatchingInfoTypes. */ + interface IAdjustByMatchingInfoTypes { + + /** AdjustByMatchingInfoTypes infoTypes */ + infoTypes?: (google.privacy.dlp.v2.IInfoType[]|null); + + /** AdjustByMatchingInfoTypes minLikelihood */ + minLikelihood?: (google.privacy.dlp.v2.Likelihood|keyof typeof google.privacy.dlp.v2.Likelihood|null); + + /** AdjustByMatchingInfoTypes matchingType */ + matchingType?: (google.privacy.dlp.v2.MatchingType|keyof typeof google.privacy.dlp.v2.MatchingType|null); + } + + /** Represents an AdjustByMatchingInfoTypes. */ + class AdjustByMatchingInfoTypes implements IAdjustByMatchingInfoTypes { + + /** + * Constructs a new AdjustByMatchingInfoTypes. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IAdjustByMatchingInfoTypes); + + /** AdjustByMatchingInfoTypes infoTypes. */ + public infoTypes: google.privacy.dlp.v2.IInfoType[]; + + /** AdjustByMatchingInfoTypes minLikelihood. */ + public minLikelihood: (google.privacy.dlp.v2.Likelihood|keyof typeof google.privacy.dlp.v2.Likelihood); + + /** AdjustByMatchingInfoTypes matchingType. */ + public matchingType: (google.privacy.dlp.v2.MatchingType|keyof typeof google.privacy.dlp.v2.MatchingType); + + /** + * Creates a new AdjustByMatchingInfoTypes instance using the specified properties. + * @param [properties] Properties to set + * @returns AdjustByMatchingInfoTypes instance + */ + public static create(properties?: google.privacy.dlp.v2.IAdjustByMatchingInfoTypes): google.privacy.dlp.v2.AdjustByMatchingInfoTypes; + + /** + * Encodes the specified AdjustByMatchingInfoTypes message. Does not implicitly {@link google.privacy.dlp.v2.AdjustByMatchingInfoTypes.verify|verify} messages. + * @param message AdjustByMatchingInfoTypes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IAdjustByMatchingInfoTypes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdjustByMatchingInfoTypes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AdjustByMatchingInfoTypes.verify|verify} messages. + * @param message AdjustByMatchingInfoTypes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IAdjustByMatchingInfoTypes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdjustByMatchingInfoTypes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdjustByMatchingInfoTypes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AdjustByMatchingInfoTypes; + + /** + * Decodes an AdjustByMatchingInfoTypes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdjustByMatchingInfoTypes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AdjustByMatchingInfoTypes; + + /** + * Verifies an AdjustByMatchingInfoTypes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AdjustByMatchingInfoTypes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdjustByMatchingInfoTypes + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AdjustByMatchingInfoTypes; + + /** + * Creates a plain object from an AdjustByMatchingInfoTypes message. Also converts values to other types if specified. + * @param message AdjustByMatchingInfoTypes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AdjustByMatchingInfoTypes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdjustByMatchingInfoTypes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdjustByMatchingInfoTypes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AdjustByImageFindings. */ + interface IAdjustByImageFindings { + + /** AdjustByImageFindings infoTypes */ + infoTypes?: (google.privacy.dlp.v2.IInfoType[]|null); + + /** AdjustByImageFindings minLikelihood */ + minLikelihood?: (google.privacy.dlp.v2.Likelihood|keyof typeof google.privacy.dlp.v2.Likelihood|null); + + /** AdjustByImageFindings imageContainmentType */ + imageContainmentType?: (google.privacy.dlp.v2.IImageContainmentType|null); + } + + /** Represents an AdjustByImageFindings. */ + class AdjustByImageFindings implements IAdjustByImageFindings { + + /** + * Constructs a new AdjustByImageFindings. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IAdjustByImageFindings); + + /** AdjustByImageFindings infoTypes. */ + public infoTypes: google.privacy.dlp.v2.IInfoType[]; + + /** AdjustByImageFindings minLikelihood. */ + public minLikelihood: (google.privacy.dlp.v2.Likelihood|keyof typeof google.privacy.dlp.v2.Likelihood); + + /** AdjustByImageFindings imageContainmentType. */ + public imageContainmentType?: (google.privacy.dlp.v2.IImageContainmentType|null); + + /** + * Creates a new AdjustByImageFindings instance using the specified properties. + * @param [properties] Properties to set + * @returns AdjustByImageFindings instance + */ + public static create(properties?: google.privacy.dlp.v2.IAdjustByImageFindings): google.privacy.dlp.v2.AdjustByImageFindings; + + /** + * Encodes the specified AdjustByImageFindings message. Does not implicitly {@link google.privacy.dlp.v2.AdjustByImageFindings.verify|verify} messages. + * @param message AdjustByImageFindings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IAdjustByImageFindings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdjustByImageFindings message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AdjustByImageFindings.verify|verify} messages. + * @param message AdjustByImageFindings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IAdjustByImageFindings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdjustByImageFindings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdjustByImageFindings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AdjustByImageFindings; + + /** + * Decodes an AdjustByImageFindings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdjustByImageFindings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AdjustByImageFindings; + + /** + * Verifies an AdjustByImageFindings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AdjustByImageFindings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdjustByImageFindings + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AdjustByImageFindings; + + /** + * Creates a plain object from an AdjustByImageFindings message. Also converts values to other types if specified. + * @param message AdjustByImageFindings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AdjustByImageFindings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdjustByImageFindings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdjustByImageFindings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AdjustmentRule. */ + interface IAdjustmentRule { + + /** AdjustmentRule adjustByMatchingInfoTypes */ + adjustByMatchingInfoTypes?: (google.privacy.dlp.v2.IAdjustByMatchingInfoTypes|null); + + /** AdjustmentRule adjustByImageFindings */ + adjustByImageFindings?: (google.privacy.dlp.v2.IAdjustByImageFindings|null); + + /** AdjustmentRule likelihoodAdjustment */ + likelihoodAdjustment?: (google.privacy.dlp.v2.CustomInfoType.DetectionRule.ILikelihoodAdjustment|null); + } + + /** Represents an AdjustmentRule. */ + class AdjustmentRule implements IAdjustmentRule { + + /** + * Constructs a new AdjustmentRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IAdjustmentRule); + + /** AdjustmentRule adjustByMatchingInfoTypes. */ + public adjustByMatchingInfoTypes?: (google.privacy.dlp.v2.IAdjustByMatchingInfoTypes|null); + + /** AdjustmentRule adjustByImageFindings. */ + public adjustByImageFindings?: (google.privacy.dlp.v2.IAdjustByImageFindings|null); + + /** AdjustmentRule likelihoodAdjustment. */ + public likelihoodAdjustment?: (google.privacy.dlp.v2.CustomInfoType.DetectionRule.ILikelihoodAdjustment|null); + + /** AdjustmentRule conditions. */ + public conditions?: ("adjustByMatchingInfoTypes"|"adjustByImageFindings"); + + /** + * Creates a new AdjustmentRule instance using the specified properties. + * @param [properties] Properties to set + * @returns AdjustmentRule instance + */ + public static create(properties?: google.privacy.dlp.v2.IAdjustmentRule): google.privacy.dlp.v2.AdjustmentRule; + + /** + * Encodes the specified AdjustmentRule message. Does not implicitly {@link google.privacy.dlp.v2.AdjustmentRule.verify|verify} messages. + * @param message AdjustmentRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IAdjustmentRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AdjustmentRule message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AdjustmentRule.verify|verify} messages. + * @param message AdjustmentRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IAdjustmentRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AdjustmentRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AdjustmentRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AdjustmentRule; + + /** + * Decodes an AdjustmentRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AdjustmentRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AdjustmentRule; + + /** + * Verifies an AdjustmentRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AdjustmentRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AdjustmentRule + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AdjustmentRule; + + /** + * Creates a plain object from an AdjustmentRule message. Also converts values to other types if specified. + * @param message AdjustmentRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AdjustmentRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AdjustmentRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AdjustmentRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InspectionRule. */ + interface IInspectionRule { + + /** InspectionRule hotwordRule */ + hotwordRule?: (google.privacy.dlp.v2.CustomInfoType.DetectionRule.IHotwordRule|null); + + /** InspectionRule exclusionRule */ + exclusionRule?: (google.privacy.dlp.v2.IExclusionRule|null); + + /** InspectionRule adjustmentRule */ + adjustmentRule?: (google.privacy.dlp.v2.IAdjustmentRule|null); + } + + /** Represents an InspectionRule. */ + class InspectionRule implements IInspectionRule { + + /** + * Constructs a new InspectionRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IInspectionRule); + + /** InspectionRule hotwordRule. */ + public hotwordRule?: (google.privacy.dlp.v2.CustomInfoType.DetectionRule.IHotwordRule|null); + + /** InspectionRule exclusionRule. */ + public exclusionRule?: (google.privacy.dlp.v2.IExclusionRule|null); + + /** InspectionRule adjustmentRule. */ + public adjustmentRule?: (google.privacy.dlp.v2.IAdjustmentRule|null); + + /** InspectionRule type. */ + public type?: ("hotwordRule"|"exclusionRule"|"adjustmentRule"); + + /** + * Creates a new InspectionRule instance using the specified properties. + * @param [properties] Properties to set + * @returns InspectionRule instance + */ + public static create(properties?: google.privacy.dlp.v2.IInspectionRule): google.privacy.dlp.v2.InspectionRule; + + /** + * Encodes the specified InspectionRule message. Does not implicitly {@link google.privacy.dlp.v2.InspectionRule.verify|verify} messages. + * @param message InspectionRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IInspectionRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InspectionRule message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectionRule.verify|verify} messages. + * @param message InspectionRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IInspectionRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InspectionRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InspectionRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.InspectionRule; + + /** + * Decodes an InspectionRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InspectionRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.InspectionRule; + + /** + * Verifies an InspectionRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InspectionRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InspectionRule + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.InspectionRule; + + /** + * Creates a plain object from an InspectionRule message. Also converts values to other types if specified. + * @param message InspectionRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.InspectionRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InspectionRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InspectionRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InspectionRuleSet. */ + interface IInspectionRuleSet { + + /** InspectionRuleSet infoTypes */ + infoTypes?: (google.privacy.dlp.v2.IInfoType[]|null); + + /** InspectionRuleSet rules */ + rules?: (google.privacy.dlp.v2.IInspectionRule[]|null); + } + + /** Represents an InspectionRuleSet. */ + class InspectionRuleSet implements IInspectionRuleSet { + + /** + * Constructs a new InspectionRuleSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IInspectionRuleSet); + + /** InspectionRuleSet infoTypes. */ + public infoTypes: google.privacy.dlp.v2.IInfoType[]; + + /** InspectionRuleSet rules. */ + public rules: google.privacy.dlp.v2.IInspectionRule[]; + + /** + * Creates a new InspectionRuleSet instance using the specified properties. + * @param [properties] Properties to set + * @returns InspectionRuleSet instance + */ + public static create(properties?: google.privacy.dlp.v2.IInspectionRuleSet): google.privacy.dlp.v2.InspectionRuleSet; + + /** + * Encodes the specified InspectionRuleSet message. Does not implicitly {@link google.privacy.dlp.v2.InspectionRuleSet.verify|verify} messages. + * @param message InspectionRuleSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IInspectionRuleSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InspectionRuleSet message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectionRuleSet.verify|verify} messages. + * @param message InspectionRuleSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IInspectionRuleSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InspectionRuleSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InspectionRuleSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.InspectionRuleSet; + + /** + * Decodes an InspectionRuleSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InspectionRuleSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.InspectionRuleSet; + + /** + * Verifies an InspectionRuleSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InspectionRuleSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InspectionRuleSet + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.InspectionRuleSet; + + /** + * Creates a plain object from an InspectionRuleSet message. Also converts values to other types if specified. + * @param message InspectionRuleSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.InspectionRuleSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InspectionRuleSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InspectionRuleSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InspectConfig. */ + interface IInspectConfig { + + /** InspectConfig infoTypes */ + infoTypes?: (google.privacy.dlp.v2.IInfoType[]|null); + + /** InspectConfig minLikelihood */ + minLikelihood?: (google.privacy.dlp.v2.Likelihood|keyof typeof google.privacy.dlp.v2.Likelihood|null); + + /** InspectConfig minLikelihoodPerInfoType */ + minLikelihoodPerInfoType?: (google.privacy.dlp.v2.InspectConfig.IInfoTypeLikelihood[]|null); + + /** InspectConfig limits */ + limits?: (google.privacy.dlp.v2.InspectConfig.IFindingLimits|null); + + /** InspectConfig includeQuote */ + includeQuote?: (boolean|null); + + /** InspectConfig excludeInfoTypes */ + excludeInfoTypes?: (boolean|null); + + /** InspectConfig customInfoTypes */ + customInfoTypes?: (google.privacy.dlp.v2.ICustomInfoType[]|null); + + /** InspectConfig contentOptions */ + contentOptions?: (google.privacy.dlp.v2.ContentOption[]|null); + + /** InspectConfig ruleSet */ + ruleSet?: (google.privacy.dlp.v2.IInspectionRuleSet[]|null); + } + + /** Represents an InspectConfig. */ + class InspectConfig implements IInspectConfig { + + /** + * Constructs a new InspectConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IInspectConfig); + + /** InspectConfig infoTypes. */ + public infoTypes: google.privacy.dlp.v2.IInfoType[]; + + /** InspectConfig minLikelihood. */ + public minLikelihood: (google.privacy.dlp.v2.Likelihood|keyof typeof google.privacy.dlp.v2.Likelihood); + + /** InspectConfig minLikelihoodPerInfoType. */ + public minLikelihoodPerInfoType: google.privacy.dlp.v2.InspectConfig.IInfoTypeLikelihood[]; + + /** InspectConfig limits. */ + public limits?: (google.privacy.dlp.v2.InspectConfig.IFindingLimits|null); + + /** InspectConfig includeQuote. */ + public includeQuote: boolean; + + /** InspectConfig excludeInfoTypes. */ + public excludeInfoTypes: boolean; + + /** InspectConfig customInfoTypes. */ + public customInfoTypes: google.privacy.dlp.v2.ICustomInfoType[]; + + /** InspectConfig contentOptions. */ + public contentOptions: google.privacy.dlp.v2.ContentOption[]; + + /** InspectConfig ruleSet. */ + public ruleSet: google.privacy.dlp.v2.IInspectionRuleSet[]; + + /** + * Creates a new InspectConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns InspectConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.IInspectConfig): google.privacy.dlp.v2.InspectConfig; + + /** + * Encodes the specified InspectConfig message. Does not implicitly {@link google.privacy.dlp.v2.InspectConfig.verify|verify} messages. + * @param message InspectConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IInspectConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InspectConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectConfig.verify|verify} messages. + * @param message InspectConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IInspectConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InspectConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InspectConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.InspectConfig; + + /** + * Decodes an InspectConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InspectConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.InspectConfig; + + /** + * Verifies an InspectConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InspectConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InspectConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.InspectConfig; + + /** + * Creates a plain object from an InspectConfig message. Also converts values to other types if specified. + * @param message InspectConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.InspectConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InspectConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InspectConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace InspectConfig { + + /** Properties of an InfoTypeLikelihood. */ + interface IInfoTypeLikelihood { + + /** InfoTypeLikelihood infoType */ + infoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** InfoTypeLikelihood minLikelihood */ + minLikelihood?: (google.privacy.dlp.v2.Likelihood|keyof typeof google.privacy.dlp.v2.Likelihood|null); + } + + /** Represents an InfoTypeLikelihood. */ + class InfoTypeLikelihood implements IInfoTypeLikelihood { + + /** + * Constructs a new InfoTypeLikelihood. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.InspectConfig.IInfoTypeLikelihood); + + /** InfoTypeLikelihood infoType. */ + public infoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** InfoTypeLikelihood minLikelihood. */ + public minLikelihood: (google.privacy.dlp.v2.Likelihood|keyof typeof google.privacy.dlp.v2.Likelihood); + + /** + * Creates a new InfoTypeLikelihood instance using the specified properties. + * @param [properties] Properties to set + * @returns InfoTypeLikelihood instance + */ + public static create(properties?: google.privacy.dlp.v2.InspectConfig.IInfoTypeLikelihood): google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood; + + /** + * Encodes the specified InfoTypeLikelihood message. Does not implicitly {@link google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood.verify|verify} messages. + * @param message InfoTypeLikelihood message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.InspectConfig.IInfoTypeLikelihood, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InfoTypeLikelihood message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood.verify|verify} messages. + * @param message InfoTypeLikelihood message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.InspectConfig.IInfoTypeLikelihood, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InfoTypeLikelihood message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InfoTypeLikelihood + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood; + + /** + * Decodes an InfoTypeLikelihood message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InfoTypeLikelihood + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood; + + /** + * Verifies an InfoTypeLikelihood message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InfoTypeLikelihood message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InfoTypeLikelihood + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood; + + /** + * Creates a plain object from an InfoTypeLikelihood message. Also converts values to other types if specified. + * @param message InfoTypeLikelihood + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InfoTypeLikelihood to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InfoTypeLikelihood + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FindingLimits. */ + interface IFindingLimits { + + /** FindingLimits maxFindingsPerItem */ + maxFindingsPerItem?: (number|null); + + /** FindingLimits maxFindingsPerRequest */ + maxFindingsPerRequest?: (number|null); + + /** FindingLimits maxFindingsPerInfoType */ + maxFindingsPerInfoType?: (google.privacy.dlp.v2.InspectConfig.FindingLimits.IInfoTypeLimit[]|null); + } + + /** Represents a FindingLimits. */ + class FindingLimits implements IFindingLimits { + + /** + * Constructs a new FindingLimits. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.InspectConfig.IFindingLimits); + + /** FindingLimits maxFindingsPerItem. */ + public maxFindingsPerItem: number; + + /** FindingLimits maxFindingsPerRequest. */ + public maxFindingsPerRequest: number; + + /** FindingLimits maxFindingsPerInfoType. */ + public maxFindingsPerInfoType: google.privacy.dlp.v2.InspectConfig.FindingLimits.IInfoTypeLimit[]; + + /** + * Creates a new FindingLimits instance using the specified properties. + * @param [properties] Properties to set + * @returns FindingLimits instance + */ + public static create(properties?: google.privacy.dlp.v2.InspectConfig.IFindingLimits): google.privacy.dlp.v2.InspectConfig.FindingLimits; + + /** + * Encodes the specified FindingLimits message. Does not implicitly {@link google.privacy.dlp.v2.InspectConfig.FindingLimits.verify|verify} messages. + * @param message FindingLimits message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.InspectConfig.IFindingLimits, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FindingLimits message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectConfig.FindingLimits.verify|verify} messages. + * @param message FindingLimits message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.InspectConfig.IFindingLimits, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FindingLimits message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FindingLimits + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.InspectConfig.FindingLimits; + + /** + * Decodes a FindingLimits message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FindingLimits + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.InspectConfig.FindingLimits; + + /** + * Verifies a FindingLimits message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FindingLimits message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FindingLimits + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.InspectConfig.FindingLimits; + + /** + * Creates a plain object from a FindingLimits message. Also converts values to other types if specified. + * @param message FindingLimits + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.InspectConfig.FindingLimits, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FindingLimits to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FindingLimits + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FindingLimits { + + /** Properties of an InfoTypeLimit. */ + interface IInfoTypeLimit { + + /** InfoTypeLimit infoType */ + infoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** InfoTypeLimit maxFindings */ + maxFindings?: (number|null); + } + + /** Represents an InfoTypeLimit. */ + class InfoTypeLimit implements IInfoTypeLimit { + + /** + * Constructs a new InfoTypeLimit. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.InspectConfig.FindingLimits.IInfoTypeLimit); + + /** InfoTypeLimit infoType. */ + public infoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** InfoTypeLimit maxFindings. */ + public maxFindings: number; + + /** + * Creates a new InfoTypeLimit instance using the specified properties. + * @param [properties] Properties to set + * @returns InfoTypeLimit instance + */ + public static create(properties?: google.privacy.dlp.v2.InspectConfig.FindingLimits.IInfoTypeLimit): google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit; + + /** + * Encodes the specified InfoTypeLimit message. Does not implicitly {@link google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.verify|verify} messages. + * @param message InfoTypeLimit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.InspectConfig.FindingLimits.IInfoTypeLimit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InfoTypeLimit message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.verify|verify} messages. + * @param message InfoTypeLimit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.InspectConfig.FindingLimits.IInfoTypeLimit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InfoTypeLimit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InfoTypeLimit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit; + + /** + * Decodes an InfoTypeLimit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InfoTypeLimit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit; + + /** + * Verifies an InfoTypeLimit message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InfoTypeLimit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InfoTypeLimit + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit; + + /** + * Creates a plain object from an InfoTypeLimit message. Also converts values to other types if specified. + * @param message InfoTypeLimit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InfoTypeLimit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InfoTypeLimit + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a ByteContentItem. */ + interface IByteContentItem { + + /** ByteContentItem type */ + type?: (google.privacy.dlp.v2.ByteContentItem.BytesType|keyof typeof google.privacy.dlp.v2.ByteContentItem.BytesType|null); + + /** ByteContentItem data */ + data?: (Uint8Array|Buffer|string|null); + } + + /** Represents a ByteContentItem. */ + class ByteContentItem implements IByteContentItem { + + /** + * Constructs a new ByteContentItem. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IByteContentItem); + + /** ByteContentItem type. */ + public type: (google.privacy.dlp.v2.ByteContentItem.BytesType|keyof typeof google.privacy.dlp.v2.ByteContentItem.BytesType); + + /** ByteContentItem data. */ + public data: (Uint8Array|Buffer|string); + + /** + * Creates a new ByteContentItem instance using the specified properties. + * @param [properties] Properties to set + * @returns ByteContentItem instance + */ + public static create(properties?: google.privacy.dlp.v2.IByteContentItem): google.privacy.dlp.v2.ByteContentItem; + + /** + * Encodes the specified ByteContentItem message. Does not implicitly {@link google.privacy.dlp.v2.ByteContentItem.verify|verify} messages. + * @param message ByteContentItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IByteContentItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ByteContentItem message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ByteContentItem.verify|verify} messages. + * @param message ByteContentItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IByteContentItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ByteContentItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ByteContentItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ByteContentItem; + + /** + * Decodes a ByteContentItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ByteContentItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ByteContentItem; + + /** + * Verifies a ByteContentItem message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ByteContentItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ByteContentItem + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ByteContentItem; + + /** + * Creates a plain object from a ByteContentItem message. Also converts values to other types if specified. + * @param message ByteContentItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ByteContentItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ByteContentItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ByteContentItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ByteContentItem { + + /** BytesType enum. */ + enum BytesType { + BYTES_TYPE_UNSPECIFIED = 0, + IMAGE = 6, + IMAGE_JPEG = 1, + IMAGE_BMP = 2, + IMAGE_PNG = 3, + IMAGE_SVG = 4, + TEXT_UTF8 = 5, + WORD_DOCUMENT = 7, + PDF = 8, + POWERPOINT_DOCUMENT = 9, + EXCEL_DOCUMENT = 10, + AVRO = 11, + CSV = 12, + TSV = 13, + AUDIO = 15, + VIDEO = 16, + EXECUTABLE = 17, + AI_MODEL = 18 + } + } + + /** Properties of a ContentItem. */ + interface IContentItem { + + /** ContentItem value */ + value?: (string|null); + + /** ContentItem table */ + table?: (google.privacy.dlp.v2.ITable|null); + + /** ContentItem byteItem */ + byteItem?: (google.privacy.dlp.v2.IByteContentItem|null); + + /** ContentItem conversation */ + conversation?: (google.privacy.dlp.v2.IConversation|null); + + /** ContentItem batchContentItem */ + batchContentItem?: (google.privacy.dlp.v2.IBatchContentItem|null); + + /** ContentItem contentMetadata */ + contentMetadata?: (google.privacy.dlp.v2.IContentMetadata|null); + } + + /** Represents a ContentItem. */ + class ContentItem implements IContentItem { + + /** + * Constructs a new ContentItem. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IContentItem); + + /** ContentItem value. */ + public value?: (string|null); + + /** ContentItem table. */ + public table?: (google.privacy.dlp.v2.ITable|null); + + /** ContentItem byteItem. */ + public byteItem?: (google.privacy.dlp.v2.IByteContentItem|null); + + /** ContentItem conversation. */ + public conversation?: (google.privacy.dlp.v2.IConversation|null); + + /** ContentItem batchContentItem. */ + public batchContentItem?: (google.privacy.dlp.v2.IBatchContentItem|null); + + /** ContentItem contentMetadata. */ + public contentMetadata?: (google.privacy.dlp.v2.IContentMetadata|null); + + /** ContentItem dataItem. */ + public dataItem?: ("value"|"table"|"byteItem"|"conversation"|"batchContentItem"); + + /** + * Creates a new ContentItem instance using the specified properties. + * @param [properties] Properties to set + * @returns ContentItem instance + */ + public static create(properties?: google.privacy.dlp.v2.IContentItem): google.privacy.dlp.v2.ContentItem; + + /** + * Encodes the specified ContentItem message. Does not implicitly {@link google.privacy.dlp.v2.ContentItem.verify|verify} messages. + * @param message ContentItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IContentItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContentItem message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ContentItem.verify|verify} messages. + * @param message ContentItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IContentItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContentItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContentItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ContentItem; + + /** + * Decodes a ContentItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContentItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ContentItem; + + /** + * Verifies a ContentItem message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ContentItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContentItem + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ContentItem; + + /** + * Creates a plain object from a ContentItem message. Also converts values to other types if specified. + * @param message ContentItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ContentItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContentItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ContentItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ContentMetadata. */ + interface IContentMetadata { + + /** ContentMetadata properties */ + properties?: (google.privacy.dlp.v2.IKeyValueMetadataProperty[]|null); + } + + /** Represents a ContentMetadata. */ + class ContentMetadata implements IContentMetadata { + + /** + * Constructs a new ContentMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IContentMetadata); + + /** ContentMetadata properties. */ + public properties: google.privacy.dlp.v2.IKeyValueMetadataProperty[]; + + /** + * Creates a new ContentMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ContentMetadata instance + */ + public static create(properties?: google.privacy.dlp.v2.IContentMetadata): google.privacy.dlp.v2.ContentMetadata; + + /** + * Encodes the specified ContentMetadata message. Does not implicitly {@link google.privacy.dlp.v2.ContentMetadata.verify|verify} messages. + * @param message ContentMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IContentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContentMetadata message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ContentMetadata.verify|verify} messages. + * @param message ContentMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IContentMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContentMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ContentMetadata; + + /** + * Decodes a ContentMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ContentMetadata; + + /** + * Verifies a ContentMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ContentMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContentMetadata + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ContentMetadata; + + /** + * Creates a plain object from a ContentMetadata message. Also converts values to other types if specified. + * @param message ContentMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ContentMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContentMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ContentMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Conversation. */ + interface IConversation { + + /** Conversation messages */ + messages?: (google.privacy.dlp.v2.IConversationMessage[]|null); + } + + /** Represents a Conversation. */ + class Conversation implements IConversation { + + /** + * Constructs a new Conversation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IConversation); + + /** Conversation messages. */ + public messages: google.privacy.dlp.v2.IConversationMessage[]; + + /** + * Creates a new Conversation instance using the specified properties. + * @param [properties] Properties to set + * @returns Conversation instance + */ + public static create(properties?: google.privacy.dlp.v2.IConversation): google.privacy.dlp.v2.Conversation; + + /** + * Encodes the specified Conversation message. Does not implicitly {@link google.privacy.dlp.v2.Conversation.verify|verify} messages. + * @param message Conversation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IConversation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Conversation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Conversation.verify|verify} messages. + * @param message Conversation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IConversation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Conversation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Conversation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Conversation; + + /** + * Decodes a Conversation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Conversation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Conversation; + + /** + * Verifies a Conversation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Conversation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Conversation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Conversation; + + /** + * Creates a plain object from a Conversation message. Also converts values to other types if specified. + * @param message Conversation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Conversation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Conversation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Conversation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConversationMessage. */ + interface IConversationMessage { + + /** ConversationMessage content */ + content?: (string|null); + + /** ConversationMessage messageType */ + messageType?: (google.privacy.dlp.v2.ConversationMessage.MessageType|keyof typeof google.privacy.dlp.v2.ConversationMessage.MessageType|null); + + /** ConversationMessage participantId */ + participantId?: (string|null); + } + + /** Represents a ConversationMessage. */ + class ConversationMessage implements IConversationMessage { + + /** + * Constructs a new ConversationMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IConversationMessage); + + /** ConversationMessage content. */ + public content: string; + + /** ConversationMessage messageType. */ + public messageType: (google.privacy.dlp.v2.ConversationMessage.MessageType|keyof typeof google.privacy.dlp.v2.ConversationMessage.MessageType); + + /** ConversationMessage participantId. */ + public participantId: string; + + /** + * Creates a new ConversationMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversationMessage instance + */ + public static create(properties?: google.privacy.dlp.v2.IConversationMessage): google.privacy.dlp.v2.ConversationMessage; + + /** + * Encodes the specified ConversationMessage message. Does not implicitly {@link google.privacy.dlp.v2.ConversationMessage.verify|verify} messages. + * @param message ConversationMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IConversationMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversationMessage message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ConversationMessage.verify|verify} messages. + * @param message ConversationMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IConversationMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversationMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversationMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ConversationMessage; + + /** + * Decodes a ConversationMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversationMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ConversationMessage; + + /** + * Verifies a ConversationMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConversationMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversationMessage + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ConversationMessage; + + /** + * Creates a plain object from a ConversationMessage message. Also converts values to other types if specified. + * @param message ConversationMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ConversationMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversationMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConversationMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ConversationMessage { + + /** MessageType enum. */ + enum MessageType { + MESSAGE_TYPE_UNSPECIFIED = 0, + CONTENT = 1, + CONTEXT = 2 + } + } + + /** Properties of a BatchContentItem. */ + interface IBatchContentItem { + + /** BatchContentItem stringValueBatch */ + stringValueBatch?: (google.privacy.dlp.v2.IStringValueBatch|null); + } + + /** Represents a BatchContentItem. */ + class BatchContentItem implements IBatchContentItem { + + /** + * Constructs a new BatchContentItem. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IBatchContentItem); + + /** BatchContentItem stringValueBatch. */ + public stringValueBatch?: (google.privacy.dlp.v2.IStringValueBatch|null); + + /** BatchContentItem batch. */ + public batch?: "stringValueBatch"; + + /** + * Creates a new BatchContentItem instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchContentItem instance + */ + public static create(properties?: google.privacy.dlp.v2.IBatchContentItem): google.privacy.dlp.v2.BatchContentItem; + + /** + * Encodes the specified BatchContentItem message. Does not implicitly {@link google.privacy.dlp.v2.BatchContentItem.verify|verify} messages. + * @param message BatchContentItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IBatchContentItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchContentItem message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BatchContentItem.verify|verify} messages. + * @param message BatchContentItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IBatchContentItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchContentItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchContentItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.BatchContentItem; + + /** + * Decodes a BatchContentItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchContentItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.BatchContentItem; + + /** + * Verifies a BatchContentItem message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BatchContentItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchContentItem + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.BatchContentItem; + + /** + * Creates a plain object from a BatchContentItem message. Also converts values to other types if specified. + * @param message BatchContentItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.BatchContentItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchContentItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchContentItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StringValueBatch. */ + interface IStringValueBatch { + + /** StringValueBatch values */ + values?: (string[]|null); + } + + /** Represents a StringValueBatch. */ + class StringValueBatch implements IStringValueBatch { + + /** + * Constructs a new StringValueBatch. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IStringValueBatch); + + /** StringValueBatch values. */ + public values: string[]; + + /** + * Creates a new StringValueBatch instance using the specified properties. + * @param [properties] Properties to set + * @returns StringValueBatch instance + */ + public static create(properties?: google.privacy.dlp.v2.IStringValueBatch): google.privacy.dlp.v2.StringValueBatch; + + /** + * Encodes the specified StringValueBatch message. Does not implicitly {@link google.privacy.dlp.v2.StringValueBatch.verify|verify} messages. + * @param message StringValueBatch message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IStringValueBatch, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StringValueBatch message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StringValueBatch.verify|verify} messages. + * @param message StringValueBatch message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IStringValueBatch, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StringValueBatch message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StringValueBatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.StringValueBatch; + + /** + * Decodes a StringValueBatch message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StringValueBatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.StringValueBatch; + + /** + * Verifies a StringValueBatch message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StringValueBatch message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StringValueBatch + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.StringValueBatch; + + /** + * Creates a plain object from a StringValueBatch message. Also converts values to other types if specified. + * @param message StringValueBatch + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.StringValueBatch, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StringValueBatch to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StringValueBatch + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Table. */ + interface ITable { + + /** Table headers */ + headers?: (google.privacy.dlp.v2.IFieldId[]|null); + + /** Table rows */ + rows?: (google.privacy.dlp.v2.Table.IRow[]|null); + } + + /** Represents a Table. */ + class Table implements ITable { + + /** + * Constructs a new Table. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ITable); + + /** Table headers. */ + public headers: google.privacy.dlp.v2.IFieldId[]; + + /** Table rows. */ + public rows: google.privacy.dlp.v2.Table.IRow[]; + + /** + * Creates a new Table instance using the specified properties. + * @param [properties] Properties to set + * @returns Table instance + */ + public static create(properties?: google.privacy.dlp.v2.ITable): google.privacy.dlp.v2.Table; + + /** + * Encodes the specified Table message. Does not implicitly {@link google.privacy.dlp.v2.Table.verify|verify} messages. + * @param message Table message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ITable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Table message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Table.verify|verify} messages. + * @param message Table message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ITable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Table message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Table + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Table; + + /** + * Decodes a Table message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Table + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Table; + + /** + * Verifies a Table message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Table message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Table + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Table; + + /** + * Creates a plain object from a Table message. Also converts values to other types if specified. + * @param message Table + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Table, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Table to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Table + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Table { + + /** Properties of a Row. */ + interface IRow { + + /** Row values */ + values?: (google.privacy.dlp.v2.IValue[]|null); + } + + /** Represents a Row. */ + class Row implements IRow { + + /** + * Constructs a new Row. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.Table.IRow); + + /** Row values. */ + public values: google.privacy.dlp.v2.IValue[]; + + /** + * Creates a new Row instance using the specified properties. + * @param [properties] Properties to set + * @returns Row instance + */ + public static create(properties?: google.privacy.dlp.v2.Table.IRow): google.privacy.dlp.v2.Table.Row; + + /** + * Encodes the specified Row message. Does not implicitly {@link google.privacy.dlp.v2.Table.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.Table.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Table.Row.verify|verify} messages. + * @param message Row message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.Table.IRow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Row message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Table.Row; + + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Table.Row; + + /** + * Verifies a Row message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Row message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Row + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Table.Row; + + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @param message Row + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Table.Row, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Row to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Row + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a KeyValueMetadataProperty. */ + interface IKeyValueMetadataProperty { + + /** KeyValueMetadataProperty key */ + key?: (string|null); + + /** KeyValueMetadataProperty value */ + value?: (string|null); + } + + /** Represents a KeyValueMetadataProperty. */ + class KeyValueMetadataProperty implements IKeyValueMetadataProperty { + + /** + * Constructs a new KeyValueMetadataProperty. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IKeyValueMetadataProperty); + + /** KeyValueMetadataProperty key. */ + public key: string; + + /** KeyValueMetadataProperty value. */ + public value: string; + + /** + * Creates a new KeyValueMetadataProperty instance using the specified properties. + * @param [properties] Properties to set + * @returns KeyValueMetadataProperty instance + */ + public static create(properties?: google.privacy.dlp.v2.IKeyValueMetadataProperty): google.privacy.dlp.v2.KeyValueMetadataProperty; + + /** + * Encodes the specified KeyValueMetadataProperty message. Does not implicitly {@link google.privacy.dlp.v2.KeyValueMetadataProperty.verify|verify} messages. + * @param message KeyValueMetadataProperty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IKeyValueMetadataProperty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KeyValueMetadataProperty message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.KeyValueMetadataProperty.verify|verify} messages. + * @param message KeyValueMetadataProperty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IKeyValueMetadataProperty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KeyValueMetadataProperty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KeyValueMetadataProperty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.KeyValueMetadataProperty; + + /** + * Decodes a KeyValueMetadataProperty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KeyValueMetadataProperty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.KeyValueMetadataProperty; + + /** + * Verifies a KeyValueMetadataProperty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KeyValueMetadataProperty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KeyValueMetadataProperty + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.KeyValueMetadataProperty; + + /** + * Creates a plain object from a KeyValueMetadataProperty message. Also converts values to other types if specified. + * @param message KeyValueMetadataProperty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.KeyValueMetadataProperty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KeyValueMetadataProperty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KeyValueMetadataProperty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InspectResult. */ + interface IInspectResult { + + /** InspectResult findings */ + findings?: (google.privacy.dlp.v2.IFinding[]|null); + + /** InspectResult findingsTruncated */ + findingsTruncated?: (boolean|null); + } + + /** Represents an InspectResult. */ + class InspectResult implements IInspectResult { + + /** + * Constructs a new InspectResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IInspectResult); + + /** InspectResult findings. */ + public findings: google.privacy.dlp.v2.IFinding[]; + + /** InspectResult findingsTruncated. */ + public findingsTruncated: boolean; + + /** + * Creates a new InspectResult instance using the specified properties. + * @param [properties] Properties to set + * @returns InspectResult instance + */ + public static create(properties?: google.privacy.dlp.v2.IInspectResult): google.privacy.dlp.v2.InspectResult; + + /** + * Encodes the specified InspectResult message. Does not implicitly {@link google.privacy.dlp.v2.InspectResult.verify|verify} messages. + * @param message InspectResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IInspectResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InspectResult message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectResult.verify|verify} messages. + * @param message InspectResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IInspectResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InspectResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InspectResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.InspectResult; + + /** + * Decodes an InspectResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InspectResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.InspectResult; + + /** + * Verifies an InspectResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InspectResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InspectResult + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.InspectResult; + + /** + * Creates a plain object from an InspectResult message. Also converts values to other types if specified. + * @param message InspectResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.InspectResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InspectResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InspectResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Finding. */ + interface IFinding { + + /** Finding name */ + name?: (string|null); + + /** Finding quote */ + quote?: (string|null); + + /** Finding infoType */ + infoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** Finding likelihood */ + likelihood?: (google.privacy.dlp.v2.Likelihood|keyof typeof google.privacy.dlp.v2.Likelihood|null); + + /** Finding location */ + location?: (google.privacy.dlp.v2.ILocation|null); + + /** Finding createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Finding quoteInfo */ + quoteInfo?: (google.privacy.dlp.v2.IQuoteInfo|null); + + /** Finding resourceName */ + resourceName?: (string|null); + + /** Finding triggerName */ + triggerName?: (string|null); + + /** Finding labels */ + labels?: ({ [k: string]: string }|null); + + /** Finding jobCreateTime */ + jobCreateTime?: (google.protobuf.ITimestamp|null); + + /** Finding jobName */ + jobName?: (string|null); + + /** Finding findingId */ + findingId?: (string|null); + } + + /** Represents a Finding. */ + class Finding implements IFinding { + + /** + * Constructs a new Finding. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IFinding); + + /** Finding name. */ + public name: string; + + /** Finding quote. */ + public quote: string; + + /** Finding infoType. */ + public infoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** Finding likelihood. */ + public likelihood: (google.privacy.dlp.v2.Likelihood|keyof typeof google.privacy.dlp.v2.Likelihood); + + /** Finding location. */ + public location?: (google.privacy.dlp.v2.ILocation|null); + + /** Finding createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Finding quoteInfo. */ + public quoteInfo?: (google.privacy.dlp.v2.IQuoteInfo|null); + + /** Finding resourceName. */ + public resourceName: string; + + /** Finding triggerName. */ + public triggerName: string; + + /** Finding labels. */ + public labels: { [k: string]: string }; + + /** Finding jobCreateTime. */ + public jobCreateTime?: (google.protobuf.ITimestamp|null); + + /** Finding jobName. */ + public jobName: string; + + /** Finding findingId. */ + public findingId: string; + + /** + * Creates a new Finding instance using the specified properties. + * @param [properties] Properties to set + * @returns Finding instance + */ + public static create(properties?: google.privacy.dlp.v2.IFinding): google.privacy.dlp.v2.Finding; + + /** + * Encodes the specified Finding message. Does not implicitly {@link google.privacy.dlp.v2.Finding.verify|verify} messages. + * @param message Finding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IFinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Finding message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Finding.verify|verify} messages. + * @param message Finding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IFinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Finding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Finding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Finding; + + /** + * Decodes a Finding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Finding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Finding; + + /** + * Verifies a Finding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Finding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Finding + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Finding; + + /** + * Creates a plain object from a Finding message. Also converts values to other types if specified. + * @param message Finding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Finding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Finding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Finding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Location. */ + interface ILocation { + + /** Location byteRange */ + byteRange?: (google.privacy.dlp.v2.IRange|null); + + /** Location codepointRange */ + codepointRange?: (google.privacy.dlp.v2.IRange|null); + + /** Location contentLocations */ + contentLocations?: (google.privacy.dlp.v2.IContentLocation[]|null); + + /** Location container */ + container?: (google.privacy.dlp.v2.IContainer|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ILocation); + + /** Location byteRange. */ + public byteRange?: (google.privacy.dlp.v2.IRange|null); + + /** Location codepointRange. */ + public codepointRange?: (google.privacy.dlp.v2.IRange|null); + + /** Location contentLocations. */ + public contentLocations: google.privacy.dlp.v2.IContentLocation[]; + + /** Location container. */ + public container?: (google.privacy.dlp.v2.IContainer|null); + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.privacy.dlp.v2.ILocation): google.privacy.dlp.v2.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.privacy.dlp.v2.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ContentLocation. */ + interface IContentLocation { + + /** ContentLocation containerName */ + containerName?: (string|null); + + /** ContentLocation recordLocation */ + recordLocation?: (google.privacy.dlp.v2.IRecordLocation|null); + + /** ContentLocation imageLocation */ + imageLocation?: (google.privacy.dlp.v2.IImageLocation|null); + + /** ContentLocation documentLocation */ + documentLocation?: (google.privacy.dlp.v2.IDocumentLocation|null); + + /** ContentLocation metadataLocation */ + metadataLocation?: (google.privacy.dlp.v2.IMetadataLocation|null); + + /** ContentLocation conversationLocation */ + conversationLocation?: (google.privacy.dlp.v2.IConversationLocation|null); + + /** ContentLocation batchContentLocation */ + batchContentLocation?: (google.privacy.dlp.v2.IBatchContentLocation|null); + + /** ContentLocation containerTimestamp */ + containerTimestamp?: (google.protobuf.ITimestamp|null); + + /** ContentLocation containerVersion */ + containerVersion?: (string|null); + } + + /** Represents a ContentLocation. */ + class ContentLocation implements IContentLocation { + + /** + * Constructs a new ContentLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IContentLocation); + + /** ContentLocation containerName. */ + public containerName: string; + + /** ContentLocation recordLocation. */ + public recordLocation?: (google.privacy.dlp.v2.IRecordLocation|null); + + /** ContentLocation imageLocation. */ + public imageLocation?: (google.privacy.dlp.v2.IImageLocation|null); + + /** ContentLocation documentLocation. */ + public documentLocation?: (google.privacy.dlp.v2.IDocumentLocation|null); + + /** ContentLocation metadataLocation. */ + public metadataLocation?: (google.privacy.dlp.v2.IMetadataLocation|null); + + /** ContentLocation conversationLocation. */ + public conversationLocation?: (google.privacy.dlp.v2.IConversationLocation|null); + + /** ContentLocation batchContentLocation. */ + public batchContentLocation?: (google.privacy.dlp.v2.IBatchContentLocation|null); + + /** ContentLocation containerTimestamp. */ + public containerTimestamp?: (google.protobuf.ITimestamp|null); + + /** ContentLocation containerVersion. */ + public containerVersion: string; + + /** ContentLocation location. */ + public location?: ("recordLocation"|"imageLocation"|"documentLocation"|"metadataLocation"|"conversationLocation"|"batchContentLocation"); + + /** + * Creates a new ContentLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns ContentLocation instance + */ + public static create(properties?: google.privacy.dlp.v2.IContentLocation): google.privacy.dlp.v2.ContentLocation; + + /** + * Encodes the specified ContentLocation message. Does not implicitly {@link google.privacy.dlp.v2.ContentLocation.verify|verify} messages. + * @param message ContentLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IContentLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ContentLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ContentLocation.verify|verify} messages. + * @param message ContentLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IContentLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ContentLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ContentLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ContentLocation; + + /** + * Decodes a ContentLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ContentLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ContentLocation; + + /** + * Verifies a ContentLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ContentLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ContentLocation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ContentLocation; + + /** + * Creates a plain object from a ContentLocation message. Also converts values to other types if specified. + * @param message ContentLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ContentLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ContentLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ContentLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConversationLocation. */ + interface IConversationLocation { + + /** ConversationLocation messageIndex */ + messageIndex?: (number|null); + + /** ConversationLocation allMessages */ + allMessages?: (google.privacy.dlp.v2.ConversationLocation.IAllMessages|null); + } + + /** Represents a ConversationLocation. */ + class ConversationLocation implements IConversationLocation { + + /** + * Constructs a new ConversationLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IConversationLocation); + + /** ConversationLocation messageIndex. */ + public messageIndex?: (number|null); + + /** ConversationLocation allMessages. */ + public allMessages?: (google.privacy.dlp.v2.ConversationLocation.IAllMessages|null); + + /** ConversationLocation location. */ + public location?: ("messageIndex"|"allMessages"); + + /** + * Creates a new ConversationLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversationLocation instance + */ + public static create(properties?: google.privacy.dlp.v2.IConversationLocation): google.privacy.dlp.v2.ConversationLocation; + + /** + * Encodes the specified ConversationLocation message. Does not implicitly {@link google.privacy.dlp.v2.ConversationLocation.verify|verify} messages. + * @param message ConversationLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IConversationLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversationLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ConversationLocation.verify|verify} messages. + * @param message ConversationLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IConversationLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversationLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversationLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ConversationLocation; + + /** + * Decodes a ConversationLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversationLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ConversationLocation; + + /** + * Verifies a ConversationLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConversationLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversationLocation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ConversationLocation; + + /** + * Creates a plain object from a ConversationLocation message. Also converts values to other types if specified. + * @param message ConversationLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ConversationLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversationLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConversationLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ConversationLocation { + + /** Properties of an AllMessages. */ + interface IAllMessages { + } + + /** Represents an AllMessages. */ + class AllMessages implements IAllMessages { + + /** + * Constructs a new AllMessages. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ConversationLocation.IAllMessages); + + /** + * Creates a new AllMessages instance using the specified properties. + * @param [properties] Properties to set + * @returns AllMessages instance + */ + public static create(properties?: google.privacy.dlp.v2.ConversationLocation.IAllMessages): google.privacy.dlp.v2.ConversationLocation.AllMessages; + + /** + * Encodes the specified AllMessages message. Does not implicitly {@link google.privacy.dlp.v2.ConversationLocation.AllMessages.verify|verify} messages. + * @param message AllMessages message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ConversationLocation.IAllMessages, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AllMessages message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ConversationLocation.AllMessages.verify|verify} messages. + * @param message AllMessages message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ConversationLocation.IAllMessages, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AllMessages message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AllMessages + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ConversationLocation.AllMessages; + + /** + * Decodes an AllMessages message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AllMessages + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ConversationLocation.AllMessages; + + /** + * Verifies an AllMessages message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AllMessages message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AllMessages + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ConversationLocation.AllMessages; + + /** + * Creates a plain object from an AllMessages message. Also converts values to other types if specified. + * @param message AllMessages + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ConversationLocation.AllMessages, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AllMessages to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AllMessages + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a BatchContentLocation. */ + interface IBatchContentLocation { + + /** BatchContentLocation itemIndex */ + itemIndex?: (number|null); + } + + /** Represents a BatchContentLocation. */ + class BatchContentLocation implements IBatchContentLocation { + + /** + * Constructs a new BatchContentLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IBatchContentLocation); + + /** BatchContentLocation itemIndex. */ + public itemIndex: number; + + /** + * Creates a new BatchContentLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns BatchContentLocation instance + */ + public static create(properties?: google.privacy.dlp.v2.IBatchContentLocation): google.privacy.dlp.v2.BatchContentLocation; + + /** + * Encodes the specified BatchContentLocation message. Does not implicitly {@link google.privacy.dlp.v2.BatchContentLocation.verify|verify} messages. + * @param message BatchContentLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IBatchContentLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BatchContentLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BatchContentLocation.verify|verify} messages. + * @param message BatchContentLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IBatchContentLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BatchContentLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BatchContentLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.BatchContentLocation; + + /** + * Decodes a BatchContentLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BatchContentLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.BatchContentLocation; + + /** + * Verifies a BatchContentLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BatchContentLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BatchContentLocation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.BatchContentLocation; + + /** + * Creates a plain object from a BatchContentLocation message. Also converts values to other types if specified. + * @param message BatchContentLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.BatchContentLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BatchContentLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BatchContentLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MetadataLocation. */ + interface IMetadataLocation { + + /** MetadataLocation type */ + type?: (google.privacy.dlp.v2.MetadataType|keyof typeof google.privacy.dlp.v2.MetadataType|null); + + /** MetadataLocation storageLabel */ + storageLabel?: (google.privacy.dlp.v2.IStorageMetadataLabel|null); + + /** MetadataLocation keyValueMetadataLabel */ + keyValueMetadataLabel?: (google.privacy.dlp.v2.IKeyValueMetadataLabel|null); + } + + /** Represents a MetadataLocation. */ + class MetadataLocation implements IMetadataLocation { + + /** + * Constructs a new MetadataLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IMetadataLocation); + + /** MetadataLocation type. */ + public type: (google.privacy.dlp.v2.MetadataType|keyof typeof google.privacy.dlp.v2.MetadataType); + + /** MetadataLocation storageLabel. */ + public storageLabel?: (google.privacy.dlp.v2.IStorageMetadataLabel|null); + + /** MetadataLocation keyValueMetadataLabel. */ + public keyValueMetadataLabel?: (google.privacy.dlp.v2.IKeyValueMetadataLabel|null); + + /** MetadataLocation label. */ + public label?: ("storageLabel"|"keyValueMetadataLabel"); + + /** + * Creates a new MetadataLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns MetadataLocation instance + */ + public static create(properties?: google.privacy.dlp.v2.IMetadataLocation): google.privacy.dlp.v2.MetadataLocation; + + /** + * Encodes the specified MetadataLocation message. Does not implicitly {@link google.privacy.dlp.v2.MetadataLocation.verify|verify} messages. + * @param message MetadataLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IMetadataLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetadataLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.MetadataLocation.verify|verify} messages. + * @param message MetadataLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IMetadataLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetadataLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetadataLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.MetadataLocation; + + /** + * Decodes a MetadataLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetadataLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.MetadataLocation; + + /** + * Verifies a MetadataLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetadataLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetadataLocation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.MetadataLocation; + + /** + * Creates a plain object from a MetadataLocation message. Also converts values to other types if specified. + * @param message MetadataLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.MetadataLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetadataLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetadataLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StorageMetadataLabel. */ + interface IStorageMetadataLabel { + + /** StorageMetadataLabel key */ + key?: (string|null); + } + + /** Represents a StorageMetadataLabel. */ + class StorageMetadataLabel implements IStorageMetadataLabel { + + /** + * Constructs a new StorageMetadataLabel. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IStorageMetadataLabel); + + /** StorageMetadataLabel key. */ + public key: string; + + /** + * Creates a new StorageMetadataLabel instance using the specified properties. + * @param [properties] Properties to set + * @returns StorageMetadataLabel instance + */ + public static create(properties?: google.privacy.dlp.v2.IStorageMetadataLabel): google.privacy.dlp.v2.StorageMetadataLabel; + + /** + * Encodes the specified StorageMetadataLabel message. Does not implicitly {@link google.privacy.dlp.v2.StorageMetadataLabel.verify|verify} messages. + * @param message StorageMetadataLabel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IStorageMetadataLabel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StorageMetadataLabel message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StorageMetadataLabel.verify|verify} messages. + * @param message StorageMetadataLabel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IStorageMetadataLabel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StorageMetadataLabel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StorageMetadataLabel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.StorageMetadataLabel; + + /** + * Decodes a StorageMetadataLabel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StorageMetadataLabel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.StorageMetadataLabel; + + /** + * Verifies a StorageMetadataLabel message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StorageMetadataLabel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StorageMetadataLabel + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.StorageMetadataLabel; + + /** + * Creates a plain object from a StorageMetadataLabel message. Also converts values to other types if specified. + * @param message StorageMetadataLabel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.StorageMetadataLabel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StorageMetadataLabel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StorageMetadataLabel + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a KeyValueMetadataLabel. */ + interface IKeyValueMetadataLabel { + + /** KeyValueMetadataLabel key */ + key?: (string|null); + } + + /** Represents a KeyValueMetadataLabel. */ + class KeyValueMetadataLabel implements IKeyValueMetadataLabel { + + /** + * Constructs a new KeyValueMetadataLabel. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IKeyValueMetadataLabel); + + /** KeyValueMetadataLabel key. */ + public key: string; + + /** + * Creates a new KeyValueMetadataLabel instance using the specified properties. + * @param [properties] Properties to set + * @returns KeyValueMetadataLabel instance + */ + public static create(properties?: google.privacy.dlp.v2.IKeyValueMetadataLabel): google.privacy.dlp.v2.KeyValueMetadataLabel; + + /** + * Encodes the specified KeyValueMetadataLabel message. Does not implicitly {@link google.privacy.dlp.v2.KeyValueMetadataLabel.verify|verify} messages. + * @param message KeyValueMetadataLabel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IKeyValueMetadataLabel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KeyValueMetadataLabel message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.KeyValueMetadataLabel.verify|verify} messages. + * @param message KeyValueMetadataLabel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IKeyValueMetadataLabel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KeyValueMetadataLabel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KeyValueMetadataLabel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.KeyValueMetadataLabel; + + /** + * Decodes a KeyValueMetadataLabel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KeyValueMetadataLabel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.KeyValueMetadataLabel; + + /** + * Verifies a KeyValueMetadataLabel message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KeyValueMetadataLabel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KeyValueMetadataLabel + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.KeyValueMetadataLabel; + + /** + * Creates a plain object from a KeyValueMetadataLabel message. Also converts values to other types if specified. + * @param message KeyValueMetadataLabel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.KeyValueMetadataLabel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KeyValueMetadataLabel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KeyValueMetadataLabel + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DocumentLocation. */ + interface IDocumentLocation { + + /** DocumentLocation fileOffset */ + fileOffset?: (number|Long|string|null); + } + + /** Represents a DocumentLocation. */ + class DocumentLocation implements IDocumentLocation { + + /** + * Constructs a new DocumentLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDocumentLocation); + + /** DocumentLocation fileOffset. */ + public fileOffset: (number|Long|string); + + /** + * Creates a new DocumentLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns DocumentLocation instance + */ + public static create(properties?: google.privacy.dlp.v2.IDocumentLocation): google.privacy.dlp.v2.DocumentLocation; + + /** + * Encodes the specified DocumentLocation message. Does not implicitly {@link google.privacy.dlp.v2.DocumentLocation.verify|verify} messages. + * @param message DocumentLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDocumentLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DocumentLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DocumentLocation.verify|verify} messages. + * @param message DocumentLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDocumentLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DocumentLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DocumentLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DocumentLocation; + + /** + * Decodes a DocumentLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DocumentLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DocumentLocation; + + /** + * Verifies a DocumentLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DocumentLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DocumentLocation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DocumentLocation; + + /** + * Creates a plain object from a DocumentLocation message. Also converts values to other types if specified. + * @param message DocumentLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DocumentLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DocumentLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DocumentLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RecordLocation. */ + interface IRecordLocation { + + /** RecordLocation recordKey */ + recordKey?: (google.privacy.dlp.v2.IRecordKey|null); + + /** RecordLocation fieldId */ + fieldId?: (google.privacy.dlp.v2.IFieldId|null); + + /** RecordLocation tableLocation */ + tableLocation?: (google.privacy.dlp.v2.ITableLocation|null); + } + + /** Represents a RecordLocation. */ + class RecordLocation implements IRecordLocation { + + /** + * Constructs a new RecordLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IRecordLocation); + + /** RecordLocation recordKey. */ + public recordKey?: (google.privacy.dlp.v2.IRecordKey|null); + + /** RecordLocation fieldId. */ + public fieldId?: (google.privacy.dlp.v2.IFieldId|null); + + /** RecordLocation tableLocation. */ + public tableLocation?: (google.privacy.dlp.v2.ITableLocation|null); + + /** + * Creates a new RecordLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns RecordLocation instance + */ + public static create(properties?: google.privacy.dlp.v2.IRecordLocation): google.privacy.dlp.v2.RecordLocation; + + /** + * Encodes the specified RecordLocation message. Does not implicitly {@link google.privacy.dlp.v2.RecordLocation.verify|verify} messages. + * @param message RecordLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IRecordLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecordLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordLocation.verify|verify} messages. + * @param message RecordLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IRecordLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecordLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecordLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RecordLocation; + + /** + * Decodes a RecordLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecordLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RecordLocation; + + /** + * Verifies a RecordLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RecordLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecordLocation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RecordLocation; + + /** + * Creates a plain object from a RecordLocation message. Also converts values to other types if specified. + * @param message RecordLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.RecordLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecordLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RecordLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TableLocation. */ + interface ITableLocation { + + /** TableLocation rowIndex */ + rowIndex?: (number|Long|string|null); + } + + /** Represents a TableLocation. */ + class TableLocation implements ITableLocation { + + /** + * Constructs a new TableLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ITableLocation); + + /** TableLocation rowIndex. */ + public rowIndex: (number|Long|string); + + /** + * Creates a new TableLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns TableLocation instance + */ + public static create(properties?: google.privacy.dlp.v2.ITableLocation): google.privacy.dlp.v2.TableLocation; + + /** + * Encodes the specified TableLocation message. Does not implicitly {@link google.privacy.dlp.v2.TableLocation.verify|verify} messages. + * @param message TableLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ITableLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TableLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TableLocation.verify|verify} messages. + * @param message TableLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ITableLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TableLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TableLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TableLocation; + + /** + * Decodes a TableLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TableLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TableLocation; + + /** + * Verifies a TableLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TableLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TableLocation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TableLocation; + + /** + * Creates a plain object from a TableLocation message. Also converts values to other types if specified. + * @param message TableLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.TableLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TableLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TableLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Container. */ + interface IContainer { + + /** Container type */ + type?: (string|null); + + /** Container projectId */ + projectId?: (string|null); + + /** Container fullPath */ + fullPath?: (string|null); + + /** Container rootPath */ + rootPath?: (string|null); + + /** Container relativePath */ + relativePath?: (string|null); + + /** Container updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Container version */ + version?: (string|null); + } + + /** Represents a Container. */ + class Container implements IContainer { + + /** + * Constructs a new Container. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IContainer); + + /** Container type. */ + public type: string; + + /** Container projectId. */ + public projectId: string; + + /** Container fullPath. */ + public fullPath: string; + + /** Container rootPath. */ + public rootPath: string; + + /** Container relativePath. */ + public relativePath: string; + + /** Container updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Container version. */ + public version: string; + + /** + * Creates a new Container instance using the specified properties. + * @param [properties] Properties to set + * @returns Container instance + */ + public static create(properties?: google.privacy.dlp.v2.IContainer): google.privacy.dlp.v2.Container; + + /** + * Encodes the specified Container message. Does not implicitly {@link google.privacy.dlp.v2.Container.verify|verify} messages. + * @param message Container message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IContainer, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Container message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Container.verify|verify} messages. + * @param message Container message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IContainer, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Container message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Container + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Container; + + /** + * Decodes a Container message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Container + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Container; + + /** + * Verifies a Container message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Container message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Container + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Container; + + /** + * Creates a plain object from a Container message. Also converts values to other types if specified. + * @param message Container + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Container, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Container to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Container + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Range. */ + interface IRange { + + /** Range start */ + start?: (number|Long|string|null); + + /** Range end */ + end?: (number|Long|string|null); + } + + /** Represents a Range. */ + class Range implements IRange { + + /** + * Constructs a new Range. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IRange); + + /** Range start. */ + public start: (number|Long|string); + + /** Range end. */ + public end: (number|Long|string); + + /** + * Creates a new Range instance using the specified properties. + * @param [properties] Properties to set + * @returns Range instance + */ + public static create(properties?: google.privacy.dlp.v2.IRange): google.privacy.dlp.v2.Range; + + /** + * Encodes the specified Range message. Does not implicitly {@link google.privacy.dlp.v2.Range.verify|verify} messages. + * @param message Range message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Range.verify|verify} messages. + * @param message Range message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Range message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Range; + + /** + * Decodes a Range message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Range; + + /** + * Verifies a Range message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Range message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Range + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Range; + + /** + * Creates a plain object from a Range message. Also converts values to other types if specified. + * @param message Range + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Range, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Range to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Range + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImageLocation. */ + interface IImageLocation { + + /** ImageLocation boundingBoxes */ + boundingBoxes?: (google.privacy.dlp.v2.IBoundingBox[]|null); + } + + /** Represents an ImageLocation. */ + class ImageLocation implements IImageLocation { + + /** + * Constructs a new ImageLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IImageLocation); + + /** ImageLocation boundingBoxes. */ + public boundingBoxes: google.privacy.dlp.v2.IBoundingBox[]; + + /** + * Creates a new ImageLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns ImageLocation instance + */ + public static create(properties?: google.privacy.dlp.v2.IImageLocation): google.privacy.dlp.v2.ImageLocation; + + /** + * Encodes the specified ImageLocation message. Does not implicitly {@link google.privacy.dlp.v2.ImageLocation.verify|verify} messages. + * @param message ImageLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IImageLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImageLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ImageLocation.verify|verify} messages. + * @param message ImageLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IImageLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImageLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImageLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ImageLocation; + + /** + * Decodes an ImageLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImageLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ImageLocation; + + /** + * Verifies an ImageLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImageLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImageLocation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ImageLocation; + + /** + * Creates a plain object from an ImageLocation message. Also converts values to other types if specified. + * @param message ImageLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ImageLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImageLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImageLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BoundingBox. */ + interface IBoundingBox { + + /** BoundingBox top */ + top?: (number|null); + + /** BoundingBox left */ + left?: (number|null); + + /** BoundingBox width */ + width?: (number|null); + + /** BoundingBox height */ + height?: (number|null); + } + + /** Represents a BoundingBox. */ + class BoundingBox implements IBoundingBox { + + /** + * Constructs a new BoundingBox. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IBoundingBox); + + /** BoundingBox top. */ + public top: number; + + /** BoundingBox left. */ + public left: number; + + /** BoundingBox width. */ + public width: number; + + /** BoundingBox height. */ + public height: number; + + /** + * Creates a new BoundingBox instance using the specified properties. + * @param [properties] Properties to set + * @returns BoundingBox instance + */ + public static create(properties?: google.privacy.dlp.v2.IBoundingBox): google.privacy.dlp.v2.BoundingBox; + + /** + * Encodes the specified BoundingBox message. Does not implicitly {@link google.privacy.dlp.v2.BoundingBox.verify|verify} messages. + * @param message BoundingBox message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IBoundingBox, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BoundingBox message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BoundingBox.verify|verify} messages. + * @param message BoundingBox message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IBoundingBox, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BoundingBox message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BoundingBox + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.BoundingBox; + + /** + * Decodes a BoundingBox message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BoundingBox + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.BoundingBox; + + /** + * Verifies a BoundingBox message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BoundingBox message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BoundingBox + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.BoundingBox; + + /** + * Creates a plain object from a BoundingBox message. Also converts values to other types if specified. + * @param message BoundingBox + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.BoundingBox, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BoundingBox to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BoundingBox + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RedactImageRequest. */ + interface IRedactImageRequest { + + /** RedactImageRequest parent */ + parent?: (string|null); + + /** RedactImageRequest locationId */ + locationId?: (string|null); + + /** RedactImageRequest inspectConfig */ + inspectConfig?: (google.privacy.dlp.v2.IInspectConfig|null); + + /** RedactImageRequest imageRedactionConfigs */ + imageRedactionConfigs?: (google.privacy.dlp.v2.RedactImageRequest.IImageRedactionConfig[]|null); + + /** RedactImageRequest includeFindings */ + includeFindings?: (boolean|null); + + /** RedactImageRequest byteItem */ + byteItem?: (google.privacy.dlp.v2.IByteContentItem|null); + + /** RedactImageRequest inspectTemplate */ + inspectTemplate?: (string|null); + + /** RedactImageRequest deidentifyTemplate */ + deidentifyTemplate?: (string|null); + } + + /** Represents a RedactImageRequest. */ + class RedactImageRequest implements IRedactImageRequest { + + /** + * Constructs a new RedactImageRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IRedactImageRequest); + + /** RedactImageRequest parent. */ + public parent: string; + + /** RedactImageRequest locationId. */ + public locationId: string; + + /** RedactImageRequest inspectConfig. */ + public inspectConfig?: (google.privacy.dlp.v2.IInspectConfig|null); + + /** RedactImageRequest imageRedactionConfigs. */ + public imageRedactionConfigs: google.privacy.dlp.v2.RedactImageRequest.IImageRedactionConfig[]; + + /** RedactImageRequest includeFindings. */ + public includeFindings: boolean; + + /** RedactImageRequest byteItem. */ + public byteItem?: (google.privacy.dlp.v2.IByteContentItem|null); + + /** RedactImageRequest inspectTemplate. */ + public inspectTemplate: string; + + /** RedactImageRequest deidentifyTemplate. */ + public deidentifyTemplate: string; + + /** + * Creates a new RedactImageRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RedactImageRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IRedactImageRequest): google.privacy.dlp.v2.RedactImageRequest; + + /** + * Encodes the specified RedactImageRequest message. Does not implicitly {@link google.privacy.dlp.v2.RedactImageRequest.verify|verify} messages. + * @param message RedactImageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IRedactImageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RedactImageRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RedactImageRequest.verify|verify} messages. + * @param message RedactImageRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IRedactImageRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RedactImageRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RedactImageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RedactImageRequest; + + /** + * Decodes a RedactImageRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RedactImageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RedactImageRequest; + + /** + * Verifies a RedactImageRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RedactImageRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RedactImageRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RedactImageRequest; + + /** + * Creates a plain object from a RedactImageRequest message. Also converts values to other types if specified. + * @param message RedactImageRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.RedactImageRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RedactImageRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RedactImageRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RedactImageRequest { + + /** Properties of an ImageRedactionConfig. */ + interface IImageRedactionConfig { + + /** ImageRedactionConfig infoType */ + infoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** ImageRedactionConfig redactAllText */ + redactAllText?: (boolean|null); + + /** ImageRedactionConfig redactionColor */ + redactionColor?: (google.privacy.dlp.v2.IColor|null); + } + + /** Represents an ImageRedactionConfig. */ + class ImageRedactionConfig implements IImageRedactionConfig { + + /** + * Constructs a new ImageRedactionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.RedactImageRequest.IImageRedactionConfig); + + /** ImageRedactionConfig infoType. */ + public infoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** ImageRedactionConfig redactAllText. */ + public redactAllText?: (boolean|null); + + /** ImageRedactionConfig redactionColor. */ + public redactionColor?: (google.privacy.dlp.v2.IColor|null); + + /** ImageRedactionConfig target. */ + public target?: ("infoType"|"redactAllText"); + + /** + * Creates a new ImageRedactionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ImageRedactionConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.RedactImageRequest.IImageRedactionConfig): google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig; + + /** + * Encodes the specified ImageRedactionConfig message. Does not implicitly {@link google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.verify|verify} messages. + * @param message ImageRedactionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.RedactImageRequest.IImageRedactionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImageRedactionConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.verify|verify} messages. + * @param message ImageRedactionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.RedactImageRequest.IImageRedactionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImageRedactionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImageRedactionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig; + + /** + * Decodes an ImageRedactionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImageRedactionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig; + + /** + * Verifies an ImageRedactionConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImageRedactionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImageRedactionConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig; + + /** + * Creates a plain object from an ImageRedactionConfig message. Also converts values to other types if specified. + * @param message ImageRedactionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImageRedactionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImageRedactionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Color. */ + interface IColor { + + /** Color red */ + red?: (number|null); + + /** Color green */ + green?: (number|null); + + /** Color blue */ + blue?: (number|null); + } + + /** Represents a Color. */ + class Color implements IColor { + + /** + * Constructs a new Color. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IColor); + + /** Color red. */ + public red: number; + + /** Color green. */ + public green: number; + + /** Color blue. */ + public blue: number; + + /** + * Creates a new Color instance using the specified properties. + * @param [properties] Properties to set + * @returns Color instance + */ + public static create(properties?: google.privacy.dlp.v2.IColor): google.privacy.dlp.v2.Color; + + /** + * Encodes the specified Color message. Does not implicitly {@link google.privacy.dlp.v2.Color.verify|verify} messages. + * @param message Color message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IColor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Color message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Color.verify|verify} messages. + * @param message Color message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IColor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Color message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Color + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Color; + + /** + * Decodes a Color message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Color + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Color; + + /** + * Verifies a Color message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Color message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Color + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Color; + + /** + * Creates a plain object from a Color message. Also converts values to other types if specified. + * @param message Color + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Color, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Color to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Color + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RedactImageResponse. */ + interface IRedactImageResponse { + + /** RedactImageResponse redactedImage */ + redactedImage?: (Uint8Array|Buffer|string|null); + + /** RedactImageResponse extractedText */ + extractedText?: (string|null); + + /** RedactImageResponse inspectResult */ + inspectResult?: (google.privacy.dlp.v2.IInspectResult|null); + } + + /** Represents a RedactImageResponse. */ + class RedactImageResponse implements IRedactImageResponse { + + /** + * Constructs a new RedactImageResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IRedactImageResponse); + + /** RedactImageResponse redactedImage. */ + public redactedImage: (Uint8Array|Buffer|string); + + /** RedactImageResponse extractedText. */ + public extractedText: string; + + /** RedactImageResponse inspectResult. */ + public inspectResult?: (google.privacy.dlp.v2.IInspectResult|null); + + /** + * Creates a new RedactImageResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns RedactImageResponse instance + */ + public static create(properties?: google.privacy.dlp.v2.IRedactImageResponse): google.privacy.dlp.v2.RedactImageResponse; + + /** + * Encodes the specified RedactImageResponse message. Does not implicitly {@link google.privacy.dlp.v2.RedactImageResponse.verify|verify} messages. + * @param message RedactImageResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IRedactImageResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RedactImageResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RedactImageResponse.verify|verify} messages. + * @param message RedactImageResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IRedactImageResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RedactImageResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RedactImageResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RedactImageResponse; + + /** + * Decodes a RedactImageResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RedactImageResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RedactImageResponse; + + /** + * Verifies a RedactImageResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RedactImageResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RedactImageResponse + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RedactImageResponse; + + /** + * Creates a plain object from a RedactImageResponse message. Also converts values to other types if specified. + * @param message RedactImageResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.RedactImageResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RedactImageResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RedactImageResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeidentifyContentRequest. */ + interface IDeidentifyContentRequest { + + /** DeidentifyContentRequest parent */ + parent?: (string|null); + + /** DeidentifyContentRequest deidentifyConfig */ + deidentifyConfig?: (google.privacy.dlp.v2.IDeidentifyConfig|null); + + /** DeidentifyContentRequest inspectConfig */ + inspectConfig?: (google.privacy.dlp.v2.IInspectConfig|null); + + /** DeidentifyContentRequest item */ + item?: (google.privacy.dlp.v2.IContentItem|null); + + /** DeidentifyContentRequest inspectTemplateName */ + inspectTemplateName?: (string|null); + + /** DeidentifyContentRequest deidentifyTemplateName */ + deidentifyTemplateName?: (string|null); + + /** DeidentifyContentRequest locationId */ + locationId?: (string|null); + } + + /** Represents a DeidentifyContentRequest. */ + class DeidentifyContentRequest implements IDeidentifyContentRequest { + + /** + * Constructs a new DeidentifyContentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDeidentifyContentRequest); + + /** DeidentifyContentRequest parent. */ + public parent: string; + + /** DeidentifyContentRequest deidentifyConfig. */ + public deidentifyConfig?: (google.privacy.dlp.v2.IDeidentifyConfig|null); + + /** DeidentifyContentRequest inspectConfig. */ + public inspectConfig?: (google.privacy.dlp.v2.IInspectConfig|null); + + /** DeidentifyContentRequest item. */ + public item?: (google.privacy.dlp.v2.IContentItem|null); + + /** DeidentifyContentRequest inspectTemplateName. */ + public inspectTemplateName: string; + + /** DeidentifyContentRequest deidentifyTemplateName. */ + public deidentifyTemplateName: string; + + /** DeidentifyContentRequest locationId. */ + public locationId: string; + + /** + * Creates a new DeidentifyContentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeidentifyContentRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IDeidentifyContentRequest): google.privacy.dlp.v2.DeidentifyContentRequest; + + /** + * Encodes the specified DeidentifyContentRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyContentRequest.verify|verify} messages. + * @param message DeidentifyContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDeidentifyContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeidentifyContentRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyContentRequest.verify|verify} messages. + * @param message DeidentifyContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDeidentifyContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeidentifyContentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeidentifyContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DeidentifyContentRequest; + + /** + * Decodes a DeidentifyContentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeidentifyContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DeidentifyContentRequest; + + /** + * Verifies a DeidentifyContentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeidentifyContentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeidentifyContentRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DeidentifyContentRequest; + + /** + * Creates a plain object from a DeidentifyContentRequest message. Also converts values to other types if specified. + * @param message DeidentifyContentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DeidentifyContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeidentifyContentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeidentifyContentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeidentifyContentResponse. */ + interface IDeidentifyContentResponse { + + /** DeidentifyContentResponse item */ + item?: (google.privacy.dlp.v2.IContentItem|null); + + /** DeidentifyContentResponse overview */ + overview?: (google.privacy.dlp.v2.ITransformationOverview|null); + } + + /** Represents a DeidentifyContentResponse. */ + class DeidentifyContentResponse implements IDeidentifyContentResponse { + + /** + * Constructs a new DeidentifyContentResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDeidentifyContentResponse); + + /** DeidentifyContentResponse item. */ + public item?: (google.privacy.dlp.v2.IContentItem|null); + + /** DeidentifyContentResponse overview. */ + public overview?: (google.privacy.dlp.v2.ITransformationOverview|null); + + /** + * Creates a new DeidentifyContentResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns DeidentifyContentResponse instance + */ + public static create(properties?: google.privacy.dlp.v2.IDeidentifyContentResponse): google.privacy.dlp.v2.DeidentifyContentResponse; + + /** + * Encodes the specified DeidentifyContentResponse message. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyContentResponse.verify|verify} messages. + * @param message DeidentifyContentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDeidentifyContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeidentifyContentResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyContentResponse.verify|verify} messages. + * @param message DeidentifyContentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDeidentifyContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeidentifyContentResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeidentifyContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DeidentifyContentResponse; + + /** + * Decodes a DeidentifyContentResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeidentifyContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DeidentifyContentResponse; + + /** + * Verifies a DeidentifyContentResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeidentifyContentResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeidentifyContentResponse + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DeidentifyContentResponse; + + /** + * Creates a plain object from a DeidentifyContentResponse message. Also converts values to other types if specified. + * @param message DeidentifyContentResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DeidentifyContentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeidentifyContentResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeidentifyContentResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReidentifyContentRequest. */ + interface IReidentifyContentRequest { + + /** ReidentifyContentRequest parent */ + parent?: (string|null); + + /** ReidentifyContentRequest reidentifyConfig */ + reidentifyConfig?: (google.privacy.dlp.v2.IDeidentifyConfig|null); + + /** ReidentifyContentRequest inspectConfig */ + inspectConfig?: (google.privacy.dlp.v2.IInspectConfig|null); + + /** ReidentifyContentRequest item */ + item?: (google.privacy.dlp.v2.IContentItem|null); + + /** ReidentifyContentRequest inspectTemplateName */ + inspectTemplateName?: (string|null); + + /** ReidentifyContentRequest reidentifyTemplateName */ + reidentifyTemplateName?: (string|null); + + /** ReidentifyContentRequest locationId */ + locationId?: (string|null); + } + + /** Represents a ReidentifyContentRequest. */ + class ReidentifyContentRequest implements IReidentifyContentRequest { + + /** + * Constructs a new ReidentifyContentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IReidentifyContentRequest); + + /** ReidentifyContentRequest parent. */ + public parent: string; + + /** ReidentifyContentRequest reidentifyConfig. */ + public reidentifyConfig?: (google.privacy.dlp.v2.IDeidentifyConfig|null); + + /** ReidentifyContentRequest inspectConfig. */ + public inspectConfig?: (google.privacy.dlp.v2.IInspectConfig|null); + + /** ReidentifyContentRequest item. */ + public item?: (google.privacy.dlp.v2.IContentItem|null); + + /** ReidentifyContentRequest inspectTemplateName. */ + public inspectTemplateName: string; + + /** ReidentifyContentRequest reidentifyTemplateName. */ + public reidentifyTemplateName: string; + + /** ReidentifyContentRequest locationId. */ + public locationId: string; + + /** + * Creates a new ReidentifyContentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ReidentifyContentRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IReidentifyContentRequest): google.privacy.dlp.v2.ReidentifyContentRequest; + + /** + * Encodes the specified ReidentifyContentRequest message. Does not implicitly {@link google.privacy.dlp.v2.ReidentifyContentRequest.verify|verify} messages. + * @param message ReidentifyContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IReidentifyContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReidentifyContentRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ReidentifyContentRequest.verify|verify} messages. + * @param message ReidentifyContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IReidentifyContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReidentifyContentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReidentifyContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ReidentifyContentRequest; + + /** + * Decodes a ReidentifyContentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReidentifyContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ReidentifyContentRequest; + + /** + * Verifies a ReidentifyContentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReidentifyContentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReidentifyContentRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ReidentifyContentRequest; + + /** + * Creates a plain object from a ReidentifyContentRequest message. Also converts values to other types if specified. + * @param message ReidentifyContentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ReidentifyContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReidentifyContentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReidentifyContentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReidentifyContentResponse. */ + interface IReidentifyContentResponse { + + /** ReidentifyContentResponse item */ + item?: (google.privacy.dlp.v2.IContentItem|null); + + /** ReidentifyContentResponse overview */ + overview?: (google.privacy.dlp.v2.ITransformationOverview|null); + } + + /** Represents a ReidentifyContentResponse. */ + class ReidentifyContentResponse implements IReidentifyContentResponse { + + /** + * Constructs a new ReidentifyContentResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IReidentifyContentResponse); + + /** ReidentifyContentResponse item. */ + public item?: (google.privacy.dlp.v2.IContentItem|null); + + /** ReidentifyContentResponse overview. */ + public overview?: (google.privacy.dlp.v2.ITransformationOverview|null); + + /** + * Creates a new ReidentifyContentResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ReidentifyContentResponse instance + */ + public static create(properties?: google.privacy.dlp.v2.IReidentifyContentResponse): google.privacy.dlp.v2.ReidentifyContentResponse; + + /** + * Encodes the specified ReidentifyContentResponse message. Does not implicitly {@link google.privacy.dlp.v2.ReidentifyContentResponse.verify|verify} messages. + * @param message ReidentifyContentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IReidentifyContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReidentifyContentResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ReidentifyContentResponse.verify|verify} messages. + * @param message ReidentifyContentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IReidentifyContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReidentifyContentResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReidentifyContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ReidentifyContentResponse; + + /** + * Decodes a ReidentifyContentResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReidentifyContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ReidentifyContentResponse; + + /** + * Verifies a ReidentifyContentResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReidentifyContentResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReidentifyContentResponse + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ReidentifyContentResponse; + + /** + * Creates a plain object from a ReidentifyContentResponse message. Also converts values to other types if specified. + * @param message ReidentifyContentResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ReidentifyContentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReidentifyContentResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReidentifyContentResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InspectContentRequest. */ + interface IInspectContentRequest { + + /** InspectContentRequest parent */ + parent?: (string|null); + + /** InspectContentRequest inspectConfig */ + inspectConfig?: (google.privacy.dlp.v2.IInspectConfig|null); + + /** InspectContentRequest item */ + item?: (google.privacy.dlp.v2.IContentItem|null); + + /** InspectContentRequest inspectTemplateName */ + inspectTemplateName?: (string|null); + + /** InspectContentRequest locationId */ + locationId?: (string|null); + } + + /** Represents an InspectContentRequest. */ + class InspectContentRequest implements IInspectContentRequest { + + /** + * Constructs a new InspectContentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IInspectContentRequest); + + /** InspectContentRequest parent. */ + public parent: string; + + /** InspectContentRequest inspectConfig. */ + public inspectConfig?: (google.privacy.dlp.v2.IInspectConfig|null); + + /** InspectContentRequest item. */ + public item?: (google.privacy.dlp.v2.IContentItem|null); + + /** InspectContentRequest inspectTemplateName. */ + public inspectTemplateName: string; + + /** InspectContentRequest locationId. */ + public locationId: string; + + /** + * Creates a new InspectContentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns InspectContentRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IInspectContentRequest): google.privacy.dlp.v2.InspectContentRequest; + + /** + * Encodes the specified InspectContentRequest message. Does not implicitly {@link google.privacy.dlp.v2.InspectContentRequest.verify|verify} messages. + * @param message InspectContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IInspectContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InspectContentRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectContentRequest.verify|verify} messages. + * @param message InspectContentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IInspectContentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InspectContentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InspectContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.InspectContentRequest; + + /** + * Decodes an InspectContentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InspectContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.InspectContentRequest; + + /** + * Verifies an InspectContentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InspectContentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InspectContentRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.InspectContentRequest; + + /** + * Creates a plain object from an InspectContentRequest message. Also converts values to other types if specified. + * @param message InspectContentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.InspectContentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InspectContentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InspectContentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InspectContentResponse. */ + interface IInspectContentResponse { + + /** InspectContentResponse result */ + result?: (google.privacy.dlp.v2.IInspectResult|null); + } + + /** Represents an InspectContentResponse. */ + class InspectContentResponse implements IInspectContentResponse { + + /** + * Constructs a new InspectContentResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IInspectContentResponse); + + /** InspectContentResponse result. */ + public result?: (google.privacy.dlp.v2.IInspectResult|null); + + /** + * Creates a new InspectContentResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns InspectContentResponse instance + */ + public static create(properties?: google.privacy.dlp.v2.IInspectContentResponse): google.privacy.dlp.v2.InspectContentResponse; + + /** + * Encodes the specified InspectContentResponse message. Does not implicitly {@link google.privacy.dlp.v2.InspectContentResponse.verify|verify} messages. + * @param message InspectContentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IInspectContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InspectContentResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectContentResponse.verify|verify} messages. + * @param message InspectContentResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IInspectContentResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InspectContentResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InspectContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.InspectContentResponse; + + /** + * Decodes an InspectContentResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InspectContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.InspectContentResponse; + + /** + * Verifies an InspectContentResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InspectContentResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InspectContentResponse + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.InspectContentResponse; + + /** + * Creates a plain object from an InspectContentResponse message. Also converts values to other types if specified. + * @param message InspectContentResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.InspectContentResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InspectContentResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InspectContentResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OutputStorageConfig. */ + interface IOutputStorageConfig { + + /** OutputStorageConfig table */ + table?: (google.privacy.dlp.v2.IBigQueryTable|null); + + /** OutputStorageConfig storagePath */ + storagePath?: (google.privacy.dlp.v2.ICloudStoragePath|null); + + /** OutputStorageConfig outputSchema */ + outputSchema?: (google.privacy.dlp.v2.OutputStorageConfig.OutputSchema|keyof typeof google.privacy.dlp.v2.OutputStorageConfig.OutputSchema|null); + } + + /** Represents an OutputStorageConfig. */ + class OutputStorageConfig implements IOutputStorageConfig { + + /** + * Constructs a new OutputStorageConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IOutputStorageConfig); + + /** OutputStorageConfig table. */ + public table?: (google.privacy.dlp.v2.IBigQueryTable|null); + + /** OutputStorageConfig storagePath. */ + public storagePath?: (google.privacy.dlp.v2.ICloudStoragePath|null); + + /** OutputStorageConfig outputSchema. */ + public outputSchema: (google.privacy.dlp.v2.OutputStorageConfig.OutputSchema|keyof typeof google.privacy.dlp.v2.OutputStorageConfig.OutputSchema); + + /** OutputStorageConfig type. */ + public type?: ("table"|"storagePath"); + + /** + * Creates a new OutputStorageConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns OutputStorageConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.IOutputStorageConfig): google.privacy.dlp.v2.OutputStorageConfig; + + /** + * Encodes the specified OutputStorageConfig message. Does not implicitly {@link google.privacy.dlp.v2.OutputStorageConfig.verify|verify} messages. + * @param message OutputStorageConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IOutputStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OutputStorageConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OutputStorageConfig.verify|verify} messages. + * @param message OutputStorageConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IOutputStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OutputStorageConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OutputStorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.OutputStorageConfig; + + /** + * Decodes an OutputStorageConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OutputStorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.OutputStorageConfig; + + /** + * Verifies an OutputStorageConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OutputStorageConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OutputStorageConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.OutputStorageConfig; + + /** + * Creates a plain object from an OutputStorageConfig message. Also converts values to other types if specified. + * @param message OutputStorageConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.OutputStorageConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OutputStorageConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OutputStorageConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace OutputStorageConfig { + + /** OutputSchema enum. */ + enum OutputSchema { + OUTPUT_SCHEMA_UNSPECIFIED = 0, + BASIC_COLUMNS = 1, + GCS_COLUMNS = 2, + DATASTORE_COLUMNS = 3, + BIG_QUERY_COLUMNS = 4, + ALL_COLUMNS = 5 + } + } + + /** Properties of an InfoTypeStats. */ + interface IInfoTypeStats { + + /** InfoTypeStats infoType */ + infoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** InfoTypeStats count */ + count?: (number|Long|string|null); + } + + /** Represents an InfoTypeStats. */ + class InfoTypeStats implements IInfoTypeStats { + + /** + * Constructs a new InfoTypeStats. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IInfoTypeStats); + + /** InfoTypeStats infoType. */ + public infoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** InfoTypeStats count. */ + public count: (number|Long|string); + + /** + * Creates a new InfoTypeStats instance using the specified properties. + * @param [properties] Properties to set + * @returns InfoTypeStats instance + */ + public static create(properties?: google.privacy.dlp.v2.IInfoTypeStats): google.privacy.dlp.v2.InfoTypeStats; + + /** + * Encodes the specified InfoTypeStats message. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeStats.verify|verify} messages. + * @param message InfoTypeStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IInfoTypeStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InfoTypeStats message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeStats.verify|verify} messages. + * @param message InfoTypeStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IInfoTypeStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InfoTypeStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InfoTypeStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.InfoTypeStats; + + /** + * Decodes an InfoTypeStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InfoTypeStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.InfoTypeStats; + + /** + * Verifies an InfoTypeStats message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InfoTypeStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InfoTypeStats + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.InfoTypeStats; + + /** + * Creates a plain object from an InfoTypeStats message. Also converts values to other types if specified. + * @param message InfoTypeStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.InfoTypeStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InfoTypeStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InfoTypeStats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InspectDataSourceDetails. */ + interface IInspectDataSourceDetails { + + /** InspectDataSourceDetails requestedOptions */ + requestedOptions?: (google.privacy.dlp.v2.InspectDataSourceDetails.IRequestedOptions|null); + + /** InspectDataSourceDetails result */ + result?: (google.privacy.dlp.v2.InspectDataSourceDetails.IResult|null); + } + + /** Represents an InspectDataSourceDetails. */ + class InspectDataSourceDetails implements IInspectDataSourceDetails { + + /** + * Constructs a new InspectDataSourceDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IInspectDataSourceDetails); + + /** InspectDataSourceDetails requestedOptions. */ + public requestedOptions?: (google.privacy.dlp.v2.InspectDataSourceDetails.IRequestedOptions|null); + + /** InspectDataSourceDetails result. */ + public result?: (google.privacy.dlp.v2.InspectDataSourceDetails.IResult|null); + + /** + * Creates a new InspectDataSourceDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns InspectDataSourceDetails instance + */ + public static create(properties?: google.privacy.dlp.v2.IInspectDataSourceDetails): google.privacy.dlp.v2.InspectDataSourceDetails; + + /** + * Encodes the specified InspectDataSourceDetails message. Does not implicitly {@link google.privacy.dlp.v2.InspectDataSourceDetails.verify|verify} messages. + * @param message InspectDataSourceDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IInspectDataSourceDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InspectDataSourceDetails message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectDataSourceDetails.verify|verify} messages. + * @param message InspectDataSourceDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IInspectDataSourceDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InspectDataSourceDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InspectDataSourceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.InspectDataSourceDetails; + + /** + * Decodes an InspectDataSourceDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InspectDataSourceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.InspectDataSourceDetails; + + /** + * Verifies an InspectDataSourceDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InspectDataSourceDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InspectDataSourceDetails + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.InspectDataSourceDetails; + + /** + * Creates a plain object from an InspectDataSourceDetails message. Also converts values to other types if specified. + * @param message InspectDataSourceDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.InspectDataSourceDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InspectDataSourceDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InspectDataSourceDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace InspectDataSourceDetails { + + /** Properties of a RequestedOptions. */ + interface IRequestedOptions { + + /** RequestedOptions snapshotInspectTemplate */ + snapshotInspectTemplate?: (google.privacy.dlp.v2.IInspectTemplate|null); + + /** RequestedOptions jobConfig */ + jobConfig?: (google.privacy.dlp.v2.IInspectJobConfig|null); + } + + /** Represents a RequestedOptions. */ + class RequestedOptions implements IRequestedOptions { + + /** + * Constructs a new RequestedOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.InspectDataSourceDetails.IRequestedOptions); + + /** RequestedOptions snapshotInspectTemplate. */ + public snapshotInspectTemplate?: (google.privacy.dlp.v2.IInspectTemplate|null); + + /** RequestedOptions jobConfig. */ + public jobConfig?: (google.privacy.dlp.v2.IInspectJobConfig|null); + + /** + * Creates a new RequestedOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestedOptions instance + */ + public static create(properties?: google.privacy.dlp.v2.InspectDataSourceDetails.IRequestedOptions): google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions; + + /** + * Encodes the specified RequestedOptions message. Does not implicitly {@link google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.verify|verify} messages. + * @param message RequestedOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.InspectDataSourceDetails.IRequestedOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestedOptions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.verify|verify} messages. + * @param message RequestedOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.InspectDataSourceDetails.IRequestedOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestedOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RequestedOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions; + + /** + * Decodes a RequestedOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RequestedOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions; + + /** + * Verifies a RequestedOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RequestedOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestedOptions + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions; + + /** + * Creates a plain object from a RequestedOptions message. Also converts values to other types if specified. + * @param message RequestedOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestedOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RequestedOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Result. */ + interface IResult { + + /** Result processedBytes */ + processedBytes?: (number|Long|string|null); + + /** Result totalEstimatedBytes */ + totalEstimatedBytes?: (number|Long|string|null); + + /** Result infoTypeStats */ + infoTypeStats?: (google.privacy.dlp.v2.IInfoTypeStats[]|null); + + /** Result numRowsProcessed */ + numRowsProcessed?: (number|Long|string|null); + + /** Result hybridStats */ + hybridStats?: (google.privacy.dlp.v2.IHybridInspectStatistics|null); + } + + /** Represents a Result. */ + class Result implements IResult { + + /** + * Constructs a new Result. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.InspectDataSourceDetails.IResult); + + /** Result processedBytes. */ + public processedBytes: (number|Long|string); + + /** Result totalEstimatedBytes. */ + public totalEstimatedBytes: (number|Long|string); + + /** Result infoTypeStats. */ + public infoTypeStats: google.privacy.dlp.v2.IInfoTypeStats[]; + + /** Result numRowsProcessed. */ + public numRowsProcessed: (number|Long|string); + + /** Result hybridStats. */ + public hybridStats?: (google.privacy.dlp.v2.IHybridInspectStatistics|null); + + /** + * Creates a new Result instance using the specified properties. + * @param [properties] Properties to set + * @returns Result instance + */ + public static create(properties?: google.privacy.dlp.v2.InspectDataSourceDetails.IResult): google.privacy.dlp.v2.InspectDataSourceDetails.Result; + + /** + * Encodes the specified Result message. Does not implicitly {@link google.privacy.dlp.v2.InspectDataSourceDetails.Result.verify|verify} messages. + * @param message Result message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.InspectDataSourceDetails.IResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Result message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectDataSourceDetails.Result.verify|verify} messages. + * @param message Result message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.InspectDataSourceDetails.IResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Result message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Result + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.InspectDataSourceDetails.Result; + + /** + * Decodes a Result message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Result + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.InspectDataSourceDetails.Result; + + /** + * Verifies a Result message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Result message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Result + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.InspectDataSourceDetails.Result; + + /** + * Creates a plain object from a Result message. Also converts values to other types if specified. + * @param message Result + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.InspectDataSourceDetails.Result, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Result to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Result + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DataProfileBigQueryRowSchema. */ + interface IDataProfileBigQueryRowSchema { + + /** DataProfileBigQueryRowSchema tableProfile */ + tableProfile?: (google.privacy.dlp.v2.ITableDataProfile|null); + + /** DataProfileBigQueryRowSchema columnProfile */ + columnProfile?: (google.privacy.dlp.v2.IColumnDataProfile|null); + + /** DataProfileBigQueryRowSchema fileStoreProfile */ + fileStoreProfile?: (google.privacy.dlp.v2.IFileStoreDataProfile|null); + } + + /** Represents a DataProfileBigQueryRowSchema. */ + class DataProfileBigQueryRowSchema implements IDataProfileBigQueryRowSchema { + + /** + * Constructs a new DataProfileBigQueryRowSchema. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDataProfileBigQueryRowSchema); + + /** DataProfileBigQueryRowSchema tableProfile. */ + public tableProfile?: (google.privacy.dlp.v2.ITableDataProfile|null); + + /** DataProfileBigQueryRowSchema columnProfile. */ + public columnProfile?: (google.privacy.dlp.v2.IColumnDataProfile|null); + + /** DataProfileBigQueryRowSchema fileStoreProfile. */ + public fileStoreProfile?: (google.privacy.dlp.v2.IFileStoreDataProfile|null); + + /** DataProfileBigQueryRowSchema dataProfile. */ + public dataProfile?: ("tableProfile"|"columnProfile"|"fileStoreProfile"); + + /** + * Creates a new DataProfileBigQueryRowSchema instance using the specified properties. + * @param [properties] Properties to set + * @returns DataProfileBigQueryRowSchema instance + */ + public static create(properties?: google.privacy.dlp.v2.IDataProfileBigQueryRowSchema): google.privacy.dlp.v2.DataProfileBigQueryRowSchema; + + /** + * Encodes the specified DataProfileBigQueryRowSchema message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileBigQueryRowSchema.verify|verify} messages. + * @param message DataProfileBigQueryRowSchema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDataProfileBigQueryRowSchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataProfileBigQueryRowSchema message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileBigQueryRowSchema.verify|verify} messages. + * @param message DataProfileBigQueryRowSchema message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDataProfileBigQueryRowSchema, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataProfileBigQueryRowSchema message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataProfileBigQueryRowSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DataProfileBigQueryRowSchema; + + /** + * Decodes a DataProfileBigQueryRowSchema message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataProfileBigQueryRowSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DataProfileBigQueryRowSchema; + + /** + * Verifies a DataProfileBigQueryRowSchema message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataProfileBigQueryRowSchema message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataProfileBigQueryRowSchema + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DataProfileBigQueryRowSchema; + + /** + * Creates a plain object from a DataProfileBigQueryRowSchema message. Also converts values to other types if specified. + * @param message DataProfileBigQueryRowSchema + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DataProfileBigQueryRowSchema, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataProfileBigQueryRowSchema to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataProfileBigQueryRowSchema + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HybridInspectStatistics. */ + interface IHybridInspectStatistics { + + /** HybridInspectStatistics processedCount */ + processedCount?: (number|Long|string|null); + + /** HybridInspectStatistics abortedCount */ + abortedCount?: (number|Long|string|null); + + /** HybridInspectStatistics pendingCount */ + pendingCount?: (number|Long|string|null); + } + + /** Represents a HybridInspectStatistics. */ + class HybridInspectStatistics implements IHybridInspectStatistics { + + /** + * Constructs a new HybridInspectStatistics. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IHybridInspectStatistics); + + /** HybridInspectStatistics processedCount. */ + public processedCount: (number|Long|string); + + /** HybridInspectStatistics abortedCount. */ + public abortedCount: (number|Long|string); + + /** HybridInspectStatistics pendingCount. */ + public pendingCount: (number|Long|string); + + /** + * Creates a new HybridInspectStatistics instance using the specified properties. + * @param [properties] Properties to set + * @returns HybridInspectStatistics instance + */ + public static create(properties?: google.privacy.dlp.v2.IHybridInspectStatistics): google.privacy.dlp.v2.HybridInspectStatistics; + + /** + * Encodes the specified HybridInspectStatistics message. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectStatistics.verify|verify} messages. + * @param message HybridInspectStatistics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IHybridInspectStatistics, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HybridInspectStatistics message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectStatistics.verify|verify} messages. + * @param message HybridInspectStatistics message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IHybridInspectStatistics, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HybridInspectStatistics message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HybridInspectStatistics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.HybridInspectStatistics; + + /** + * Decodes a HybridInspectStatistics message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HybridInspectStatistics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.HybridInspectStatistics; + + /** + * Verifies a HybridInspectStatistics message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HybridInspectStatistics message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HybridInspectStatistics + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.HybridInspectStatistics; + + /** + * Creates a plain object from a HybridInspectStatistics message. Also converts values to other types if specified. + * @param message HybridInspectStatistics + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.HybridInspectStatistics, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HybridInspectStatistics to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HybridInspectStatistics + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ActionDetails. */ + interface IActionDetails { + + /** ActionDetails deidentifyDetails */ + deidentifyDetails?: (google.privacy.dlp.v2.IDeidentifyDataSourceDetails|null); + } + + /** Represents an ActionDetails. */ + class ActionDetails implements IActionDetails { + + /** + * Constructs a new ActionDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IActionDetails); + + /** ActionDetails deidentifyDetails. */ + public deidentifyDetails?: (google.privacy.dlp.v2.IDeidentifyDataSourceDetails|null); + + /** ActionDetails details. */ + public details?: "deidentifyDetails"; + + /** + * Creates a new ActionDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns ActionDetails instance + */ + public static create(properties?: google.privacy.dlp.v2.IActionDetails): google.privacy.dlp.v2.ActionDetails; + + /** + * Encodes the specified ActionDetails message. Does not implicitly {@link google.privacy.dlp.v2.ActionDetails.verify|verify} messages. + * @param message ActionDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IActionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ActionDetails message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ActionDetails.verify|verify} messages. + * @param message ActionDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IActionDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ActionDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ActionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ActionDetails; + + /** + * Decodes an ActionDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ActionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ActionDetails; + + /** + * Verifies an ActionDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ActionDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ActionDetails + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ActionDetails; + + /** + * Creates a plain object from an ActionDetails message. Also converts values to other types if specified. + * @param message ActionDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ActionDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ActionDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ActionDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeidentifyDataSourceStats. */ + interface IDeidentifyDataSourceStats { + + /** DeidentifyDataSourceStats transformedBytes */ + transformedBytes?: (number|Long|string|null); + + /** DeidentifyDataSourceStats transformationCount */ + transformationCount?: (number|Long|string|null); + + /** DeidentifyDataSourceStats transformationErrorCount */ + transformationErrorCount?: (number|Long|string|null); + } + + /** Represents a DeidentifyDataSourceStats. */ + class DeidentifyDataSourceStats implements IDeidentifyDataSourceStats { + + /** + * Constructs a new DeidentifyDataSourceStats. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDeidentifyDataSourceStats); + + /** DeidentifyDataSourceStats transformedBytes. */ + public transformedBytes: (number|Long|string); + + /** DeidentifyDataSourceStats transformationCount. */ + public transformationCount: (number|Long|string); + + /** DeidentifyDataSourceStats transformationErrorCount. */ + public transformationErrorCount: (number|Long|string); + + /** + * Creates a new DeidentifyDataSourceStats instance using the specified properties. + * @param [properties] Properties to set + * @returns DeidentifyDataSourceStats instance + */ + public static create(properties?: google.privacy.dlp.v2.IDeidentifyDataSourceStats): google.privacy.dlp.v2.DeidentifyDataSourceStats; + + /** + * Encodes the specified DeidentifyDataSourceStats message. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyDataSourceStats.verify|verify} messages. + * @param message DeidentifyDataSourceStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDeidentifyDataSourceStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeidentifyDataSourceStats message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyDataSourceStats.verify|verify} messages. + * @param message DeidentifyDataSourceStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDeidentifyDataSourceStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeidentifyDataSourceStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeidentifyDataSourceStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DeidentifyDataSourceStats; + + /** + * Decodes a DeidentifyDataSourceStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeidentifyDataSourceStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DeidentifyDataSourceStats; + + /** + * Verifies a DeidentifyDataSourceStats message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeidentifyDataSourceStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeidentifyDataSourceStats + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DeidentifyDataSourceStats; + + /** + * Creates a plain object from a DeidentifyDataSourceStats message. Also converts values to other types if specified. + * @param message DeidentifyDataSourceStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DeidentifyDataSourceStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeidentifyDataSourceStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeidentifyDataSourceStats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeidentifyDataSourceDetails. */ + interface IDeidentifyDataSourceDetails { + + /** DeidentifyDataSourceDetails requestedOptions */ + requestedOptions?: (google.privacy.dlp.v2.DeidentifyDataSourceDetails.IRequestedDeidentifyOptions|null); + + /** DeidentifyDataSourceDetails deidentifyStats */ + deidentifyStats?: (google.privacy.dlp.v2.IDeidentifyDataSourceStats|null); + } + + /** Represents a DeidentifyDataSourceDetails. */ + class DeidentifyDataSourceDetails implements IDeidentifyDataSourceDetails { + + /** + * Constructs a new DeidentifyDataSourceDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDeidentifyDataSourceDetails); + + /** DeidentifyDataSourceDetails requestedOptions. */ + public requestedOptions?: (google.privacy.dlp.v2.DeidentifyDataSourceDetails.IRequestedDeidentifyOptions|null); + + /** DeidentifyDataSourceDetails deidentifyStats. */ + public deidentifyStats?: (google.privacy.dlp.v2.IDeidentifyDataSourceStats|null); + + /** + * Creates a new DeidentifyDataSourceDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns DeidentifyDataSourceDetails instance + */ + public static create(properties?: google.privacy.dlp.v2.IDeidentifyDataSourceDetails): google.privacy.dlp.v2.DeidentifyDataSourceDetails; + + /** + * Encodes the specified DeidentifyDataSourceDetails message. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyDataSourceDetails.verify|verify} messages. + * @param message DeidentifyDataSourceDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDeidentifyDataSourceDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeidentifyDataSourceDetails message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyDataSourceDetails.verify|verify} messages. + * @param message DeidentifyDataSourceDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDeidentifyDataSourceDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeidentifyDataSourceDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeidentifyDataSourceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DeidentifyDataSourceDetails; + + /** + * Decodes a DeidentifyDataSourceDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeidentifyDataSourceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DeidentifyDataSourceDetails; + + /** + * Verifies a DeidentifyDataSourceDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeidentifyDataSourceDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeidentifyDataSourceDetails + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DeidentifyDataSourceDetails; + + /** + * Creates a plain object from a DeidentifyDataSourceDetails message. Also converts values to other types if specified. + * @param message DeidentifyDataSourceDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DeidentifyDataSourceDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeidentifyDataSourceDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeidentifyDataSourceDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DeidentifyDataSourceDetails { + + /** Properties of a RequestedDeidentifyOptions. */ + interface IRequestedDeidentifyOptions { + + /** RequestedDeidentifyOptions snapshotDeidentifyTemplate */ + snapshotDeidentifyTemplate?: (google.privacy.dlp.v2.IDeidentifyTemplate|null); + + /** RequestedDeidentifyOptions snapshotStructuredDeidentifyTemplate */ + snapshotStructuredDeidentifyTemplate?: (google.privacy.dlp.v2.IDeidentifyTemplate|null); + + /** RequestedDeidentifyOptions snapshotImageRedactTemplate */ + snapshotImageRedactTemplate?: (google.privacy.dlp.v2.IDeidentifyTemplate|null); + } + + /** Represents a RequestedDeidentifyOptions. */ + class RequestedDeidentifyOptions implements IRequestedDeidentifyOptions { + + /** + * Constructs a new RequestedDeidentifyOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.DeidentifyDataSourceDetails.IRequestedDeidentifyOptions); + + /** RequestedDeidentifyOptions snapshotDeidentifyTemplate. */ + public snapshotDeidentifyTemplate?: (google.privacy.dlp.v2.IDeidentifyTemplate|null); + + /** RequestedDeidentifyOptions snapshotStructuredDeidentifyTemplate. */ + public snapshotStructuredDeidentifyTemplate?: (google.privacy.dlp.v2.IDeidentifyTemplate|null); + + /** RequestedDeidentifyOptions snapshotImageRedactTemplate. */ + public snapshotImageRedactTemplate?: (google.privacy.dlp.v2.IDeidentifyTemplate|null); + + /** + * Creates a new RequestedDeidentifyOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestedDeidentifyOptions instance + */ + public static create(properties?: google.privacy.dlp.v2.DeidentifyDataSourceDetails.IRequestedDeidentifyOptions): google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions; + + /** + * Encodes the specified RequestedDeidentifyOptions message. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions.verify|verify} messages. + * @param message RequestedDeidentifyOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.DeidentifyDataSourceDetails.IRequestedDeidentifyOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestedDeidentifyOptions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions.verify|verify} messages. + * @param message RequestedDeidentifyOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.DeidentifyDataSourceDetails.IRequestedDeidentifyOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestedDeidentifyOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RequestedDeidentifyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions; + + /** + * Decodes a RequestedDeidentifyOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RequestedDeidentifyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions; + + /** + * Verifies a RequestedDeidentifyOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RequestedDeidentifyOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestedDeidentifyOptions + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions; + + /** + * Creates a plain object from a RequestedDeidentifyOptions message. Also converts values to other types if specified. + * @param message RequestedDeidentifyOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestedDeidentifyOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RequestedDeidentifyOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a LocationSupport. */ + interface ILocationSupport { + + /** LocationSupport regionalizationScope */ + regionalizationScope?: (google.privacy.dlp.v2.LocationSupport.RegionalizationScope|keyof typeof google.privacy.dlp.v2.LocationSupport.RegionalizationScope|null); + + /** LocationSupport locations */ + locations?: (string[]|null); + } + + /** Represents a LocationSupport. */ + class LocationSupport implements ILocationSupport { + + /** + * Constructs a new LocationSupport. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ILocationSupport); + + /** LocationSupport regionalizationScope. */ + public regionalizationScope: (google.privacy.dlp.v2.LocationSupport.RegionalizationScope|keyof typeof google.privacy.dlp.v2.LocationSupport.RegionalizationScope); + + /** LocationSupport locations. */ + public locations: string[]; + + /** + * Creates a new LocationSupport instance using the specified properties. + * @param [properties] Properties to set + * @returns LocationSupport instance + */ + public static create(properties?: google.privacy.dlp.v2.ILocationSupport): google.privacy.dlp.v2.LocationSupport; + + /** + * Encodes the specified LocationSupport message. Does not implicitly {@link google.privacy.dlp.v2.LocationSupport.verify|verify} messages. + * @param message LocationSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ILocationSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LocationSupport message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.LocationSupport.verify|verify} messages. + * @param message LocationSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ILocationSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LocationSupport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocationSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.LocationSupport; + + /** + * Decodes a LocationSupport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocationSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.LocationSupport; + + /** + * Verifies a LocationSupport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LocationSupport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocationSupport + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.LocationSupport; + + /** + * Creates a plain object from a LocationSupport message. Also converts values to other types if specified. + * @param message LocationSupport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.LocationSupport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LocationSupport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LocationSupport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LocationSupport { + + /** RegionalizationScope enum. */ + enum RegionalizationScope { + REGIONALIZATION_SCOPE_UNSPECIFIED = 0, + REGIONAL = 1, + ANY_LOCATION = 2 + } + } + + /** Properties of an InfoTypeDescription. */ + interface IInfoTypeDescription { + + /** InfoTypeDescription name */ + name?: (string|null); + + /** InfoTypeDescription displayName */ + displayName?: (string|null); + + /** InfoTypeDescription supportedBy */ + supportedBy?: (google.privacy.dlp.v2.InfoTypeSupportedBy[]|null); + + /** InfoTypeDescription description */ + description?: (string|null); + + /** InfoTypeDescription locationSupport */ + locationSupport?: (google.privacy.dlp.v2.ILocationSupport|null); + + /** InfoTypeDescription example */ + example?: (string|null); + + /** InfoTypeDescription versions */ + versions?: (google.privacy.dlp.v2.IVersionDescription[]|null); + + /** InfoTypeDescription categories */ + categories?: (google.privacy.dlp.v2.IInfoTypeCategory[]|null); + + /** InfoTypeDescription sensitivityScore */ + sensitivityScore?: (google.privacy.dlp.v2.ISensitivityScore|null); + + /** InfoTypeDescription specificInfoTypes */ + specificInfoTypes?: (string[]|null); + + /** InfoTypeDescription launchStatus */ + launchStatus?: (google.privacy.dlp.v2.InfoTypeDescription.InfoTypeLaunchStatus|keyof typeof google.privacy.dlp.v2.InfoTypeDescription.InfoTypeLaunchStatus|null); + } + + /** Represents an InfoTypeDescription. */ + class InfoTypeDescription implements IInfoTypeDescription { + + /** + * Constructs a new InfoTypeDescription. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IInfoTypeDescription); + + /** InfoTypeDescription name. */ + public name: string; + + /** InfoTypeDescription displayName. */ + public displayName: string; + + /** InfoTypeDescription supportedBy. */ + public supportedBy: google.privacy.dlp.v2.InfoTypeSupportedBy[]; + + /** InfoTypeDescription description. */ + public description: string; + + /** InfoTypeDescription locationSupport. */ + public locationSupport?: (google.privacy.dlp.v2.ILocationSupport|null); + + /** InfoTypeDescription example. */ + public example: string; + + /** InfoTypeDescription versions. */ + public versions: google.privacy.dlp.v2.IVersionDescription[]; + + /** InfoTypeDescription categories. */ + public categories: google.privacy.dlp.v2.IInfoTypeCategory[]; + + /** InfoTypeDescription sensitivityScore. */ + public sensitivityScore?: (google.privacy.dlp.v2.ISensitivityScore|null); + + /** InfoTypeDescription specificInfoTypes. */ + public specificInfoTypes: string[]; + + /** InfoTypeDescription launchStatus. */ + public launchStatus: (google.privacy.dlp.v2.InfoTypeDescription.InfoTypeLaunchStatus|keyof typeof google.privacy.dlp.v2.InfoTypeDescription.InfoTypeLaunchStatus); + + /** + * Creates a new InfoTypeDescription instance using the specified properties. + * @param [properties] Properties to set + * @returns InfoTypeDescription instance + */ + public static create(properties?: google.privacy.dlp.v2.IInfoTypeDescription): google.privacy.dlp.v2.InfoTypeDescription; + + /** + * Encodes the specified InfoTypeDescription message. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeDescription.verify|verify} messages. + * @param message InfoTypeDescription message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IInfoTypeDescription, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InfoTypeDescription message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeDescription.verify|verify} messages. + * @param message InfoTypeDescription message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IInfoTypeDescription, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InfoTypeDescription message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InfoTypeDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.InfoTypeDescription; + + /** + * Decodes an InfoTypeDescription message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InfoTypeDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.InfoTypeDescription; + + /** + * Verifies an InfoTypeDescription message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InfoTypeDescription message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InfoTypeDescription + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.InfoTypeDescription; + + /** + * Creates a plain object from an InfoTypeDescription message. Also converts values to other types if specified. + * @param message InfoTypeDescription + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.InfoTypeDescription, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InfoTypeDescription to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InfoTypeDescription + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace InfoTypeDescription { + + /** InfoTypeLaunchStatus enum. */ + enum InfoTypeLaunchStatus { + INFO_TYPE_LAUNCH_STATUS_UNSPECIFIED = 0, + GENERAL_AVAILABILITY = 1, + PUBLIC_PREVIEW = 2, + PRIVATE_PREVIEW = 3 + } + } + + /** Properties of an InfoTypeCategory. */ + interface IInfoTypeCategory { + + /** InfoTypeCategory locationCategory */ + locationCategory?: (google.privacy.dlp.v2.InfoTypeCategory.LocationCategory|keyof typeof google.privacy.dlp.v2.InfoTypeCategory.LocationCategory|null); + + /** InfoTypeCategory industryCategory */ + industryCategory?: (google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory|keyof typeof google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory|null); + + /** InfoTypeCategory typeCategory */ + typeCategory?: (google.privacy.dlp.v2.InfoTypeCategory.TypeCategory|keyof typeof google.privacy.dlp.v2.InfoTypeCategory.TypeCategory|null); + } + + /** Represents an InfoTypeCategory. */ + class InfoTypeCategory implements IInfoTypeCategory { + + /** + * Constructs a new InfoTypeCategory. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IInfoTypeCategory); + + /** InfoTypeCategory locationCategory. */ + public locationCategory?: (google.privacy.dlp.v2.InfoTypeCategory.LocationCategory|keyof typeof google.privacy.dlp.v2.InfoTypeCategory.LocationCategory|null); + + /** InfoTypeCategory industryCategory. */ + public industryCategory?: (google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory|keyof typeof google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory|null); + + /** InfoTypeCategory typeCategory. */ + public typeCategory?: (google.privacy.dlp.v2.InfoTypeCategory.TypeCategory|keyof typeof google.privacy.dlp.v2.InfoTypeCategory.TypeCategory|null); + + /** InfoTypeCategory category. */ + public category?: ("locationCategory"|"industryCategory"|"typeCategory"); + + /** + * Creates a new InfoTypeCategory instance using the specified properties. + * @param [properties] Properties to set + * @returns InfoTypeCategory instance + */ + public static create(properties?: google.privacy.dlp.v2.IInfoTypeCategory): google.privacy.dlp.v2.InfoTypeCategory; + + /** + * Encodes the specified InfoTypeCategory message. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeCategory.verify|verify} messages. + * @param message InfoTypeCategory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IInfoTypeCategory, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InfoTypeCategory message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeCategory.verify|verify} messages. + * @param message InfoTypeCategory message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IInfoTypeCategory, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InfoTypeCategory message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InfoTypeCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.InfoTypeCategory; + + /** + * Decodes an InfoTypeCategory message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InfoTypeCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.InfoTypeCategory; + + /** + * Verifies an InfoTypeCategory message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InfoTypeCategory message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InfoTypeCategory + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.InfoTypeCategory; + + /** + * Creates a plain object from an InfoTypeCategory message. Also converts values to other types if specified. + * @param message InfoTypeCategory + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.InfoTypeCategory, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InfoTypeCategory to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InfoTypeCategory + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace InfoTypeCategory { + + /** LocationCategory enum. */ + enum LocationCategory { + LOCATION_UNSPECIFIED = 0, + GLOBAL = 1, + ARGENTINA = 2, + ARMENIA = 51, + AUSTRALIA = 3, + AUSTRIA = 53, + AZERBAIJAN = 48, + BELARUS = 50, + BELGIUM = 4, + BRAZIL = 5, + CANADA = 6, + CHILE = 7, + CHINA = 8, + COLOMBIA = 9, + CROATIA = 42, + CZECHIA = 52, + DENMARK = 10, + FRANCE = 11, + FINLAND = 12, + GERMANY = 13, + HONG_KONG = 14, + INDIA = 15, + INDONESIA = 16, + IRELAND = 17, + ISRAEL = 18, + ITALY = 19, + JAPAN = 20, + KAZAKHSTAN = 47, + KOREA = 21, + MEXICO = 22, + THE_NETHERLANDS = 23, + NEW_ZEALAND = 41, + NORWAY = 24, + PARAGUAY = 25, + PERU = 26, + POLAND = 27, + PORTUGAL = 28, + RUSSIA = 44, + SINGAPORE = 29, + SOUTH_AFRICA = 30, + SPAIN = 31, + SWEDEN = 32, + SWITZERLAND = 43, + TAIWAN = 33, + THAILAND = 34, + TURKEY = 35, + UKRAINE = 45, + UNITED_KINGDOM = 36, + UNITED_STATES = 37, + URUGUAY = 38, + UZBEKISTAN = 46, + VENEZUELA = 39, + INTERNAL = 40 + } + + /** IndustryCategory enum. */ + enum IndustryCategory { + INDUSTRY_UNSPECIFIED = 0, + FINANCE = 1, + HEALTH = 2, + TELECOMMUNICATIONS = 3 + } + + /** TypeCategory enum. */ + enum TypeCategory { + TYPE_UNSPECIFIED = 0, + PII = 1, + SPII = 2, + DEMOGRAPHIC = 3, + CREDENTIAL = 4, + GOVERNMENT_ID = 5, + DOCUMENT = 6, + CONTEXTUAL_INFORMATION = 7, + CUSTOM = 8 + } + } + + /** Properties of a VersionDescription. */ + interface IVersionDescription { + + /** VersionDescription version */ + version?: (string|null); + + /** VersionDescription description */ + description?: (string|null); + } + + /** Represents a VersionDescription. */ + class VersionDescription implements IVersionDescription { + + /** + * Constructs a new VersionDescription. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IVersionDescription); + + /** VersionDescription version. */ + public version: string; + + /** VersionDescription description. */ + public description: string; + + /** + * Creates a new VersionDescription instance using the specified properties. + * @param [properties] Properties to set + * @returns VersionDescription instance + */ + public static create(properties?: google.privacy.dlp.v2.IVersionDescription): google.privacy.dlp.v2.VersionDescription; + + /** + * Encodes the specified VersionDescription message. Does not implicitly {@link google.privacy.dlp.v2.VersionDescription.verify|verify} messages. + * @param message VersionDescription message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IVersionDescription, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VersionDescription message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.VersionDescription.verify|verify} messages. + * @param message VersionDescription message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IVersionDescription, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VersionDescription message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VersionDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.VersionDescription; + + /** + * Decodes a VersionDescription message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VersionDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.VersionDescription; + + /** + * Verifies a VersionDescription message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VersionDescription message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VersionDescription + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.VersionDescription; + + /** + * Creates a plain object from a VersionDescription message. Also converts values to other types if specified. + * @param message VersionDescription + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.VersionDescription, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VersionDescription to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VersionDescription + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListInfoTypesRequest. */ + interface IListInfoTypesRequest { + + /** ListInfoTypesRequest parent */ + parent?: (string|null); + + /** ListInfoTypesRequest languageCode */ + languageCode?: (string|null); + + /** ListInfoTypesRequest filter */ + filter?: (string|null); + + /** ListInfoTypesRequest locationId */ + locationId?: (string|null); + } + + /** Represents a ListInfoTypesRequest. */ + class ListInfoTypesRequest implements IListInfoTypesRequest { + + /** + * Constructs a new ListInfoTypesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListInfoTypesRequest); + + /** ListInfoTypesRequest parent. */ + public parent: string; + + /** ListInfoTypesRequest languageCode. */ + public languageCode: string; + + /** ListInfoTypesRequest filter. */ + public filter: string; + + /** ListInfoTypesRequest locationId. */ + public locationId: string; + + /** + * Creates a new ListInfoTypesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListInfoTypesRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IListInfoTypesRequest): google.privacy.dlp.v2.ListInfoTypesRequest; + + /** + * Encodes the specified ListInfoTypesRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListInfoTypesRequest.verify|verify} messages. + * @param message ListInfoTypesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListInfoTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListInfoTypesRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListInfoTypesRequest.verify|verify} messages. + * @param message ListInfoTypesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListInfoTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListInfoTypesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListInfoTypesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ListInfoTypesRequest; + + /** + * Decodes a ListInfoTypesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListInfoTypesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ListInfoTypesRequest; + + /** + * Verifies a ListInfoTypesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListInfoTypesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListInfoTypesRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListInfoTypesRequest; + + /** + * Creates a plain object from a ListInfoTypesRequest message. Also converts values to other types if specified. + * @param message ListInfoTypesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListInfoTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListInfoTypesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListInfoTypesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListInfoTypesResponse. */ + interface IListInfoTypesResponse { + + /** ListInfoTypesResponse infoTypes */ + infoTypes?: (google.privacy.dlp.v2.IInfoTypeDescription[]|null); + } + + /** Represents a ListInfoTypesResponse. */ + class ListInfoTypesResponse implements IListInfoTypesResponse { + + /** + * Constructs a new ListInfoTypesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListInfoTypesResponse); + + /** ListInfoTypesResponse infoTypes. */ + public infoTypes: google.privacy.dlp.v2.IInfoTypeDescription[]; + + /** + * Creates a new ListInfoTypesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListInfoTypesResponse instance + */ + public static create(properties?: google.privacy.dlp.v2.IListInfoTypesResponse): google.privacy.dlp.v2.ListInfoTypesResponse; + + /** + * Encodes the specified ListInfoTypesResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListInfoTypesResponse.verify|verify} messages. + * @param message ListInfoTypesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListInfoTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListInfoTypesResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListInfoTypesResponse.verify|verify} messages. + * @param message ListInfoTypesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListInfoTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListInfoTypesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListInfoTypesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ListInfoTypesResponse; + + /** + * Decodes a ListInfoTypesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListInfoTypesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ListInfoTypesResponse; + + /** + * Verifies a ListInfoTypesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListInfoTypesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListInfoTypesResponse + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListInfoTypesResponse; + + /** + * Creates a plain object from a ListInfoTypesResponse message. Also converts values to other types if specified. + * @param message ListInfoTypesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListInfoTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListInfoTypesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListInfoTypesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RiskAnalysisJobConfig. */ + interface IRiskAnalysisJobConfig { + + /** RiskAnalysisJobConfig privacyMetric */ + privacyMetric?: (google.privacy.dlp.v2.IPrivacyMetric|null); + + /** RiskAnalysisJobConfig sourceTable */ + sourceTable?: (google.privacy.dlp.v2.IBigQueryTable|null); + + /** RiskAnalysisJobConfig actions */ + actions?: (google.privacy.dlp.v2.IAction[]|null); + } + + /** Represents a RiskAnalysisJobConfig. */ + class RiskAnalysisJobConfig implements IRiskAnalysisJobConfig { + + /** + * Constructs a new RiskAnalysisJobConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IRiskAnalysisJobConfig); + + /** RiskAnalysisJobConfig privacyMetric. */ + public privacyMetric?: (google.privacy.dlp.v2.IPrivacyMetric|null); + + /** RiskAnalysisJobConfig sourceTable. */ + public sourceTable?: (google.privacy.dlp.v2.IBigQueryTable|null); + + /** RiskAnalysisJobConfig actions. */ + public actions: google.privacy.dlp.v2.IAction[]; + + /** + * Creates a new RiskAnalysisJobConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns RiskAnalysisJobConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.IRiskAnalysisJobConfig): google.privacy.dlp.v2.RiskAnalysisJobConfig; + + /** + * Encodes the specified RiskAnalysisJobConfig message. Does not implicitly {@link google.privacy.dlp.v2.RiskAnalysisJobConfig.verify|verify} messages. + * @param message RiskAnalysisJobConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IRiskAnalysisJobConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RiskAnalysisJobConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RiskAnalysisJobConfig.verify|verify} messages. + * @param message RiskAnalysisJobConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IRiskAnalysisJobConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RiskAnalysisJobConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RiskAnalysisJobConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RiskAnalysisJobConfig; + + /** + * Decodes a RiskAnalysisJobConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RiskAnalysisJobConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RiskAnalysisJobConfig; + + /** + * Verifies a RiskAnalysisJobConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RiskAnalysisJobConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RiskAnalysisJobConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RiskAnalysisJobConfig; + + /** + * Creates a plain object from a RiskAnalysisJobConfig message. Also converts values to other types if specified. + * @param message RiskAnalysisJobConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.RiskAnalysisJobConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RiskAnalysisJobConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RiskAnalysisJobConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuasiId. */ + interface IQuasiId { + + /** QuasiId field */ + field?: (google.privacy.dlp.v2.IFieldId|null); + + /** QuasiId infoType */ + infoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** QuasiId customTag */ + customTag?: (string|null); + + /** QuasiId inferred */ + inferred?: (google.protobuf.IEmpty|null); + } + + /** Represents a QuasiId. */ + class QuasiId implements IQuasiId { + + /** + * Constructs a new QuasiId. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IQuasiId); + + /** QuasiId field. */ + public field?: (google.privacy.dlp.v2.IFieldId|null); + + /** QuasiId infoType. */ + public infoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** QuasiId customTag. */ + public customTag?: (string|null); + + /** QuasiId inferred. */ + public inferred?: (google.protobuf.IEmpty|null); + + /** QuasiId tag. */ + public tag?: ("infoType"|"customTag"|"inferred"); + + /** + * Creates a new QuasiId instance using the specified properties. + * @param [properties] Properties to set + * @returns QuasiId instance + */ + public static create(properties?: google.privacy.dlp.v2.IQuasiId): google.privacy.dlp.v2.QuasiId; + + /** + * Encodes the specified QuasiId message. Does not implicitly {@link google.privacy.dlp.v2.QuasiId.verify|verify} messages. + * @param message QuasiId message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IQuasiId, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuasiId message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.QuasiId.verify|verify} messages. + * @param message QuasiId message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IQuasiId, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuasiId message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuasiId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.QuasiId; + + /** + * Decodes a QuasiId message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuasiId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.QuasiId; + + /** + * Verifies a QuasiId message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QuasiId message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuasiId + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.QuasiId; + + /** + * Creates a plain object from a QuasiId message. Also converts values to other types if specified. + * @param message QuasiId + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.QuasiId, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuasiId to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuasiId + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StatisticalTable. */ + interface IStatisticalTable { + + /** StatisticalTable table */ + table?: (google.privacy.dlp.v2.IBigQueryTable|null); + + /** StatisticalTable quasiIds */ + quasiIds?: (google.privacy.dlp.v2.StatisticalTable.IQuasiIdentifierField[]|null); + + /** StatisticalTable relativeFrequency */ + relativeFrequency?: (google.privacy.dlp.v2.IFieldId|null); + } + + /** Represents a StatisticalTable. */ + class StatisticalTable implements IStatisticalTable { + + /** + * Constructs a new StatisticalTable. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IStatisticalTable); + + /** StatisticalTable table. */ + public table?: (google.privacy.dlp.v2.IBigQueryTable|null); + + /** StatisticalTable quasiIds. */ + public quasiIds: google.privacy.dlp.v2.StatisticalTable.IQuasiIdentifierField[]; + + /** StatisticalTable relativeFrequency. */ + public relativeFrequency?: (google.privacy.dlp.v2.IFieldId|null); + + /** + * Creates a new StatisticalTable instance using the specified properties. + * @param [properties] Properties to set + * @returns StatisticalTable instance + */ + public static create(properties?: google.privacy.dlp.v2.IStatisticalTable): google.privacy.dlp.v2.StatisticalTable; + + /** + * Encodes the specified StatisticalTable message. Does not implicitly {@link google.privacy.dlp.v2.StatisticalTable.verify|verify} messages. + * @param message StatisticalTable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IStatisticalTable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StatisticalTable message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StatisticalTable.verify|verify} messages. + * @param message StatisticalTable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IStatisticalTable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StatisticalTable message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StatisticalTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.StatisticalTable; + + /** + * Decodes a StatisticalTable message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StatisticalTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.StatisticalTable; + + /** + * Verifies a StatisticalTable message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StatisticalTable message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StatisticalTable + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.StatisticalTable; + + /** + * Creates a plain object from a StatisticalTable message. Also converts values to other types if specified. + * @param message StatisticalTable + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.StatisticalTable, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StatisticalTable to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StatisticalTable + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StatisticalTable { + + /** Properties of a QuasiIdentifierField. */ + interface IQuasiIdentifierField { + + /** QuasiIdentifierField field */ + field?: (google.privacy.dlp.v2.IFieldId|null); + + /** QuasiIdentifierField customTag */ + customTag?: (string|null); + } + + /** Represents a QuasiIdentifierField. */ + class QuasiIdentifierField implements IQuasiIdentifierField { + + /** + * Constructs a new QuasiIdentifierField. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.StatisticalTable.IQuasiIdentifierField); + + /** QuasiIdentifierField field. */ + public field?: (google.privacy.dlp.v2.IFieldId|null); + + /** QuasiIdentifierField customTag. */ + public customTag: string; + + /** + * Creates a new QuasiIdentifierField instance using the specified properties. + * @param [properties] Properties to set + * @returns QuasiIdentifierField instance + */ + public static create(properties?: google.privacy.dlp.v2.StatisticalTable.IQuasiIdentifierField): google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField; + + /** + * Encodes the specified QuasiIdentifierField message. Does not implicitly {@link google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.verify|verify} messages. + * @param message QuasiIdentifierField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.StatisticalTable.IQuasiIdentifierField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuasiIdentifierField message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.verify|verify} messages. + * @param message QuasiIdentifierField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.StatisticalTable.IQuasiIdentifierField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuasiIdentifierField message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuasiIdentifierField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField; + + /** + * Decodes a QuasiIdentifierField message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuasiIdentifierField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField; + + /** + * Verifies a QuasiIdentifierField message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QuasiIdentifierField message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuasiIdentifierField + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField; + + /** + * Creates a plain object from a QuasiIdentifierField message. Also converts values to other types if specified. + * @param message QuasiIdentifierField + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuasiIdentifierField to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuasiIdentifierField + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a PrivacyMetric. */ + interface IPrivacyMetric { + + /** PrivacyMetric numericalStatsConfig */ + numericalStatsConfig?: (google.privacy.dlp.v2.PrivacyMetric.INumericalStatsConfig|null); + + /** PrivacyMetric categoricalStatsConfig */ + categoricalStatsConfig?: (google.privacy.dlp.v2.PrivacyMetric.ICategoricalStatsConfig|null); + + /** PrivacyMetric kAnonymityConfig */ + kAnonymityConfig?: (google.privacy.dlp.v2.PrivacyMetric.IKAnonymityConfig|null); + + /** PrivacyMetric lDiversityConfig */ + lDiversityConfig?: (google.privacy.dlp.v2.PrivacyMetric.ILDiversityConfig|null); + + /** PrivacyMetric kMapEstimationConfig */ + kMapEstimationConfig?: (google.privacy.dlp.v2.PrivacyMetric.IKMapEstimationConfig|null); + + /** PrivacyMetric deltaPresenceEstimationConfig */ + deltaPresenceEstimationConfig?: (google.privacy.dlp.v2.PrivacyMetric.IDeltaPresenceEstimationConfig|null); + } + + /** Represents a PrivacyMetric. */ + class PrivacyMetric implements IPrivacyMetric { + + /** + * Constructs a new PrivacyMetric. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IPrivacyMetric); + + /** PrivacyMetric numericalStatsConfig. */ + public numericalStatsConfig?: (google.privacy.dlp.v2.PrivacyMetric.INumericalStatsConfig|null); + + /** PrivacyMetric categoricalStatsConfig. */ + public categoricalStatsConfig?: (google.privacy.dlp.v2.PrivacyMetric.ICategoricalStatsConfig|null); + + /** PrivacyMetric kAnonymityConfig. */ + public kAnonymityConfig?: (google.privacy.dlp.v2.PrivacyMetric.IKAnonymityConfig|null); + + /** PrivacyMetric lDiversityConfig. */ + public lDiversityConfig?: (google.privacy.dlp.v2.PrivacyMetric.ILDiversityConfig|null); + + /** PrivacyMetric kMapEstimationConfig. */ + public kMapEstimationConfig?: (google.privacy.dlp.v2.PrivacyMetric.IKMapEstimationConfig|null); + + /** PrivacyMetric deltaPresenceEstimationConfig. */ + public deltaPresenceEstimationConfig?: (google.privacy.dlp.v2.PrivacyMetric.IDeltaPresenceEstimationConfig|null); + + /** PrivacyMetric type. */ + public type?: ("numericalStatsConfig"|"categoricalStatsConfig"|"kAnonymityConfig"|"lDiversityConfig"|"kMapEstimationConfig"|"deltaPresenceEstimationConfig"); + + /** + * Creates a new PrivacyMetric instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivacyMetric instance + */ + public static create(properties?: google.privacy.dlp.v2.IPrivacyMetric): google.privacy.dlp.v2.PrivacyMetric; + + /** + * Encodes the specified PrivacyMetric message. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.verify|verify} messages. + * @param message PrivacyMetric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IPrivacyMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivacyMetric message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.verify|verify} messages. + * @param message PrivacyMetric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IPrivacyMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivacyMetric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivacyMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.PrivacyMetric; + + /** + * Decodes a PrivacyMetric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivacyMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.PrivacyMetric; + + /** + * Verifies a PrivacyMetric message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrivacyMetric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivacyMetric + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.PrivacyMetric; + + /** + * Creates a plain object from a PrivacyMetric message. Also converts values to other types if specified. + * @param message PrivacyMetric + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.PrivacyMetric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivacyMetric to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivacyMetric + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PrivacyMetric { + + /** Properties of a NumericalStatsConfig. */ + interface INumericalStatsConfig { + + /** NumericalStatsConfig field */ + field?: (google.privacy.dlp.v2.IFieldId|null); + } + + /** Represents a NumericalStatsConfig. */ + class NumericalStatsConfig implements INumericalStatsConfig { + + /** + * Constructs a new NumericalStatsConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.PrivacyMetric.INumericalStatsConfig); + + /** NumericalStatsConfig field. */ + public field?: (google.privacy.dlp.v2.IFieldId|null); + + /** + * Creates a new NumericalStatsConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NumericalStatsConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.PrivacyMetric.INumericalStatsConfig): google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig; + + /** + * Encodes the specified NumericalStatsConfig message. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.verify|verify} messages. + * @param message NumericalStatsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.PrivacyMetric.INumericalStatsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NumericalStatsConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.verify|verify} messages. + * @param message NumericalStatsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.PrivacyMetric.INumericalStatsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NumericalStatsConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NumericalStatsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig; + + /** + * Decodes a NumericalStatsConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NumericalStatsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig; + + /** + * Verifies a NumericalStatsConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NumericalStatsConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NumericalStatsConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig; + + /** + * Creates a plain object from a NumericalStatsConfig message. Also converts values to other types if specified. + * @param message NumericalStatsConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NumericalStatsConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NumericalStatsConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CategoricalStatsConfig. */ + interface ICategoricalStatsConfig { + + /** CategoricalStatsConfig field */ + field?: (google.privacy.dlp.v2.IFieldId|null); + } + + /** Represents a CategoricalStatsConfig. */ + class CategoricalStatsConfig implements ICategoricalStatsConfig { + + /** + * Constructs a new CategoricalStatsConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.PrivacyMetric.ICategoricalStatsConfig); + + /** CategoricalStatsConfig field. */ + public field?: (google.privacy.dlp.v2.IFieldId|null); + + /** + * Creates a new CategoricalStatsConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns CategoricalStatsConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.PrivacyMetric.ICategoricalStatsConfig): google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig; + + /** + * Encodes the specified CategoricalStatsConfig message. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.verify|verify} messages. + * @param message CategoricalStatsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.PrivacyMetric.ICategoricalStatsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CategoricalStatsConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.verify|verify} messages. + * @param message CategoricalStatsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.PrivacyMetric.ICategoricalStatsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CategoricalStatsConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CategoricalStatsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig; + + /** + * Decodes a CategoricalStatsConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CategoricalStatsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig; + + /** + * Verifies a CategoricalStatsConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CategoricalStatsConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CategoricalStatsConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig; + + /** + * Creates a plain object from a CategoricalStatsConfig message. Also converts values to other types if specified. + * @param message CategoricalStatsConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CategoricalStatsConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CategoricalStatsConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a KAnonymityConfig. */ + interface IKAnonymityConfig { + + /** KAnonymityConfig quasiIds */ + quasiIds?: (google.privacy.dlp.v2.IFieldId[]|null); + + /** KAnonymityConfig entityId */ + entityId?: (google.privacy.dlp.v2.IEntityId|null); + } + + /** Represents a KAnonymityConfig. */ + class KAnonymityConfig implements IKAnonymityConfig { + + /** + * Constructs a new KAnonymityConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.PrivacyMetric.IKAnonymityConfig); + + /** KAnonymityConfig quasiIds. */ + public quasiIds: google.privacy.dlp.v2.IFieldId[]; + + /** KAnonymityConfig entityId. */ + public entityId?: (google.privacy.dlp.v2.IEntityId|null); + + /** + * Creates a new KAnonymityConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns KAnonymityConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.PrivacyMetric.IKAnonymityConfig): google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig; + + /** + * Encodes the specified KAnonymityConfig message. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.verify|verify} messages. + * @param message KAnonymityConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.PrivacyMetric.IKAnonymityConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KAnonymityConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.verify|verify} messages. + * @param message KAnonymityConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.PrivacyMetric.IKAnonymityConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KAnonymityConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KAnonymityConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig; + + /** + * Decodes a KAnonymityConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KAnonymityConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig; + + /** + * Verifies a KAnonymityConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KAnonymityConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KAnonymityConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig; + + /** + * Creates a plain object from a KAnonymityConfig message. Also converts values to other types if specified. + * @param message KAnonymityConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KAnonymityConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KAnonymityConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LDiversityConfig. */ + interface ILDiversityConfig { + + /** LDiversityConfig quasiIds */ + quasiIds?: (google.privacy.dlp.v2.IFieldId[]|null); + + /** LDiversityConfig sensitiveAttribute */ + sensitiveAttribute?: (google.privacy.dlp.v2.IFieldId|null); + } + + /** Represents a LDiversityConfig. */ + class LDiversityConfig implements ILDiversityConfig { + + /** + * Constructs a new LDiversityConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.PrivacyMetric.ILDiversityConfig); + + /** LDiversityConfig quasiIds. */ + public quasiIds: google.privacy.dlp.v2.IFieldId[]; + + /** LDiversityConfig sensitiveAttribute. */ + public sensitiveAttribute?: (google.privacy.dlp.v2.IFieldId|null); + + /** + * Creates a new LDiversityConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns LDiversityConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.PrivacyMetric.ILDiversityConfig): google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig; + + /** + * Encodes the specified LDiversityConfig message. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.verify|verify} messages. + * @param message LDiversityConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.PrivacyMetric.ILDiversityConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LDiversityConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.verify|verify} messages. + * @param message LDiversityConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.PrivacyMetric.ILDiversityConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LDiversityConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LDiversityConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig; + + /** + * Decodes a LDiversityConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LDiversityConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig; + + /** + * Verifies a LDiversityConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LDiversityConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LDiversityConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig; + + /** + * Creates a plain object from a LDiversityConfig message. Also converts values to other types if specified. + * @param message LDiversityConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LDiversityConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LDiversityConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a KMapEstimationConfig. */ + interface IKMapEstimationConfig { + + /** KMapEstimationConfig quasiIds */ + quasiIds?: (google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.ITaggedField[]|null); + + /** KMapEstimationConfig regionCode */ + regionCode?: (string|null); + + /** KMapEstimationConfig auxiliaryTables */ + auxiliaryTables?: (google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.IAuxiliaryTable[]|null); + } + + /** Represents a KMapEstimationConfig. */ + class KMapEstimationConfig implements IKMapEstimationConfig { + + /** + * Constructs a new KMapEstimationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.PrivacyMetric.IKMapEstimationConfig); + + /** KMapEstimationConfig quasiIds. */ + public quasiIds: google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.ITaggedField[]; + + /** KMapEstimationConfig regionCode. */ + public regionCode: string; + + /** KMapEstimationConfig auxiliaryTables. */ + public auxiliaryTables: google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.IAuxiliaryTable[]; + + /** + * Creates a new KMapEstimationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns KMapEstimationConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.PrivacyMetric.IKMapEstimationConfig): google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig; + + /** + * Encodes the specified KMapEstimationConfig message. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.verify|verify} messages. + * @param message KMapEstimationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.PrivacyMetric.IKMapEstimationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KMapEstimationConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.verify|verify} messages. + * @param message KMapEstimationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.PrivacyMetric.IKMapEstimationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KMapEstimationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KMapEstimationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig; + + /** + * Decodes a KMapEstimationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KMapEstimationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig; + + /** + * Verifies a KMapEstimationConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KMapEstimationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KMapEstimationConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig; + + /** + * Creates a plain object from a KMapEstimationConfig message. Also converts values to other types if specified. + * @param message KMapEstimationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KMapEstimationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KMapEstimationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace KMapEstimationConfig { + + /** Properties of a TaggedField. */ + interface ITaggedField { + + /** TaggedField field */ + field?: (google.privacy.dlp.v2.IFieldId|null); + + /** TaggedField infoType */ + infoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** TaggedField customTag */ + customTag?: (string|null); + + /** TaggedField inferred */ + inferred?: (google.protobuf.IEmpty|null); + } + + /** Represents a TaggedField. */ + class TaggedField implements ITaggedField { + + /** + * Constructs a new TaggedField. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.ITaggedField); + + /** TaggedField field. */ + public field?: (google.privacy.dlp.v2.IFieldId|null); + + /** TaggedField infoType. */ + public infoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** TaggedField customTag. */ + public customTag?: (string|null); + + /** TaggedField inferred. */ + public inferred?: (google.protobuf.IEmpty|null); + + /** TaggedField tag. */ + public tag?: ("infoType"|"customTag"|"inferred"); + + /** + * Creates a new TaggedField instance using the specified properties. + * @param [properties] Properties to set + * @returns TaggedField instance + */ + public static create(properties?: google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.ITaggedField): google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField; + + /** + * Encodes the specified TaggedField message. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.verify|verify} messages. + * @param message TaggedField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.ITaggedField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TaggedField message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.verify|verify} messages. + * @param message TaggedField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.ITaggedField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TaggedField message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TaggedField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField; + + /** + * Decodes a TaggedField message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TaggedField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField; + + /** + * Verifies a TaggedField message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TaggedField message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TaggedField + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField; + + /** + * Creates a plain object from a TaggedField message. Also converts values to other types if specified. + * @param message TaggedField + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TaggedField to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TaggedField + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AuxiliaryTable. */ + interface IAuxiliaryTable { + + /** AuxiliaryTable table */ + table?: (google.privacy.dlp.v2.IBigQueryTable|null); + + /** AuxiliaryTable quasiIds */ + quasiIds?: (google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.IQuasiIdField[]|null); + + /** AuxiliaryTable relativeFrequency */ + relativeFrequency?: (google.privacy.dlp.v2.IFieldId|null); + } + + /** Represents an AuxiliaryTable. */ + class AuxiliaryTable implements IAuxiliaryTable { + + /** + * Constructs a new AuxiliaryTable. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.IAuxiliaryTable); + + /** AuxiliaryTable table. */ + public table?: (google.privacy.dlp.v2.IBigQueryTable|null); + + /** AuxiliaryTable quasiIds. */ + public quasiIds: google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.IQuasiIdField[]; + + /** AuxiliaryTable relativeFrequency. */ + public relativeFrequency?: (google.privacy.dlp.v2.IFieldId|null); + + /** + * Creates a new AuxiliaryTable instance using the specified properties. + * @param [properties] Properties to set + * @returns AuxiliaryTable instance + */ + public static create(properties?: google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.IAuxiliaryTable): google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable; + + /** + * Encodes the specified AuxiliaryTable message. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.verify|verify} messages. + * @param message AuxiliaryTable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.IAuxiliaryTable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AuxiliaryTable message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.verify|verify} messages. + * @param message AuxiliaryTable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.IAuxiliaryTable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AuxiliaryTable message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AuxiliaryTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable; + + /** + * Decodes an AuxiliaryTable message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AuxiliaryTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable; + + /** + * Verifies an AuxiliaryTable message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AuxiliaryTable message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AuxiliaryTable + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable; + + /** + * Creates a plain object from an AuxiliaryTable message. Also converts values to other types if specified. + * @param message AuxiliaryTable + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AuxiliaryTable to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AuxiliaryTable + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AuxiliaryTable { + + /** Properties of a QuasiIdField. */ + interface IQuasiIdField { + + /** QuasiIdField field */ + field?: (google.privacy.dlp.v2.IFieldId|null); + + /** QuasiIdField customTag */ + customTag?: (string|null); + } + + /** Represents a QuasiIdField. */ + class QuasiIdField implements IQuasiIdField { + + /** + * Constructs a new QuasiIdField. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.IQuasiIdField); + + /** QuasiIdField field. */ + public field?: (google.privacy.dlp.v2.IFieldId|null); + + /** QuasiIdField customTag. */ + public customTag: string; + + /** + * Creates a new QuasiIdField instance using the specified properties. + * @param [properties] Properties to set + * @returns QuasiIdField instance + */ + public static create(properties?: google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.IQuasiIdField): google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField; + + /** + * Encodes the specified QuasiIdField message. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.verify|verify} messages. + * @param message QuasiIdField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.IQuasiIdField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuasiIdField message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.verify|verify} messages. + * @param message QuasiIdField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.IQuasiIdField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuasiIdField message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuasiIdField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField; + + /** + * Decodes a QuasiIdField message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuasiIdField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField; + + /** + * Verifies a QuasiIdField message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QuasiIdField message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuasiIdField + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField; + + /** + * Creates a plain object from a QuasiIdField message. Also converts values to other types if specified. + * @param message QuasiIdField + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuasiIdField to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuasiIdField + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a DeltaPresenceEstimationConfig. */ + interface IDeltaPresenceEstimationConfig { + + /** DeltaPresenceEstimationConfig quasiIds */ + quasiIds?: (google.privacy.dlp.v2.IQuasiId[]|null); + + /** DeltaPresenceEstimationConfig regionCode */ + regionCode?: (string|null); + + /** DeltaPresenceEstimationConfig auxiliaryTables */ + auxiliaryTables?: (google.privacy.dlp.v2.IStatisticalTable[]|null); + } + + /** Represents a DeltaPresenceEstimationConfig. */ + class DeltaPresenceEstimationConfig implements IDeltaPresenceEstimationConfig { + + /** + * Constructs a new DeltaPresenceEstimationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.PrivacyMetric.IDeltaPresenceEstimationConfig); + + /** DeltaPresenceEstimationConfig quasiIds. */ + public quasiIds: google.privacy.dlp.v2.IQuasiId[]; + + /** DeltaPresenceEstimationConfig regionCode. */ + public regionCode: string; + + /** DeltaPresenceEstimationConfig auxiliaryTables. */ + public auxiliaryTables: google.privacy.dlp.v2.IStatisticalTable[]; + + /** + * Creates a new DeltaPresenceEstimationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DeltaPresenceEstimationConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.PrivacyMetric.IDeltaPresenceEstimationConfig): google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig; + + /** + * Encodes the specified DeltaPresenceEstimationConfig message. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.verify|verify} messages. + * @param message DeltaPresenceEstimationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.PrivacyMetric.IDeltaPresenceEstimationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeltaPresenceEstimationConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.verify|verify} messages. + * @param message DeltaPresenceEstimationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.PrivacyMetric.IDeltaPresenceEstimationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeltaPresenceEstimationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeltaPresenceEstimationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig; + + /** + * Decodes a DeltaPresenceEstimationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeltaPresenceEstimationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig; + + /** + * Verifies a DeltaPresenceEstimationConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeltaPresenceEstimationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeltaPresenceEstimationConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig; + + /** + * Creates a plain object from a DeltaPresenceEstimationConfig message. Also converts values to other types if specified. + * @param message DeltaPresenceEstimationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeltaPresenceEstimationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeltaPresenceEstimationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an AnalyzeDataSourceRiskDetails. */ + interface IAnalyzeDataSourceRiskDetails { + + /** AnalyzeDataSourceRiskDetails requestedPrivacyMetric */ + requestedPrivacyMetric?: (google.privacy.dlp.v2.IPrivacyMetric|null); + + /** AnalyzeDataSourceRiskDetails requestedSourceTable */ + requestedSourceTable?: (google.privacy.dlp.v2.IBigQueryTable|null); + + /** AnalyzeDataSourceRiskDetails numericalStatsResult */ + numericalStatsResult?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.INumericalStatsResult|null); + + /** AnalyzeDataSourceRiskDetails categoricalStatsResult */ + categoricalStatsResult?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ICategoricalStatsResult|null); + + /** AnalyzeDataSourceRiskDetails kAnonymityResult */ + kAnonymityResult?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IKAnonymityResult|null); + + /** AnalyzeDataSourceRiskDetails lDiversityResult */ + lDiversityResult?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ILDiversityResult|null); + + /** AnalyzeDataSourceRiskDetails kMapEstimationResult */ + kMapEstimationResult?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IKMapEstimationResult|null); + + /** AnalyzeDataSourceRiskDetails deltaPresenceEstimationResult */ + deltaPresenceEstimationResult?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IDeltaPresenceEstimationResult|null); + + /** AnalyzeDataSourceRiskDetails requestedOptions */ + requestedOptions?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IRequestedRiskAnalysisOptions|null); + } + + /** Represents an AnalyzeDataSourceRiskDetails. */ + class AnalyzeDataSourceRiskDetails implements IAnalyzeDataSourceRiskDetails { + + /** + * Constructs a new AnalyzeDataSourceRiskDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IAnalyzeDataSourceRiskDetails); + + /** AnalyzeDataSourceRiskDetails requestedPrivacyMetric. */ + public requestedPrivacyMetric?: (google.privacy.dlp.v2.IPrivacyMetric|null); + + /** AnalyzeDataSourceRiskDetails requestedSourceTable. */ + public requestedSourceTable?: (google.privacy.dlp.v2.IBigQueryTable|null); + + /** AnalyzeDataSourceRiskDetails numericalStatsResult. */ + public numericalStatsResult?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.INumericalStatsResult|null); + + /** AnalyzeDataSourceRiskDetails categoricalStatsResult. */ + public categoricalStatsResult?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ICategoricalStatsResult|null); + + /** AnalyzeDataSourceRiskDetails kAnonymityResult. */ + public kAnonymityResult?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IKAnonymityResult|null); + + /** AnalyzeDataSourceRiskDetails lDiversityResult. */ + public lDiversityResult?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ILDiversityResult|null); + + /** AnalyzeDataSourceRiskDetails kMapEstimationResult. */ + public kMapEstimationResult?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IKMapEstimationResult|null); + + /** AnalyzeDataSourceRiskDetails deltaPresenceEstimationResult. */ + public deltaPresenceEstimationResult?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IDeltaPresenceEstimationResult|null); + + /** AnalyzeDataSourceRiskDetails requestedOptions. */ + public requestedOptions?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IRequestedRiskAnalysisOptions|null); + + /** AnalyzeDataSourceRiskDetails result. */ + public result?: ("numericalStatsResult"|"categoricalStatsResult"|"kAnonymityResult"|"lDiversityResult"|"kMapEstimationResult"|"deltaPresenceEstimationResult"); + + /** + * Creates a new AnalyzeDataSourceRiskDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalyzeDataSourceRiskDetails instance + */ + public static create(properties?: google.privacy.dlp.v2.IAnalyzeDataSourceRiskDetails): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails; + + /** + * Encodes the specified AnalyzeDataSourceRiskDetails message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.verify|verify} messages. + * @param message AnalyzeDataSourceRiskDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IAnalyzeDataSourceRiskDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalyzeDataSourceRiskDetails message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.verify|verify} messages. + * @param message AnalyzeDataSourceRiskDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IAnalyzeDataSourceRiskDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalyzeDataSourceRiskDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalyzeDataSourceRiskDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails; + + /** + * Decodes an AnalyzeDataSourceRiskDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalyzeDataSourceRiskDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails; + + /** + * Verifies an AnalyzeDataSourceRiskDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AnalyzeDataSourceRiskDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalyzeDataSourceRiskDetails + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails; + + /** + * Creates a plain object from an AnalyzeDataSourceRiskDetails message. Also converts values to other types if specified. + * @param message AnalyzeDataSourceRiskDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalyzeDataSourceRiskDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalyzeDataSourceRiskDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AnalyzeDataSourceRiskDetails { + + /** Properties of a NumericalStatsResult. */ + interface INumericalStatsResult { + + /** NumericalStatsResult minValue */ + minValue?: (google.privacy.dlp.v2.IValue|null); + + /** NumericalStatsResult maxValue */ + maxValue?: (google.privacy.dlp.v2.IValue|null); + + /** NumericalStatsResult quantileValues */ + quantileValues?: (google.privacy.dlp.v2.IValue[]|null); + } + + /** Represents a NumericalStatsResult. */ + class NumericalStatsResult implements INumericalStatsResult { + + /** + * Constructs a new NumericalStatsResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.INumericalStatsResult); + + /** NumericalStatsResult minValue. */ + public minValue?: (google.privacy.dlp.v2.IValue|null); + + /** NumericalStatsResult maxValue. */ + public maxValue?: (google.privacy.dlp.v2.IValue|null); + + /** NumericalStatsResult quantileValues. */ + public quantileValues: google.privacy.dlp.v2.IValue[]; + + /** + * Creates a new NumericalStatsResult instance using the specified properties. + * @param [properties] Properties to set + * @returns NumericalStatsResult instance + */ + public static create(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.INumericalStatsResult): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult; + + /** + * Encodes the specified NumericalStatsResult message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.verify|verify} messages. + * @param message NumericalStatsResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.INumericalStatsResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NumericalStatsResult message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.verify|verify} messages. + * @param message NumericalStatsResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.INumericalStatsResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NumericalStatsResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NumericalStatsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult; + + /** + * Decodes a NumericalStatsResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NumericalStatsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult; + + /** + * Verifies a NumericalStatsResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NumericalStatsResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NumericalStatsResult + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult; + + /** + * Creates a plain object from a NumericalStatsResult message. Also converts values to other types if specified. + * @param message NumericalStatsResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NumericalStatsResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NumericalStatsResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CategoricalStatsResult. */ + interface ICategoricalStatsResult { + + /** CategoricalStatsResult valueFrequencyHistogramBuckets */ + valueFrequencyHistogramBuckets?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.ICategoricalStatsHistogramBucket[]|null); + } + + /** Represents a CategoricalStatsResult. */ + class CategoricalStatsResult implements ICategoricalStatsResult { + + /** + * Constructs a new CategoricalStatsResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ICategoricalStatsResult); + + /** CategoricalStatsResult valueFrequencyHistogramBuckets. */ + public valueFrequencyHistogramBuckets: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.ICategoricalStatsHistogramBucket[]; + + /** + * Creates a new CategoricalStatsResult instance using the specified properties. + * @param [properties] Properties to set + * @returns CategoricalStatsResult instance + */ + public static create(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ICategoricalStatsResult): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult; + + /** + * Encodes the specified CategoricalStatsResult message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.verify|verify} messages. + * @param message CategoricalStatsResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ICategoricalStatsResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CategoricalStatsResult message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.verify|verify} messages. + * @param message CategoricalStatsResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ICategoricalStatsResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CategoricalStatsResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CategoricalStatsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult; + + /** + * Decodes a CategoricalStatsResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CategoricalStatsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult; + + /** + * Verifies a CategoricalStatsResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CategoricalStatsResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CategoricalStatsResult + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult; + + /** + * Creates a plain object from a CategoricalStatsResult message. Also converts values to other types if specified. + * @param message CategoricalStatsResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CategoricalStatsResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CategoricalStatsResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CategoricalStatsResult { + + /** Properties of a CategoricalStatsHistogramBucket. */ + interface ICategoricalStatsHistogramBucket { + + /** CategoricalStatsHistogramBucket valueFrequencyLowerBound */ + valueFrequencyLowerBound?: (number|Long|string|null); + + /** CategoricalStatsHistogramBucket valueFrequencyUpperBound */ + valueFrequencyUpperBound?: (number|Long|string|null); + + /** CategoricalStatsHistogramBucket bucketSize */ + bucketSize?: (number|Long|string|null); + + /** CategoricalStatsHistogramBucket bucketValues */ + bucketValues?: (google.privacy.dlp.v2.IValueFrequency[]|null); + + /** CategoricalStatsHistogramBucket bucketValueCount */ + bucketValueCount?: (number|Long|string|null); + } + + /** Represents a CategoricalStatsHistogramBucket. */ + class CategoricalStatsHistogramBucket implements ICategoricalStatsHistogramBucket { + + /** + * Constructs a new CategoricalStatsHistogramBucket. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.ICategoricalStatsHistogramBucket); + + /** CategoricalStatsHistogramBucket valueFrequencyLowerBound. */ + public valueFrequencyLowerBound: (number|Long|string); + + /** CategoricalStatsHistogramBucket valueFrequencyUpperBound. */ + public valueFrequencyUpperBound: (number|Long|string); + + /** CategoricalStatsHistogramBucket bucketSize. */ + public bucketSize: (number|Long|string); + + /** CategoricalStatsHistogramBucket bucketValues. */ + public bucketValues: google.privacy.dlp.v2.IValueFrequency[]; + + /** CategoricalStatsHistogramBucket bucketValueCount. */ + public bucketValueCount: (number|Long|string); + + /** + * Creates a new CategoricalStatsHistogramBucket instance using the specified properties. + * @param [properties] Properties to set + * @returns CategoricalStatsHistogramBucket instance + */ + public static create(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.ICategoricalStatsHistogramBucket): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket; + + /** + * Encodes the specified CategoricalStatsHistogramBucket message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.verify|verify} messages. + * @param message CategoricalStatsHistogramBucket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.ICategoricalStatsHistogramBucket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CategoricalStatsHistogramBucket message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.verify|verify} messages. + * @param message CategoricalStatsHistogramBucket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.ICategoricalStatsHistogramBucket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CategoricalStatsHistogramBucket message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CategoricalStatsHistogramBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket; + + /** + * Decodes a CategoricalStatsHistogramBucket message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CategoricalStatsHistogramBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket; + + /** + * Verifies a CategoricalStatsHistogramBucket message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CategoricalStatsHistogramBucket message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CategoricalStatsHistogramBucket + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket; + + /** + * Creates a plain object from a CategoricalStatsHistogramBucket message. Also converts values to other types if specified. + * @param message CategoricalStatsHistogramBucket + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CategoricalStatsHistogramBucket to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CategoricalStatsHistogramBucket + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a KAnonymityResult. */ + interface IKAnonymityResult { + + /** KAnonymityResult equivalenceClassHistogramBuckets */ + equivalenceClassHistogramBuckets?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.IKAnonymityHistogramBucket[]|null); + } + + /** Represents a KAnonymityResult. */ + class KAnonymityResult implements IKAnonymityResult { + + /** + * Constructs a new KAnonymityResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IKAnonymityResult); + + /** KAnonymityResult equivalenceClassHistogramBuckets. */ + public equivalenceClassHistogramBuckets: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.IKAnonymityHistogramBucket[]; + + /** + * Creates a new KAnonymityResult instance using the specified properties. + * @param [properties] Properties to set + * @returns KAnonymityResult instance + */ + public static create(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IKAnonymityResult): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult; + + /** + * Encodes the specified KAnonymityResult message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.verify|verify} messages. + * @param message KAnonymityResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IKAnonymityResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KAnonymityResult message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.verify|verify} messages. + * @param message KAnonymityResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IKAnonymityResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KAnonymityResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KAnonymityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult; + + /** + * Decodes a KAnonymityResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KAnonymityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult; + + /** + * Verifies a KAnonymityResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KAnonymityResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KAnonymityResult + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult; + + /** + * Creates a plain object from a KAnonymityResult message. Also converts values to other types if specified. + * @param message KAnonymityResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KAnonymityResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KAnonymityResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace KAnonymityResult { + + /** Properties of a KAnonymityEquivalenceClass. */ + interface IKAnonymityEquivalenceClass { + + /** KAnonymityEquivalenceClass quasiIdsValues */ + quasiIdsValues?: (google.privacy.dlp.v2.IValue[]|null); + + /** KAnonymityEquivalenceClass equivalenceClassSize */ + equivalenceClassSize?: (number|Long|string|null); + } + + /** Represents a KAnonymityEquivalenceClass. */ + class KAnonymityEquivalenceClass implements IKAnonymityEquivalenceClass { + + /** + * Constructs a new KAnonymityEquivalenceClass. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.IKAnonymityEquivalenceClass); + + /** KAnonymityEquivalenceClass quasiIdsValues. */ + public quasiIdsValues: google.privacy.dlp.v2.IValue[]; + + /** KAnonymityEquivalenceClass equivalenceClassSize. */ + public equivalenceClassSize: (number|Long|string); + + /** + * Creates a new KAnonymityEquivalenceClass instance using the specified properties. + * @param [properties] Properties to set + * @returns KAnonymityEquivalenceClass instance + */ + public static create(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.IKAnonymityEquivalenceClass): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass; + + /** + * Encodes the specified KAnonymityEquivalenceClass message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.verify|verify} messages. + * @param message KAnonymityEquivalenceClass message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.IKAnonymityEquivalenceClass, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KAnonymityEquivalenceClass message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.verify|verify} messages. + * @param message KAnonymityEquivalenceClass message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.IKAnonymityEquivalenceClass, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KAnonymityEquivalenceClass message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KAnonymityEquivalenceClass + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass; + + /** + * Decodes a KAnonymityEquivalenceClass message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KAnonymityEquivalenceClass + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass; + + /** + * Verifies a KAnonymityEquivalenceClass message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KAnonymityEquivalenceClass message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KAnonymityEquivalenceClass + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass; + + /** + * Creates a plain object from a KAnonymityEquivalenceClass message. Also converts values to other types if specified. + * @param message KAnonymityEquivalenceClass + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KAnonymityEquivalenceClass to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KAnonymityEquivalenceClass + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a KAnonymityHistogramBucket. */ + interface IKAnonymityHistogramBucket { + + /** KAnonymityHistogramBucket equivalenceClassSizeLowerBound */ + equivalenceClassSizeLowerBound?: (number|Long|string|null); + + /** KAnonymityHistogramBucket equivalenceClassSizeUpperBound */ + equivalenceClassSizeUpperBound?: (number|Long|string|null); + + /** KAnonymityHistogramBucket bucketSize */ + bucketSize?: (number|Long|string|null); + + /** KAnonymityHistogramBucket bucketValues */ + bucketValues?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.IKAnonymityEquivalenceClass[]|null); + + /** KAnonymityHistogramBucket bucketValueCount */ + bucketValueCount?: (number|Long|string|null); + } + + /** Represents a KAnonymityHistogramBucket. */ + class KAnonymityHistogramBucket implements IKAnonymityHistogramBucket { + + /** + * Constructs a new KAnonymityHistogramBucket. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.IKAnonymityHistogramBucket); + + /** KAnonymityHistogramBucket equivalenceClassSizeLowerBound. */ + public equivalenceClassSizeLowerBound: (number|Long|string); + + /** KAnonymityHistogramBucket equivalenceClassSizeUpperBound. */ + public equivalenceClassSizeUpperBound: (number|Long|string); + + /** KAnonymityHistogramBucket bucketSize. */ + public bucketSize: (number|Long|string); + + /** KAnonymityHistogramBucket bucketValues. */ + public bucketValues: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.IKAnonymityEquivalenceClass[]; + + /** KAnonymityHistogramBucket bucketValueCount. */ + public bucketValueCount: (number|Long|string); + + /** + * Creates a new KAnonymityHistogramBucket instance using the specified properties. + * @param [properties] Properties to set + * @returns KAnonymityHistogramBucket instance + */ + public static create(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.IKAnonymityHistogramBucket): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket; + + /** + * Encodes the specified KAnonymityHistogramBucket message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.verify|verify} messages. + * @param message KAnonymityHistogramBucket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.IKAnonymityHistogramBucket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KAnonymityHistogramBucket message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.verify|verify} messages. + * @param message KAnonymityHistogramBucket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.IKAnonymityHistogramBucket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KAnonymityHistogramBucket message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KAnonymityHistogramBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket; + + /** + * Decodes a KAnonymityHistogramBucket message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KAnonymityHistogramBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket; + + /** + * Verifies a KAnonymityHistogramBucket message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KAnonymityHistogramBucket message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KAnonymityHistogramBucket + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket; + + /** + * Creates a plain object from a KAnonymityHistogramBucket message. Also converts values to other types if specified. + * @param message KAnonymityHistogramBucket + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KAnonymityHistogramBucket to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KAnonymityHistogramBucket + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a LDiversityResult. */ + interface ILDiversityResult { + + /** LDiversityResult sensitiveValueFrequencyHistogramBuckets */ + sensitiveValueFrequencyHistogramBuckets?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.ILDiversityHistogramBucket[]|null); + } + + /** Represents a LDiversityResult. */ + class LDiversityResult implements ILDiversityResult { + + /** + * Constructs a new LDiversityResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ILDiversityResult); + + /** LDiversityResult sensitiveValueFrequencyHistogramBuckets. */ + public sensitiveValueFrequencyHistogramBuckets: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.ILDiversityHistogramBucket[]; + + /** + * Creates a new LDiversityResult instance using the specified properties. + * @param [properties] Properties to set + * @returns LDiversityResult instance + */ + public static create(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ILDiversityResult): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult; + + /** + * Encodes the specified LDiversityResult message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.verify|verify} messages. + * @param message LDiversityResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ILDiversityResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LDiversityResult message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.verify|verify} messages. + * @param message LDiversityResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ILDiversityResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LDiversityResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LDiversityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult; + + /** + * Decodes a LDiversityResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LDiversityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult; + + /** + * Verifies a LDiversityResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LDiversityResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LDiversityResult + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult; + + /** + * Creates a plain object from a LDiversityResult message. Also converts values to other types if specified. + * @param message LDiversityResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LDiversityResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LDiversityResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LDiversityResult { + + /** Properties of a LDiversityEquivalenceClass. */ + interface ILDiversityEquivalenceClass { + + /** LDiversityEquivalenceClass quasiIdsValues */ + quasiIdsValues?: (google.privacy.dlp.v2.IValue[]|null); + + /** LDiversityEquivalenceClass equivalenceClassSize */ + equivalenceClassSize?: (number|Long|string|null); + + /** LDiversityEquivalenceClass numDistinctSensitiveValues */ + numDistinctSensitiveValues?: (number|Long|string|null); + + /** LDiversityEquivalenceClass topSensitiveValues */ + topSensitiveValues?: (google.privacy.dlp.v2.IValueFrequency[]|null); + } + + /** Represents a LDiversityEquivalenceClass. */ + class LDiversityEquivalenceClass implements ILDiversityEquivalenceClass { + + /** + * Constructs a new LDiversityEquivalenceClass. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.ILDiversityEquivalenceClass); + + /** LDiversityEquivalenceClass quasiIdsValues. */ + public quasiIdsValues: google.privacy.dlp.v2.IValue[]; + + /** LDiversityEquivalenceClass equivalenceClassSize. */ + public equivalenceClassSize: (number|Long|string); + + /** LDiversityEquivalenceClass numDistinctSensitiveValues. */ + public numDistinctSensitiveValues: (number|Long|string); + + /** LDiversityEquivalenceClass topSensitiveValues. */ + public topSensitiveValues: google.privacy.dlp.v2.IValueFrequency[]; + + /** + * Creates a new LDiversityEquivalenceClass instance using the specified properties. + * @param [properties] Properties to set + * @returns LDiversityEquivalenceClass instance + */ + public static create(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.ILDiversityEquivalenceClass): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass; + + /** + * Encodes the specified LDiversityEquivalenceClass message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.verify|verify} messages. + * @param message LDiversityEquivalenceClass message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.ILDiversityEquivalenceClass, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LDiversityEquivalenceClass message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.verify|verify} messages. + * @param message LDiversityEquivalenceClass message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.ILDiversityEquivalenceClass, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LDiversityEquivalenceClass message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LDiversityEquivalenceClass + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass; + + /** + * Decodes a LDiversityEquivalenceClass message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LDiversityEquivalenceClass + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass; + + /** + * Verifies a LDiversityEquivalenceClass message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LDiversityEquivalenceClass message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LDiversityEquivalenceClass + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass; + + /** + * Creates a plain object from a LDiversityEquivalenceClass message. Also converts values to other types if specified. + * @param message LDiversityEquivalenceClass + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LDiversityEquivalenceClass to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LDiversityEquivalenceClass + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LDiversityHistogramBucket. */ + interface ILDiversityHistogramBucket { + + /** LDiversityHistogramBucket sensitiveValueFrequencyLowerBound */ + sensitiveValueFrequencyLowerBound?: (number|Long|string|null); + + /** LDiversityHistogramBucket sensitiveValueFrequencyUpperBound */ + sensitiveValueFrequencyUpperBound?: (number|Long|string|null); + + /** LDiversityHistogramBucket bucketSize */ + bucketSize?: (number|Long|string|null); + + /** LDiversityHistogramBucket bucketValues */ + bucketValues?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.ILDiversityEquivalenceClass[]|null); + + /** LDiversityHistogramBucket bucketValueCount */ + bucketValueCount?: (number|Long|string|null); + } + + /** Represents a LDiversityHistogramBucket. */ + class LDiversityHistogramBucket implements ILDiversityHistogramBucket { + + /** + * Constructs a new LDiversityHistogramBucket. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.ILDiversityHistogramBucket); + + /** LDiversityHistogramBucket sensitiveValueFrequencyLowerBound. */ + public sensitiveValueFrequencyLowerBound: (number|Long|string); + + /** LDiversityHistogramBucket sensitiveValueFrequencyUpperBound. */ + public sensitiveValueFrequencyUpperBound: (number|Long|string); + + /** LDiversityHistogramBucket bucketSize. */ + public bucketSize: (number|Long|string); + + /** LDiversityHistogramBucket bucketValues. */ + public bucketValues: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.ILDiversityEquivalenceClass[]; + + /** LDiversityHistogramBucket bucketValueCount. */ + public bucketValueCount: (number|Long|string); + + /** + * Creates a new LDiversityHistogramBucket instance using the specified properties. + * @param [properties] Properties to set + * @returns LDiversityHistogramBucket instance + */ + public static create(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.ILDiversityHistogramBucket): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket; + + /** + * Encodes the specified LDiversityHistogramBucket message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.verify|verify} messages. + * @param message LDiversityHistogramBucket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.ILDiversityHistogramBucket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LDiversityHistogramBucket message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.verify|verify} messages. + * @param message LDiversityHistogramBucket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.ILDiversityHistogramBucket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LDiversityHistogramBucket message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LDiversityHistogramBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket; + + /** + * Decodes a LDiversityHistogramBucket message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LDiversityHistogramBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket; + + /** + * Verifies a LDiversityHistogramBucket message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LDiversityHistogramBucket message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LDiversityHistogramBucket + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket; + + /** + * Creates a plain object from a LDiversityHistogramBucket message. Also converts values to other types if specified. + * @param message LDiversityHistogramBucket + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LDiversityHistogramBucket to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LDiversityHistogramBucket + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a KMapEstimationResult. */ + interface IKMapEstimationResult { + + /** KMapEstimationResult kMapEstimationHistogram */ + kMapEstimationHistogram?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.IKMapEstimationHistogramBucket[]|null); + } + + /** Represents a KMapEstimationResult. */ + class KMapEstimationResult implements IKMapEstimationResult { + + /** + * Constructs a new KMapEstimationResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IKMapEstimationResult); + + /** KMapEstimationResult kMapEstimationHistogram. */ + public kMapEstimationHistogram: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.IKMapEstimationHistogramBucket[]; + + /** + * Creates a new KMapEstimationResult instance using the specified properties. + * @param [properties] Properties to set + * @returns KMapEstimationResult instance + */ + public static create(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IKMapEstimationResult): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult; + + /** + * Encodes the specified KMapEstimationResult message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.verify|verify} messages. + * @param message KMapEstimationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IKMapEstimationResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KMapEstimationResult message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.verify|verify} messages. + * @param message KMapEstimationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IKMapEstimationResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KMapEstimationResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KMapEstimationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult; + + /** + * Decodes a KMapEstimationResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KMapEstimationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult; + + /** + * Verifies a KMapEstimationResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KMapEstimationResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KMapEstimationResult + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult; + + /** + * Creates a plain object from a KMapEstimationResult message. Also converts values to other types if specified. + * @param message KMapEstimationResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KMapEstimationResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KMapEstimationResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace KMapEstimationResult { + + /** Properties of a KMapEstimationQuasiIdValues. */ + interface IKMapEstimationQuasiIdValues { + + /** KMapEstimationQuasiIdValues quasiIdsValues */ + quasiIdsValues?: (google.privacy.dlp.v2.IValue[]|null); + + /** KMapEstimationQuasiIdValues estimatedAnonymity */ + estimatedAnonymity?: (number|Long|string|null); + } + + /** Represents a KMapEstimationQuasiIdValues. */ + class KMapEstimationQuasiIdValues implements IKMapEstimationQuasiIdValues { + + /** + * Constructs a new KMapEstimationQuasiIdValues. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.IKMapEstimationQuasiIdValues); + + /** KMapEstimationQuasiIdValues quasiIdsValues. */ + public quasiIdsValues: google.privacy.dlp.v2.IValue[]; + + /** KMapEstimationQuasiIdValues estimatedAnonymity. */ + public estimatedAnonymity: (number|Long|string); + + /** + * Creates a new KMapEstimationQuasiIdValues instance using the specified properties. + * @param [properties] Properties to set + * @returns KMapEstimationQuasiIdValues instance + */ + public static create(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.IKMapEstimationQuasiIdValues): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues; + + /** + * Encodes the specified KMapEstimationQuasiIdValues message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.verify|verify} messages. + * @param message KMapEstimationQuasiIdValues message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.IKMapEstimationQuasiIdValues, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KMapEstimationQuasiIdValues message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.verify|verify} messages. + * @param message KMapEstimationQuasiIdValues message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.IKMapEstimationQuasiIdValues, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KMapEstimationQuasiIdValues message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KMapEstimationQuasiIdValues + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues; + + /** + * Decodes a KMapEstimationQuasiIdValues message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KMapEstimationQuasiIdValues + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues; + + /** + * Verifies a KMapEstimationQuasiIdValues message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KMapEstimationQuasiIdValues message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KMapEstimationQuasiIdValues + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues; + + /** + * Creates a plain object from a KMapEstimationQuasiIdValues message. Also converts values to other types if specified. + * @param message KMapEstimationQuasiIdValues + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KMapEstimationQuasiIdValues to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KMapEstimationQuasiIdValues + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a KMapEstimationHistogramBucket. */ + interface IKMapEstimationHistogramBucket { + + /** KMapEstimationHistogramBucket minAnonymity */ + minAnonymity?: (number|Long|string|null); + + /** KMapEstimationHistogramBucket maxAnonymity */ + maxAnonymity?: (number|Long|string|null); + + /** KMapEstimationHistogramBucket bucketSize */ + bucketSize?: (number|Long|string|null); + + /** KMapEstimationHistogramBucket bucketValues */ + bucketValues?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.IKMapEstimationQuasiIdValues[]|null); + + /** KMapEstimationHistogramBucket bucketValueCount */ + bucketValueCount?: (number|Long|string|null); + } + + /** Represents a KMapEstimationHistogramBucket. */ + class KMapEstimationHistogramBucket implements IKMapEstimationHistogramBucket { + + /** + * Constructs a new KMapEstimationHistogramBucket. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.IKMapEstimationHistogramBucket); + + /** KMapEstimationHistogramBucket minAnonymity. */ + public minAnonymity: (number|Long|string); + + /** KMapEstimationHistogramBucket maxAnonymity. */ + public maxAnonymity: (number|Long|string); + + /** KMapEstimationHistogramBucket bucketSize. */ + public bucketSize: (number|Long|string); + + /** KMapEstimationHistogramBucket bucketValues. */ + public bucketValues: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.IKMapEstimationQuasiIdValues[]; + + /** KMapEstimationHistogramBucket bucketValueCount. */ + public bucketValueCount: (number|Long|string); + + /** + * Creates a new KMapEstimationHistogramBucket instance using the specified properties. + * @param [properties] Properties to set + * @returns KMapEstimationHistogramBucket instance + */ + public static create(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.IKMapEstimationHistogramBucket): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket; + + /** + * Encodes the specified KMapEstimationHistogramBucket message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.verify|verify} messages. + * @param message KMapEstimationHistogramBucket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.IKMapEstimationHistogramBucket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KMapEstimationHistogramBucket message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.verify|verify} messages. + * @param message KMapEstimationHistogramBucket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.IKMapEstimationHistogramBucket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KMapEstimationHistogramBucket message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KMapEstimationHistogramBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket; + + /** + * Decodes a KMapEstimationHistogramBucket message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KMapEstimationHistogramBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket; + + /** + * Verifies a KMapEstimationHistogramBucket message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KMapEstimationHistogramBucket message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KMapEstimationHistogramBucket + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket; + + /** + * Creates a plain object from a KMapEstimationHistogramBucket message. Also converts values to other types if specified. + * @param message KMapEstimationHistogramBucket + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KMapEstimationHistogramBucket to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KMapEstimationHistogramBucket + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DeltaPresenceEstimationResult. */ + interface IDeltaPresenceEstimationResult { + + /** DeltaPresenceEstimationResult deltaPresenceEstimationHistogram */ + deltaPresenceEstimationHistogram?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.IDeltaPresenceEstimationHistogramBucket[]|null); + } + + /** Represents a DeltaPresenceEstimationResult. */ + class DeltaPresenceEstimationResult implements IDeltaPresenceEstimationResult { + + /** + * Constructs a new DeltaPresenceEstimationResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IDeltaPresenceEstimationResult); + + /** DeltaPresenceEstimationResult deltaPresenceEstimationHistogram. */ + public deltaPresenceEstimationHistogram: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.IDeltaPresenceEstimationHistogramBucket[]; + + /** + * Creates a new DeltaPresenceEstimationResult instance using the specified properties. + * @param [properties] Properties to set + * @returns DeltaPresenceEstimationResult instance + */ + public static create(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IDeltaPresenceEstimationResult): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult; + + /** + * Encodes the specified DeltaPresenceEstimationResult message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.verify|verify} messages. + * @param message DeltaPresenceEstimationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IDeltaPresenceEstimationResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeltaPresenceEstimationResult message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.verify|verify} messages. + * @param message DeltaPresenceEstimationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IDeltaPresenceEstimationResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeltaPresenceEstimationResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeltaPresenceEstimationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult; + + /** + * Decodes a DeltaPresenceEstimationResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeltaPresenceEstimationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult; + + /** + * Verifies a DeltaPresenceEstimationResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeltaPresenceEstimationResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeltaPresenceEstimationResult + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult; + + /** + * Creates a plain object from a DeltaPresenceEstimationResult message. Also converts values to other types if specified. + * @param message DeltaPresenceEstimationResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeltaPresenceEstimationResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeltaPresenceEstimationResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DeltaPresenceEstimationResult { + + /** Properties of a DeltaPresenceEstimationQuasiIdValues. */ + interface IDeltaPresenceEstimationQuasiIdValues { + + /** DeltaPresenceEstimationQuasiIdValues quasiIdsValues */ + quasiIdsValues?: (google.privacy.dlp.v2.IValue[]|null); + + /** DeltaPresenceEstimationQuasiIdValues estimatedProbability */ + estimatedProbability?: (number|null); + } + + /** Represents a DeltaPresenceEstimationQuasiIdValues. */ + class DeltaPresenceEstimationQuasiIdValues implements IDeltaPresenceEstimationQuasiIdValues { + + /** + * Constructs a new DeltaPresenceEstimationQuasiIdValues. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.IDeltaPresenceEstimationQuasiIdValues); + + /** DeltaPresenceEstimationQuasiIdValues quasiIdsValues. */ + public quasiIdsValues: google.privacy.dlp.v2.IValue[]; + + /** DeltaPresenceEstimationQuasiIdValues estimatedProbability. */ + public estimatedProbability: number; + + /** + * Creates a new DeltaPresenceEstimationQuasiIdValues instance using the specified properties. + * @param [properties] Properties to set + * @returns DeltaPresenceEstimationQuasiIdValues instance + */ + public static create(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.IDeltaPresenceEstimationQuasiIdValues): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues; + + /** + * Encodes the specified DeltaPresenceEstimationQuasiIdValues message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.verify|verify} messages. + * @param message DeltaPresenceEstimationQuasiIdValues message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.IDeltaPresenceEstimationQuasiIdValues, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeltaPresenceEstimationQuasiIdValues message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.verify|verify} messages. + * @param message DeltaPresenceEstimationQuasiIdValues message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.IDeltaPresenceEstimationQuasiIdValues, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeltaPresenceEstimationQuasiIdValues message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeltaPresenceEstimationQuasiIdValues + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues; + + /** + * Decodes a DeltaPresenceEstimationQuasiIdValues message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeltaPresenceEstimationQuasiIdValues + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues; + + /** + * Verifies a DeltaPresenceEstimationQuasiIdValues message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeltaPresenceEstimationQuasiIdValues message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeltaPresenceEstimationQuasiIdValues + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues; + + /** + * Creates a plain object from a DeltaPresenceEstimationQuasiIdValues message. Also converts values to other types if specified. + * @param message DeltaPresenceEstimationQuasiIdValues + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeltaPresenceEstimationQuasiIdValues to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeltaPresenceEstimationQuasiIdValues + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeltaPresenceEstimationHistogramBucket. */ + interface IDeltaPresenceEstimationHistogramBucket { + + /** DeltaPresenceEstimationHistogramBucket minProbability */ + minProbability?: (number|null); + + /** DeltaPresenceEstimationHistogramBucket maxProbability */ + maxProbability?: (number|null); + + /** DeltaPresenceEstimationHistogramBucket bucketSize */ + bucketSize?: (number|Long|string|null); + + /** DeltaPresenceEstimationHistogramBucket bucketValues */ + bucketValues?: (google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.IDeltaPresenceEstimationQuasiIdValues[]|null); + + /** DeltaPresenceEstimationHistogramBucket bucketValueCount */ + bucketValueCount?: (number|Long|string|null); + } + + /** Represents a DeltaPresenceEstimationHistogramBucket. */ + class DeltaPresenceEstimationHistogramBucket implements IDeltaPresenceEstimationHistogramBucket { + + /** + * Constructs a new DeltaPresenceEstimationHistogramBucket. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.IDeltaPresenceEstimationHistogramBucket); + + /** DeltaPresenceEstimationHistogramBucket minProbability. */ + public minProbability: number; + + /** DeltaPresenceEstimationHistogramBucket maxProbability. */ + public maxProbability: number; + + /** DeltaPresenceEstimationHistogramBucket bucketSize. */ + public bucketSize: (number|Long|string); + + /** DeltaPresenceEstimationHistogramBucket bucketValues. */ + public bucketValues: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.IDeltaPresenceEstimationQuasiIdValues[]; + + /** DeltaPresenceEstimationHistogramBucket bucketValueCount. */ + public bucketValueCount: (number|Long|string); + + /** + * Creates a new DeltaPresenceEstimationHistogramBucket instance using the specified properties. + * @param [properties] Properties to set + * @returns DeltaPresenceEstimationHistogramBucket instance + */ + public static create(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.IDeltaPresenceEstimationHistogramBucket): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket; + + /** + * Encodes the specified DeltaPresenceEstimationHistogramBucket message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.verify|verify} messages. + * @param message DeltaPresenceEstimationHistogramBucket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.IDeltaPresenceEstimationHistogramBucket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeltaPresenceEstimationHistogramBucket message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.verify|verify} messages. + * @param message DeltaPresenceEstimationHistogramBucket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.IDeltaPresenceEstimationHistogramBucket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeltaPresenceEstimationHistogramBucket message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeltaPresenceEstimationHistogramBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket; + + /** + * Decodes a DeltaPresenceEstimationHistogramBucket message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeltaPresenceEstimationHistogramBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket; + + /** + * Verifies a DeltaPresenceEstimationHistogramBucket message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeltaPresenceEstimationHistogramBucket message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeltaPresenceEstimationHistogramBucket + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket; + + /** + * Creates a plain object from a DeltaPresenceEstimationHistogramBucket message. Also converts values to other types if specified. + * @param message DeltaPresenceEstimationHistogramBucket + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeltaPresenceEstimationHistogramBucket to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeltaPresenceEstimationHistogramBucket + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a RequestedRiskAnalysisOptions. */ + interface IRequestedRiskAnalysisOptions { + + /** RequestedRiskAnalysisOptions jobConfig */ + jobConfig?: (google.privacy.dlp.v2.IRiskAnalysisJobConfig|null); + } + + /** Represents a RequestedRiskAnalysisOptions. */ + class RequestedRiskAnalysisOptions implements IRequestedRiskAnalysisOptions { + + /** + * Constructs a new RequestedRiskAnalysisOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IRequestedRiskAnalysisOptions); + + /** RequestedRiskAnalysisOptions jobConfig. */ + public jobConfig?: (google.privacy.dlp.v2.IRiskAnalysisJobConfig|null); + + /** + * Creates a new RequestedRiskAnalysisOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestedRiskAnalysisOptions instance + */ + public static create(properties?: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IRequestedRiskAnalysisOptions): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions; + + /** + * Encodes the specified RequestedRiskAnalysisOptions message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.verify|verify} messages. + * @param message RequestedRiskAnalysisOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IRequestedRiskAnalysisOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestedRiskAnalysisOptions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.verify|verify} messages. + * @param message RequestedRiskAnalysisOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IRequestedRiskAnalysisOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestedRiskAnalysisOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RequestedRiskAnalysisOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions; + + /** + * Decodes a RequestedRiskAnalysisOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RequestedRiskAnalysisOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions; + + /** + * Verifies a RequestedRiskAnalysisOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RequestedRiskAnalysisOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestedRiskAnalysisOptions + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions; + + /** + * Creates a plain object from a RequestedRiskAnalysisOptions message. Also converts values to other types if specified. + * @param message RequestedRiskAnalysisOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestedRiskAnalysisOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RequestedRiskAnalysisOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ValueFrequency. */ + interface IValueFrequency { + + /** ValueFrequency value */ + value?: (google.privacy.dlp.v2.IValue|null); + + /** ValueFrequency count */ + count?: (number|Long|string|null); + } + + /** Represents a ValueFrequency. */ + class ValueFrequency implements IValueFrequency { + + /** + * Constructs a new ValueFrequency. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IValueFrequency); + + /** ValueFrequency value. */ + public value?: (google.privacy.dlp.v2.IValue|null); + + /** ValueFrequency count. */ + public count: (number|Long|string); + + /** + * Creates a new ValueFrequency instance using the specified properties. + * @param [properties] Properties to set + * @returns ValueFrequency instance + */ + public static create(properties?: google.privacy.dlp.v2.IValueFrequency): google.privacy.dlp.v2.ValueFrequency; + + /** + * Encodes the specified ValueFrequency message. Does not implicitly {@link google.privacy.dlp.v2.ValueFrequency.verify|verify} messages. + * @param message ValueFrequency message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IValueFrequency, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ValueFrequency message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ValueFrequency.verify|verify} messages. + * @param message ValueFrequency message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IValueFrequency, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ValueFrequency message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ValueFrequency + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ValueFrequency; + + /** + * Decodes a ValueFrequency message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ValueFrequency + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ValueFrequency; + + /** + * Verifies a ValueFrequency message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ValueFrequency message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ValueFrequency + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ValueFrequency; + + /** + * Creates a plain object from a ValueFrequency message. Also converts values to other types if specified. + * @param message ValueFrequency + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ValueFrequency, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ValueFrequency to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ValueFrequency + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Value. */ + interface IValue { + + /** Value integerValue */ + integerValue?: (number|Long|string|null); + + /** Value floatValue */ + floatValue?: (number|null); + + /** Value stringValue */ + stringValue?: (string|null); + + /** Value booleanValue */ + booleanValue?: (boolean|null); + + /** Value timestampValue */ + timestampValue?: (google.protobuf.ITimestamp|null); + + /** Value timeValue */ + timeValue?: (google.type.ITimeOfDay|null); + + /** Value dateValue */ + dateValue?: (google.type.IDate|null); + + /** Value dayOfWeekValue */ + dayOfWeekValue?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); + } + + /** Represents a Value. */ + class Value implements IValue { + + /** + * Constructs a new Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IValue); + + /** Value integerValue. */ + public integerValue?: (number|Long|string|null); + + /** Value floatValue. */ + public floatValue?: (number|null); + + /** Value stringValue. */ + public stringValue?: (string|null); + + /** Value booleanValue. */ + public booleanValue?: (boolean|null); + + /** Value timestampValue. */ + public timestampValue?: (google.protobuf.ITimestamp|null); + + /** Value timeValue. */ + public timeValue?: (google.type.ITimeOfDay|null); + + /** Value dateValue. */ + public dateValue?: (google.type.IDate|null); + + /** Value dayOfWeekValue. */ + public dayOfWeekValue?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); + + /** Value type. */ + public type?: ("integerValue"|"floatValue"|"stringValue"|"booleanValue"|"timestampValue"|"timeValue"|"dateValue"|"dayOfWeekValue"); + + /** + * Creates a new Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Value instance + */ + public static create(properties?: google.privacy.dlp.v2.IValue): google.privacy.dlp.v2.Value; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.privacy.dlp.v2.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Value; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Value; + + /** + * Verifies a Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Value + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Value; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuoteInfo. */ + interface IQuoteInfo { + + /** QuoteInfo dateTime */ + dateTime?: (google.privacy.dlp.v2.IDateTime|null); + } + + /** Represents a QuoteInfo. */ + class QuoteInfo implements IQuoteInfo { + + /** + * Constructs a new QuoteInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IQuoteInfo); + + /** QuoteInfo dateTime. */ + public dateTime?: (google.privacy.dlp.v2.IDateTime|null); + + /** QuoteInfo parsedQuote. */ + public parsedQuote?: "dateTime"; + + /** + * Creates a new QuoteInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns QuoteInfo instance + */ + public static create(properties?: google.privacy.dlp.v2.IQuoteInfo): google.privacy.dlp.v2.QuoteInfo; + + /** + * Encodes the specified QuoteInfo message. Does not implicitly {@link google.privacy.dlp.v2.QuoteInfo.verify|verify} messages. + * @param message QuoteInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IQuoteInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuoteInfo message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.QuoteInfo.verify|verify} messages. + * @param message QuoteInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IQuoteInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuoteInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuoteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.QuoteInfo; + + /** + * Decodes a QuoteInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuoteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.QuoteInfo; + + /** + * Verifies a QuoteInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a QuoteInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuoteInfo + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.QuoteInfo; + + /** + * Creates a plain object from a QuoteInfo message. Also converts values to other types if specified. + * @param message QuoteInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.QuoteInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuoteInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuoteInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DateTime. */ + interface IDateTime { + + /** DateTime date */ + date?: (google.type.IDate|null); + + /** DateTime dayOfWeek */ + dayOfWeek?: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek|null); + + /** DateTime time */ + time?: (google.type.ITimeOfDay|null); + + /** DateTime timeZone */ + timeZone?: (google.privacy.dlp.v2.DateTime.ITimeZone|null); + } + + /** Represents a DateTime. */ + class DateTime implements IDateTime { + + /** + * Constructs a new DateTime. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDateTime); + + /** DateTime date. */ + public date?: (google.type.IDate|null); + + /** DateTime dayOfWeek. */ + public dayOfWeek: (google.type.DayOfWeek|keyof typeof google.type.DayOfWeek); + + /** DateTime time. */ + public time?: (google.type.ITimeOfDay|null); + + /** DateTime timeZone. */ + public timeZone?: (google.privacy.dlp.v2.DateTime.ITimeZone|null); + + /** + * Creates a new DateTime instance using the specified properties. + * @param [properties] Properties to set + * @returns DateTime instance + */ + public static create(properties?: google.privacy.dlp.v2.IDateTime): google.privacy.dlp.v2.DateTime; + + /** + * Encodes the specified DateTime message. Does not implicitly {@link google.privacy.dlp.v2.DateTime.verify|verify} messages. + * @param message DateTime message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDateTime, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DateTime message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DateTime.verify|verify} messages. + * @param message DateTime message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDateTime, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DateTime message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DateTime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DateTime; + + /** + * Decodes a DateTime message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DateTime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DateTime; + + /** + * Verifies a DateTime message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DateTime message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DateTime + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DateTime; + + /** + * Creates a plain object from a DateTime message. Also converts values to other types if specified. + * @param message DateTime + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DateTime, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DateTime to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DateTime + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DateTime { + + /** Properties of a TimeZone. */ + interface ITimeZone { + + /** TimeZone offsetMinutes */ + offsetMinutes?: (number|null); + } + + /** Represents a TimeZone. */ + class TimeZone implements ITimeZone { + + /** + * Constructs a new TimeZone. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.DateTime.ITimeZone); + + /** TimeZone offsetMinutes. */ + public offsetMinutes: number; + + /** + * Creates a new TimeZone instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeZone instance + */ + public static create(properties?: google.privacy.dlp.v2.DateTime.ITimeZone): google.privacy.dlp.v2.DateTime.TimeZone; + + /** + * Encodes the specified TimeZone message. Does not implicitly {@link google.privacy.dlp.v2.DateTime.TimeZone.verify|verify} messages. + * @param message TimeZone message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.DateTime.ITimeZone, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeZone message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DateTime.TimeZone.verify|verify} messages. + * @param message TimeZone message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.DateTime.ITimeZone, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeZone message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeZone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DateTime.TimeZone; + + /** + * Decodes a TimeZone message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeZone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DateTime.TimeZone; + + /** + * Verifies a TimeZone message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeZone message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeZone + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DateTime.TimeZone; + + /** + * Creates a plain object from a TimeZone message. Also converts values to other types if specified. + * @param message TimeZone + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DateTime.TimeZone, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeZone to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeZone + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DeidentifyConfig. */ + interface IDeidentifyConfig { + + /** DeidentifyConfig infoTypeTransformations */ + infoTypeTransformations?: (google.privacy.dlp.v2.IInfoTypeTransformations|null); + + /** DeidentifyConfig recordTransformations */ + recordTransformations?: (google.privacy.dlp.v2.IRecordTransformations|null); + + /** DeidentifyConfig imageTransformations */ + imageTransformations?: (google.privacy.dlp.v2.IImageTransformations|null); + + /** DeidentifyConfig transformationErrorHandling */ + transformationErrorHandling?: (google.privacy.dlp.v2.ITransformationErrorHandling|null); + } + + /** Represents a DeidentifyConfig. */ + class DeidentifyConfig implements IDeidentifyConfig { + + /** + * Constructs a new DeidentifyConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDeidentifyConfig); + + /** DeidentifyConfig infoTypeTransformations. */ + public infoTypeTransformations?: (google.privacy.dlp.v2.IInfoTypeTransformations|null); + + /** DeidentifyConfig recordTransformations. */ + public recordTransformations?: (google.privacy.dlp.v2.IRecordTransformations|null); + + /** DeidentifyConfig imageTransformations. */ + public imageTransformations?: (google.privacy.dlp.v2.IImageTransformations|null); + + /** DeidentifyConfig transformationErrorHandling. */ + public transformationErrorHandling?: (google.privacy.dlp.v2.ITransformationErrorHandling|null); + + /** DeidentifyConfig transformation. */ + public transformation?: ("infoTypeTransformations"|"recordTransformations"|"imageTransformations"); + + /** + * Creates a new DeidentifyConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DeidentifyConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.IDeidentifyConfig): google.privacy.dlp.v2.DeidentifyConfig; + + /** + * Encodes the specified DeidentifyConfig message. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyConfig.verify|verify} messages. + * @param message DeidentifyConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDeidentifyConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeidentifyConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyConfig.verify|verify} messages. + * @param message DeidentifyConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDeidentifyConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeidentifyConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeidentifyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DeidentifyConfig; + + /** + * Decodes a DeidentifyConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeidentifyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DeidentifyConfig; + + /** + * Verifies a DeidentifyConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeidentifyConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeidentifyConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DeidentifyConfig; + + /** + * Creates a plain object from a DeidentifyConfig message. Also converts values to other types if specified. + * @param message DeidentifyConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DeidentifyConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeidentifyConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeidentifyConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImageTransformations. */ + interface IImageTransformations { + + /** ImageTransformations transforms */ + transforms?: (google.privacy.dlp.v2.ImageTransformations.IImageTransformation[]|null); + } + + /** Represents an ImageTransformations. */ + class ImageTransformations implements IImageTransformations { + + /** + * Constructs a new ImageTransformations. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IImageTransformations); + + /** ImageTransformations transforms. */ + public transforms: google.privacy.dlp.v2.ImageTransformations.IImageTransformation[]; + + /** + * Creates a new ImageTransformations instance using the specified properties. + * @param [properties] Properties to set + * @returns ImageTransformations instance + */ + public static create(properties?: google.privacy.dlp.v2.IImageTransformations): google.privacy.dlp.v2.ImageTransformations; + + /** + * Encodes the specified ImageTransformations message. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.verify|verify} messages. + * @param message ImageTransformations message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IImageTransformations, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImageTransformations message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.verify|verify} messages. + * @param message ImageTransformations message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IImageTransformations, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImageTransformations message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImageTransformations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ImageTransformations; + + /** + * Decodes an ImageTransformations message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImageTransformations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ImageTransformations; + + /** + * Verifies an ImageTransformations message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImageTransformations message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImageTransformations + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ImageTransformations; + + /** + * Creates a plain object from an ImageTransformations message. Also converts values to other types if specified. + * @param message ImageTransformations + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ImageTransformations, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImageTransformations to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImageTransformations + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ImageTransformations { + + /** Properties of an ImageTransformation. */ + interface IImageTransformation { + + /** ImageTransformation selectedInfoTypes */ + selectedInfoTypes?: (google.privacy.dlp.v2.ImageTransformations.ImageTransformation.ISelectedInfoTypes|null); + + /** ImageTransformation allInfoTypes */ + allInfoTypes?: (google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllInfoTypes|null); + + /** ImageTransformation allText */ + allText?: (google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllText|null); + + /** ImageTransformation redactionColor */ + redactionColor?: (google.privacy.dlp.v2.IColor|null); + } + + /** Represents an ImageTransformation. */ + class ImageTransformation implements IImageTransformation { + + /** + * Constructs a new ImageTransformation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ImageTransformations.IImageTransformation); + + /** ImageTransformation selectedInfoTypes. */ + public selectedInfoTypes?: (google.privacy.dlp.v2.ImageTransformations.ImageTransformation.ISelectedInfoTypes|null); + + /** ImageTransformation allInfoTypes. */ + public allInfoTypes?: (google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllInfoTypes|null); + + /** ImageTransformation allText. */ + public allText?: (google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllText|null); + + /** ImageTransformation redactionColor. */ + public redactionColor?: (google.privacy.dlp.v2.IColor|null); + + /** ImageTransformation target. */ + public target?: ("selectedInfoTypes"|"allInfoTypes"|"allText"); + + /** + * Creates a new ImageTransformation instance using the specified properties. + * @param [properties] Properties to set + * @returns ImageTransformation instance + */ + public static create(properties?: google.privacy.dlp.v2.ImageTransformations.IImageTransformation): google.privacy.dlp.v2.ImageTransformations.ImageTransformation; + + /** + * Encodes the specified ImageTransformation message. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.verify|verify} messages. + * @param message ImageTransformation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ImageTransformations.IImageTransformation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImageTransformation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.verify|verify} messages. + * @param message ImageTransformation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ImageTransformations.IImageTransformation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImageTransformation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImageTransformation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ImageTransformations.ImageTransformation; + + /** + * Decodes an ImageTransformation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImageTransformation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ImageTransformations.ImageTransformation; + + /** + * Verifies an ImageTransformation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImageTransformation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImageTransformation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ImageTransformations.ImageTransformation; + + /** + * Creates a plain object from an ImageTransformation message. Also converts values to other types if specified. + * @param message ImageTransformation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ImageTransformations.ImageTransformation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImageTransformation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImageTransformation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ImageTransformation { + + /** Properties of a SelectedInfoTypes. */ + interface ISelectedInfoTypes { + + /** SelectedInfoTypes infoTypes */ + infoTypes?: (google.privacy.dlp.v2.IInfoType[]|null); + } + + /** Represents a SelectedInfoTypes. */ + class SelectedInfoTypes implements ISelectedInfoTypes { + + /** + * Constructs a new SelectedInfoTypes. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.ISelectedInfoTypes); + + /** SelectedInfoTypes infoTypes. */ + public infoTypes: google.privacy.dlp.v2.IInfoType[]; + + /** + * Creates a new SelectedInfoTypes instance using the specified properties. + * @param [properties] Properties to set + * @returns SelectedInfoTypes instance + */ + public static create(properties?: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.ISelectedInfoTypes): google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes; + + /** + * Encodes the specified SelectedInfoTypes message. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.verify|verify} messages. + * @param message SelectedInfoTypes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.ISelectedInfoTypes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SelectedInfoTypes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.verify|verify} messages. + * @param message SelectedInfoTypes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.ISelectedInfoTypes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SelectedInfoTypes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SelectedInfoTypes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes; + + /** + * Decodes a SelectedInfoTypes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SelectedInfoTypes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes; + + /** + * Verifies a SelectedInfoTypes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SelectedInfoTypes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SelectedInfoTypes + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes; + + /** + * Creates a plain object from a SelectedInfoTypes message. Also converts values to other types if specified. + * @param message SelectedInfoTypes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SelectedInfoTypes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SelectedInfoTypes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AllInfoTypes. */ + interface IAllInfoTypes { + } + + /** Represents an AllInfoTypes. */ + class AllInfoTypes implements IAllInfoTypes { + + /** + * Constructs a new AllInfoTypes. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllInfoTypes); + + /** + * Creates a new AllInfoTypes instance using the specified properties. + * @param [properties] Properties to set + * @returns AllInfoTypes instance + */ + public static create(properties?: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllInfoTypes): google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes; + + /** + * Encodes the specified AllInfoTypes message. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.verify|verify} messages. + * @param message AllInfoTypes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllInfoTypes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AllInfoTypes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.verify|verify} messages. + * @param message AllInfoTypes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllInfoTypes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AllInfoTypes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AllInfoTypes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes; + + /** + * Decodes an AllInfoTypes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AllInfoTypes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes; + + /** + * Verifies an AllInfoTypes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AllInfoTypes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AllInfoTypes + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes; + + /** + * Creates a plain object from an AllInfoTypes message. Also converts values to other types if specified. + * @param message AllInfoTypes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AllInfoTypes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AllInfoTypes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AllText. */ + interface IAllText { + } + + /** Represents an AllText. */ + class AllText implements IAllText { + + /** + * Constructs a new AllText. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllText); + + /** + * Creates a new AllText instance using the specified properties. + * @param [properties] Properties to set + * @returns AllText instance + */ + public static create(properties?: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllText): google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText; + + /** + * Encodes the specified AllText message. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.verify|verify} messages. + * @param message AllText message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AllText message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.verify|verify} messages. + * @param message AllText message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllText, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AllText message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AllText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText; + + /** + * Decodes an AllText message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AllText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText; + + /** + * Verifies an AllText message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AllText message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AllText + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText; + + /** + * Creates a plain object from an AllText message. Also converts values to other types if specified. + * @param message AllText + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AllText to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AllText + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a TransformationErrorHandling. */ + interface ITransformationErrorHandling { + + /** TransformationErrorHandling throwError */ + throwError?: (google.privacy.dlp.v2.TransformationErrorHandling.IThrowError|null); + + /** TransformationErrorHandling leaveUntransformed */ + leaveUntransformed?: (google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed|null); + } + + /** Represents a TransformationErrorHandling. */ + class TransformationErrorHandling implements ITransformationErrorHandling { + + /** + * Constructs a new TransformationErrorHandling. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ITransformationErrorHandling); + + /** TransformationErrorHandling throwError. */ + public throwError?: (google.privacy.dlp.v2.TransformationErrorHandling.IThrowError|null); + + /** TransformationErrorHandling leaveUntransformed. */ + public leaveUntransformed?: (google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed|null); + + /** TransformationErrorHandling mode. */ + public mode?: ("throwError"|"leaveUntransformed"); + + /** + * Creates a new TransformationErrorHandling instance using the specified properties. + * @param [properties] Properties to set + * @returns TransformationErrorHandling instance + */ + public static create(properties?: google.privacy.dlp.v2.ITransformationErrorHandling): google.privacy.dlp.v2.TransformationErrorHandling; + + /** + * Encodes the specified TransformationErrorHandling message. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.verify|verify} messages. + * @param message TransformationErrorHandling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ITransformationErrorHandling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TransformationErrorHandling message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.verify|verify} messages. + * @param message TransformationErrorHandling message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ITransformationErrorHandling, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TransformationErrorHandling message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TransformationErrorHandling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationErrorHandling; + + /** + * Decodes a TransformationErrorHandling message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransformationErrorHandling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationErrorHandling; + + /** + * Verifies a TransformationErrorHandling message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TransformationErrorHandling message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransformationErrorHandling + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationErrorHandling; + + /** + * Creates a plain object from a TransformationErrorHandling message. Also converts values to other types if specified. + * @param message TransformationErrorHandling + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.TransformationErrorHandling, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransformationErrorHandling to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TransformationErrorHandling + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TransformationErrorHandling { + + /** Properties of a ThrowError. */ + interface IThrowError { + } + + /** Represents a ThrowError. */ + class ThrowError implements IThrowError { + + /** + * Constructs a new ThrowError. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.TransformationErrorHandling.IThrowError); + + /** + * Creates a new ThrowError instance using the specified properties. + * @param [properties] Properties to set + * @returns ThrowError instance + */ + public static create(properties?: google.privacy.dlp.v2.TransformationErrorHandling.IThrowError): google.privacy.dlp.v2.TransformationErrorHandling.ThrowError; + + /** + * Encodes the specified ThrowError message. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.verify|verify} messages. + * @param message ThrowError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.TransformationErrorHandling.IThrowError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ThrowError message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.verify|verify} messages. + * @param message ThrowError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.TransformationErrorHandling.IThrowError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ThrowError message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ThrowError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationErrorHandling.ThrowError; + + /** + * Decodes a ThrowError message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ThrowError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationErrorHandling.ThrowError; + + /** + * Verifies a ThrowError message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ThrowError message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ThrowError + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationErrorHandling.ThrowError; + + /** + * Creates a plain object from a ThrowError message. Also converts values to other types if specified. + * @param message ThrowError + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.TransformationErrorHandling.ThrowError, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ThrowError to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ThrowError + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LeaveUntransformed. */ + interface ILeaveUntransformed { + } + + /** Represents a LeaveUntransformed. */ + class LeaveUntransformed implements ILeaveUntransformed { + + /** + * Constructs a new LeaveUntransformed. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed); + + /** + * Creates a new LeaveUntransformed instance using the specified properties. + * @param [properties] Properties to set + * @returns LeaveUntransformed instance + */ + public static create(properties?: google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed): google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed; + + /** + * Encodes the specified LeaveUntransformed message. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.verify|verify} messages. + * @param message LeaveUntransformed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LeaveUntransformed message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.verify|verify} messages. + * @param message LeaveUntransformed message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LeaveUntransformed message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LeaveUntransformed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed; + + /** + * Decodes a LeaveUntransformed message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LeaveUntransformed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed; + + /** + * Verifies a LeaveUntransformed message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LeaveUntransformed message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LeaveUntransformed + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed; + + /** + * Creates a plain object from a LeaveUntransformed message. Also converts values to other types if specified. + * @param message LeaveUntransformed + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LeaveUntransformed to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LeaveUntransformed + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a PrimitiveTransformation. */ + interface IPrimitiveTransformation { + + /** PrimitiveTransformation replaceConfig */ + replaceConfig?: (google.privacy.dlp.v2.IReplaceValueConfig|null); + + /** PrimitiveTransformation redactConfig */ + redactConfig?: (google.privacy.dlp.v2.IRedactConfig|null); + + /** PrimitiveTransformation characterMaskConfig */ + characterMaskConfig?: (google.privacy.dlp.v2.ICharacterMaskConfig|null); + + /** PrimitiveTransformation cryptoReplaceFfxFpeConfig */ + cryptoReplaceFfxFpeConfig?: (google.privacy.dlp.v2.ICryptoReplaceFfxFpeConfig|null); + + /** PrimitiveTransformation fixedSizeBucketingConfig */ + fixedSizeBucketingConfig?: (google.privacy.dlp.v2.IFixedSizeBucketingConfig|null); + + /** PrimitiveTransformation bucketingConfig */ + bucketingConfig?: (google.privacy.dlp.v2.IBucketingConfig|null); + + /** PrimitiveTransformation replaceWithInfoTypeConfig */ + replaceWithInfoTypeConfig?: (google.privacy.dlp.v2.IReplaceWithInfoTypeConfig|null); + + /** PrimitiveTransformation timePartConfig */ + timePartConfig?: (google.privacy.dlp.v2.ITimePartConfig|null); + + /** PrimitiveTransformation cryptoHashConfig */ + cryptoHashConfig?: (google.privacy.dlp.v2.ICryptoHashConfig|null); + + /** PrimitiveTransformation dateShiftConfig */ + dateShiftConfig?: (google.privacy.dlp.v2.IDateShiftConfig|null); + + /** PrimitiveTransformation cryptoDeterministicConfig */ + cryptoDeterministicConfig?: (google.privacy.dlp.v2.ICryptoDeterministicConfig|null); + + /** PrimitiveTransformation replaceDictionaryConfig */ + replaceDictionaryConfig?: (google.privacy.dlp.v2.IReplaceDictionaryConfig|null); + } + + /** Represents a PrimitiveTransformation. */ + class PrimitiveTransformation implements IPrimitiveTransformation { + + /** + * Constructs a new PrimitiveTransformation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IPrimitiveTransformation); + + /** PrimitiveTransformation replaceConfig. */ + public replaceConfig?: (google.privacy.dlp.v2.IReplaceValueConfig|null); + + /** PrimitiveTransformation redactConfig. */ + public redactConfig?: (google.privacy.dlp.v2.IRedactConfig|null); + + /** PrimitiveTransformation characterMaskConfig. */ + public characterMaskConfig?: (google.privacy.dlp.v2.ICharacterMaskConfig|null); + + /** PrimitiveTransformation cryptoReplaceFfxFpeConfig. */ + public cryptoReplaceFfxFpeConfig?: (google.privacy.dlp.v2.ICryptoReplaceFfxFpeConfig|null); + + /** PrimitiveTransformation fixedSizeBucketingConfig. */ + public fixedSizeBucketingConfig?: (google.privacy.dlp.v2.IFixedSizeBucketingConfig|null); + + /** PrimitiveTransformation bucketingConfig. */ + public bucketingConfig?: (google.privacy.dlp.v2.IBucketingConfig|null); + + /** PrimitiveTransformation replaceWithInfoTypeConfig. */ + public replaceWithInfoTypeConfig?: (google.privacy.dlp.v2.IReplaceWithInfoTypeConfig|null); + + /** PrimitiveTransformation timePartConfig. */ + public timePartConfig?: (google.privacy.dlp.v2.ITimePartConfig|null); + + /** PrimitiveTransformation cryptoHashConfig. */ + public cryptoHashConfig?: (google.privacy.dlp.v2.ICryptoHashConfig|null); + + /** PrimitiveTransformation dateShiftConfig. */ + public dateShiftConfig?: (google.privacy.dlp.v2.IDateShiftConfig|null); + + /** PrimitiveTransformation cryptoDeterministicConfig. */ + public cryptoDeterministicConfig?: (google.privacy.dlp.v2.ICryptoDeterministicConfig|null); + + /** PrimitiveTransformation replaceDictionaryConfig. */ + public replaceDictionaryConfig?: (google.privacy.dlp.v2.IReplaceDictionaryConfig|null); + + /** PrimitiveTransformation transformation. */ + public transformation?: ("replaceConfig"|"redactConfig"|"characterMaskConfig"|"cryptoReplaceFfxFpeConfig"|"fixedSizeBucketingConfig"|"bucketingConfig"|"replaceWithInfoTypeConfig"|"timePartConfig"|"cryptoHashConfig"|"dateShiftConfig"|"cryptoDeterministicConfig"|"replaceDictionaryConfig"); + + /** + * Creates a new PrimitiveTransformation instance using the specified properties. + * @param [properties] Properties to set + * @returns PrimitiveTransformation instance + */ + public static create(properties?: google.privacy.dlp.v2.IPrimitiveTransformation): google.privacy.dlp.v2.PrimitiveTransformation; + + /** + * Encodes the specified PrimitiveTransformation message. Does not implicitly {@link google.privacy.dlp.v2.PrimitiveTransformation.verify|verify} messages. + * @param message PrimitiveTransformation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IPrimitiveTransformation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrimitiveTransformation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrimitiveTransformation.verify|verify} messages. + * @param message PrimitiveTransformation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IPrimitiveTransformation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrimitiveTransformation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrimitiveTransformation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.PrimitiveTransformation; + + /** + * Decodes a PrimitiveTransformation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrimitiveTransformation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.PrimitiveTransformation; + + /** + * Verifies a PrimitiveTransformation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrimitiveTransformation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrimitiveTransformation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.PrimitiveTransformation; + + /** + * Creates a plain object from a PrimitiveTransformation message. Also converts values to other types if specified. + * @param message PrimitiveTransformation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.PrimitiveTransformation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrimitiveTransformation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrimitiveTransformation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TimePartConfig. */ + interface ITimePartConfig { + + /** TimePartConfig partToExtract */ + partToExtract?: (google.privacy.dlp.v2.TimePartConfig.TimePart|keyof typeof google.privacy.dlp.v2.TimePartConfig.TimePart|null); + } + + /** Represents a TimePartConfig. */ + class TimePartConfig implements ITimePartConfig { + + /** + * Constructs a new TimePartConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ITimePartConfig); + + /** TimePartConfig partToExtract. */ + public partToExtract: (google.privacy.dlp.v2.TimePartConfig.TimePart|keyof typeof google.privacy.dlp.v2.TimePartConfig.TimePart); + + /** + * Creates a new TimePartConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns TimePartConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.ITimePartConfig): google.privacy.dlp.v2.TimePartConfig; + + /** + * Encodes the specified TimePartConfig message. Does not implicitly {@link google.privacy.dlp.v2.TimePartConfig.verify|verify} messages. + * @param message TimePartConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ITimePartConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimePartConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TimePartConfig.verify|verify} messages. + * @param message TimePartConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ITimePartConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimePartConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimePartConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TimePartConfig; + + /** + * Decodes a TimePartConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimePartConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TimePartConfig; + + /** + * Verifies a TimePartConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimePartConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimePartConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TimePartConfig; + + /** + * Creates a plain object from a TimePartConfig message. Also converts values to other types if specified. + * @param message TimePartConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.TimePartConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimePartConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimePartConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TimePartConfig { + + /** TimePart enum. */ + enum TimePart { + TIME_PART_UNSPECIFIED = 0, + YEAR = 1, + MONTH = 2, + DAY_OF_MONTH = 3, + DAY_OF_WEEK = 4, + WEEK_OF_YEAR = 5, + HOUR_OF_DAY = 6 + } + } + + /** Properties of a CryptoHashConfig. */ + interface ICryptoHashConfig { + + /** CryptoHashConfig cryptoKey */ + cryptoKey?: (google.privacy.dlp.v2.ICryptoKey|null); + } + + /** Represents a CryptoHashConfig. */ + class CryptoHashConfig implements ICryptoHashConfig { + + /** + * Constructs a new CryptoHashConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ICryptoHashConfig); + + /** CryptoHashConfig cryptoKey. */ + public cryptoKey?: (google.privacy.dlp.v2.ICryptoKey|null); + + /** + * Creates a new CryptoHashConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns CryptoHashConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.ICryptoHashConfig): google.privacy.dlp.v2.CryptoHashConfig; + + /** + * Encodes the specified CryptoHashConfig message. Does not implicitly {@link google.privacy.dlp.v2.CryptoHashConfig.verify|verify} messages. + * @param message CryptoHashConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ICryptoHashConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CryptoHashConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CryptoHashConfig.verify|verify} messages. + * @param message CryptoHashConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ICryptoHashConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CryptoHashConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CryptoHashConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CryptoHashConfig; + + /** + * Decodes a CryptoHashConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CryptoHashConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CryptoHashConfig; + + /** + * Verifies a CryptoHashConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CryptoHashConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CryptoHashConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CryptoHashConfig; + + /** + * Creates a plain object from a CryptoHashConfig message. Also converts values to other types if specified. + * @param message CryptoHashConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CryptoHashConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CryptoHashConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CryptoHashConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CryptoDeterministicConfig. */ + interface ICryptoDeterministicConfig { + + /** CryptoDeterministicConfig cryptoKey */ + cryptoKey?: (google.privacy.dlp.v2.ICryptoKey|null); + + /** CryptoDeterministicConfig surrogateInfoType */ + surrogateInfoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** CryptoDeterministicConfig context */ + context?: (google.privacy.dlp.v2.IFieldId|null); + } + + /** Represents a CryptoDeterministicConfig. */ + class CryptoDeterministicConfig implements ICryptoDeterministicConfig { + + /** + * Constructs a new CryptoDeterministicConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ICryptoDeterministicConfig); + + /** CryptoDeterministicConfig cryptoKey. */ + public cryptoKey?: (google.privacy.dlp.v2.ICryptoKey|null); + + /** CryptoDeterministicConfig surrogateInfoType. */ + public surrogateInfoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** CryptoDeterministicConfig context. */ + public context?: (google.privacy.dlp.v2.IFieldId|null); + + /** + * Creates a new CryptoDeterministicConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns CryptoDeterministicConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.ICryptoDeterministicConfig): google.privacy.dlp.v2.CryptoDeterministicConfig; + + /** + * Encodes the specified CryptoDeterministicConfig message. Does not implicitly {@link google.privacy.dlp.v2.CryptoDeterministicConfig.verify|verify} messages. + * @param message CryptoDeterministicConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ICryptoDeterministicConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CryptoDeterministicConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CryptoDeterministicConfig.verify|verify} messages. + * @param message CryptoDeterministicConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ICryptoDeterministicConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CryptoDeterministicConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CryptoDeterministicConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CryptoDeterministicConfig; + + /** + * Decodes a CryptoDeterministicConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CryptoDeterministicConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CryptoDeterministicConfig; + + /** + * Verifies a CryptoDeterministicConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CryptoDeterministicConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CryptoDeterministicConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CryptoDeterministicConfig; + + /** + * Creates a plain object from a CryptoDeterministicConfig message. Also converts values to other types if specified. + * @param message CryptoDeterministicConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CryptoDeterministicConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CryptoDeterministicConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CryptoDeterministicConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReplaceValueConfig. */ + interface IReplaceValueConfig { + + /** ReplaceValueConfig newValue */ + newValue?: (google.privacy.dlp.v2.IValue|null); + } + + /** Represents a ReplaceValueConfig. */ + class ReplaceValueConfig implements IReplaceValueConfig { + + /** + * Constructs a new ReplaceValueConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IReplaceValueConfig); + + /** ReplaceValueConfig newValue. */ + public newValue?: (google.privacy.dlp.v2.IValue|null); + + /** + * Creates a new ReplaceValueConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ReplaceValueConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.IReplaceValueConfig): google.privacy.dlp.v2.ReplaceValueConfig; + + /** + * Encodes the specified ReplaceValueConfig message. Does not implicitly {@link google.privacy.dlp.v2.ReplaceValueConfig.verify|verify} messages. + * @param message ReplaceValueConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IReplaceValueConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReplaceValueConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ReplaceValueConfig.verify|verify} messages. + * @param message ReplaceValueConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IReplaceValueConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReplaceValueConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReplaceValueConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ReplaceValueConfig; + + /** + * Decodes a ReplaceValueConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReplaceValueConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ReplaceValueConfig; + + /** + * Verifies a ReplaceValueConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReplaceValueConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReplaceValueConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ReplaceValueConfig; + + /** + * Creates a plain object from a ReplaceValueConfig message. Also converts values to other types if specified. + * @param message ReplaceValueConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ReplaceValueConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReplaceValueConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReplaceValueConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReplaceDictionaryConfig. */ + interface IReplaceDictionaryConfig { + + /** ReplaceDictionaryConfig wordList */ + wordList?: (google.privacy.dlp.v2.CustomInfoType.Dictionary.IWordList|null); + } + + /** Represents a ReplaceDictionaryConfig. */ + class ReplaceDictionaryConfig implements IReplaceDictionaryConfig { + + /** + * Constructs a new ReplaceDictionaryConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IReplaceDictionaryConfig); + + /** ReplaceDictionaryConfig wordList. */ + public wordList?: (google.privacy.dlp.v2.CustomInfoType.Dictionary.IWordList|null); + + /** ReplaceDictionaryConfig type. */ + public type?: "wordList"; + + /** + * Creates a new ReplaceDictionaryConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ReplaceDictionaryConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.IReplaceDictionaryConfig): google.privacy.dlp.v2.ReplaceDictionaryConfig; + + /** + * Encodes the specified ReplaceDictionaryConfig message. Does not implicitly {@link google.privacy.dlp.v2.ReplaceDictionaryConfig.verify|verify} messages. + * @param message ReplaceDictionaryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IReplaceDictionaryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReplaceDictionaryConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ReplaceDictionaryConfig.verify|verify} messages. + * @param message ReplaceDictionaryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IReplaceDictionaryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReplaceDictionaryConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReplaceDictionaryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ReplaceDictionaryConfig; + + /** + * Decodes a ReplaceDictionaryConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReplaceDictionaryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ReplaceDictionaryConfig; + + /** + * Verifies a ReplaceDictionaryConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReplaceDictionaryConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReplaceDictionaryConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ReplaceDictionaryConfig; + + /** + * Creates a plain object from a ReplaceDictionaryConfig message. Also converts values to other types if specified. + * @param message ReplaceDictionaryConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ReplaceDictionaryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReplaceDictionaryConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReplaceDictionaryConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReplaceWithInfoTypeConfig. */ + interface IReplaceWithInfoTypeConfig { + } + + /** Represents a ReplaceWithInfoTypeConfig. */ + class ReplaceWithInfoTypeConfig implements IReplaceWithInfoTypeConfig { + + /** + * Constructs a new ReplaceWithInfoTypeConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IReplaceWithInfoTypeConfig); + + /** + * Creates a new ReplaceWithInfoTypeConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ReplaceWithInfoTypeConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.IReplaceWithInfoTypeConfig): google.privacy.dlp.v2.ReplaceWithInfoTypeConfig; + + /** + * Encodes the specified ReplaceWithInfoTypeConfig message. Does not implicitly {@link google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.verify|verify} messages. + * @param message ReplaceWithInfoTypeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IReplaceWithInfoTypeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReplaceWithInfoTypeConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.verify|verify} messages. + * @param message ReplaceWithInfoTypeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IReplaceWithInfoTypeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReplaceWithInfoTypeConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReplaceWithInfoTypeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ReplaceWithInfoTypeConfig; + + /** + * Decodes a ReplaceWithInfoTypeConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReplaceWithInfoTypeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ReplaceWithInfoTypeConfig; + + /** + * Verifies a ReplaceWithInfoTypeConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReplaceWithInfoTypeConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReplaceWithInfoTypeConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ReplaceWithInfoTypeConfig; + + /** + * Creates a plain object from a ReplaceWithInfoTypeConfig message. Also converts values to other types if specified. + * @param message ReplaceWithInfoTypeConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ReplaceWithInfoTypeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReplaceWithInfoTypeConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReplaceWithInfoTypeConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RedactConfig. */ + interface IRedactConfig { + } + + /** Represents a RedactConfig. */ + class RedactConfig implements IRedactConfig { + + /** + * Constructs a new RedactConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IRedactConfig); + + /** + * Creates a new RedactConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns RedactConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.IRedactConfig): google.privacy.dlp.v2.RedactConfig; + + /** + * Encodes the specified RedactConfig message. Does not implicitly {@link google.privacy.dlp.v2.RedactConfig.verify|verify} messages. + * @param message RedactConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IRedactConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RedactConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RedactConfig.verify|verify} messages. + * @param message RedactConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IRedactConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RedactConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RedactConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RedactConfig; + + /** + * Decodes a RedactConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RedactConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RedactConfig; + + /** + * Verifies a RedactConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RedactConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RedactConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RedactConfig; + + /** + * Creates a plain object from a RedactConfig message. Also converts values to other types if specified. + * @param message RedactConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.RedactConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RedactConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RedactConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CharsToIgnore. */ + interface ICharsToIgnore { + + /** CharsToIgnore charactersToSkip */ + charactersToSkip?: (string|null); + + /** CharsToIgnore commonCharactersToIgnore */ + commonCharactersToIgnore?: (google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore|keyof typeof google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore|null); + } + + /** Represents a CharsToIgnore. */ + class CharsToIgnore implements ICharsToIgnore { + + /** + * Constructs a new CharsToIgnore. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ICharsToIgnore); + + /** CharsToIgnore charactersToSkip. */ + public charactersToSkip?: (string|null); + + /** CharsToIgnore commonCharactersToIgnore. */ + public commonCharactersToIgnore?: (google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore|keyof typeof google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore|null); + + /** CharsToIgnore characters. */ + public characters?: ("charactersToSkip"|"commonCharactersToIgnore"); + + /** + * Creates a new CharsToIgnore instance using the specified properties. + * @param [properties] Properties to set + * @returns CharsToIgnore instance + */ + public static create(properties?: google.privacy.dlp.v2.ICharsToIgnore): google.privacy.dlp.v2.CharsToIgnore; + + /** + * Encodes the specified CharsToIgnore message. Does not implicitly {@link google.privacy.dlp.v2.CharsToIgnore.verify|verify} messages. + * @param message CharsToIgnore message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ICharsToIgnore, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CharsToIgnore message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CharsToIgnore.verify|verify} messages. + * @param message CharsToIgnore message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ICharsToIgnore, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CharsToIgnore message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CharsToIgnore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CharsToIgnore; + + /** + * Decodes a CharsToIgnore message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CharsToIgnore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CharsToIgnore; + + /** + * Verifies a CharsToIgnore message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CharsToIgnore message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CharsToIgnore + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CharsToIgnore; + + /** + * Creates a plain object from a CharsToIgnore message. Also converts values to other types if specified. + * @param message CharsToIgnore + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CharsToIgnore, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CharsToIgnore to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CharsToIgnore + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CharsToIgnore { + + /** CommonCharsToIgnore enum. */ + enum CommonCharsToIgnore { + COMMON_CHARS_TO_IGNORE_UNSPECIFIED = 0, + NUMERIC = 1, + ALPHA_UPPER_CASE = 2, + ALPHA_LOWER_CASE = 3, + PUNCTUATION = 4, + WHITESPACE = 5 + } + } + + /** Properties of a CharacterMaskConfig. */ + interface ICharacterMaskConfig { + + /** CharacterMaskConfig maskingCharacter */ + maskingCharacter?: (string|null); + + /** CharacterMaskConfig numberToMask */ + numberToMask?: (number|null); + + /** CharacterMaskConfig reverseOrder */ + reverseOrder?: (boolean|null); + + /** CharacterMaskConfig charactersToIgnore */ + charactersToIgnore?: (google.privacy.dlp.v2.ICharsToIgnore[]|null); + } + + /** Represents a CharacterMaskConfig. */ + class CharacterMaskConfig implements ICharacterMaskConfig { + + /** + * Constructs a new CharacterMaskConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ICharacterMaskConfig); + + /** CharacterMaskConfig maskingCharacter. */ + public maskingCharacter: string; + + /** CharacterMaskConfig numberToMask. */ + public numberToMask: number; + + /** CharacterMaskConfig reverseOrder. */ + public reverseOrder: boolean; + + /** CharacterMaskConfig charactersToIgnore. */ + public charactersToIgnore: google.privacy.dlp.v2.ICharsToIgnore[]; + + /** + * Creates a new CharacterMaskConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns CharacterMaskConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.ICharacterMaskConfig): google.privacy.dlp.v2.CharacterMaskConfig; + + /** + * Encodes the specified CharacterMaskConfig message. Does not implicitly {@link google.privacy.dlp.v2.CharacterMaskConfig.verify|verify} messages. + * @param message CharacterMaskConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ICharacterMaskConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CharacterMaskConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CharacterMaskConfig.verify|verify} messages. + * @param message CharacterMaskConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ICharacterMaskConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CharacterMaskConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CharacterMaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CharacterMaskConfig; + + /** + * Decodes a CharacterMaskConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CharacterMaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CharacterMaskConfig; + + /** + * Verifies a CharacterMaskConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CharacterMaskConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CharacterMaskConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CharacterMaskConfig; + + /** + * Creates a plain object from a CharacterMaskConfig message. Also converts values to other types if specified. + * @param message CharacterMaskConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CharacterMaskConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CharacterMaskConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CharacterMaskConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FixedSizeBucketingConfig. */ + interface IFixedSizeBucketingConfig { + + /** FixedSizeBucketingConfig lowerBound */ + lowerBound?: (google.privacy.dlp.v2.IValue|null); + + /** FixedSizeBucketingConfig upperBound */ + upperBound?: (google.privacy.dlp.v2.IValue|null); + + /** FixedSizeBucketingConfig bucketSize */ + bucketSize?: (number|null); + } + + /** Represents a FixedSizeBucketingConfig. */ + class FixedSizeBucketingConfig implements IFixedSizeBucketingConfig { + + /** + * Constructs a new FixedSizeBucketingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IFixedSizeBucketingConfig); + + /** FixedSizeBucketingConfig lowerBound. */ + public lowerBound?: (google.privacy.dlp.v2.IValue|null); + + /** FixedSizeBucketingConfig upperBound. */ + public upperBound?: (google.privacy.dlp.v2.IValue|null); + + /** FixedSizeBucketingConfig bucketSize. */ + public bucketSize: number; + + /** + * Creates a new FixedSizeBucketingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns FixedSizeBucketingConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.IFixedSizeBucketingConfig): google.privacy.dlp.v2.FixedSizeBucketingConfig; + + /** + * Encodes the specified FixedSizeBucketingConfig message. Does not implicitly {@link google.privacy.dlp.v2.FixedSizeBucketingConfig.verify|verify} messages. + * @param message FixedSizeBucketingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IFixedSizeBucketingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FixedSizeBucketingConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FixedSizeBucketingConfig.verify|verify} messages. + * @param message FixedSizeBucketingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IFixedSizeBucketingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FixedSizeBucketingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FixedSizeBucketingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.FixedSizeBucketingConfig; + + /** + * Decodes a FixedSizeBucketingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FixedSizeBucketingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.FixedSizeBucketingConfig; + + /** + * Verifies a FixedSizeBucketingConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FixedSizeBucketingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FixedSizeBucketingConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.FixedSizeBucketingConfig; + + /** + * Creates a plain object from a FixedSizeBucketingConfig message. Also converts values to other types if specified. + * @param message FixedSizeBucketingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.FixedSizeBucketingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FixedSizeBucketingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FixedSizeBucketingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BucketingConfig. */ + interface IBucketingConfig { + + /** BucketingConfig buckets */ + buckets?: (google.privacy.dlp.v2.BucketingConfig.IBucket[]|null); + } + + /** Represents a BucketingConfig. */ + class BucketingConfig implements IBucketingConfig { + + /** + * Constructs a new BucketingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IBucketingConfig); + + /** BucketingConfig buckets. */ + public buckets: google.privacy.dlp.v2.BucketingConfig.IBucket[]; + + /** + * Creates a new BucketingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns BucketingConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.IBucketingConfig): google.privacy.dlp.v2.BucketingConfig; + + /** + * Encodes the specified BucketingConfig message. Does not implicitly {@link google.privacy.dlp.v2.BucketingConfig.verify|verify} messages. + * @param message BucketingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IBucketingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BucketingConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BucketingConfig.verify|verify} messages. + * @param message BucketingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IBucketingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BucketingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BucketingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.BucketingConfig; + + /** + * Decodes a BucketingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BucketingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.BucketingConfig; + + /** + * Verifies a BucketingConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BucketingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BucketingConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.BucketingConfig; + + /** + * Creates a plain object from a BucketingConfig message. Also converts values to other types if specified. + * @param message BucketingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.BucketingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BucketingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BucketingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BucketingConfig { + + /** Properties of a Bucket. */ + interface IBucket { + + /** Bucket min */ + min?: (google.privacy.dlp.v2.IValue|null); + + /** Bucket max */ + max?: (google.privacy.dlp.v2.IValue|null); + + /** Bucket replacementValue */ + replacementValue?: (google.privacy.dlp.v2.IValue|null); + } + + /** Represents a Bucket. */ + class Bucket implements IBucket { + + /** + * Constructs a new Bucket. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.BucketingConfig.IBucket); + + /** Bucket min. */ + public min?: (google.privacy.dlp.v2.IValue|null); + + /** Bucket max. */ + public max?: (google.privacy.dlp.v2.IValue|null); + + /** Bucket replacementValue. */ + public replacementValue?: (google.privacy.dlp.v2.IValue|null); + + /** + * Creates a new Bucket instance using the specified properties. + * @param [properties] Properties to set + * @returns Bucket instance + */ + public static create(properties?: google.privacy.dlp.v2.BucketingConfig.IBucket): google.privacy.dlp.v2.BucketingConfig.Bucket; + + /** + * Encodes the specified Bucket message. Does not implicitly {@link google.privacy.dlp.v2.BucketingConfig.Bucket.verify|verify} messages. + * @param message Bucket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.BucketingConfig.IBucket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Bucket message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BucketingConfig.Bucket.verify|verify} messages. + * @param message Bucket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.BucketingConfig.IBucket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Bucket message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Bucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.BucketingConfig.Bucket; + + /** + * Decodes a Bucket message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Bucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.BucketingConfig.Bucket; + + /** + * Verifies a Bucket message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Bucket message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Bucket + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.BucketingConfig.Bucket; + + /** + * Creates a plain object from a Bucket message. Also converts values to other types if specified. + * @param message Bucket + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.BucketingConfig.Bucket, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Bucket to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Bucket + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CryptoReplaceFfxFpeConfig. */ + interface ICryptoReplaceFfxFpeConfig { + + /** CryptoReplaceFfxFpeConfig cryptoKey */ + cryptoKey?: (google.privacy.dlp.v2.ICryptoKey|null); + + /** CryptoReplaceFfxFpeConfig context */ + context?: (google.privacy.dlp.v2.IFieldId|null); + + /** CryptoReplaceFfxFpeConfig commonAlphabet */ + commonAlphabet?: (google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet|keyof typeof google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet|null); + + /** CryptoReplaceFfxFpeConfig customAlphabet */ + customAlphabet?: (string|null); + + /** CryptoReplaceFfxFpeConfig radix */ + radix?: (number|null); + + /** CryptoReplaceFfxFpeConfig surrogateInfoType */ + surrogateInfoType?: (google.privacy.dlp.v2.IInfoType|null); + } + + /** Represents a CryptoReplaceFfxFpeConfig. */ + class CryptoReplaceFfxFpeConfig implements ICryptoReplaceFfxFpeConfig { + + /** + * Constructs a new CryptoReplaceFfxFpeConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ICryptoReplaceFfxFpeConfig); + + /** CryptoReplaceFfxFpeConfig cryptoKey. */ + public cryptoKey?: (google.privacy.dlp.v2.ICryptoKey|null); + + /** CryptoReplaceFfxFpeConfig context. */ + public context?: (google.privacy.dlp.v2.IFieldId|null); + + /** CryptoReplaceFfxFpeConfig commonAlphabet. */ + public commonAlphabet?: (google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet|keyof typeof google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet|null); + + /** CryptoReplaceFfxFpeConfig customAlphabet. */ + public customAlphabet?: (string|null); + + /** CryptoReplaceFfxFpeConfig radix. */ + public radix?: (number|null); + + /** CryptoReplaceFfxFpeConfig surrogateInfoType. */ + public surrogateInfoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** CryptoReplaceFfxFpeConfig alphabet. */ + public alphabet?: ("commonAlphabet"|"customAlphabet"|"radix"); + + /** + * Creates a new CryptoReplaceFfxFpeConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns CryptoReplaceFfxFpeConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.ICryptoReplaceFfxFpeConfig): google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig; + + /** + * Encodes the specified CryptoReplaceFfxFpeConfig message. Does not implicitly {@link google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.verify|verify} messages. + * @param message CryptoReplaceFfxFpeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ICryptoReplaceFfxFpeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CryptoReplaceFfxFpeConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.verify|verify} messages. + * @param message CryptoReplaceFfxFpeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ICryptoReplaceFfxFpeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CryptoReplaceFfxFpeConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CryptoReplaceFfxFpeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig; + + /** + * Decodes a CryptoReplaceFfxFpeConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CryptoReplaceFfxFpeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig; + + /** + * Verifies a CryptoReplaceFfxFpeConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CryptoReplaceFfxFpeConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CryptoReplaceFfxFpeConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig; + + /** + * Creates a plain object from a CryptoReplaceFfxFpeConfig message. Also converts values to other types if specified. + * @param message CryptoReplaceFfxFpeConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CryptoReplaceFfxFpeConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CryptoReplaceFfxFpeConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CryptoReplaceFfxFpeConfig { + + /** FfxCommonNativeAlphabet enum. */ + enum FfxCommonNativeAlphabet { + FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED = 0, + NUMERIC = 1, + HEXADECIMAL = 2, + UPPER_CASE_ALPHA_NUMERIC = 3, + ALPHA_NUMERIC = 4 + } + } + + /** Properties of a CryptoKey. */ + interface ICryptoKey { + + /** CryptoKey transient */ + transient?: (google.privacy.dlp.v2.ITransientCryptoKey|null); + + /** CryptoKey unwrapped */ + unwrapped?: (google.privacy.dlp.v2.IUnwrappedCryptoKey|null); + + /** CryptoKey kmsWrapped */ + kmsWrapped?: (google.privacy.dlp.v2.IKmsWrappedCryptoKey|null); + } + + /** Represents a CryptoKey. */ + class CryptoKey implements ICryptoKey { + + /** + * Constructs a new CryptoKey. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ICryptoKey); + + /** CryptoKey transient. */ + public transient?: (google.privacy.dlp.v2.ITransientCryptoKey|null); + + /** CryptoKey unwrapped. */ + public unwrapped?: (google.privacy.dlp.v2.IUnwrappedCryptoKey|null); + + /** CryptoKey kmsWrapped. */ + public kmsWrapped?: (google.privacy.dlp.v2.IKmsWrappedCryptoKey|null); + + /** CryptoKey source. */ + public source?: ("transient"|"unwrapped"|"kmsWrapped"); + + /** + * Creates a new CryptoKey instance using the specified properties. + * @param [properties] Properties to set + * @returns CryptoKey instance + */ + public static create(properties?: google.privacy.dlp.v2.ICryptoKey): google.privacy.dlp.v2.CryptoKey; + + /** + * Encodes the specified CryptoKey message. Does not implicitly {@link google.privacy.dlp.v2.CryptoKey.verify|verify} messages. + * @param message CryptoKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ICryptoKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CryptoKey message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CryptoKey.verify|verify} messages. + * @param message CryptoKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ICryptoKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CryptoKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CryptoKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CryptoKey; + + /** + * Decodes a CryptoKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CryptoKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CryptoKey; + + /** + * Verifies a CryptoKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CryptoKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CryptoKey + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CryptoKey; + + /** + * Creates a plain object from a CryptoKey message. Also converts values to other types if specified. + * @param message CryptoKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CryptoKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CryptoKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CryptoKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TransientCryptoKey. */ + interface ITransientCryptoKey { + + /** TransientCryptoKey name */ + name?: (string|null); + } + + /** Represents a TransientCryptoKey. */ + class TransientCryptoKey implements ITransientCryptoKey { + + /** + * Constructs a new TransientCryptoKey. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ITransientCryptoKey); + + /** TransientCryptoKey name. */ + public name: string; + + /** + * Creates a new TransientCryptoKey instance using the specified properties. + * @param [properties] Properties to set + * @returns TransientCryptoKey instance + */ + public static create(properties?: google.privacy.dlp.v2.ITransientCryptoKey): google.privacy.dlp.v2.TransientCryptoKey; + + /** + * Encodes the specified TransientCryptoKey message. Does not implicitly {@link google.privacy.dlp.v2.TransientCryptoKey.verify|verify} messages. + * @param message TransientCryptoKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ITransientCryptoKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TransientCryptoKey message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransientCryptoKey.verify|verify} messages. + * @param message TransientCryptoKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ITransientCryptoKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TransientCryptoKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TransientCryptoKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransientCryptoKey; + + /** + * Decodes a TransientCryptoKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransientCryptoKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransientCryptoKey; + + /** + * Verifies a TransientCryptoKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TransientCryptoKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransientCryptoKey + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransientCryptoKey; + + /** + * Creates a plain object from a TransientCryptoKey message. Also converts values to other types if specified. + * @param message TransientCryptoKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.TransientCryptoKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransientCryptoKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TransientCryptoKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UnwrappedCryptoKey. */ + interface IUnwrappedCryptoKey { + + /** UnwrappedCryptoKey key */ + key?: (Uint8Array|Buffer|string|null); + } + + /** Represents an UnwrappedCryptoKey. */ + class UnwrappedCryptoKey implements IUnwrappedCryptoKey { + + /** + * Constructs a new UnwrappedCryptoKey. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IUnwrappedCryptoKey); + + /** UnwrappedCryptoKey key. */ + public key: (Uint8Array|Buffer|string); + + /** + * Creates a new UnwrappedCryptoKey instance using the specified properties. + * @param [properties] Properties to set + * @returns UnwrappedCryptoKey instance + */ + public static create(properties?: google.privacy.dlp.v2.IUnwrappedCryptoKey): google.privacy.dlp.v2.UnwrappedCryptoKey; + + /** + * Encodes the specified UnwrappedCryptoKey message. Does not implicitly {@link google.privacy.dlp.v2.UnwrappedCryptoKey.verify|verify} messages. + * @param message UnwrappedCryptoKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IUnwrappedCryptoKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UnwrappedCryptoKey message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.UnwrappedCryptoKey.verify|verify} messages. + * @param message UnwrappedCryptoKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IUnwrappedCryptoKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UnwrappedCryptoKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UnwrappedCryptoKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.UnwrappedCryptoKey; + + /** + * Decodes an UnwrappedCryptoKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UnwrappedCryptoKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.UnwrappedCryptoKey; + + /** + * Verifies an UnwrappedCryptoKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UnwrappedCryptoKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UnwrappedCryptoKey + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.UnwrappedCryptoKey; + + /** + * Creates a plain object from an UnwrappedCryptoKey message. Also converts values to other types if specified. + * @param message UnwrappedCryptoKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.UnwrappedCryptoKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UnwrappedCryptoKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UnwrappedCryptoKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a KmsWrappedCryptoKey. */ + interface IKmsWrappedCryptoKey { + + /** KmsWrappedCryptoKey wrappedKey */ + wrappedKey?: (Uint8Array|Buffer|string|null); + + /** KmsWrappedCryptoKey cryptoKeyName */ + cryptoKeyName?: (string|null); + } + + /** Represents a KmsWrappedCryptoKey. */ + class KmsWrappedCryptoKey implements IKmsWrappedCryptoKey { + + /** + * Constructs a new KmsWrappedCryptoKey. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IKmsWrappedCryptoKey); + + /** KmsWrappedCryptoKey wrappedKey. */ + public wrappedKey: (Uint8Array|Buffer|string); + + /** KmsWrappedCryptoKey cryptoKeyName. */ + public cryptoKeyName: string; + + /** + * Creates a new KmsWrappedCryptoKey instance using the specified properties. + * @param [properties] Properties to set + * @returns KmsWrappedCryptoKey instance + */ + public static create(properties?: google.privacy.dlp.v2.IKmsWrappedCryptoKey): google.privacy.dlp.v2.KmsWrappedCryptoKey; + + /** + * Encodes the specified KmsWrappedCryptoKey message. Does not implicitly {@link google.privacy.dlp.v2.KmsWrappedCryptoKey.verify|verify} messages. + * @param message KmsWrappedCryptoKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IKmsWrappedCryptoKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KmsWrappedCryptoKey message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.KmsWrappedCryptoKey.verify|verify} messages. + * @param message KmsWrappedCryptoKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IKmsWrappedCryptoKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KmsWrappedCryptoKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KmsWrappedCryptoKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.KmsWrappedCryptoKey; + + /** + * Decodes a KmsWrappedCryptoKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KmsWrappedCryptoKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.KmsWrappedCryptoKey; + + /** + * Verifies a KmsWrappedCryptoKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KmsWrappedCryptoKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KmsWrappedCryptoKey + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.KmsWrappedCryptoKey; + + /** + * Creates a plain object from a KmsWrappedCryptoKey message. Also converts values to other types if specified. + * @param message KmsWrappedCryptoKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.KmsWrappedCryptoKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KmsWrappedCryptoKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KmsWrappedCryptoKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DateShiftConfig. */ + interface IDateShiftConfig { + + /** DateShiftConfig upperBoundDays */ + upperBoundDays?: (number|null); + + /** DateShiftConfig lowerBoundDays */ + lowerBoundDays?: (number|null); + + /** DateShiftConfig context */ + context?: (google.privacy.dlp.v2.IFieldId|null); + + /** DateShiftConfig cryptoKey */ + cryptoKey?: (google.privacy.dlp.v2.ICryptoKey|null); + } + + /** Represents a DateShiftConfig. */ + class DateShiftConfig implements IDateShiftConfig { + + /** + * Constructs a new DateShiftConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDateShiftConfig); + + /** DateShiftConfig upperBoundDays. */ + public upperBoundDays: number; + + /** DateShiftConfig lowerBoundDays. */ + public lowerBoundDays: number; + + /** DateShiftConfig context. */ + public context?: (google.privacy.dlp.v2.IFieldId|null); + + /** DateShiftConfig cryptoKey. */ + public cryptoKey?: (google.privacy.dlp.v2.ICryptoKey|null); + + /** DateShiftConfig method. */ + public method?: "cryptoKey"; + + /** + * Creates a new DateShiftConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DateShiftConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.IDateShiftConfig): google.privacy.dlp.v2.DateShiftConfig; + + /** + * Encodes the specified DateShiftConfig message. Does not implicitly {@link google.privacy.dlp.v2.DateShiftConfig.verify|verify} messages. + * @param message DateShiftConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDateShiftConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DateShiftConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DateShiftConfig.verify|verify} messages. + * @param message DateShiftConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDateShiftConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DateShiftConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DateShiftConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DateShiftConfig; + + /** + * Decodes a DateShiftConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DateShiftConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DateShiftConfig; + + /** + * Verifies a DateShiftConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DateShiftConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DateShiftConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DateShiftConfig; + + /** + * Creates a plain object from a DateShiftConfig message. Also converts values to other types if specified. + * @param message DateShiftConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DateShiftConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DateShiftConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DateShiftConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InfoTypeTransformations. */ + interface IInfoTypeTransformations { + + /** InfoTypeTransformations transformations */ + transformations?: (google.privacy.dlp.v2.InfoTypeTransformations.IInfoTypeTransformation[]|null); + } + + /** Represents an InfoTypeTransformations. */ + class InfoTypeTransformations implements IInfoTypeTransformations { + + /** + * Constructs a new InfoTypeTransformations. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IInfoTypeTransformations); + + /** InfoTypeTransformations transformations. */ + public transformations: google.privacy.dlp.v2.InfoTypeTransformations.IInfoTypeTransformation[]; + + /** + * Creates a new InfoTypeTransformations instance using the specified properties. + * @param [properties] Properties to set + * @returns InfoTypeTransformations instance + */ + public static create(properties?: google.privacy.dlp.v2.IInfoTypeTransformations): google.privacy.dlp.v2.InfoTypeTransformations; + + /** + * Encodes the specified InfoTypeTransformations message. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeTransformations.verify|verify} messages. + * @param message InfoTypeTransformations message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IInfoTypeTransformations, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InfoTypeTransformations message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeTransformations.verify|verify} messages. + * @param message InfoTypeTransformations message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IInfoTypeTransformations, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InfoTypeTransformations message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InfoTypeTransformations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.InfoTypeTransformations; + + /** + * Decodes an InfoTypeTransformations message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InfoTypeTransformations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.InfoTypeTransformations; + + /** + * Verifies an InfoTypeTransformations message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InfoTypeTransformations message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InfoTypeTransformations + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.InfoTypeTransformations; + + /** + * Creates a plain object from an InfoTypeTransformations message. Also converts values to other types if specified. + * @param message InfoTypeTransformations + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.InfoTypeTransformations, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InfoTypeTransformations to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InfoTypeTransformations + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace InfoTypeTransformations { + + /** Properties of an InfoTypeTransformation. */ + interface IInfoTypeTransformation { + + /** InfoTypeTransformation infoTypes */ + infoTypes?: (google.privacy.dlp.v2.IInfoType[]|null); + + /** InfoTypeTransformation primitiveTransformation */ + primitiveTransformation?: (google.privacy.dlp.v2.IPrimitiveTransformation|null); + } + + /** Represents an InfoTypeTransformation. */ + class InfoTypeTransformation implements IInfoTypeTransformation { + + /** + * Constructs a new InfoTypeTransformation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.InfoTypeTransformations.IInfoTypeTransformation); + + /** InfoTypeTransformation infoTypes. */ + public infoTypes: google.privacy.dlp.v2.IInfoType[]; + + /** InfoTypeTransformation primitiveTransformation. */ + public primitiveTransformation?: (google.privacy.dlp.v2.IPrimitiveTransformation|null); + + /** + * Creates a new InfoTypeTransformation instance using the specified properties. + * @param [properties] Properties to set + * @returns InfoTypeTransformation instance + */ + public static create(properties?: google.privacy.dlp.v2.InfoTypeTransformations.IInfoTypeTransformation): google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; + + /** + * Encodes the specified InfoTypeTransformation message. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.verify|verify} messages. + * @param message InfoTypeTransformation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.InfoTypeTransformations.IInfoTypeTransformation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InfoTypeTransformation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.verify|verify} messages. + * @param message InfoTypeTransformation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.InfoTypeTransformations.IInfoTypeTransformation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InfoTypeTransformation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InfoTypeTransformation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; + + /** + * Decodes an InfoTypeTransformation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InfoTypeTransformation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; + + /** + * Verifies an InfoTypeTransformation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InfoTypeTransformation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InfoTypeTransformation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation; + + /** + * Creates a plain object from an InfoTypeTransformation message. Also converts values to other types if specified. + * @param message InfoTypeTransformation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InfoTypeTransformation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InfoTypeTransformation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a FieldTransformation. */ + interface IFieldTransformation { + + /** FieldTransformation fields */ + fields?: (google.privacy.dlp.v2.IFieldId[]|null); + + /** FieldTransformation condition */ + condition?: (google.privacy.dlp.v2.IRecordCondition|null); + + /** FieldTransformation primitiveTransformation */ + primitiveTransformation?: (google.privacy.dlp.v2.IPrimitiveTransformation|null); + + /** FieldTransformation infoTypeTransformations */ + infoTypeTransformations?: (google.privacy.dlp.v2.IInfoTypeTransformations|null); + } + + /** Represents a FieldTransformation. */ + class FieldTransformation implements IFieldTransformation { + + /** + * Constructs a new FieldTransformation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IFieldTransformation); + + /** FieldTransformation fields. */ + public fields: google.privacy.dlp.v2.IFieldId[]; + + /** FieldTransformation condition. */ + public condition?: (google.privacy.dlp.v2.IRecordCondition|null); + + /** FieldTransformation primitiveTransformation. */ + public primitiveTransformation?: (google.privacy.dlp.v2.IPrimitiveTransformation|null); + + /** FieldTransformation infoTypeTransformations. */ + public infoTypeTransformations?: (google.privacy.dlp.v2.IInfoTypeTransformations|null); + + /** FieldTransformation transformation. */ + public transformation?: ("primitiveTransformation"|"infoTypeTransformations"); + + /** + * Creates a new FieldTransformation instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldTransformation instance + */ + public static create(properties?: google.privacy.dlp.v2.IFieldTransformation): google.privacy.dlp.v2.FieldTransformation; + + /** + * Encodes the specified FieldTransformation message. Does not implicitly {@link google.privacy.dlp.v2.FieldTransformation.verify|verify} messages. + * @param message FieldTransformation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IFieldTransformation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldTransformation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FieldTransformation.verify|verify} messages. + * @param message FieldTransformation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IFieldTransformation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldTransformation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldTransformation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.FieldTransformation; + + /** + * Decodes a FieldTransformation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldTransformation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.FieldTransformation; + + /** + * Verifies a FieldTransformation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldTransformation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldTransformation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.FieldTransformation; + + /** + * Creates a plain object from a FieldTransformation message. Also converts values to other types if specified. + * @param message FieldTransformation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.FieldTransformation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldTransformation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldTransformation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RecordTransformations. */ + interface IRecordTransformations { + + /** RecordTransformations fieldTransformations */ + fieldTransformations?: (google.privacy.dlp.v2.IFieldTransformation[]|null); + + /** RecordTransformations recordSuppressions */ + recordSuppressions?: (google.privacy.dlp.v2.IRecordSuppression[]|null); + } + + /** Represents a RecordTransformations. */ + class RecordTransformations implements IRecordTransformations { + + /** + * Constructs a new RecordTransformations. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IRecordTransformations); + + /** RecordTransformations fieldTransformations. */ + public fieldTransformations: google.privacy.dlp.v2.IFieldTransformation[]; + + /** RecordTransformations recordSuppressions. */ + public recordSuppressions: google.privacy.dlp.v2.IRecordSuppression[]; + + /** + * Creates a new RecordTransformations instance using the specified properties. + * @param [properties] Properties to set + * @returns RecordTransformations instance + */ + public static create(properties?: google.privacy.dlp.v2.IRecordTransformations): google.privacy.dlp.v2.RecordTransformations; + + /** + * Encodes the specified RecordTransformations message. Does not implicitly {@link google.privacy.dlp.v2.RecordTransformations.verify|verify} messages. + * @param message RecordTransformations message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IRecordTransformations, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecordTransformations message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordTransformations.verify|verify} messages. + * @param message RecordTransformations message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IRecordTransformations, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecordTransformations message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecordTransformations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RecordTransformations; + + /** + * Decodes a RecordTransformations message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecordTransformations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RecordTransformations; + + /** + * Verifies a RecordTransformations message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RecordTransformations message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecordTransformations + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RecordTransformations; + + /** + * Creates a plain object from a RecordTransformations message. Also converts values to other types if specified. + * @param message RecordTransformations + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.RecordTransformations, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecordTransformations to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RecordTransformations + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RecordSuppression. */ + interface IRecordSuppression { + + /** RecordSuppression condition */ + condition?: (google.privacy.dlp.v2.IRecordCondition|null); + } + + /** Represents a RecordSuppression. */ + class RecordSuppression implements IRecordSuppression { + + /** + * Constructs a new RecordSuppression. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IRecordSuppression); + + /** RecordSuppression condition. */ + public condition?: (google.privacy.dlp.v2.IRecordCondition|null); + + /** + * Creates a new RecordSuppression instance using the specified properties. + * @param [properties] Properties to set + * @returns RecordSuppression instance + */ + public static create(properties?: google.privacy.dlp.v2.IRecordSuppression): google.privacy.dlp.v2.RecordSuppression; + + /** + * Encodes the specified RecordSuppression message. Does not implicitly {@link google.privacy.dlp.v2.RecordSuppression.verify|verify} messages. + * @param message RecordSuppression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IRecordSuppression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecordSuppression message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordSuppression.verify|verify} messages. + * @param message RecordSuppression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IRecordSuppression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecordSuppression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecordSuppression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RecordSuppression; + + /** + * Decodes a RecordSuppression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecordSuppression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RecordSuppression; + + /** + * Verifies a RecordSuppression message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RecordSuppression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecordSuppression + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RecordSuppression; + + /** + * Creates a plain object from a RecordSuppression message. Also converts values to other types if specified. + * @param message RecordSuppression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.RecordSuppression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecordSuppression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RecordSuppression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RecordCondition. */ + interface IRecordCondition { + + /** RecordCondition expressions */ + expressions?: (google.privacy.dlp.v2.RecordCondition.IExpressions|null); + } + + /** Represents a RecordCondition. */ + class RecordCondition implements IRecordCondition { + + /** + * Constructs a new RecordCondition. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IRecordCondition); + + /** RecordCondition expressions. */ + public expressions?: (google.privacy.dlp.v2.RecordCondition.IExpressions|null); + + /** + * Creates a new RecordCondition instance using the specified properties. + * @param [properties] Properties to set + * @returns RecordCondition instance + */ + public static create(properties?: google.privacy.dlp.v2.IRecordCondition): google.privacy.dlp.v2.RecordCondition; + + /** + * Encodes the specified RecordCondition message. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.verify|verify} messages. + * @param message RecordCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IRecordCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecordCondition message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.verify|verify} messages. + * @param message RecordCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IRecordCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecordCondition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecordCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RecordCondition; + + /** + * Decodes a RecordCondition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecordCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RecordCondition; + + /** + * Verifies a RecordCondition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RecordCondition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecordCondition + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RecordCondition; + + /** + * Creates a plain object from a RecordCondition message. Also converts values to other types if specified. + * @param message RecordCondition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.RecordCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecordCondition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RecordCondition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace RecordCondition { + + /** Properties of a Condition. */ + interface ICondition { + + /** Condition field */ + field?: (google.privacy.dlp.v2.IFieldId|null); + + /** Condition operator */ + operator?: (google.privacy.dlp.v2.RelationalOperator|keyof typeof google.privacy.dlp.v2.RelationalOperator|null); + + /** Condition value */ + value?: (google.privacy.dlp.v2.IValue|null); + } + + /** Represents a Condition. */ + class Condition implements ICondition { + + /** + * Constructs a new Condition. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.RecordCondition.ICondition); + + /** Condition field. */ + public field?: (google.privacy.dlp.v2.IFieldId|null); + + /** Condition operator. */ + public operator: (google.privacy.dlp.v2.RelationalOperator|keyof typeof google.privacy.dlp.v2.RelationalOperator); + + /** Condition value. */ + public value?: (google.privacy.dlp.v2.IValue|null); + + /** + * Creates a new Condition instance using the specified properties. + * @param [properties] Properties to set + * @returns Condition instance + */ + public static create(properties?: google.privacy.dlp.v2.RecordCondition.ICondition): google.privacy.dlp.v2.RecordCondition.Condition; + + /** + * Encodes the specified Condition message. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Condition.verify|verify} messages. + * @param message Condition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.RecordCondition.ICondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Condition message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Condition.verify|verify} messages. + * @param message Condition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.RecordCondition.ICondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Condition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Condition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RecordCondition.Condition; + + /** + * Decodes a Condition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Condition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RecordCondition.Condition; + + /** + * Verifies a Condition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Condition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Condition + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RecordCondition.Condition; + + /** + * Creates a plain object from a Condition message. Also converts values to other types if specified. + * @param message Condition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.RecordCondition.Condition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Condition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Condition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Conditions. */ + interface IConditions { + + /** Conditions conditions */ + conditions?: (google.privacy.dlp.v2.RecordCondition.ICondition[]|null); + } + + /** Represents a Conditions. */ + class Conditions implements IConditions { + + /** + * Constructs a new Conditions. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.RecordCondition.IConditions); + + /** Conditions conditions. */ + public conditions: google.privacy.dlp.v2.RecordCondition.ICondition[]; + + /** + * Creates a new Conditions instance using the specified properties. + * @param [properties] Properties to set + * @returns Conditions instance + */ + public static create(properties?: google.privacy.dlp.v2.RecordCondition.IConditions): google.privacy.dlp.v2.RecordCondition.Conditions; + + /** + * Encodes the specified Conditions message. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Conditions.verify|verify} messages. + * @param message Conditions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.RecordCondition.IConditions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Conditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Conditions.verify|verify} messages. + * @param message Conditions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.RecordCondition.IConditions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Conditions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Conditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RecordCondition.Conditions; + + /** + * Decodes a Conditions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Conditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RecordCondition.Conditions; + + /** + * Verifies a Conditions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Conditions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Conditions + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RecordCondition.Conditions; + + /** + * Creates a plain object from a Conditions message. Also converts values to other types if specified. + * @param message Conditions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.RecordCondition.Conditions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Conditions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Conditions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Expressions. */ + interface IExpressions { + + /** Expressions logicalOperator */ + logicalOperator?: (google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator|keyof typeof google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator|null); + + /** Expressions conditions */ + conditions?: (google.privacy.dlp.v2.RecordCondition.IConditions|null); + } + + /** Represents an Expressions. */ + class Expressions implements IExpressions { + + /** + * Constructs a new Expressions. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.RecordCondition.IExpressions); + + /** Expressions logicalOperator. */ + public logicalOperator: (google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator|keyof typeof google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator); + + /** Expressions conditions. */ + public conditions?: (google.privacy.dlp.v2.RecordCondition.IConditions|null); + + /** Expressions type. */ + public type?: "conditions"; + + /** + * Creates a new Expressions instance using the specified properties. + * @param [properties] Properties to set + * @returns Expressions instance + */ + public static create(properties?: google.privacy.dlp.v2.RecordCondition.IExpressions): google.privacy.dlp.v2.RecordCondition.Expressions; + + /** + * Encodes the specified Expressions message. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Expressions.verify|verify} messages. + * @param message Expressions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.RecordCondition.IExpressions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Expressions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Expressions.verify|verify} messages. + * @param message Expressions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.RecordCondition.IExpressions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Expressions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Expressions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RecordCondition.Expressions; + + /** + * Decodes an Expressions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Expressions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RecordCondition.Expressions; + + /** + * Verifies an Expressions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Expressions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Expressions + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RecordCondition.Expressions; + + /** + * Creates a plain object from an Expressions message. Also converts values to other types if specified. + * @param message Expressions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.RecordCondition.Expressions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Expressions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Expressions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Expressions { + + /** LogicalOperator enum. */ + enum LogicalOperator { + LOGICAL_OPERATOR_UNSPECIFIED = 0, + AND = 1 + } + } + } + + /** Properties of a TransformationOverview. */ + interface ITransformationOverview { + + /** TransformationOverview transformedBytes */ + transformedBytes?: (number|Long|string|null); + + /** TransformationOverview transformationSummaries */ + transformationSummaries?: (google.privacy.dlp.v2.ITransformationSummary[]|null); + } + + /** Represents a TransformationOverview. */ + class TransformationOverview implements ITransformationOverview { + + /** + * Constructs a new TransformationOverview. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ITransformationOverview); + + /** TransformationOverview transformedBytes. */ + public transformedBytes: (number|Long|string); + + /** TransformationOverview transformationSummaries. */ + public transformationSummaries: google.privacy.dlp.v2.ITransformationSummary[]; + + /** + * Creates a new TransformationOverview instance using the specified properties. + * @param [properties] Properties to set + * @returns TransformationOverview instance + */ + public static create(properties?: google.privacy.dlp.v2.ITransformationOverview): google.privacy.dlp.v2.TransformationOverview; + + /** + * Encodes the specified TransformationOverview message. Does not implicitly {@link google.privacy.dlp.v2.TransformationOverview.verify|verify} messages. + * @param message TransformationOverview message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ITransformationOverview, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TransformationOverview message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationOverview.verify|verify} messages. + * @param message TransformationOverview message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ITransformationOverview, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TransformationOverview message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TransformationOverview + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationOverview; + + /** + * Decodes a TransformationOverview message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransformationOverview + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationOverview; + + /** + * Verifies a TransformationOverview message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TransformationOverview message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransformationOverview + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationOverview; + + /** + * Creates a plain object from a TransformationOverview message. Also converts values to other types if specified. + * @param message TransformationOverview + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.TransformationOverview, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransformationOverview to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TransformationOverview + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TransformationSummary. */ + interface ITransformationSummary { + + /** TransformationSummary infoType */ + infoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** TransformationSummary field */ + field?: (google.privacy.dlp.v2.IFieldId|null); + + /** TransformationSummary transformation */ + transformation?: (google.privacy.dlp.v2.IPrimitiveTransformation|null); + + /** TransformationSummary fieldTransformations */ + fieldTransformations?: (google.privacy.dlp.v2.IFieldTransformation[]|null); + + /** TransformationSummary recordSuppress */ + recordSuppress?: (google.privacy.dlp.v2.IRecordSuppression|null); + + /** TransformationSummary results */ + results?: (google.privacy.dlp.v2.TransformationSummary.ISummaryResult[]|null); + + /** TransformationSummary transformedBytes */ + transformedBytes?: (number|Long|string|null); + } + + /** Represents a TransformationSummary. */ + class TransformationSummary implements ITransformationSummary { + + /** + * Constructs a new TransformationSummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ITransformationSummary); + + /** TransformationSummary infoType. */ + public infoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** TransformationSummary field. */ + public field?: (google.privacy.dlp.v2.IFieldId|null); + + /** TransformationSummary transformation. */ + public transformation?: (google.privacy.dlp.v2.IPrimitiveTransformation|null); + + /** TransformationSummary fieldTransformations. */ + public fieldTransformations: google.privacy.dlp.v2.IFieldTransformation[]; + + /** TransformationSummary recordSuppress. */ + public recordSuppress?: (google.privacy.dlp.v2.IRecordSuppression|null); + + /** TransformationSummary results. */ + public results: google.privacy.dlp.v2.TransformationSummary.ISummaryResult[]; + + /** TransformationSummary transformedBytes. */ + public transformedBytes: (number|Long|string); + + /** + * Creates a new TransformationSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns TransformationSummary instance + */ + public static create(properties?: google.privacy.dlp.v2.ITransformationSummary): google.privacy.dlp.v2.TransformationSummary; + + /** + * Encodes the specified TransformationSummary message. Does not implicitly {@link google.privacy.dlp.v2.TransformationSummary.verify|verify} messages. + * @param message TransformationSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ITransformationSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TransformationSummary message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationSummary.verify|verify} messages. + * @param message TransformationSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ITransformationSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TransformationSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TransformationSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationSummary; + + /** + * Decodes a TransformationSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransformationSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationSummary; + + /** + * Verifies a TransformationSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TransformationSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransformationSummary + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationSummary; + + /** + * Creates a plain object from a TransformationSummary message. Also converts values to other types if specified. + * @param message TransformationSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.TransformationSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransformationSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TransformationSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TransformationSummary { + + /** TransformationResultCode enum. */ + enum TransformationResultCode { + TRANSFORMATION_RESULT_CODE_UNSPECIFIED = 0, + SUCCESS = 1, + ERROR = 2 + } + + /** Properties of a SummaryResult. */ + interface ISummaryResult { + + /** SummaryResult count */ + count?: (number|Long|string|null); + + /** SummaryResult code */ + code?: (google.privacy.dlp.v2.TransformationSummary.TransformationResultCode|keyof typeof google.privacy.dlp.v2.TransformationSummary.TransformationResultCode|null); + + /** SummaryResult details */ + details?: (string|null); + } + + /** Represents a SummaryResult. */ + class SummaryResult implements ISummaryResult { + + /** + * Constructs a new SummaryResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.TransformationSummary.ISummaryResult); + + /** SummaryResult count. */ + public count: (number|Long|string); + + /** SummaryResult code. */ + public code: (google.privacy.dlp.v2.TransformationSummary.TransformationResultCode|keyof typeof google.privacy.dlp.v2.TransformationSummary.TransformationResultCode); + + /** SummaryResult details. */ + public details: string; + + /** + * Creates a new SummaryResult instance using the specified properties. + * @param [properties] Properties to set + * @returns SummaryResult instance + */ + public static create(properties?: google.privacy.dlp.v2.TransformationSummary.ISummaryResult): google.privacy.dlp.v2.TransformationSummary.SummaryResult; + + /** + * Encodes the specified SummaryResult message. Does not implicitly {@link google.privacy.dlp.v2.TransformationSummary.SummaryResult.verify|verify} messages. + * @param message SummaryResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.TransformationSummary.ISummaryResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SummaryResult message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationSummary.SummaryResult.verify|verify} messages. + * @param message SummaryResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.TransformationSummary.ISummaryResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SummaryResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SummaryResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationSummary.SummaryResult; + + /** + * Decodes a SummaryResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SummaryResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationSummary.SummaryResult; + + /** + * Verifies a SummaryResult message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SummaryResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SummaryResult + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationSummary.SummaryResult; + + /** + * Creates a plain object from a SummaryResult message. Also converts values to other types if specified. + * @param message SummaryResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.TransformationSummary.SummaryResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SummaryResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SummaryResult + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a TransformationDescription. */ + interface ITransformationDescription { + + /** TransformationDescription type */ + type?: (google.privacy.dlp.v2.TransformationType|keyof typeof google.privacy.dlp.v2.TransformationType|null); + + /** TransformationDescription description */ + description?: (string|null); + + /** TransformationDescription condition */ + condition?: (string|null); + + /** TransformationDescription infoType */ + infoType?: (google.privacy.dlp.v2.IInfoType|null); + } + + /** Represents a TransformationDescription. */ + class TransformationDescription implements ITransformationDescription { + + /** + * Constructs a new TransformationDescription. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ITransformationDescription); + + /** TransformationDescription type. */ + public type: (google.privacy.dlp.v2.TransformationType|keyof typeof google.privacy.dlp.v2.TransformationType); + + /** TransformationDescription description. */ + public description: string; + + /** TransformationDescription condition. */ + public condition: string; + + /** TransformationDescription infoType. */ + public infoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** + * Creates a new TransformationDescription instance using the specified properties. + * @param [properties] Properties to set + * @returns TransformationDescription instance + */ + public static create(properties?: google.privacy.dlp.v2.ITransformationDescription): google.privacy.dlp.v2.TransformationDescription; + + /** + * Encodes the specified TransformationDescription message. Does not implicitly {@link google.privacy.dlp.v2.TransformationDescription.verify|verify} messages. + * @param message TransformationDescription message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ITransformationDescription, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TransformationDescription message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationDescription.verify|verify} messages. + * @param message TransformationDescription message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ITransformationDescription, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TransformationDescription message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TransformationDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationDescription; + + /** + * Decodes a TransformationDescription message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransformationDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationDescription; + + /** + * Verifies a TransformationDescription message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TransformationDescription message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransformationDescription + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationDescription; + + /** + * Creates a plain object from a TransformationDescription message. Also converts values to other types if specified. + * @param message TransformationDescription + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.TransformationDescription, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransformationDescription to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TransformationDescription + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TransformationDetails. */ + interface ITransformationDetails { + + /** TransformationDetails resourceName */ + resourceName?: (string|null); + + /** TransformationDetails containerName */ + containerName?: (string|null); + + /** TransformationDetails transformation */ + transformation?: (google.privacy.dlp.v2.ITransformationDescription[]|null); + + /** TransformationDetails statusDetails */ + statusDetails?: (google.privacy.dlp.v2.ITransformationResultStatus|null); + + /** TransformationDetails transformedBytes */ + transformedBytes?: (number|Long|string|null); + + /** TransformationDetails transformationLocation */ + transformationLocation?: (google.privacy.dlp.v2.ITransformationLocation|null); + } + + /** Represents a TransformationDetails. */ + class TransformationDetails implements ITransformationDetails { + + /** + * Constructs a new TransformationDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ITransformationDetails); + + /** TransformationDetails resourceName. */ + public resourceName: string; + + /** TransformationDetails containerName. */ + public containerName: string; + + /** TransformationDetails transformation. */ + public transformation: google.privacy.dlp.v2.ITransformationDescription[]; + + /** TransformationDetails statusDetails. */ + public statusDetails?: (google.privacy.dlp.v2.ITransformationResultStatus|null); + + /** TransformationDetails transformedBytes. */ + public transformedBytes: (number|Long|string); + + /** TransformationDetails transformationLocation. */ + public transformationLocation?: (google.privacy.dlp.v2.ITransformationLocation|null); + + /** + * Creates a new TransformationDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns TransformationDetails instance + */ + public static create(properties?: google.privacy.dlp.v2.ITransformationDetails): google.privacy.dlp.v2.TransformationDetails; + + /** + * Encodes the specified TransformationDetails message. Does not implicitly {@link google.privacy.dlp.v2.TransformationDetails.verify|verify} messages. + * @param message TransformationDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ITransformationDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TransformationDetails message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationDetails.verify|verify} messages. + * @param message TransformationDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ITransformationDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TransformationDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TransformationDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationDetails; + + /** + * Decodes a TransformationDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransformationDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationDetails; + + /** + * Verifies a TransformationDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TransformationDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransformationDetails + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationDetails; + + /** + * Creates a plain object from a TransformationDetails message. Also converts values to other types if specified. + * @param message TransformationDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.TransformationDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransformationDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TransformationDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TransformationLocation. */ + interface ITransformationLocation { + + /** TransformationLocation findingId */ + findingId?: (string|null); + + /** TransformationLocation recordTransformation */ + recordTransformation?: (google.privacy.dlp.v2.IRecordTransformation|null); + + /** TransformationLocation containerType */ + containerType?: (google.privacy.dlp.v2.TransformationContainerType|keyof typeof google.privacy.dlp.v2.TransformationContainerType|null); + } + + /** Represents a TransformationLocation. */ + class TransformationLocation implements ITransformationLocation { + + /** + * Constructs a new TransformationLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ITransformationLocation); + + /** TransformationLocation findingId. */ + public findingId?: (string|null); + + /** TransformationLocation recordTransformation. */ + public recordTransformation?: (google.privacy.dlp.v2.IRecordTransformation|null); + + /** TransformationLocation containerType. */ + public containerType: (google.privacy.dlp.v2.TransformationContainerType|keyof typeof google.privacy.dlp.v2.TransformationContainerType); + + /** TransformationLocation locationType. */ + public locationType?: ("findingId"|"recordTransformation"); + + /** + * Creates a new TransformationLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns TransformationLocation instance + */ + public static create(properties?: google.privacy.dlp.v2.ITransformationLocation): google.privacy.dlp.v2.TransformationLocation; + + /** + * Encodes the specified TransformationLocation message. Does not implicitly {@link google.privacy.dlp.v2.TransformationLocation.verify|verify} messages. + * @param message TransformationLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ITransformationLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TransformationLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationLocation.verify|verify} messages. + * @param message TransformationLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ITransformationLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TransformationLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TransformationLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationLocation; + + /** + * Decodes a TransformationLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransformationLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationLocation; + + /** + * Verifies a TransformationLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TransformationLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransformationLocation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationLocation; + + /** + * Creates a plain object from a TransformationLocation message. Also converts values to other types if specified. + * @param message TransformationLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.TransformationLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransformationLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TransformationLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RecordTransformation. */ + interface IRecordTransformation { + + /** RecordTransformation fieldId */ + fieldId?: (google.privacy.dlp.v2.IFieldId|null); + + /** RecordTransformation containerTimestamp */ + containerTimestamp?: (google.protobuf.ITimestamp|null); + + /** RecordTransformation containerVersion */ + containerVersion?: (string|null); + } + + /** Represents a RecordTransformation. */ + class RecordTransformation implements IRecordTransformation { + + /** + * Constructs a new RecordTransformation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IRecordTransformation); + + /** RecordTransformation fieldId. */ + public fieldId?: (google.privacy.dlp.v2.IFieldId|null); + + /** RecordTransformation containerTimestamp. */ + public containerTimestamp?: (google.protobuf.ITimestamp|null); + + /** RecordTransformation containerVersion. */ + public containerVersion: string; + + /** + * Creates a new RecordTransformation instance using the specified properties. + * @param [properties] Properties to set + * @returns RecordTransformation instance + */ + public static create(properties?: google.privacy.dlp.v2.IRecordTransformation): google.privacy.dlp.v2.RecordTransformation; + + /** + * Encodes the specified RecordTransformation message. Does not implicitly {@link google.privacy.dlp.v2.RecordTransformation.verify|verify} messages. + * @param message RecordTransformation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IRecordTransformation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecordTransformation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordTransformation.verify|verify} messages. + * @param message RecordTransformation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IRecordTransformation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecordTransformation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecordTransformation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RecordTransformation; + + /** + * Decodes a RecordTransformation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecordTransformation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RecordTransformation; + + /** + * Verifies a RecordTransformation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RecordTransformation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecordTransformation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RecordTransformation; + + /** + * Creates a plain object from a RecordTransformation message. Also converts values to other types if specified. + * @param message RecordTransformation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.RecordTransformation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecordTransformation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RecordTransformation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TransformationResultStatus. */ + interface ITransformationResultStatus { + + /** TransformationResultStatus resultStatusType */ + resultStatusType?: (google.privacy.dlp.v2.TransformationResultStatusType|keyof typeof google.privacy.dlp.v2.TransformationResultStatusType|null); + + /** TransformationResultStatus details */ + details?: (google.rpc.IStatus|null); + } + + /** Represents a TransformationResultStatus. */ + class TransformationResultStatus implements ITransformationResultStatus { + + /** + * Constructs a new TransformationResultStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ITransformationResultStatus); + + /** TransformationResultStatus resultStatusType. */ + public resultStatusType: (google.privacy.dlp.v2.TransformationResultStatusType|keyof typeof google.privacy.dlp.v2.TransformationResultStatusType); + + /** TransformationResultStatus details. */ + public details?: (google.rpc.IStatus|null); + + /** + * Creates a new TransformationResultStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns TransformationResultStatus instance + */ + public static create(properties?: google.privacy.dlp.v2.ITransformationResultStatus): google.privacy.dlp.v2.TransformationResultStatus; + + /** + * Encodes the specified TransformationResultStatus message. Does not implicitly {@link google.privacy.dlp.v2.TransformationResultStatus.verify|verify} messages. + * @param message TransformationResultStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ITransformationResultStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TransformationResultStatus message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationResultStatus.verify|verify} messages. + * @param message TransformationResultStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ITransformationResultStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TransformationResultStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TransformationResultStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationResultStatus; + + /** + * Decodes a TransformationResultStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransformationResultStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationResultStatus; + + /** + * Verifies a TransformationResultStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TransformationResultStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransformationResultStatus + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationResultStatus; + + /** + * Creates a plain object from a TransformationResultStatus message. Also converts values to other types if specified. + * @param message TransformationResultStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.TransformationResultStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransformationResultStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TransformationResultStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** TransformationResultStatusType enum. */ + enum TransformationResultStatusType { + STATE_TYPE_UNSPECIFIED = 0, + INVALID_TRANSFORM = 1, + BIGQUERY_MAX_ROW_SIZE_EXCEEDED = 2, + METADATA_UNRETRIEVABLE = 3, + SUCCESS = 4 + } + + /** TransformationContainerType enum. */ + enum TransformationContainerType { + TRANSFORM_UNKNOWN_CONTAINER = 0, + TRANSFORM_BODY = 1, + TRANSFORM_METADATA = 2, + TRANSFORM_TABLE = 3 + } + + /** TransformationType enum. */ + enum TransformationType { + TRANSFORMATION_TYPE_UNSPECIFIED = 0, + RECORD_SUPPRESSION = 1, + REPLACE_VALUE = 2, + REPLACE_DICTIONARY = 15, + REDACT = 3, + CHARACTER_MASK = 4, + CRYPTO_REPLACE_FFX_FPE = 5, + FIXED_SIZE_BUCKETING = 6, + BUCKETING = 7, + REPLACE_WITH_INFO_TYPE = 8, + TIME_PART = 9, + CRYPTO_HASH = 10, + DATE_SHIFT = 12, + CRYPTO_DETERMINISTIC_CONFIG = 13, + REDACT_IMAGE = 14 + } + + /** Properties of a TransformationDetailsStorageConfig. */ + interface ITransformationDetailsStorageConfig { + + /** TransformationDetailsStorageConfig table */ + table?: (google.privacy.dlp.v2.IBigQueryTable|null); + } + + /** Represents a TransformationDetailsStorageConfig. */ + class TransformationDetailsStorageConfig implements ITransformationDetailsStorageConfig { + + /** + * Constructs a new TransformationDetailsStorageConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ITransformationDetailsStorageConfig); + + /** TransformationDetailsStorageConfig table. */ + public table?: (google.privacy.dlp.v2.IBigQueryTable|null); + + /** TransformationDetailsStorageConfig type. */ + public type?: "table"; + + /** + * Creates a new TransformationDetailsStorageConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns TransformationDetailsStorageConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.ITransformationDetailsStorageConfig): google.privacy.dlp.v2.TransformationDetailsStorageConfig; + + /** + * Encodes the specified TransformationDetailsStorageConfig message. Does not implicitly {@link google.privacy.dlp.v2.TransformationDetailsStorageConfig.verify|verify} messages. + * @param message TransformationDetailsStorageConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ITransformationDetailsStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TransformationDetailsStorageConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationDetailsStorageConfig.verify|verify} messages. + * @param message TransformationDetailsStorageConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ITransformationDetailsStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TransformationDetailsStorageConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TransformationDetailsStorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationDetailsStorageConfig; + + /** + * Decodes a TransformationDetailsStorageConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransformationDetailsStorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationDetailsStorageConfig; + + /** + * Verifies a TransformationDetailsStorageConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TransformationDetailsStorageConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransformationDetailsStorageConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationDetailsStorageConfig; + + /** + * Creates a plain object from a TransformationDetailsStorageConfig message. Also converts values to other types if specified. + * @param message TransformationDetailsStorageConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.TransformationDetailsStorageConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransformationDetailsStorageConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TransformationDetailsStorageConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Schedule. */ + interface ISchedule { + + /** Schedule recurrencePeriodDuration */ + recurrencePeriodDuration?: (google.protobuf.IDuration|null); + } + + /** Represents a Schedule. */ + class Schedule implements ISchedule { + + /** + * Constructs a new Schedule. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ISchedule); + + /** Schedule recurrencePeriodDuration. */ + public recurrencePeriodDuration?: (google.protobuf.IDuration|null); + + /** Schedule option. */ + public option?: "recurrencePeriodDuration"; + + /** + * Creates a new Schedule instance using the specified properties. + * @param [properties] Properties to set + * @returns Schedule instance + */ + public static create(properties?: google.privacy.dlp.v2.ISchedule): google.privacy.dlp.v2.Schedule; + + /** + * Encodes the specified Schedule message. Does not implicitly {@link google.privacy.dlp.v2.Schedule.verify|verify} messages. + * @param message Schedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ISchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Schedule message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Schedule.verify|verify} messages. + * @param message Schedule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ISchedule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Schedule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Schedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Schedule; + + /** + * Decodes a Schedule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Schedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Schedule; + + /** + * Verifies a Schedule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Schedule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Schedule + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Schedule; + + /** + * Creates a plain object from a Schedule message. Also converts values to other types if specified. + * @param message Schedule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Schedule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Schedule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Schedule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Manual. */ + interface IManual { + } + + /** Represents a Manual. */ + class Manual implements IManual { + + /** + * Constructs a new Manual. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IManual); + + /** + * Creates a new Manual instance using the specified properties. + * @param [properties] Properties to set + * @returns Manual instance + */ + public static create(properties?: google.privacy.dlp.v2.IManual): google.privacy.dlp.v2.Manual; + + /** + * Encodes the specified Manual message. Does not implicitly {@link google.privacy.dlp.v2.Manual.verify|verify} messages. + * @param message Manual message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IManual, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Manual message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Manual.verify|verify} messages. + * @param message Manual message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IManual, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Manual message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Manual + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Manual; + + /** + * Decodes a Manual message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Manual + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Manual; + + /** + * Verifies a Manual message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Manual message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Manual + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Manual; + + /** + * Creates a plain object from a Manual message. Also converts values to other types if specified. + * @param message Manual + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Manual, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Manual to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Manual + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InspectTemplate. */ + interface IInspectTemplate { + + /** InspectTemplate name */ + name?: (string|null); + + /** InspectTemplate displayName */ + displayName?: (string|null); + + /** InspectTemplate description */ + description?: (string|null); + + /** InspectTemplate createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** InspectTemplate updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** InspectTemplate inspectConfig */ + inspectConfig?: (google.privacy.dlp.v2.IInspectConfig|null); + } + + /** Represents an InspectTemplate. */ + class InspectTemplate implements IInspectTemplate { + + /** + * Constructs a new InspectTemplate. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IInspectTemplate); + + /** InspectTemplate name. */ + public name: string; + + /** InspectTemplate displayName. */ + public displayName: string; + + /** InspectTemplate description. */ + public description: string; + + /** InspectTemplate createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** InspectTemplate updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** InspectTemplate inspectConfig. */ + public inspectConfig?: (google.privacy.dlp.v2.IInspectConfig|null); + + /** + * Creates a new InspectTemplate instance using the specified properties. + * @param [properties] Properties to set + * @returns InspectTemplate instance + */ + public static create(properties?: google.privacy.dlp.v2.IInspectTemplate): google.privacy.dlp.v2.InspectTemplate; + + /** + * Encodes the specified InspectTemplate message. Does not implicitly {@link google.privacy.dlp.v2.InspectTemplate.verify|verify} messages. + * @param message InspectTemplate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IInspectTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InspectTemplate message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectTemplate.verify|verify} messages. + * @param message InspectTemplate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IInspectTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InspectTemplate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InspectTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.InspectTemplate; + + /** + * Decodes an InspectTemplate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InspectTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.InspectTemplate; + + /** + * Verifies an InspectTemplate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InspectTemplate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InspectTemplate + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.InspectTemplate; + + /** + * Creates a plain object from an InspectTemplate message. Also converts values to other types if specified. + * @param message InspectTemplate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.InspectTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InspectTemplate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InspectTemplate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeidentifyTemplate. */ + interface IDeidentifyTemplate { + + /** DeidentifyTemplate name */ + name?: (string|null); + + /** DeidentifyTemplate displayName */ + displayName?: (string|null); + + /** DeidentifyTemplate description */ + description?: (string|null); + + /** DeidentifyTemplate createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DeidentifyTemplate updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** DeidentifyTemplate deidentifyConfig */ + deidentifyConfig?: (google.privacy.dlp.v2.IDeidentifyConfig|null); + } + + /** Represents a DeidentifyTemplate. */ + class DeidentifyTemplate implements IDeidentifyTemplate { + + /** + * Constructs a new DeidentifyTemplate. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDeidentifyTemplate); + + /** DeidentifyTemplate name. */ + public name: string; + + /** DeidentifyTemplate displayName. */ + public displayName: string; + + /** DeidentifyTemplate description. */ + public description: string; + + /** DeidentifyTemplate createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DeidentifyTemplate updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DeidentifyTemplate deidentifyConfig. */ + public deidentifyConfig?: (google.privacy.dlp.v2.IDeidentifyConfig|null); + + /** + * Creates a new DeidentifyTemplate instance using the specified properties. + * @param [properties] Properties to set + * @returns DeidentifyTemplate instance + */ + public static create(properties?: google.privacy.dlp.v2.IDeidentifyTemplate): google.privacy.dlp.v2.DeidentifyTemplate; + + /** + * Encodes the specified DeidentifyTemplate message. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyTemplate.verify|verify} messages. + * @param message DeidentifyTemplate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDeidentifyTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeidentifyTemplate message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyTemplate.verify|verify} messages. + * @param message DeidentifyTemplate message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDeidentifyTemplate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeidentifyTemplate message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeidentifyTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DeidentifyTemplate; + + /** + * Decodes a DeidentifyTemplate message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeidentifyTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DeidentifyTemplate; + + /** + * Verifies a DeidentifyTemplate message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeidentifyTemplate message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeidentifyTemplate + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DeidentifyTemplate; + + /** + * Creates a plain object from a DeidentifyTemplate message. Also converts values to other types if specified. + * @param message DeidentifyTemplate + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DeidentifyTemplate, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeidentifyTemplate to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeidentifyTemplate + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Error. */ + interface IError { + + /** Error details */ + details?: (google.rpc.IStatus|null); + + /** Error timestamps */ + timestamps?: (google.protobuf.ITimestamp[]|null); + + /** Error extraInfo */ + extraInfo?: (google.privacy.dlp.v2.Error.ErrorExtraInfo|keyof typeof google.privacy.dlp.v2.Error.ErrorExtraInfo|null); + } + + /** Represents an Error. */ + class Error implements IError { + + /** + * Constructs a new Error. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IError); + + /** Error details. */ + public details?: (google.rpc.IStatus|null); + + /** Error timestamps. */ + public timestamps: google.protobuf.ITimestamp[]; + + /** Error extraInfo. */ + public extraInfo: (google.privacy.dlp.v2.Error.ErrorExtraInfo|keyof typeof google.privacy.dlp.v2.Error.ErrorExtraInfo); + + /** + * Creates a new Error instance using the specified properties. + * @param [properties] Properties to set + * @returns Error instance + */ + public static create(properties?: google.privacy.dlp.v2.IError): google.privacy.dlp.v2.Error; + + /** + * Encodes the specified Error message. Does not implicitly {@link google.privacy.dlp.v2.Error.verify|verify} messages. + * @param message Error message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Error message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Error.verify|verify} messages. + * @param message Error message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Error message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Error; + + /** + * Decodes an Error message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Error; + + /** + * Verifies an Error message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Error message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Error + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Error; + + /** + * Creates a plain object from an Error message. Also converts values to other types if specified. + * @param message Error + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Error, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Error to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Error + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Error { + + /** ErrorExtraInfo enum. */ + enum ErrorExtraInfo { + ERROR_INFO_UNSPECIFIED = 0, + IMAGE_SCAN_UNAVAILABLE_IN_REGION = 1, + FILE_STORE_CLUSTER_UNSUPPORTED = 2 + } + } + + /** Properties of a JobTrigger. */ + interface IJobTrigger { + + /** JobTrigger name */ + name?: (string|null); + + /** JobTrigger displayName */ + displayName?: (string|null); + + /** JobTrigger description */ + description?: (string|null); + + /** JobTrigger inspectJob */ + inspectJob?: (google.privacy.dlp.v2.IInspectJobConfig|null); + + /** JobTrigger triggers */ + triggers?: (google.privacy.dlp.v2.JobTrigger.ITrigger[]|null); + + /** JobTrigger errors */ + errors?: (google.privacy.dlp.v2.IError[]|null); + + /** JobTrigger createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** JobTrigger updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** JobTrigger lastRunTime */ + lastRunTime?: (google.protobuf.ITimestamp|null); + + /** JobTrigger status */ + status?: (google.privacy.dlp.v2.JobTrigger.Status|keyof typeof google.privacy.dlp.v2.JobTrigger.Status|null); + } + + /** Represents a JobTrigger. */ + class JobTrigger implements IJobTrigger { + + /** + * Constructs a new JobTrigger. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IJobTrigger); + + /** JobTrigger name. */ + public name: string; + + /** JobTrigger displayName. */ + public displayName: string; + + /** JobTrigger description. */ + public description: string; + + /** JobTrigger inspectJob. */ + public inspectJob?: (google.privacy.dlp.v2.IInspectJobConfig|null); + + /** JobTrigger triggers. */ + public triggers: google.privacy.dlp.v2.JobTrigger.ITrigger[]; + + /** JobTrigger errors. */ + public errors: google.privacy.dlp.v2.IError[]; + + /** JobTrigger createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** JobTrigger updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** JobTrigger lastRunTime. */ + public lastRunTime?: (google.protobuf.ITimestamp|null); + + /** JobTrigger status. */ + public status: (google.privacy.dlp.v2.JobTrigger.Status|keyof typeof google.privacy.dlp.v2.JobTrigger.Status); + + /** JobTrigger job. */ + public job?: "inspectJob"; + + /** + * Creates a new JobTrigger instance using the specified properties. + * @param [properties] Properties to set + * @returns JobTrigger instance + */ + public static create(properties?: google.privacy.dlp.v2.IJobTrigger): google.privacy.dlp.v2.JobTrigger; + + /** + * Encodes the specified JobTrigger message. Does not implicitly {@link google.privacy.dlp.v2.JobTrigger.verify|verify} messages. + * @param message JobTrigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IJobTrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JobTrigger message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.JobTrigger.verify|verify} messages. + * @param message JobTrigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IJobTrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JobTrigger message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JobTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.JobTrigger; + + /** + * Decodes a JobTrigger message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JobTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.JobTrigger; + + /** + * Verifies a JobTrigger message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JobTrigger message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JobTrigger + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.JobTrigger; + + /** + * Creates a plain object from a JobTrigger message. Also converts values to other types if specified. + * @param message JobTrigger + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.JobTrigger, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JobTrigger to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JobTrigger + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace JobTrigger { + + /** Properties of a Trigger. */ + interface ITrigger { + + /** Trigger schedule */ + schedule?: (google.privacy.dlp.v2.ISchedule|null); + + /** Trigger manual */ + manual?: (google.privacy.dlp.v2.IManual|null); + } + + /** Represents a Trigger. */ + class Trigger implements ITrigger { + + /** + * Constructs a new Trigger. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.JobTrigger.ITrigger); + + /** Trigger schedule. */ + public schedule?: (google.privacy.dlp.v2.ISchedule|null); + + /** Trigger manual. */ + public manual?: (google.privacy.dlp.v2.IManual|null); + + /** Trigger trigger. */ + public trigger?: ("schedule"|"manual"); + + /** + * Creates a new Trigger instance using the specified properties. + * @param [properties] Properties to set + * @returns Trigger instance + */ + public static create(properties?: google.privacy.dlp.v2.JobTrigger.ITrigger): google.privacy.dlp.v2.JobTrigger.Trigger; + + /** + * Encodes the specified Trigger message. Does not implicitly {@link google.privacy.dlp.v2.JobTrigger.Trigger.verify|verify} messages. + * @param message Trigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.JobTrigger.ITrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Trigger message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.JobTrigger.Trigger.verify|verify} messages. + * @param message Trigger message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.JobTrigger.ITrigger, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Trigger message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Trigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.JobTrigger.Trigger; + + /** + * Decodes a Trigger message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Trigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.JobTrigger.Trigger; + + /** + * Verifies a Trigger message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Trigger message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Trigger + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.JobTrigger.Trigger; + + /** + * Creates a plain object from a Trigger message. Also converts values to other types if specified. + * @param message Trigger + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.JobTrigger.Trigger, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Trigger to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Trigger + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Status enum. */ + enum Status { + STATUS_UNSPECIFIED = 0, + HEALTHY = 1, + PAUSED = 2, + CANCELLED = 3 + } + } + + /** Properties of an Action. */ + interface IAction { + + /** Action saveFindings */ + saveFindings?: (google.privacy.dlp.v2.Action.ISaveFindings|null); + + /** Action pubSub */ + pubSub?: (google.privacy.dlp.v2.Action.IPublishToPubSub|null); + + /** Action publishSummaryToCscc */ + publishSummaryToCscc?: (google.privacy.dlp.v2.Action.IPublishSummaryToCscc|null); + + /** Action publishFindingsToCloudDataCatalog */ + publishFindingsToCloudDataCatalog?: (google.privacy.dlp.v2.Action.IPublishFindingsToCloudDataCatalog|null); + + /** Action publishFindingsToDataplexCatalog */ + publishFindingsToDataplexCatalog?: (google.privacy.dlp.v2.Action.IPublishFindingsToDataplexCatalog|null); + + /** Action deidentify */ + deidentify?: (google.privacy.dlp.v2.Action.IDeidentify|null); + + /** Action jobNotificationEmails */ + jobNotificationEmails?: (google.privacy.dlp.v2.Action.IJobNotificationEmails|null); + + /** Action publishToStackdriver */ + publishToStackdriver?: (google.privacy.dlp.v2.Action.IPublishToStackdriver|null); + } + + /** Represents an Action. */ + class Action implements IAction { + + /** + * Constructs a new Action. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IAction); + + /** Action saveFindings. */ + public saveFindings?: (google.privacy.dlp.v2.Action.ISaveFindings|null); + + /** Action pubSub. */ + public pubSub?: (google.privacy.dlp.v2.Action.IPublishToPubSub|null); + + /** Action publishSummaryToCscc. */ + public publishSummaryToCscc?: (google.privacy.dlp.v2.Action.IPublishSummaryToCscc|null); + + /** Action publishFindingsToCloudDataCatalog. */ + public publishFindingsToCloudDataCatalog?: (google.privacy.dlp.v2.Action.IPublishFindingsToCloudDataCatalog|null); + + /** Action publishFindingsToDataplexCatalog. */ + public publishFindingsToDataplexCatalog?: (google.privacy.dlp.v2.Action.IPublishFindingsToDataplexCatalog|null); + + /** Action deidentify. */ + public deidentify?: (google.privacy.dlp.v2.Action.IDeidentify|null); + + /** Action jobNotificationEmails. */ + public jobNotificationEmails?: (google.privacy.dlp.v2.Action.IJobNotificationEmails|null); + + /** Action publishToStackdriver. */ + public publishToStackdriver?: (google.privacy.dlp.v2.Action.IPublishToStackdriver|null); + + /** Action action. */ + public action?: ("saveFindings"|"pubSub"|"publishSummaryToCscc"|"publishFindingsToCloudDataCatalog"|"publishFindingsToDataplexCatalog"|"deidentify"|"jobNotificationEmails"|"publishToStackdriver"); + + /** + * Creates a new Action instance using the specified properties. + * @param [properties] Properties to set + * @returns Action instance + */ + public static create(properties?: google.privacy.dlp.v2.IAction): google.privacy.dlp.v2.Action; + + /** + * Encodes the specified Action message. Does not implicitly {@link google.privacy.dlp.v2.Action.verify|verify} messages. + * @param message Action message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Action message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Action.verify|verify} messages. + * @param message Action message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Action message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Action + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Action; + + /** + * Decodes an Action message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Action + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Action; + + /** + * Verifies an Action message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Action message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Action + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Action; + + /** + * Creates a plain object from an Action message. Also converts values to other types if specified. + * @param message Action + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Action, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Action to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Action + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Action { + + /** Properties of a SaveFindings. */ + interface ISaveFindings { + + /** SaveFindings outputConfig */ + outputConfig?: (google.privacy.dlp.v2.IOutputStorageConfig|null); + } + + /** Represents a SaveFindings. */ + class SaveFindings implements ISaveFindings { + + /** + * Constructs a new SaveFindings. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.Action.ISaveFindings); + + /** SaveFindings outputConfig. */ + public outputConfig?: (google.privacy.dlp.v2.IOutputStorageConfig|null); + + /** + * Creates a new SaveFindings instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveFindings instance + */ + public static create(properties?: google.privacy.dlp.v2.Action.ISaveFindings): google.privacy.dlp.v2.Action.SaveFindings; + + /** + * Encodes the specified SaveFindings message. Does not implicitly {@link google.privacy.dlp.v2.Action.SaveFindings.verify|verify} messages. + * @param message SaveFindings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.Action.ISaveFindings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveFindings message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Action.SaveFindings.verify|verify} messages. + * @param message SaveFindings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.Action.ISaveFindings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveFindings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveFindings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Action.SaveFindings; + + /** + * Decodes a SaveFindings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveFindings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Action.SaveFindings; + + /** + * Verifies a SaveFindings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveFindings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveFindings + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Action.SaveFindings; + + /** + * Creates a plain object from a SaveFindings message. Also converts values to other types if specified. + * @param message SaveFindings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Action.SaveFindings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveFindings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveFindings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PublishToPubSub. */ + interface IPublishToPubSub { + + /** PublishToPubSub topic */ + topic?: (string|null); + } + + /** Represents a PublishToPubSub. */ + class PublishToPubSub implements IPublishToPubSub { + + /** + * Constructs a new PublishToPubSub. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.Action.IPublishToPubSub); + + /** PublishToPubSub topic. */ + public topic: string; + + /** + * Creates a new PublishToPubSub instance using the specified properties. + * @param [properties] Properties to set + * @returns PublishToPubSub instance + */ + public static create(properties?: google.privacy.dlp.v2.Action.IPublishToPubSub): google.privacy.dlp.v2.Action.PublishToPubSub; + + /** + * Encodes the specified PublishToPubSub message. Does not implicitly {@link google.privacy.dlp.v2.Action.PublishToPubSub.verify|verify} messages. + * @param message PublishToPubSub message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.Action.IPublishToPubSub, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublishToPubSub message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Action.PublishToPubSub.verify|verify} messages. + * @param message PublishToPubSub message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.Action.IPublishToPubSub, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublishToPubSub message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublishToPubSub + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Action.PublishToPubSub; + + /** + * Decodes a PublishToPubSub message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublishToPubSub + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Action.PublishToPubSub; + + /** + * Verifies a PublishToPubSub message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PublishToPubSub message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublishToPubSub + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Action.PublishToPubSub; + + /** + * Creates a plain object from a PublishToPubSub message. Also converts values to other types if specified. + * @param message PublishToPubSub + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Action.PublishToPubSub, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublishToPubSub to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublishToPubSub + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PublishSummaryToCscc. */ + interface IPublishSummaryToCscc { + } + + /** Represents a PublishSummaryToCscc. */ + class PublishSummaryToCscc implements IPublishSummaryToCscc { + + /** + * Constructs a new PublishSummaryToCscc. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.Action.IPublishSummaryToCscc); + + /** + * Creates a new PublishSummaryToCscc instance using the specified properties. + * @param [properties] Properties to set + * @returns PublishSummaryToCscc instance + */ + public static create(properties?: google.privacy.dlp.v2.Action.IPublishSummaryToCscc): google.privacy.dlp.v2.Action.PublishSummaryToCscc; + + /** + * Encodes the specified PublishSummaryToCscc message. Does not implicitly {@link google.privacy.dlp.v2.Action.PublishSummaryToCscc.verify|verify} messages. + * @param message PublishSummaryToCscc message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.Action.IPublishSummaryToCscc, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublishSummaryToCscc message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Action.PublishSummaryToCscc.verify|verify} messages. + * @param message PublishSummaryToCscc message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.Action.IPublishSummaryToCscc, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublishSummaryToCscc message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublishSummaryToCscc + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Action.PublishSummaryToCscc; + + /** + * Decodes a PublishSummaryToCscc message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublishSummaryToCscc + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Action.PublishSummaryToCscc; + + /** + * Verifies a PublishSummaryToCscc message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PublishSummaryToCscc message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublishSummaryToCscc + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Action.PublishSummaryToCscc; + + /** + * Creates a plain object from a PublishSummaryToCscc message. Also converts values to other types if specified. + * @param message PublishSummaryToCscc + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Action.PublishSummaryToCscc, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublishSummaryToCscc to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublishSummaryToCscc + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PublishFindingsToCloudDataCatalog. */ + interface IPublishFindingsToCloudDataCatalog { + } + + /** Represents a PublishFindingsToCloudDataCatalog. */ + class PublishFindingsToCloudDataCatalog implements IPublishFindingsToCloudDataCatalog { + + /** + * Constructs a new PublishFindingsToCloudDataCatalog. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.Action.IPublishFindingsToCloudDataCatalog); + + /** + * Creates a new PublishFindingsToCloudDataCatalog instance using the specified properties. + * @param [properties] Properties to set + * @returns PublishFindingsToCloudDataCatalog instance + */ + public static create(properties?: google.privacy.dlp.v2.Action.IPublishFindingsToCloudDataCatalog): google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog; + + /** + * Encodes the specified PublishFindingsToCloudDataCatalog message. Does not implicitly {@link google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.verify|verify} messages. + * @param message PublishFindingsToCloudDataCatalog message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.Action.IPublishFindingsToCloudDataCatalog, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublishFindingsToCloudDataCatalog message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.verify|verify} messages. + * @param message PublishFindingsToCloudDataCatalog message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.Action.IPublishFindingsToCloudDataCatalog, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublishFindingsToCloudDataCatalog message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublishFindingsToCloudDataCatalog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog; + + /** + * Decodes a PublishFindingsToCloudDataCatalog message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublishFindingsToCloudDataCatalog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog; + + /** + * Verifies a PublishFindingsToCloudDataCatalog message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PublishFindingsToCloudDataCatalog message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublishFindingsToCloudDataCatalog + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog; + + /** + * Creates a plain object from a PublishFindingsToCloudDataCatalog message. Also converts values to other types if specified. + * @param message PublishFindingsToCloudDataCatalog + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublishFindingsToCloudDataCatalog to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublishFindingsToCloudDataCatalog + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PublishFindingsToDataplexCatalog. */ + interface IPublishFindingsToDataplexCatalog { + } + + /** Represents a PublishFindingsToDataplexCatalog. */ + class PublishFindingsToDataplexCatalog implements IPublishFindingsToDataplexCatalog { + + /** + * Constructs a new PublishFindingsToDataplexCatalog. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.Action.IPublishFindingsToDataplexCatalog); + + /** + * Creates a new PublishFindingsToDataplexCatalog instance using the specified properties. + * @param [properties] Properties to set + * @returns PublishFindingsToDataplexCatalog instance + */ + public static create(properties?: google.privacy.dlp.v2.Action.IPublishFindingsToDataplexCatalog): google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog; + + /** + * Encodes the specified PublishFindingsToDataplexCatalog message. Does not implicitly {@link google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog.verify|verify} messages. + * @param message PublishFindingsToDataplexCatalog message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.Action.IPublishFindingsToDataplexCatalog, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublishFindingsToDataplexCatalog message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog.verify|verify} messages. + * @param message PublishFindingsToDataplexCatalog message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.Action.IPublishFindingsToDataplexCatalog, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublishFindingsToDataplexCatalog message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublishFindingsToDataplexCatalog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog; + + /** + * Decodes a PublishFindingsToDataplexCatalog message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublishFindingsToDataplexCatalog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog; + + /** + * Verifies a PublishFindingsToDataplexCatalog message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PublishFindingsToDataplexCatalog message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublishFindingsToDataplexCatalog + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog; + + /** + * Creates a plain object from a PublishFindingsToDataplexCatalog message. Also converts values to other types if specified. + * @param message PublishFindingsToDataplexCatalog + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublishFindingsToDataplexCatalog to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublishFindingsToDataplexCatalog + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Deidentify. */ + interface IDeidentify { + + /** Deidentify transformationConfig */ + transformationConfig?: (google.privacy.dlp.v2.ITransformationConfig|null); + + /** Deidentify transformationDetailsStorageConfig */ + transformationDetailsStorageConfig?: (google.privacy.dlp.v2.ITransformationDetailsStorageConfig|null); + + /** Deidentify cloudStorageOutput */ + cloudStorageOutput?: (string|null); + + /** Deidentify fileTypesToTransform */ + fileTypesToTransform?: (google.privacy.dlp.v2.FileType[]|null); + } + + /** Represents a Deidentify. */ + class Deidentify implements IDeidentify { + + /** + * Constructs a new Deidentify. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.Action.IDeidentify); + + /** Deidentify transformationConfig. */ + public transformationConfig?: (google.privacy.dlp.v2.ITransformationConfig|null); + + /** Deidentify transformationDetailsStorageConfig. */ + public transformationDetailsStorageConfig?: (google.privacy.dlp.v2.ITransformationDetailsStorageConfig|null); + + /** Deidentify cloudStorageOutput. */ + public cloudStorageOutput?: (string|null); + + /** Deidentify fileTypesToTransform. */ + public fileTypesToTransform: google.privacy.dlp.v2.FileType[]; + + /** Deidentify output. */ + public output?: "cloudStorageOutput"; + + /** + * Creates a new Deidentify instance using the specified properties. + * @param [properties] Properties to set + * @returns Deidentify instance + */ + public static create(properties?: google.privacy.dlp.v2.Action.IDeidentify): google.privacy.dlp.v2.Action.Deidentify; + + /** + * Encodes the specified Deidentify message. Does not implicitly {@link google.privacy.dlp.v2.Action.Deidentify.verify|verify} messages. + * @param message Deidentify message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.Action.IDeidentify, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Deidentify message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Action.Deidentify.verify|verify} messages. + * @param message Deidentify message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.Action.IDeidentify, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Deidentify message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Deidentify + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Action.Deidentify; + + /** + * Decodes a Deidentify message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Deidentify + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Action.Deidentify; + + /** + * Verifies a Deidentify message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Deidentify message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Deidentify + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Action.Deidentify; + + /** + * Creates a plain object from a Deidentify message. Also converts values to other types if specified. + * @param message Deidentify + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Action.Deidentify, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Deidentify to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Deidentify + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JobNotificationEmails. */ + interface IJobNotificationEmails { + } + + /** Represents a JobNotificationEmails. */ + class JobNotificationEmails implements IJobNotificationEmails { + + /** + * Constructs a new JobNotificationEmails. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.Action.IJobNotificationEmails); + + /** + * Creates a new JobNotificationEmails instance using the specified properties. + * @param [properties] Properties to set + * @returns JobNotificationEmails instance + */ + public static create(properties?: google.privacy.dlp.v2.Action.IJobNotificationEmails): google.privacy.dlp.v2.Action.JobNotificationEmails; + + /** + * Encodes the specified JobNotificationEmails message. Does not implicitly {@link google.privacy.dlp.v2.Action.JobNotificationEmails.verify|verify} messages. + * @param message JobNotificationEmails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.Action.IJobNotificationEmails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JobNotificationEmails message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Action.JobNotificationEmails.verify|verify} messages. + * @param message JobNotificationEmails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.Action.IJobNotificationEmails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JobNotificationEmails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JobNotificationEmails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Action.JobNotificationEmails; + + /** + * Decodes a JobNotificationEmails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JobNotificationEmails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Action.JobNotificationEmails; + + /** + * Verifies a JobNotificationEmails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JobNotificationEmails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JobNotificationEmails + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Action.JobNotificationEmails; + + /** + * Creates a plain object from a JobNotificationEmails message. Also converts values to other types if specified. + * @param message JobNotificationEmails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Action.JobNotificationEmails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JobNotificationEmails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JobNotificationEmails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PublishToStackdriver. */ + interface IPublishToStackdriver { + } + + /** Represents a PublishToStackdriver. */ + class PublishToStackdriver implements IPublishToStackdriver { + + /** + * Constructs a new PublishToStackdriver. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.Action.IPublishToStackdriver); + + /** + * Creates a new PublishToStackdriver instance using the specified properties. + * @param [properties] Properties to set + * @returns PublishToStackdriver instance + */ + public static create(properties?: google.privacy.dlp.v2.Action.IPublishToStackdriver): google.privacy.dlp.v2.Action.PublishToStackdriver; + + /** + * Encodes the specified PublishToStackdriver message. Does not implicitly {@link google.privacy.dlp.v2.Action.PublishToStackdriver.verify|verify} messages. + * @param message PublishToStackdriver message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.Action.IPublishToStackdriver, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublishToStackdriver message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Action.PublishToStackdriver.verify|verify} messages. + * @param message PublishToStackdriver message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.Action.IPublishToStackdriver, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublishToStackdriver message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublishToStackdriver + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Action.PublishToStackdriver; + + /** + * Decodes a PublishToStackdriver message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublishToStackdriver + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Action.PublishToStackdriver; + + /** + * Verifies a PublishToStackdriver message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PublishToStackdriver message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublishToStackdriver + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Action.PublishToStackdriver; + + /** + * Creates a plain object from a PublishToStackdriver message. Also converts values to other types if specified. + * @param message PublishToStackdriver + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Action.PublishToStackdriver, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublishToStackdriver to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublishToStackdriver + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a TransformationConfig. */ + interface ITransformationConfig { + + /** TransformationConfig deidentifyTemplate */ + deidentifyTemplate?: (string|null); + + /** TransformationConfig structuredDeidentifyTemplate */ + structuredDeidentifyTemplate?: (string|null); + + /** TransformationConfig imageRedactTemplate */ + imageRedactTemplate?: (string|null); + } + + /** Represents a TransformationConfig. */ + class TransformationConfig implements ITransformationConfig { + + /** + * Constructs a new TransformationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ITransformationConfig); + + /** TransformationConfig deidentifyTemplate. */ + public deidentifyTemplate: string; + + /** TransformationConfig structuredDeidentifyTemplate. */ + public structuredDeidentifyTemplate: string; + + /** TransformationConfig imageRedactTemplate. */ + public imageRedactTemplate: string; + + /** + * Creates a new TransformationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns TransformationConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.ITransformationConfig): google.privacy.dlp.v2.TransformationConfig; + + /** + * Encodes the specified TransformationConfig message. Does not implicitly {@link google.privacy.dlp.v2.TransformationConfig.verify|verify} messages. + * @param message TransformationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ITransformationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TransformationConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationConfig.verify|verify} messages. + * @param message TransformationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ITransformationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TransformationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TransformationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TransformationConfig; + + /** + * Decodes a TransformationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TransformationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TransformationConfig; + + /** + * Verifies a TransformationConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TransformationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TransformationConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TransformationConfig; + + /** + * Creates a plain object from a TransformationConfig message. Also converts values to other types if specified. + * @param message TransformationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.TransformationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TransformationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TransformationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateInspectTemplateRequest. */ + interface ICreateInspectTemplateRequest { + + /** CreateInspectTemplateRequest parent */ + parent?: (string|null); + + /** CreateInspectTemplateRequest inspectTemplate */ + inspectTemplate?: (google.privacy.dlp.v2.IInspectTemplate|null); + + /** CreateInspectTemplateRequest templateId */ + templateId?: (string|null); + + /** CreateInspectTemplateRequest locationId */ + locationId?: (string|null); + } + + /** Represents a CreateInspectTemplateRequest. */ + class CreateInspectTemplateRequest implements ICreateInspectTemplateRequest { + + /** + * Constructs a new CreateInspectTemplateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ICreateInspectTemplateRequest); + + /** CreateInspectTemplateRequest parent. */ + public parent: string; + + /** CreateInspectTemplateRequest inspectTemplate. */ + public inspectTemplate?: (google.privacy.dlp.v2.IInspectTemplate|null); + + /** CreateInspectTemplateRequest templateId. */ + public templateId: string; + + /** CreateInspectTemplateRequest locationId. */ + public locationId: string; + + /** + * Creates a new CreateInspectTemplateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateInspectTemplateRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.ICreateInspectTemplateRequest): google.privacy.dlp.v2.CreateInspectTemplateRequest; + + /** + * Encodes the specified CreateInspectTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.CreateInspectTemplateRequest.verify|verify} messages. + * @param message CreateInspectTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ICreateInspectTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateInspectTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CreateInspectTemplateRequest.verify|verify} messages. + * @param message CreateInspectTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ICreateInspectTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateInspectTemplateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateInspectTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CreateInspectTemplateRequest; + + /** + * Decodes a CreateInspectTemplateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateInspectTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CreateInspectTemplateRequest; + + /** + * Verifies a CreateInspectTemplateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateInspectTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateInspectTemplateRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CreateInspectTemplateRequest; + + /** + * Creates a plain object from a CreateInspectTemplateRequest message. Also converts values to other types if specified. + * @param message CreateInspectTemplateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CreateInspectTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateInspectTemplateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateInspectTemplateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateInspectTemplateRequest. */ + interface IUpdateInspectTemplateRequest { + + /** UpdateInspectTemplateRequest name */ + name?: (string|null); + + /** UpdateInspectTemplateRequest inspectTemplate */ + inspectTemplate?: (google.privacy.dlp.v2.IInspectTemplate|null); + + /** UpdateInspectTemplateRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateInspectTemplateRequest. */ + class UpdateInspectTemplateRequest implements IUpdateInspectTemplateRequest { + + /** + * Constructs a new UpdateInspectTemplateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IUpdateInspectTemplateRequest); + + /** UpdateInspectTemplateRequest name. */ + public name: string; + + /** UpdateInspectTemplateRequest inspectTemplate. */ + public inspectTemplate?: (google.privacy.dlp.v2.IInspectTemplate|null); + + /** UpdateInspectTemplateRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateInspectTemplateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateInspectTemplateRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IUpdateInspectTemplateRequest): google.privacy.dlp.v2.UpdateInspectTemplateRequest; + + /** + * Encodes the specified UpdateInspectTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.UpdateInspectTemplateRequest.verify|verify} messages. + * @param message UpdateInspectTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IUpdateInspectTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateInspectTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.UpdateInspectTemplateRequest.verify|verify} messages. + * @param message UpdateInspectTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IUpdateInspectTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateInspectTemplateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateInspectTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.UpdateInspectTemplateRequest; + + /** + * Decodes an UpdateInspectTemplateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateInspectTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.UpdateInspectTemplateRequest; + + /** + * Verifies an UpdateInspectTemplateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateInspectTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateInspectTemplateRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.UpdateInspectTemplateRequest; + + /** + * Creates a plain object from an UpdateInspectTemplateRequest message. Also converts values to other types if specified. + * @param message UpdateInspectTemplateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.UpdateInspectTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateInspectTemplateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateInspectTemplateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetInspectTemplateRequest. */ + interface IGetInspectTemplateRequest { + + /** GetInspectTemplateRequest name */ + name?: (string|null); + } + + /** Represents a GetInspectTemplateRequest. */ + class GetInspectTemplateRequest implements IGetInspectTemplateRequest { + + /** + * Constructs a new GetInspectTemplateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IGetInspectTemplateRequest); + + /** GetInspectTemplateRequest name. */ + public name: string; + + /** + * Creates a new GetInspectTemplateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetInspectTemplateRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IGetInspectTemplateRequest): google.privacy.dlp.v2.GetInspectTemplateRequest; + + /** + * Encodes the specified GetInspectTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetInspectTemplateRequest.verify|verify} messages. + * @param message GetInspectTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IGetInspectTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetInspectTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetInspectTemplateRequest.verify|verify} messages. + * @param message GetInspectTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IGetInspectTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetInspectTemplateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetInspectTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.GetInspectTemplateRequest; + + /** + * Decodes a GetInspectTemplateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetInspectTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.GetInspectTemplateRequest; + + /** + * Verifies a GetInspectTemplateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetInspectTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetInspectTemplateRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.GetInspectTemplateRequest; + + /** + * Creates a plain object from a GetInspectTemplateRequest message. Also converts values to other types if specified. + * @param message GetInspectTemplateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.GetInspectTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetInspectTemplateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetInspectTemplateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListInspectTemplatesRequest. */ + interface IListInspectTemplatesRequest { + + /** ListInspectTemplatesRequest parent */ + parent?: (string|null); + + /** ListInspectTemplatesRequest pageToken */ + pageToken?: (string|null); + + /** ListInspectTemplatesRequest pageSize */ + pageSize?: (number|null); + + /** ListInspectTemplatesRequest orderBy */ + orderBy?: (string|null); + + /** ListInspectTemplatesRequest locationId */ + locationId?: (string|null); + } + + /** Represents a ListInspectTemplatesRequest. */ + class ListInspectTemplatesRequest implements IListInspectTemplatesRequest { + + /** + * Constructs a new ListInspectTemplatesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListInspectTemplatesRequest); + + /** ListInspectTemplatesRequest parent. */ + public parent: string; + + /** ListInspectTemplatesRequest pageToken. */ + public pageToken: string; + + /** ListInspectTemplatesRequest pageSize. */ + public pageSize: number; + + /** ListInspectTemplatesRequest orderBy. */ + public orderBy: string; + + /** ListInspectTemplatesRequest locationId. */ + public locationId: string; + + /** + * Creates a new ListInspectTemplatesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListInspectTemplatesRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IListInspectTemplatesRequest): google.privacy.dlp.v2.ListInspectTemplatesRequest; + + /** + * Encodes the specified ListInspectTemplatesRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListInspectTemplatesRequest.verify|verify} messages. + * @param message ListInspectTemplatesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListInspectTemplatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListInspectTemplatesRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListInspectTemplatesRequest.verify|verify} messages. + * @param message ListInspectTemplatesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListInspectTemplatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListInspectTemplatesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListInspectTemplatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ListInspectTemplatesRequest; + + /** + * Decodes a ListInspectTemplatesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListInspectTemplatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ListInspectTemplatesRequest; + + /** + * Verifies a ListInspectTemplatesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListInspectTemplatesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListInspectTemplatesRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListInspectTemplatesRequest; + + /** + * Creates a plain object from a ListInspectTemplatesRequest message. Also converts values to other types if specified. + * @param message ListInspectTemplatesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListInspectTemplatesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListInspectTemplatesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListInspectTemplatesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListInspectTemplatesResponse. */ + interface IListInspectTemplatesResponse { + + /** ListInspectTemplatesResponse inspectTemplates */ + inspectTemplates?: (google.privacy.dlp.v2.IInspectTemplate[]|null); + + /** ListInspectTemplatesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListInspectTemplatesResponse. */ + class ListInspectTemplatesResponse implements IListInspectTemplatesResponse { + + /** + * Constructs a new ListInspectTemplatesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListInspectTemplatesResponse); + + /** ListInspectTemplatesResponse inspectTemplates. */ + public inspectTemplates: google.privacy.dlp.v2.IInspectTemplate[]; + + /** ListInspectTemplatesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListInspectTemplatesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListInspectTemplatesResponse instance + */ + public static create(properties?: google.privacy.dlp.v2.IListInspectTemplatesResponse): google.privacy.dlp.v2.ListInspectTemplatesResponse; + + /** + * Encodes the specified ListInspectTemplatesResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListInspectTemplatesResponse.verify|verify} messages. + * @param message ListInspectTemplatesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListInspectTemplatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListInspectTemplatesResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListInspectTemplatesResponse.verify|verify} messages. + * @param message ListInspectTemplatesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListInspectTemplatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListInspectTemplatesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListInspectTemplatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ListInspectTemplatesResponse; + + /** + * Decodes a ListInspectTemplatesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListInspectTemplatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ListInspectTemplatesResponse; + + /** + * Verifies a ListInspectTemplatesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListInspectTemplatesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListInspectTemplatesResponse + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListInspectTemplatesResponse; + + /** + * Creates a plain object from a ListInspectTemplatesResponse message. Also converts values to other types if specified. + * @param message ListInspectTemplatesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListInspectTemplatesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListInspectTemplatesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListInspectTemplatesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteInspectTemplateRequest. */ + interface IDeleteInspectTemplateRequest { + + /** DeleteInspectTemplateRequest name */ + name?: (string|null); + } + + /** Represents a DeleteInspectTemplateRequest. */ + class DeleteInspectTemplateRequest implements IDeleteInspectTemplateRequest { + + /** + * Constructs a new DeleteInspectTemplateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDeleteInspectTemplateRequest); + + /** DeleteInspectTemplateRequest name. */ + public name: string; + + /** + * Creates a new DeleteInspectTemplateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteInspectTemplateRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IDeleteInspectTemplateRequest): google.privacy.dlp.v2.DeleteInspectTemplateRequest; + + /** + * Encodes the specified DeleteInspectTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteInspectTemplateRequest.verify|verify} messages. + * @param message DeleteInspectTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDeleteInspectTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteInspectTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteInspectTemplateRequest.verify|verify} messages. + * @param message DeleteInspectTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDeleteInspectTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteInspectTemplateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteInspectTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DeleteInspectTemplateRequest; + + /** + * Decodes a DeleteInspectTemplateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteInspectTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DeleteInspectTemplateRequest; + + /** + * Verifies a DeleteInspectTemplateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteInspectTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteInspectTemplateRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DeleteInspectTemplateRequest; + + /** + * Creates a plain object from a DeleteInspectTemplateRequest message. Also converts values to other types if specified. + * @param message DeleteInspectTemplateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DeleteInspectTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteInspectTemplateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteInspectTemplateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateJobTriggerRequest. */ + interface ICreateJobTriggerRequest { + + /** CreateJobTriggerRequest parent */ + parent?: (string|null); + + /** CreateJobTriggerRequest jobTrigger */ + jobTrigger?: (google.privacy.dlp.v2.IJobTrigger|null); + + /** CreateJobTriggerRequest triggerId */ + triggerId?: (string|null); + + /** CreateJobTriggerRequest locationId */ + locationId?: (string|null); + } + + /** Represents a CreateJobTriggerRequest. */ + class CreateJobTriggerRequest implements ICreateJobTriggerRequest { + + /** + * Constructs a new CreateJobTriggerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ICreateJobTriggerRequest); + + /** CreateJobTriggerRequest parent. */ + public parent: string; + + /** CreateJobTriggerRequest jobTrigger. */ + public jobTrigger?: (google.privacy.dlp.v2.IJobTrigger|null); + + /** CreateJobTriggerRequest triggerId. */ + public triggerId: string; + + /** CreateJobTriggerRequest locationId. */ + public locationId: string; + + /** + * Creates a new CreateJobTriggerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateJobTriggerRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.ICreateJobTriggerRequest): google.privacy.dlp.v2.CreateJobTriggerRequest; + + /** + * Encodes the specified CreateJobTriggerRequest message. Does not implicitly {@link google.privacy.dlp.v2.CreateJobTriggerRequest.verify|verify} messages. + * @param message CreateJobTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ICreateJobTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateJobTriggerRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CreateJobTriggerRequest.verify|verify} messages. + * @param message CreateJobTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ICreateJobTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateJobTriggerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateJobTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CreateJobTriggerRequest; + + /** + * Decodes a CreateJobTriggerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateJobTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CreateJobTriggerRequest; + + /** + * Verifies a CreateJobTriggerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateJobTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateJobTriggerRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CreateJobTriggerRequest; + + /** + * Creates a plain object from a CreateJobTriggerRequest message. Also converts values to other types if specified. + * @param message CreateJobTriggerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CreateJobTriggerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateJobTriggerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateJobTriggerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ActivateJobTriggerRequest. */ + interface IActivateJobTriggerRequest { + + /** ActivateJobTriggerRequest name */ + name?: (string|null); + } + + /** Represents an ActivateJobTriggerRequest. */ + class ActivateJobTriggerRequest implements IActivateJobTriggerRequest { + + /** + * Constructs a new ActivateJobTriggerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IActivateJobTriggerRequest); + + /** ActivateJobTriggerRequest name. */ + public name: string; + + /** + * Creates a new ActivateJobTriggerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ActivateJobTriggerRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IActivateJobTriggerRequest): google.privacy.dlp.v2.ActivateJobTriggerRequest; + + /** + * Encodes the specified ActivateJobTriggerRequest message. Does not implicitly {@link google.privacy.dlp.v2.ActivateJobTriggerRequest.verify|verify} messages. + * @param message ActivateJobTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IActivateJobTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ActivateJobTriggerRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ActivateJobTriggerRequest.verify|verify} messages. + * @param message ActivateJobTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IActivateJobTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ActivateJobTriggerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ActivateJobTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ActivateJobTriggerRequest; + + /** + * Decodes an ActivateJobTriggerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ActivateJobTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ActivateJobTriggerRequest; + + /** + * Verifies an ActivateJobTriggerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ActivateJobTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ActivateJobTriggerRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ActivateJobTriggerRequest; + + /** + * Creates a plain object from an ActivateJobTriggerRequest message. Also converts values to other types if specified. + * @param message ActivateJobTriggerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ActivateJobTriggerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ActivateJobTriggerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ActivateJobTriggerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateJobTriggerRequest. */ + interface IUpdateJobTriggerRequest { + + /** UpdateJobTriggerRequest name */ + name?: (string|null); + + /** UpdateJobTriggerRequest jobTrigger */ + jobTrigger?: (google.privacy.dlp.v2.IJobTrigger|null); + + /** UpdateJobTriggerRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateJobTriggerRequest. */ + class UpdateJobTriggerRequest implements IUpdateJobTriggerRequest { + + /** + * Constructs a new UpdateJobTriggerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IUpdateJobTriggerRequest); + + /** UpdateJobTriggerRequest name. */ + public name: string; + + /** UpdateJobTriggerRequest jobTrigger. */ + public jobTrigger?: (google.privacy.dlp.v2.IJobTrigger|null); + + /** UpdateJobTriggerRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateJobTriggerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateJobTriggerRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IUpdateJobTriggerRequest): google.privacy.dlp.v2.UpdateJobTriggerRequest; + + /** + * Encodes the specified UpdateJobTriggerRequest message. Does not implicitly {@link google.privacy.dlp.v2.UpdateJobTriggerRequest.verify|verify} messages. + * @param message UpdateJobTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IUpdateJobTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateJobTriggerRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.UpdateJobTriggerRequest.verify|verify} messages. + * @param message UpdateJobTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IUpdateJobTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateJobTriggerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateJobTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.UpdateJobTriggerRequest; + + /** + * Decodes an UpdateJobTriggerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateJobTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.UpdateJobTriggerRequest; + + /** + * Verifies an UpdateJobTriggerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateJobTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateJobTriggerRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.UpdateJobTriggerRequest; + + /** + * Creates a plain object from an UpdateJobTriggerRequest message. Also converts values to other types if specified. + * @param message UpdateJobTriggerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.UpdateJobTriggerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateJobTriggerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateJobTriggerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetJobTriggerRequest. */ + interface IGetJobTriggerRequest { + + /** GetJobTriggerRequest name */ + name?: (string|null); + } + + /** Represents a GetJobTriggerRequest. */ + class GetJobTriggerRequest implements IGetJobTriggerRequest { + + /** + * Constructs a new GetJobTriggerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IGetJobTriggerRequest); + + /** GetJobTriggerRequest name. */ + public name: string; + + /** + * Creates a new GetJobTriggerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetJobTriggerRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IGetJobTriggerRequest): google.privacy.dlp.v2.GetJobTriggerRequest; + + /** + * Encodes the specified GetJobTriggerRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetJobTriggerRequest.verify|verify} messages. + * @param message GetJobTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IGetJobTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetJobTriggerRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetJobTriggerRequest.verify|verify} messages. + * @param message GetJobTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IGetJobTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetJobTriggerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetJobTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.GetJobTriggerRequest; + + /** + * Decodes a GetJobTriggerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetJobTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.GetJobTriggerRequest; + + /** + * Verifies a GetJobTriggerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetJobTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetJobTriggerRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.GetJobTriggerRequest; + + /** + * Creates a plain object from a GetJobTriggerRequest message. Also converts values to other types if specified. + * @param message GetJobTriggerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.GetJobTriggerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetJobTriggerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetJobTriggerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateDiscoveryConfigRequest. */ + interface ICreateDiscoveryConfigRequest { + + /** CreateDiscoveryConfigRequest parent */ + parent?: (string|null); + + /** CreateDiscoveryConfigRequest discoveryConfig */ + discoveryConfig?: (google.privacy.dlp.v2.IDiscoveryConfig|null); + + /** CreateDiscoveryConfigRequest configId */ + configId?: (string|null); + } + + /** Represents a CreateDiscoveryConfigRequest. */ + class CreateDiscoveryConfigRequest implements ICreateDiscoveryConfigRequest { + + /** + * Constructs a new CreateDiscoveryConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ICreateDiscoveryConfigRequest); + + /** CreateDiscoveryConfigRequest parent. */ + public parent: string; + + /** CreateDiscoveryConfigRequest discoveryConfig. */ + public discoveryConfig?: (google.privacy.dlp.v2.IDiscoveryConfig|null); + + /** CreateDiscoveryConfigRequest configId. */ + public configId: string; + + /** + * Creates a new CreateDiscoveryConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateDiscoveryConfigRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.ICreateDiscoveryConfigRequest): google.privacy.dlp.v2.CreateDiscoveryConfigRequest; + + /** + * Encodes the specified CreateDiscoveryConfigRequest message. Does not implicitly {@link google.privacy.dlp.v2.CreateDiscoveryConfigRequest.verify|verify} messages. + * @param message CreateDiscoveryConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ICreateDiscoveryConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateDiscoveryConfigRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CreateDiscoveryConfigRequest.verify|verify} messages. + * @param message CreateDiscoveryConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ICreateDiscoveryConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateDiscoveryConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateDiscoveryConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CreateDiscoveryConfigRequest; + + /** + * Decodes a CreateDiscoveryConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateDiscoveryConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CreateDiscoveryConfigRequest; + + /** + * Verifies a CreateDiscoveryConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateDiscoveryConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDiscoveryConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CreateDiscoveryConfigRequest; + + /** + * Creates a plain object from a CreateDiscoveryConfigRequest message. Also converts values to other types if specified. + * @param message CreateDiscoveryConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CreateDiscoveryConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateDiscoveryConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDiscoveryConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateDiscoveryConfigRequest. */ + interface IUpdateDiscoveryConfigRequest { + + /** UpdateDiscoveryConfigRequest name */ + name?: (string|null); + + /** UpdateDiscoveryConfigRequest discoveryConfig */ + discoveryConfig?: (google.privacy.dlp.v2.IDiscoveryConfig|null); + + /** UpdateDiscoveryConfigRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateDiscoveryConfigRequest. */ + class UpdateDiscoveryConfigRequest implements IUpdateDiscoveryConfigRequest { + + /** + * Constructs a new UpdateDiscoveryConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IUpdateDiscoveryConfigRequest); + + /** UpdateDiscoveryConfigRequest name. */ + public name: string; + + /** UpdateDiscoveryConfigRequest discoveryConfig. */ + public discoveryConfig?: (google.privacy.dlp.v2.IDiscoveryConfig|null); + + /** UpdateDiscoveryConfigRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateDiscoveryConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDiscoveryConfigRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IUpdateDiscoveryConfigRequest): google.privacy.dlp.v2.UpdateDiscoveryConfigRequest; + + /** + * Encodes the specified UpdateDiscoveryConfigRequest message. Does not implicitly {@link google.privacy.dlp.v2.UpdateDiscoveryConfigRequest.verify|verify} messages. + * @param message UpdateDiscoveryConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IUpdateDiscoveryConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDiscoveryConfigRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.UpdateDiscoveryConfigRequest.verify|verify} messages. + * @param message UpdateDiscoveryConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IUpdateDiscoveryConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDiscoveryConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDiscoveryConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.UpdateDiscoveryConfigRequest; + + /** + * Decodes an UpdateDiscoveryConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDiscoveryConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.UpdateDiscoveryConfigRequest; + + /** + * Verifies an UpdateDiscoveryConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateDiscoveryConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDiscoveryConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.UpdateDiscoveryConfigRequest; + + /** + * Creates a plain object from an UpdateDiscoveryConfigRequest message. Also converts values to other types if specified. + * @param message UpdateDiscoveryConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.UpdateDiscoveryConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDiscoveryConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDiscoveryConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDiscoveryConfigRequest. */ + interface IGetDiscoveryConfigRequest { + + /** GetDiscoveryConfigRequest name */ + name?: (string|null); + } + + /** Represents a GetDiscoveryConfigRequest. */ + class GetDiscoveryConfigRequest implements IGetDiscoveryConfigRequest { + + /** + * Constructs a new GetDiscoveryConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IGetDiscoveryConfigRequest); + + /** GetDiscoveryConfigRequest name. */ + public name: string; + + /** + * Creates a new GetDiscoveryConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDiscoveryConfigRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IGetDiscoveryConfigRequest): google.privacy.dlp.v2.GetDiscoveryConfigRequest; + + /** + * Encodes the specified GetDiscoveryConfigRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetDiscoveryConfigRequest.verify|verify} messages. + * @param message GetDiscoveryConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IGetDiscoveryConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDiscoveryConfigRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetDiscoveryConfigRequest.verify|verify} messages. + * @param message GetDiscoveryConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IGetDiscoveryConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDiscoveryConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDiscoveryConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.GetDiscoveryConfigRequest; + + /** + * Decodes a GetDiscoveryConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDiscoveryConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.GetDiscoveryConfigRequest; + + /** + * Verifies a GetDiscoveryConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDiscoveryConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDiscoveryConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.GetDiscoveryConfigRequest; + + /** + * Creates a plain object from a GetDiscoveryConfigRequest message. Also converts values to other types if specified. + * @param message GetDiscoveryConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.GetDiscoveryConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDiscoveryConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDiscoveryConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDiscoveryConfigsRequest. */ + interface IListDiscoveryConfigsRequest { + + /** ListDiscoveryConfigsRequest parent */ + parent?: (string|null); + + /** ListDiscoveryConfigsRequest pageToken */ + pageToken?: (string|null); + + /** ListDiscoveryConfigsRequest pageSize */ + pageSize?: (number|null); + + /** ListDiscoveryConfigsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListDiscoveryConfigsRequest. */ + class ListDiscoveryConfigsRequest implements IListDiscoveryConfigsRequest { + + /** + * Constructs a new ListDiscoveryConfigsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListDiscoveryConfigsRequest); + + /** ListDiscoveryConfigsRequest parent. */ + public parent: string; + + /** ListDiscoveryConfigsRequest pageToken. */ + public pageToken: string; + + /** ListDiscoveryConfigsRequest pageSize. */ + public pageSize: number; + + /** ListDiscoveryConfigsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListDiscoveryConfigsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDiscoveryConfigsRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IListDiscoveryConfigsRequest): google.privacy.dlp.v2.ListDiscoveryConfigsRequest; + + /** + * Encodes the specified ListDiscoveryConfigsRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListDiscoveryConfigsRequest.verify|verify} messages. + * @param message ListDiscoveryConfigsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListDiscoveryConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDiscoveryConfigsRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListDiscoveryConfigsRequest.verify|verify} messages. + * @param message ListDiscoveryConfigsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListDiscoveryConfigsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDiscoveryConfigsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDiscoveryConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ListDiscoveryConfigsRequest; + + /** + * Decodes a ListDiscoveryConfigsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDiscoveryConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ListDiscoveryConfigsRequest; + + /** + * Verifies a ListDiscoveryConfigsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDiscoveryConfigsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDiscoveryConfigsRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListDiscoveryConfigsRequest; + + /** + * Creates a plain object from a ListDiscoveryConfigsRequest message. Also converts values to other types if specified. + * @param message ListDiscoveryConfigsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListDiscoveryConfigsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDiscoveryConfigsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDiscoveryConfigsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDiscoveryConfigsResponse. */ + interface IListDiscoveryConfigsResponse { + + /** ListDiscoveryConfigsResponse discoveryConfigs */ + discoveryConfigs?: (google.privacy.dlp.v2.IDiscoveryConfig[]|null); + + /** ListDiscoveryConfigsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListDiscoveryConfigsResponse. */ + class ListDiscoveryConfigsResponse implements IListDiscoveryConfigsResponse { + + /** + * Constructs a new ListDiscoveryConfigsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListDiscoveryConfigsResponse); + + /** ListDiscoveryConfigsResponse discoveryConfigs. */ + public discoveryConfigs: google.privacy.dlp.v2.IDiscoveryConfig[]; + + /** ListDiscoveryConfigsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListDiscoveryConfigsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDiscoveryConfigsResponse instance + */ + public static create(properties?: google.privacy.dlp.v2.IListDiscoveryConfigsResponse): google.privacy.dlp.v2.ListDiscoveryConfigsResponse; + + /** + * Encodes the specified ListDiscoveryConfigsResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListDiscoveryConfigsResponse.verify|verify} messages. + * @param message ListDiscoveryConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListDiscoveryConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDiscoveryConfigsResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListDiscoveryConfigsResponse.verify|verify} messages. + * @param message ListDiscoveryConfigsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListDiscoveryConfigsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDiscoveryConfigsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDiscoveryConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ListDiscoveryConfigsResponse; + + /** + * Decodes a ListDiscoveryConfigsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDiscoveryConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ListDiscoveryConfigsResponse; + + /** + * Verifies a ListDiscoveryConfigsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDiscoveryConfigsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDiscoveryConfigsResponse + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListDiscoveryConfigsResponse; + + /** + * Creates a plain object from a ListDiscoveryConfigsResponse message. Also converts values to other types if specified. + * @param message ListDiscoveryConfigsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListDiscoveryConfigsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDiscoveryConfigsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDiscoveryConfigsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteDiscoveryConfigRequest. */ + interface IDeleteDiscoveryConfigRequest { + + /** DeleteDiscoveryConfigRequest name */ + name?: (string|null); + } + + /** Represents a DeleteDiscoveryConfigRequest. */ + class DeleteDiscoveryConfigRequest implements IDeleteDiscoveryConfigRequest { + + /** + * Constructs a new DeleteDiscoveryConfigRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDeleteDiscoveryConfigRequest); + + /** DeleteDiscoveryConfigRequest name. */ + public name: string; + + /** + * Creates a new DeleteDiscoveryConfigRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteDiscoveryConfigRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IDeleteDiscoveryConfigRequest): google.privacy.dlp.v2.DeleteDiscoveryConfigRequest; + + /** + * Encodes the specified DeleteDiscoveryConfigRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteDiscoveryConfigRequest.verify|verify} messages. + * @param message DeleteDiscoveryConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDeleteDiscoveryConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteDiscoveryConfigRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteDiscoveryConfigRequest.verify|verify} messages. + * @param message DeleteDiscoveryConfigRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDeleteDiscoveryConfigRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteDiscoveryConfigRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteDiscoveryConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DeleteDiscoveryConfigRequest; + + /** + * Decodes a DeleteDiscoveryConfigRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteDiscoveryConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DeleteDiscoveryConfigRequest; + + /** + * Verifies a DeleteDiscoveryConfigRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteDiscoveryConfigRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteDiscoveryConfigRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DeleteDiscoveryConfigRequest; + + /** + * Creates a plain object from a DeleteDiscoveryConfigRequest message. Also converts values to other types if specified. + * @param message DeleteDiscoveryConfigRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DeleteDiscoveryConfigRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteDiscoveryConfigRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteDiscoveryConfigRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateDlpJobRequest. */ + interface ICreateDlpJobRequest { + + /** CreateDlpJobRequest parent */ + parent?: (string|null); + + /** CreateDlpJobRequest inspectJob */ + inspectJob?: (google.privacy.dlp.v2.IInspectJobConfig|null); + + /** CreateDlpJobRequest riskJob */ + riskJob?: (google.privacy.dlp.v2.IRiskAnalysisJobConfig|null); + + /** CreateDlpJobRequest jobId */ + jobId?: (string|null); + + /** CreateDlpJobRequest locationId */ + locationId?: (string|null); + } + + /** Represents a CreateDlpJobRequest. */ + class CreateDlpJobRequest implements ICreateDlpJobRequest { + + /** + * Constructs a new CreateDlpJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ICreateDlpJobRequest); + + /** CreateDlpJobRequest parent. */ + public parent: string; + + /** CreateDlpJobRequest inspectJob. */ + public inspectJob?: (google.privacy.dlp.v2.IInspectJobConfig|null); + + /** CreateDlpJobRequest riskJob. */ + public riskJob?: (google.privacy.dlp.v2.IRiskAnalysisJobConfig|null); + + /** CreateDlpJobRequest jobId. */ + public jobId: string; + + /** CreateDlpJobRequest locationId. */ + public locationId: string; + + /** CreateDlpJobRequest job. */ + public job?: ("inspectJob"|"riskJob"); + + /** + * Creates a new CreateDlpJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateDlpJobRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.ICreateDlpJobRequest): google.privacy.dlp.v2.CreateDlpJobRequest; + + /** + * Encodes the specified CreateDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.CreateDlpJobRequest.verify|verify} messages. + * @param message CreateDlpJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ICreateDlpJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CreateDlpJobRequest.verify|verify} messages. + * @param message CreateDlpJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ICreateDlpJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateDlpJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CreateDlpJobRequest; + + /** + * Decodes a CreateDlpJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CreateDlpJobRequest; + + /** + * Verifies a CreateDlpJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateDlpJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDlpJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CreateDlpJobRequest; + + /** + * Creates a plain object from a CreateDlpJobRequest message. Also converts values to other types if specified. + * @param message CreateDlpJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CreateDlpJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateDlpJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDlpJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListJobTriggersRequest. */ + interface IListJobTriggersRequest { + + /** ListJobTriggersRequest parent */ + parent?: (string|null); + + /** ListJobTriggersRequest pageToken */ + pageToken?: (string|null); + + /** ListJobTriggersRequest pageSize */ + pageSize?: (number|null); + + /** ListJobTriggersRequest orderBy */ + orderBy?: (string|null); + + /** ListJobTriggersRequest filter */ + filter?: (string|null); + + /** ListJobTriggersRequest type */ + type?: (google.privacy.dlp.v2.DlpJobType|keyof typeof google.privacy.dlp.v2.DlpJobType|null); + + /** ListJobTriggersRequest locationId */ + locationId?: (string|null); + } + + /** Represents a ListJobTriggersRequest. */ + class ListJobTriggersRequest implements IListJobTriggersRequest { + + /** + * Constructs a new ListJobTriggersRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListJobTriggersRequest); + + /** ListJobTriggersRequest parent. */ + public parent: string; + + /** ListJobTriggersRequest pageToken. */ + public pageToken: string; + + /** ListJobTriggersRequest pageSize. */ + public pageSize: number; + + /** ListJobTriggersRequest orderBy. */ + public orderBy: string; + + /** ListJobTriggersRequest filter. */ + public filter: string; + + /** ListJobTriggersRequest type. */ + public type: (google.privacy.dlp.v2.DlpJobType|keyof typeof google.privacy.dlp.v2.DlpJobType); + + /** ListJobTriggersRequest locationId. */ + public locationId: string; + + /** + * Creates a new ListJobTriggersRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListJobTriggersRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IListJobTriggersRequest): google.privacy.dlp.v2.ListJobTriggersRequest; + + /** + * Encodes the specified ListJobTriggersRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListJobTriggersRequest.verify|verify} messages. + * @param message ListJobTriggersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListJobTriggersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListJobTriggersRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListJobTriggersRequest.verify|verify} messages. + * @param message ListJobTriggersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListJobTriggersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListJobTriggersRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListJobTriggersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ListJobTriggersRequest; + + /** + * Decodes a ListJobTriggersRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListJobTriggersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ListJobTriggersRequest; + + /** + * Verifies a ListJobTriggersRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListJobTriggersRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListJobTriggersRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListJobTriggersRequest; + + /** + * Creates a plain object from a ListJobTriggersRequest message. Also converts values to other types if specified. + * @param message ListJobTriggersRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListJobTriggersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListJobTriggersRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListJobTriggersRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListJobTriggersResponse. */ + interface IListJobTriggersResponse { + + /** ListJobTriggersResponse jobTriggers */ + jobTriggers?: (google.privacy.dlp.v2.IJobTrigger[]|null); + + /** ListJobTriggersResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListJobTriggersResponse. */ + class ListJobTriggersResponse implements IListJobTriggersResponse { + + /** + * Constructs a new ListJobTriggersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListJobTriggersResponse); + + /** ListJobTriggersResponse jobTriggers. */ + public jobTriggers: google.privacy.dlp.v2.IJobTrigger[]; + + /** ListJobTriggersResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListJobTriggersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListJobTriggersResponse instance + */ + public static create(properties?: google.privacy.dlp.v2.IListJobTriggersResponse): google.privacy.dlp.v2.ListJobTriggersResponse; + + /** + * Encodes the specified ListJobTriggersResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListJobTriggersResponse.verify|verify} messages. + * @param message ListJobTriggersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListJobTriggersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListJobTriggersResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListJobTriggersResponse.verify|verify} messages. + * @param message ListJobTriggersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListJobTriggersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListJobTriggersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListJobTriggersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ListJobTriggersResponse; + + /** + * Decodes a ListJobTriggersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListJobTriggersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ListJobTriggersResponse; + + /** + * Verifies a ListJobTriggersResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListJobTriggersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListJobTriggersResponse + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListJobTriggersResponse; + + /** + * Creates a plain object from a ListJobTriggersResponse message. Also converts values to other types if specified. + * @param message ListJobTriggersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListJobTriggersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListJobTriggersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListJobTriggersResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteJobTriggerRequest. */ + interface IDeleteJobTriggerRequest { + + /** DeleteJobTriggerRequest name */ + name?: (string|null); + } + + /** Represents a DeleteJobTriggerRequest. */ + class DeleteJobTriggerRequest implements IDeleteJobTriggerRequest { + + /** + * Constructs a new DeleteJobTriggerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDeleteJobTriggerRequest); + + /** DeleteJobTriggerRequest name. */ + public name: string; + + /** + * Creates a new DeleteJobTriggerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteJobTriggerRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IDeleteJobTriggerRequest): google.privacy.dlp.v2.DeleteJobTriggerRequest; + + /** + * Encodes the specified DeleteJobTriggerRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteJobTriggerRequest.verify|verify} messages. + * @param message DeleteJobTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDeleteJobTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteJobTriggerRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteJobTriggerRequest.verify|verify} messages. + * @param message DeleteJobTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDeleteJobTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteJobTriggerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteJobTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DeleteJobTriggerRequest; + + /** + * Decodes a DeleteJobTriggerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteJobTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DeleteJobTriggerRequest; + + /** + * Verifies a DeleteJobTriggerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteJobTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteJobTriggerRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DeleteJobTriggerRequest; + + /** + * Creates a plain object from a DeleteJobTriggerRequest message. Also converts values to other types if specified. + * @param message DeleteJobTriggerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DeleteJobTriggerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteJobTriggerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteJobTriggerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an InspectJobConfig. */ + interface IInspectJobConfig { + + /** InspectJobConfig storageConfig */ + storageConfig?: (google.privacy.dlp.v2.IStorageConfig|null); + + /** InspectJobConfig inspectConfig */ + inspectConfig?: (google.privacy.dlp.v2.IInspectConfig|null); + + /** InspectJobConfig inspectTemplateName */ + inspectTemplateName?: (string|null); + + /** InspectJobConfig actions */ + actions?: (google.privacy.dlp.v2.IAction[]|null); + } + + /** Represents an InspectJobConfig. */ + class InspectJobConfig implements IInspectJobConfig { + + /** + * Constructs a new InspectJobConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IInspectJobConfig); + + /** InspectJobConfig storageConfig. */ + public storageConfig?: (google.privacy.dlp.v2.IStorageConfig|null); + + /** InspectJobConfig inspectConfig. */ + public inspectConfig?: (google.privacy.dlp.v2.IInspectConfig|null); + + /** InspectJobConfig inspectTemplateName. */ + public inspectTemplateName: string; + + /** InspectJobConfig actions. */ + public actions: google.privacy.dlp.v2.IAction[]; + + /** + * Creates a new InspectJobConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns InspectJobConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.IInspectJobConfig): google.privacy.dlp.v2.InspectJobConfig; + + /** + * Encodes the specified InspectJobConfig message. Does not implicitly {@link google.privacy.dlp.v2.InspectJobConfig.verify|verify} messages. + * @param message InspectJobConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IInspectJobConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InspectJobConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectJobConfig.verify|verify} messages. + * @param message InspectJobConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IInspectJobConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InspectJobConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InspectJobConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.InspectJobConfig; + + /** + * Decodes an InspectJobConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InspectJobConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.InspectJobConfig; + + /** + * Verifies an InspectJobConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InspectJobConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InspectJobConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.InspectJobConfig; + + /** + * Creates a plain object from an InspectJobConfig message. Also converts values to other types if specified. + * @param message InspectJobConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.InspectJobConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InspectJobConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InspectJobConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** ProfileGeneration enum. */ + enum ProfileGeneration { + PROFILE_GENERATION_UNSPECIFIED = 0, + PROFILE_GENERATION_NEW = 1, + PROFILE_GENERATION_UPDATE = 2 + } + + /** Properties of a DataProfileAction. */ + interface IDataProfileAction { + + /** DataProfileAction exportData */ + exportData?: (google.privacy.dlp.v2.DataProfileAction.IExport|null); + + /** DataProfileAction pubSubNotification */ + pubSubNotification?: (google.privacy.dlp.v2.DataProfileAction.IPubSubNotification|null); + + /** DataProfileAction publishToChronicle */ + publishToChronicle?: (google.privacy.dlp.v2.DataProfileAction.IPublishToChronicle|null); + + /** DataProfileAction publishToScc */ + publishToScc?: (google.privacy.dlp.v2.DataProfileAction.IPublishToSecurityCommandCenter|null); + + /** DataProfileAction tagResources */ + tagResources?: (google.privacy.dlp.v2.DataProfileAction.ITagResources|null); + + /** DataProfileAction publishToDataplexCatalog */ + publishToDataplexCatalog?: (google.privacy.dlp.v2.DataProfileAction.IPublishToDataplexCatalog|null); + } + + /** Represents a DataProfileAction. */ + class DataProfileAction implements IDataProfileAction { + + /** + * Constructs a new DataProfileAction. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDataProfileAction); + + /** DataProfileAction exportData. */ + public exportData?: (google.privacy.dlp.v2.DataProfileAction.IExport|null); + + /** DataProfileAction pubSubNotification. */ + public pubSubNotification?: (google.privacy.dlp.v2.DataProfileAction.IPubSubNotification|null); + + /** DataProfileAction publishToChronicle. */ + public publishToChronicle?: (google.privacy.dlp.v2.DataProfileAction.IPublishToChronicle|null); + + /** DataProfileAction publishToScc. */ + public publishToScc?: (google.privacy.dlp.v2.DataProfileAction.IPublishToSecurityCommandCenter|null); + + /** DataProfileAction tagResources. */ + public tagResources?: (google.privacy.dlp.v2.DataProfileAction.ITagResources|null); + + /** DataProfileAction publishToDataplexCatalog. */ + public publishToDataplexCatalog?: (google.privacy.dlp.v2.DataProfileAction.IPublishToDataplexCatalog|null); + + /** DataProfileAction action. */ + public action?: ("exportData"|"pubSubNotification"|"publishToChronicle"|"publishToScc"|"tagResources"|"publishToDataplexCatalog"); + + /** + * Creates a new DataProfileAction instance using the specified properties. + * @param [properties] Properties to set + * @returns DataProfileAction instance + */ + public static create(properties?: google.privacy.dlp.v2.IDataProfileAction): google.privacy.dlp.v2.DataProfileAction; + + /** + * Encodes the specified DataProfileAction message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.verify|verify} messages. + * @param message DataProfileAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDataProfileAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataProfileAction message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.verify|verify} messages. + * @param message DataProfileAction message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDataProfileAction, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataProfileAction message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataProfileAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DataProfileAction; + + /** + * Decodes a DataProfileAction message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataProfileAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DataProfileAction; + + /** + * Verifies a DataProfileAction message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataProfileAction message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataProfileAction + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DataProfileAction; + + /** + * Creates a plain object from a DataProfileAction message. Also converts values to other types if specified. + * @param message DataProfileAction + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DataProfileAction, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataProfileAction to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataProfileAction + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataProfileAction { + + /** Properties of an Export. */ + interface IExport { + + /** Export profileTable */ + profileTable?: (google.privacy.dlp.v2.IBigQueryTable|null); + + /** Export sampleFindingsTable */ + sampleFindingsTable?: (google.privacy.dlp.v2.IBigQueryTable|null); + } + + /** Represents an Export. */ + class Export implements IExport { + + /** + * Constructs a new Export. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.DataProfileAction.IExport); + + /** Export profileTable. */ + public profileTable?: (google.privacy.dlp.v2.IBigQueryTable|null); + + /** Export sampleFindingsTable. */ + public sampleFindingsTable?: (google.privacy.dlp.v2.IBigQueryTable|null); + + /** + * Creates a new Export instance using the specified properties. + * @param [properties] Properties to set + * @returns Export instance + */ + public static create(properties?: google.privacy.dlp.v2.DataProfileAction.IExport): google.privacy.dlp.v2.DataProfileAction.Export; + + /** + * Encodes the specified Export message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.Export.verify|verify} messages. + * @param message Export message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.DataProfileAction.IExport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Export message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.Export.verify|verify} messages. + * @param message Export message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.DataProfileAction.IExport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Export message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Export + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DataProfileAction.Export; + + /** + * Decodes an Export message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Export + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DataProfileAction.Export; + + /** + * Verifies an Export message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Export message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Export + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DataProfileAction.Export; + + /** + * Creates a plain object from an Export message. Also converts values to other types if specified. + * @param message Export + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DataProfileAction.Export, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Export to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Export + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PubSubNotification. */ + interface IPubSubNotification { + + /** PubSubNotification topic */ + topic?: (string|null); + + /** PubSubNotification event */ + event?: (google.privacy.dlp.v2.DataProfileAction.EventType|keyof typeof google.privacy.dlp.v2.DataProfileAction.EventType|null); + + /** PubSubNotification pubsubCondition */ + pubsubCondition?: (google.privacy.dlp.v2.IDataProfilePubSubCondition|null); + + /** PubSubNotification detailOfMessage */ + detailOfMessage?: (google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel|keyof typeof google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel|null); + } + + /** Represents a PubSubNotification. */ + class PubSubNotification implements IPubSubNotification { + + /** + * Constructs a new PubSubNotification. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.DataProfileAction.IPubSubNotification); + + /** PubSubNotification topic. */ + public topic: string; + + /** PubSubNotification event. */ + public event: (google.privacy.dlp.v2.DataProfileAction.EventType|keyof typeof google.privacy.dlp.v2.DataProfileAction.EventType); + + /** PubSubNotification pubsubCondition. */ + public pubsubCondition?: (google.privacy.dlp.v2.IDataProfilePubSubCondition|null); + + /** PubSubNotification detailOfMessage. */ + public detailOfMessage: (google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel|keyof typeof google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel); + + /** + * Creates a new PubSubNotification instance using the specified properties. + * @param [properties] Properties to set + * @returns PubSubNotification instance + */ + public static create(properties?: google.privacy.dlp.v2.DataProfileAction.IPubSubNotification): google.privacy.dlp.v2.DataProfileAction.PubSubNotification; + + /** + * Encodes the specified PubSubNotification message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PubSubNotification.verify|verify} messages. + * @param message PubSubNotification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.DataProfileAction.IPubSubNotification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PubSubNotification message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PubSubNotification.verify|verify} messages. + * @param message PubSubNotification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.DataProfileAction.IPubSubNotification, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PubSubNotification message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PubSubNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DataProfileAction.PubSubNotification; + + /** + * Decodes a PubSubNotification message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PubSubNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DataProfileAction.PubSubNotification; + + /** + * Verifies a PubSubNotification message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PubSubNotification message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PubSubNotification + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DataProfileAction.PubSubNotification; + + /** + * Creates a plain object from a PubSubNotification message. Also converts values to other types if specified. + * @param message PubSubNotification + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DataProfileAction.PubSubNotification, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PubSubNotification to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PubSubNotification + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PubSubNotification { + + /** DetailLevel enum. */ + enum DetailLevel { + DETAIL_LEVEL_UNSPECIFIED = 0, + TABLE_PROFILE = 1, + RESOURCE_NAME = 2, + FILE_STORE_PROFILE = 3 + } + } + + /** EventType enum. */ + enum EventType { + EVENT_TYPE_UNSPECIFIED = 0, + NEW_PROFILE = 1, + CHANGED_PROFILE = 2, + SCORE_INCREASED = 3, + ERROR_CHANGED = 4 + } + + /** Properties of a PublishToChronicle. */ + interface IPublishToChronicle { + } + + /** Represents a PublishToChronicle. */ + class PublishToChronicle implements IPublishToChronicle { + + /** + * Constructs a new PublishToChronicle. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.DataProfileAction.IPublishToChronicle); + + /** + * Creates a new PublishToChronicle instance using the specified properties. + * @param [properties] Properties to set + * @returns PublishToChronicle instance + */ + public static create(properties?: google.privacy.dlp.v2.DataProfileAction.IPublishToChronicle): google.privacy.dlp.v2.DataProfileAction.PublishToChronicle; + + /** + * Encodes the specified PublishToChronicle message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PublishToChronicle.verify|verify} messages. + * @param message PublishToChronicle message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.DataProfileAction.IPublishToChronicle, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublishToChronicle message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PublishToChronicle.verify|verify} messages. + * @param message PublishToChronicle message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.DataProfileAction.IPublishToChronicle, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublishToChronicle message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublishToChronicle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DataProfileAction.PublishToChronicle; + + /** + * Decodes a PublishToChronicle message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublishToChronicle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DataProfileAction.PublishToChronicle; + + /** + * Verifies a PublishToChronicle message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PublishToChronicle message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublishToChronicle + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DataProfileAction.PublishToChronicle; + + /** + * Creates a plain object from a PublishToChronicle message. Also converts values to other types if specified. + * @param message PublishToChronicle + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DataProfileAction.PublishToChronicle, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublishToChronicle to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublishToChronicle + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PublishToSecurityCommandCenter. */ + interface IPublishToSecurityCommandCenter { + } + + /** Represents a PublishToSecurityCommandCenter. */ + class PublishToSecurityCommandCenter implements IPublishToSecurityCommandCenter { + + /** + * Constructs a new PublishToSecurityCommandCenter. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.DataProfileAction.IPublishToSecurityCommandCenter); + + /** + * Creates a new PublishToSecurityCommandCenter instance using the specified properties. + * @param [properties] Properties to set + * @returns PublishToSecurityCommandCenter instance + */ + public static create(properties?: google.privacy.dlp.v2.DataProfileAction.IPublishToSecurityCommandCenter): google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter; + + /** + * Encodes the specified PublishToSecurityCommandCenter message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter.verify|verify} messages. + * @param message PublishToSecurityCommandCenter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.DataProfileAction.IPublishToSecurityCommandCenter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublishToSecurityCommandCenter message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter.verify|verify} messages. + * @param message PublishToSecurityCommandCenter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.DataProfileAction.IPublishToSecurityCommandCenter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublishToSecurityCommandCenter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublishToSecurityCommandCenter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter; + + /** + * Decodes a PublishToSecurityCommandCenter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublishToSecurityCommandCenter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter; + + /** + * Verifies a PublishToSecurityCommandCenter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PublishToSecurityCommandCenter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublishToSecurityCommandCenter + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter; + + /** + * Creates a plain object from a PublishToSecurityCommandCenter message. Also converts values to other types if specified. + * @param message PublishToSecurityCommandCenter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublishToSecurityCommandCenter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublishToSecurityCommandCenter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PublishToDataplexCatalog. */ + interface IPublishToDataplexCatalog { + + /** PublishToDataplexCatalog lowerDataRiskToLow */ + lowerDataRiskToLow?: (boolean|null); + } + + /** Represents a PublishToDataplexCatalog. */ + class PublishToDataplexCatalog implements IPublishToDataplexCatalog { + + /** + * Constructs a new PublishToDataplexCatalog. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.DataProfileAction.IPublishToDataplexCatalog); + + /** PublishToDataplexCatalog lowerDataRiskToLow. */ + public lowerDataRiskToLow: boolean; + + /** + * Creates a new PublishToDataplexCatalog instance using the specified properties. + * @param [properties] Properties to set + * @returns PublishToDataplexCatalog instance + */ + public static create(properties?: google.privacy.dlp.v2.DataProfileAction.IPublishToDataplexCatalog): google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog; + + /** + * Encodes the specified PublishToDataplexCatalog message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog.verify|verify} messages. + * @param message PublishToDataplexCatalog message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.DataProfileAction.IPublishToDataplexCatalog, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PublishToDataplexCatalog message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog.verify|verify} messages. + * @param message PublishToDataplexCatalog message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.DataProfileAction.IPublishToDataplexCatalog, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PublishToDataplexCatalog message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PublishToDataplexCatalog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog; + + /** + * Decodes a PublishToDataplexCatalog message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PublishToDataplexCatalog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog; + + /** + * Verifies a PublishToDataplexCatalog message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PublishToDataplexCatalog message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PublishToDataplexCatalog + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog; + + /** + * Creates a plain object from a PublishToDataplexCatalog message. Also converts values to other types if specified. + * @param message PublishToDataplexCatalog + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PublishToDataplexCatalog to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PublishToDataplexCatalog + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TagResources. */ + interface ITagResources { + + /** TagResources tagConditions */ + tagConditions?: (google.privacy.dlp.v2.DataProfileAction.TagResources.ITagCondition[]|null); + + /** TagResources profileGenerationsToTag */ + profileGenerationsToTag?: (google.privacy.dlp.v2.ProfileGeneration[]|null); + + /** TagResources lowerDataRiskToLow */ + lowerDataRiskToLow?: (boolean|null); + } + + /** Represents a TagResources. */ + class TagResources implements ITagResources { + + /** + * Constructs a new TagResources. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.DataProfileAction.ITagResources); + + /** TagResources tagConditions. */ + public tagConditions: google.privacy.dlp.v2.DataProfileAction.TagResources.ITagCondition[]; + + /** TagResources profileGenerationsToTag. */ + public profileGenerationsToTag: google.privacy.dlp.v2.ProfileGeneration[]; + + /** TagResources lowerDataRiskToLow. */ + public lowerDataRiskToLow: boolean; + + /** + * Creates a new TagResources instance using the specified properties. + * @param [properties] Properties to set + * @returns TagResources instance + */ + public static create(properties?: google.privacy.dlp.v2.DataProfileAction.ITagResources): google.privacy.dlp.v2.DataProfileAction.TagResources; + + /** + * Encodes the specified TagResources message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.verify|verify} messages. + * @param message TagResources message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.DataProfileAction.ITagResources, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TagResources message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.verify|verify} messages. + * @param message TagResources message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.DataProfileAction.ITagResources, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TagResources message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TagResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DataProfileAction.TagResources; + + /** + * Decodes a TagResources message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TagResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DataProfileAction.TagResources; + + /** + * Verifies a TagResources message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TagResources message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TagResources + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DataProfileAction.TagResources; + + /** + * Creates a plain object from a TagResources message. Also converts values to other types if specified. + * @param message TagResources + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DataProfileAction.TagResources, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TagResources to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TagResources + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TagResources { + + /** Properties of a TagCondition. */ + interface ITagCondition { + + /** TagCondition tag */ + tag?: (google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue|null); + + /** TagCondition sensitivityScore */ + sensitivityScore?: (google.privacy.dlp.v2.ISensitivityScore|null); + } + + /** Represents a TagCondition. */ + class TagCondition implements ITagCondition { + + /** + * Constructs a new TagCondition. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.DataProfileAction.TagResources.ITagCondition); + + /** TagCondition tag. */ + public tag?: (google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue|null); + + /** TagCondition sensitivityScore. */ + public sensitivityScore?: (google.privacy.dlp.v2.ISensitivityScore|null); + + /** TagCondition type. */ + public type?: "sensitivityScore"; + + /** + * Creates a new TagCondition instance using the specified properties. + * @param [properties] Properties to set + * @returns TagCondition instance + */ + public static create(properties?: google.privacy.dlp.v2.DataProfileAction.TagResources.ITagCondition): google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition; + + /** + * Encodes the specified TagCondition message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.verify|verify} messages. + * @param message TagCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.DataProfileAction.TagResources.ITagCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TagCondition message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.verify|verify} messages. + * @param message TagCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.DataProfileAction.TagResources.ITagCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TagCondition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TagCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition; + + /** + * Decodes a TagCondition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TagCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition; + + /** + * Verifies a TagCondition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TagCondition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TagCondition + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition; + + /** + * Creates a plain object from a TagCondition message. Also converts values to other types if specified. + * @param message TagCondition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TagCondition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TagCondition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TagValue. */ + interface ITagValue { + + /** TagValue namespacedValue */ + namespacedValue?: (string|null); + } + + /** Represents a TagValue. */ + class TagValue implements ITagValue { + + /** + * Constructs a new TagValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue); + + /** TagValue namespacedValue. */ + public namespacedValue?: (string|null); + + /** TagValue format. */ + public format?: "namespacedValue"; + + /** + * Creates a new TagValue instance using the specified properties. + * @param [properties] Properties to set + * @returns TagValue instance + */ + public static create(properties?: google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue): google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue; + + /** + * Encodes the specified TagValue message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.verify|verify} messages. + * @param message TagValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TagValue message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.verify|verify} messages. + * @param message TagValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TagValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TagValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue; + + /** + * Decodes a TagValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TagValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue; + + /** + * Verifies a TagValue message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TagValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TagValue + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue; + + /** + * Creates a plain object from a TagValue message. Also converts values to other types if specified. + * @param message TagValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TagValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TagValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + + /** Properties of a DataProfileFinding. */ + interface IDataProfileFinding { + + /** DataProfileFinding quote */ + quote?: (string|null); + + /** DataProfileFinding infotype */ + infotype?: (google.privacy.dlp.v2.IInfoType|null); + + /** DataProfileFinding quoteInfo */ + quoteInfo?: (google.privacy.dlp.v2.IQuoteInfo|null); + + /** DataProfileFinding dataProfileResourceName */ + dataProfileResourceName?: (string|null); + + /** DataProfileFinding findingId */ + findingId?: (string|null); + + /** DataProfileFinding timestamp */ + timestamp?: (google.protobuf.ITimestamp|null); + + /** DataProfileFinding location */ + location?: (google.privacy.dlp.v2.IDataProfileFindingLocation|null); + + /** DataProfileFinding resourceVisibility */ + resourceVisibility?: (google.privacy.dlp.v2.ResourceVisibility|keyof typeof google.privacy.dlp.v2.ResourceVisibility|null); + + /** DataProfileFinding fullResourceName */ + fullResourceName?: (string|null); + + /** DataProfileFinding dataSourceType */ + dataSourceType?: (google.privacy.dlp.v2.IDataSourceType|null); + } + + /** Represents a DataProfileFinding. */ + class DataProfileFinding implements IDataProfileFinding { + + /** + * Constructs a new DataProfileFinding. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDataProfileFinding); + + /** DataProfileFinding quote. */ + public quote: string; + + /** DataProfileFinding infotype. */ + public infotype?: (google.privacy.dlp.v2.IInfoType|null); + + /** DataProfileFinding quoteInfo. */ + public quoteInfo?: (google.privacy.dlp.v2.IQuoteInfo|null); + + /** DataProfileFinding dataProfileResourceName. */ + public dataProfileResourceName: string; + + /** DataProfileFinding findingId. */ + public findingId: string; + + /** DataProfileFinding timestamp. */ + public timestamp?: (google.protobuf.ITimestamp|null); + + /** DataProfileFinding location. */ + public location?: (google.privacy.dlp.v2.IDataProfileFindingLocation|null); + + /** DataProfileFinding resourceVisibility. */ + public resourceVisibility: (google.privacy.dlp.v2.ResourceVisibility|keyof typeof google.privacy.dlp.v2.ResourceVisibility); + + /** DataProfileFinding fullResourceName. */ + public fullResourceName: string; + + /** DataProfileFinding dataSourceType. */ + public dataSourceType?: (google.privacy.dlp.v2.IDataSourceType|null); + + /** + * Creates a new DataProfileFinding instance using the specified properties. + * @param [properties] Properties to set + * @returns DataProfileFinding instance + */ + public static create(properties?: google.privacy.dlp.v2.IDataProfileFinding): google.privacy.dlp.v2.DataProfileFinding; + + /** + * Encodes the specified DataProfileFinding message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileFinding.verify|verify} messages. + * @param message DataProfileFinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDataProfileFinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataProfileFinding message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileFinding.verify|verify} messages. + * @param message DataProfileFinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDataProfileFinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataProfileFinding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataProfileFinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DataProfileFinding; + + /** + * Decodes a DataProfileFinding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataProfileFinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DataProfileFinding; + + /** + * Verifies a DataProfileFinding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataProfileFinding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataProfileFinding + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DataProfileFinding; + + /** + * Creates a plain object from a DataProfileFinding message. Also converts values to other types if specified. + * @param message DataProfileFinding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DataProfileFinding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataProfileFinding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataProfileFinding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataProfileFindingLocation. */ + interface IDataProfileFindingLocation { + + /** DataProfileFindingLocation containerName */ + containerName?: (string|null); + + /** DataProfileFindingLocation dataProfileFindingRecordLocation */ + dataProfileFindingRecordLocation?: (google.privacy.dlp.v2.IDataProfileFindingRecordLocation|null); + } + + /** Represents a DataProfileFindingLocation. */ + class DataProfileFindingLocation implements IDataProfileFindingLocation { + + /** + * Constructs a new DataProfileFindingLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDataProfileFindingLocation); + + /** DataProfileFindingLocation containerName. */ + public containerName: string; + + /** DataProfileFindingLocation dataProfileFindingRecordLocation. */ + public dataProfileFindingRecordLocation?: (google.privacy.dlp.v2.IDataProfileFindingRecordLocation|null); + + /** DataProfileFindingLocation locationExtraDetails. */ + public locationExtraDetails?: "dataProfileFindingRecordLocation"; + + /** + * Creates a new DataProfileFindingLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns DataProfileFindingLocation instance + */ + public static create(properties?: google.privacy.dlp.v2.IDataProfileFindingLocation): google.privacy.dlp.v2.DataProfileFindingLocation; + + /** + * Encodes the specified DataProfileFindingLocation message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileFindingLocation.verify|verify} messages. + * @param message DataProfileFindingLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDataProfileFindingLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataProfileFindingLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileFindingLocation.verify|verify} messages. + * @param message DataProfileFindingLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDataProfileFindingLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataProfileFindingLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataProfileFindingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DataProfileFindingLocation; + + /** + * Decodes a DataProfileFindingLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataProfileFindingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DataProfileFindingLocation; + + /** + * Verifies a DataProfileFindingLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataProfileFindingLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataProfileFindingLocation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DataProfileFindingLocation; + + /** + * Creates a plain object from a DataProfileFindingLocation message. Also converts values to other types if specified. + * @param message DataProfileFindingLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DataProfileFindingLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataProfileFindingLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataProfileFindingLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataProfileFindingRecordLocation. */ + interface IDataProfileFindingRecordLocation { + + /** DataProfileFindingRecordLocation field */ + field?: (google.privacy.dlp.v2.IFieldId|null); + } + + /** Represents a DataProfileFindingRecordLocation. */ + class DataProfileFindingRecordLocation implements IDataProfileFindingRecordLocation { + + /** + * Constructs a new DataProfileFindingRecordLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDataProfileFindingRecordLocation); + + /** DataProfileFindingRecordLocation field. */ + public field?: (google.privacy.dlp.v2.IFieldId|null); + + /** + * Creates a new DataProfileFindingRecordLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns DataProfileFindingRecordLocation instance + */ + public static create(properties?: google.privacy.dlp.v2.IDataProfileFindingRecordLocation): google.privacy.dlp.v2.DataProfileFindingRecordLocation; + + /** + * Encodes the specified DataProfileFindingRecordLocation message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileFindingRecordLocation.verify|verify} messages. + * @param message DataProfileFindingRecordLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDataProfileFindingRecordLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataProfileFindingRecordLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileFindingRecordLocation.verify|verify} messages. + * @param message DataProfileFindingRecordLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDataProfileFindingRecordLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataProfileFindingRecordLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataProfileFindingRecordLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DataProfileFindingRecordLocation; + + /** + * Decodes a DataProfileFindingRecordLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataProfileFindingRecordLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DataProfileFindingRecordLocation; + + /** + * Verifies a DataProfileFindingRecordLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataProfileFindingRecordLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataProfileFindingRecordLocation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DataProfileFindingRecordLocation; + + /** + * Creates a plain object from a DataProfileFindingRecordLocation message. Also converts values to other types if specified. + * @param message DataProfileFindingRecordLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DataProfileFindingRecordLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataProfileFindingRecordLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataProfileFindingRecordLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataProfileJobConfig. */ + interface IDataProfileJobConfig { + + /** DataProfileJobConfig location */ + location?: (google.privacy.dlp.v2.IDataProfileLocation|null); + + /** DataProfileJobConfig projectId */ + projectId?: (string|null); + + /** DataProfileJobConfig otherCloudStartingLocation */ + otherCloudStartingLocation?: (google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation|null); + + /** DataProfileJobConfig inspectTemplates */ + inspectTemplates?: (string[]|null); + + /** DataProfileJobConfig dataProfileActions */ + dataProfileActions?: (google.privacy.dlp.v2.IDataProfileAction[]|null); + } + + /** Represents a DataProfileJobConfig. */ + class DataProfileJobConfig implements IDataProfileJobConfig { + + /** + * Constructs a new DataProfileJobConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDataProfileJobConfig); + + /** DataProfileJobConfig location. */ + public location?: (google.privacy.dlp.v2.IDataProfileLocation|null); + + /** DataProfileJobConfig projectId. */ + public projectId: string; + + /** DataProfileJobConfig otherCloudStartingLocation. */ + public otherCloudStartingLocation?: (google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation|null); + + /** DataProfileJobConfig inspectTemplates. */ + public inspectTemplates: string[]; + + /** DataProfileJobConfig dataProfileActions. */ + public dataProfileActions: google.privacy.dlp.v2.IDataProfileAction[]; + + /** + * Creates a new DataProfileJobConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DataProfileJobConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.IDataProfileJobConfig): google.privacy.dlp.v2.DataProfileJobConfig; + + /** + * Encodes the specified DataProfileJobConfig message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileJobConfig.verify|verify} messages. + * @param message DataProfileJobConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDataProfileJobConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataProfileJobConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileJobConfig.verify|verify} messages. + * @param message DataProfileJobConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDataProfileJobConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataProfileJobConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataProfileJobConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DataProfileJobConfig; + + /** + * Decodes a DataProfileJobConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataProfileJobConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DataProfileJobConfig; + + /** + * Verifies a DataProfileJobConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataProfileJobConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataProfileJobConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DataProfileJobConfig; + + /** + * Creates a plain object from a DataProfileJobConfig message. Also converts values to other types if specified. + * @param message DataProfileJobConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DataProfileJobConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataProfileJobConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataProfileJobConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BigQueryRegex. */ + interface IBigQueryRegex { + + /** BigQueryRegex projectIdRegex */ + projectIdRegex?: (string|null); + + /** BigQueryRegex datasetIdRegex */ + datasetIdRegex?: (string|null); + + /** BigQueryRegex tableIdRegex */ + tableIdRegex?: (string|null); + } + + /** Represents a BigQueryRegex. */ + class BigQueryRegex implements IBigQueryRegex { + + /** + * Constructs a new BigQueryRegex. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IBigQueryRegex); + + /** BigQueryRegex projectIdRegex. */ + public projectIdRegex: string; + + /** BigQueryRegex datasetIdRegex. */ + public datasetIdRegex: string; + + /** BigQueryRegex tableIdRegex. */ + public tableIdRegex: string; + + /** + * Creates a new BigQueryRegex instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryRegex instance + */ + public static create(properties?: google.privacy.dlp.v2.IBigQueryRegex): google.privacy.dlp.v2.BigQueryRegex; + + /** + * Encodes the specified BigQueryRegex message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryRegex.verify|verify} messages. + * @param message BigQueryRegex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IBigQueryRegex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryRegex.verify|verify} messages. + * @param message BigQueryRegex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IBigQueryRegex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryRegex message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.BigQueryRegex; + + /** + * Decodes a BigQueryRegex message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.BigQueryRegex; + + /** + * Verifies a BigQueryRegex message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryRegex message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryRegex + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.BigQueryRegex; + + /** + * Creates a plain object from a BigQueryRegex message. Also converts values to other types if specified. + * @param message BigQueryRegex + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.BigQueryRegex, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryRegex to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryRegex + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BigQueryRegexes. */ + interface IBigQueryRegexes { + + /** BigQueryRegexes patterns */ + patterns?: (google.privacy.dlp.v2.IBigQueryRegex[]|null); + } + + /** Represents a BigQueryRegexes. */ + class BigQueryRegexes implements IBigQueryRegexes { + + /** + * Constructs a new BigQueryRegexes. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IBigQueryRegexes); + + /** BigQueryRegexes patterns. */ + public patterns: google.privacy.dlp.v2.IBigQueryRegex[]; + + /** + * Creates a new BigQueryRegexes instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryRegexes instance + */ + public static create(properties?: google.privacy.dlp.v2.IBigQueryRegexes): google.privacy.dlp.v2.BigQueryRegexes; + + /** + * Encodes the specified BigQueryRegexes message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryRegexes.verify|verify} messages. + * @param message BigQueryRegexes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IBigQueryRegexes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryRegexes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryRegexes.verify|verify} messages. + * @param message BigQueryRegexes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IBigQueryRegexes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryRegexes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.BigQueryRegexes; + + /** + * Decodes a BigQueryRegexes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.BigQueryRegexes; + + /** + * Verifies a BigQueryRegexes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryRegexes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryRegexes + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.BigQueryRegexes; + + /** + * Creates a plain object from a BigQueryRegexes message. Also converts values to other types if specified. + * @param message BigQueryRegexes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.BigQueryRegexes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryRegexes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryRegexes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BigQueryTableTypes. */ + interface IBigQueryTableTypes { + + /** BigQueryTableTypes types */ + types?: (google.privacy.dlp.v2.BigQueryTableType[]|null); + } + + /** Represents a BigQueryTableTypes. */ + class BigQueryTableTypes implements IBigQueryTableTypes { + + /** + * Constructs a new BigQueryTableTypes. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IBigQueryTableTypes); + + /** BigQueryTableTypes types. */ + public types: google.privacy.dlp.v2.BigQueryTableType[]; + + /** + * Creates a new BigQueryTableTypes instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryTableTypes instance + */ + public static create(properties?: google.privacy.dlp.v2.IBigQueryTableTypes): google.privacy.dlp.v2.BigQueryTableTypes; + + /** + * Encodes the specified BigQueryTableTypes message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryTableTypes.verify|verify} messages. + * @param message BigQueryTableTypes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IBigQueryTableTypes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryTableTypes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryTableTypes.verify|verify} messages. + * @param message BigQueryTableTypes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IBigQueryTableTypes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryTableTypes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryTableTypes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.BigQueryTableTypes; + + /** + * Decodes a BigQueryTableTypes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryTableTypes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.BigQueryTableTypes; + + /** + * Verifies a BigQueryTableTypes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryTableTypes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryTableTypes + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.BigQueryTableTypes; + + /** + * Creates a plain object from a BigQueryTableTypes message. Also converts values to other types if specified. + * @param message BigQueryTableTypes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.BigQueryTableTypes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryTableTypes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryTableTypes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** BigQueryTableTypeCollection enum. */ + enum BigQueryTableTypeCollection { + BIG_QUERY_COLLECTION_UNSPECIFIED = 0, + BIG_QUERY_COLLECTION_ALL_TYPES = 1, + BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES = 2 + } + + /** BigQueryTableType enum. */ + enum BigQueryTableType { + BIG_QUERY_TABLE_TYPE_UNSPECIFIED = 0, + BIG_QUERY_TABLE_TYPE_TABLE = 1, + BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE = 2, + BIG_QUERY_TABLE_TYPE_SNAPSHOT = 3 + } + + /** DataProfileUpdateFrequency enum. */ + enum DataProfileUpdateFrequency { + UPDATE_FREQUENCY_UNSPECIFIED = 0, + UPDATE_FREQUENCY_NEVER = 1, + UPDATE_FREQUENCY_DAILY = 2, + UPDATE_FREQUENCY_MONTHLY = 4 + } + + /** Properties of a Disabled. */ + interface IDisabled { + } + + /** Represents a Disabled. */ + class Disabled implements IDisabled { + + /** + * Constructs a new Disabled. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDisabled); + + /** + * Creates a new Disabled instance using the specified properties. + * @param [properties] Properties to set + * @returns Disabled instance + */ + public static create(properties?: google.privacy.dlp.v2.IDisabled): google.privacy.dlp.v2.Disabled; + + /** + * Encodes the specified Disabled message. Does not implicitly {@link google.privacy.dlp.v2.Disabled.verify|verify} messages. + * @param message Disabled message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDisabled, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Disabled message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Disabled.verify|verify} messages. + * @param message Disabled message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDisabled, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Disabled message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Disabled + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Disabled; + + /** + * Decodes a Disabled message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Disabled + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Disabled; + + /** + * Verifies a Disabled message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Disabled message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Disabled + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Disabled; + + /** + * Creates a plain object from a Disabled message. Also converts values to other types if specified. + * @param message Disabled + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Disabled, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Disabled to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Disabled + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataProfileLocation. */ + interface IDataProfileLocation { + + /** DataProfileLocation organizationId */ + organizationId?: (number|Long|string|null); + + /** DataProfileLocation folderId */ + folderId?: (number|Long|string|null); + } + + /** Represents a DataProfileLocation. */ + class DataProfileLocation implements IDataProfileLocation { + + /** + * Constructs a new DataProfileLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDataProfileLocation); + + /** DataProfileLocation organizationId. */ + public organizationId?: (number|Long|string|null); + + /** DataProfileLocation folderId. */ + public folderId?: (number|Long|string|null); + + /** DataProfileLocation location. */ + public location?: ("organizationId"|"folderId"); + + /** + * Creates a new DataProfileLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns DataProfileLocation instance + */ + public static create(properties?: google.privacy.dlp.v2.IDataProfileLocation): google.privacy.dlp.v2.DataProfileLocation; + + /** + * Encodes the specified DataProfileLocation message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileLocation.verify|verify} messages. + * @param message DataProfileLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDataProfileLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataProfileLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileLocation.verify|verify} messages. + * @param message DataProfileLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDataProfileLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataProfileLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataProfileLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DataProfileLocation; + + /** + * Decodes a DataProfileLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataProfileLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DataProfileLocation; + + /** + * Verifies a DataProfileLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataProfileLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataProfileLocation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DataProfileLocation; + + /** + * Creates a plain object from a DataProfileLocation message. Also converts values to other types if specified. + * @param message DataProfileLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DataProfileLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataProfileLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataProfileLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DiscoveryConfig. */ + interface IDiscoveryConfig { + + /** DiscoveryConfig name */ + name?: (string|null); + + /** DiscoveryConfig displayName */ + displayName?: (string|null); + + /** DiscoveryConfig orgConfig */ + orgConfig?: (google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig|null); + + /** DiscoveryConfig otherCloudStartingLocation */ + otherCloudStartingLocation?: (google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation|null); + + /** DiscoveryConfig inspectTemplates */ + inspectTemplates?: (string[]|null); + + /** DiscoveryConfig actions */ + actions?: (google.privacy.dlp.v2.IDataProfileAction[]|null); + + /** DiscoveryConfig targets */ + targets?: (google.privacy.dlp.v2.IDiscoveryTarget[]|null); + + /** DiscoveryConfig errors */ + errors?: (google.privacy.dlp.v2.IError[]|null); + + /** DiscoveryConfig createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DiscoveryConfig updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** DiscoveryConfig lastRunTime */ + lastRunTime?: (google.protobuf.ITimestamp|null); + + /** DiscoveryConfig status */ + status?: (google.privacy.dlp.v2.DiscoveryConfig.Status|keyof typeof google.privacy.dlp.v2.DiscoveryConfig.Status|null); + + /** DiscoveryConfig processingLocation */ + processingLocation?: (google.privacy.dlp.v2.IProcessingLocation|null); + } + + /** Represents a DiscoveryConfig. */ + class DiscoveryConfig implements IDiscoveryConfig { + + /** + * Constructs a new DiscoveryConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoveryConfig); + + /** DiscoveryConfig name. */ + public name: string; + + /** DiscoveryConfig displayName. */ + public displayName: string; + + /** DiscoveryConfig orgConfig. */ + public orgConfig?: (google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig|null); + + /** DiscoveryConfig otherCloudStartingLocation. */ + public otherCloudStartingLocation?: (google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation|null); + + /** DiscoveryConfig inspectTemplates. */ + public inspectTemplates: string[]; + + /** DiscoveryConfig actions. */ + public actions: google.privacy.dlp.v2.IDataProfileAction[]; + + /** DiscoveryConfig targets. */ + public targets: google.privacy.dlp.v2.IDiscoveryTarget[]; + + /** DiscoveryConfig errors. */ + public errors: google.privacy.dlp.v2.IError[]; + + /** DiscoveryConfig createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DiscoveryConfig updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** DiscoveryConfig lastRunTime. */ + public lastRunTime?: (google.protobuf.ITimestamp|null); + + /** DiscoveryConfig status. */ + public status: (google.privacy.dlp.v2.DiscoveryConfig.Status|keyof typeof google.privacy.dlp.v2.DiscoveryConfig.Status); + + /** DiscoveryConfig processingLocation. */ + public processingLocation?: (google.privacy.dlp.v2.IProcessingLocation|null); + + /** + * Creates a new DiscoveryConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoveryConfig): google.privacy.dlp.v2.DiscoveryConfig; + + /** + * Encodes the specified DiscoveryConfig message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryConfig.verify|verify} messages. + * @param message DiscoveryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoveryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryConfig.verify|verify} messages. + * @param message DiscoveryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryConfig; + + /** + * Decodes a DiscoveryConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryConfig; + + /** + * Verifies a DiscoveryConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryConfig; + + /** + * Creates a plain object from a DiscoveryConfig message. Also converts values to other types if specified. + * @param message DiscoveryConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DiscoveryConfig { + + /** Properties of an OrgConfig. */ + interface IOrgConfig { + + /** OrgConfig location */ + location?: (google.privacy.dlp.v2.IDiscoveryStartingLocation|null); + + /** OrgConfig projectId */ + projectId?: (string|null); + } + + /** Represents an OrgConfig. */ + class OrgConfig implements IOrgConfig { + + /** + * Constructs a new OrgConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig); + + /** OrgConfig location. */ + public location?: (google.privacy.dlp.v2.IDiscoveryStartingLocation|null); + + /** OrgConfig projectId. */ + public projectId: string; + + /** + * Creates a new OrgConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns OrgConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig): google.privacy.dlp.v2.DiscoveryConfig.OrgConfig; + + /** + * Encodes the specified OrgConfig message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.verify|verify} messages. + * @param message OrgConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OrgConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.verify|verify} messages. + * @param message OrgConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OrgConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OrgConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryConfig.OrgConfig; + + /** + * Decodes an OrgConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OrgConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryConfig.OrgConfig; + + /** + * Verifies an OrgConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OrgConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OrgConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryConfig.OrgConfig; + + /** + * Creates a plain object from an OrgConfig message. Also converts values to other types if specified. + * @param message OrgConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryConfig.OrgConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OrgConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OrgConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Status enum. */ + enum Status { + STATUS_UNSPECIFIED = 0, + RUNNING = 1, + PAUSED = 2 + } + } + + /** Properties of a DiscoveryTarget. */ + interface IDiscoveryTarget { + + /** DiscoveryTarget bigQueryTarget */ + bigQueryTarget?: (google.privacy.dlp.v2.IBigQueryDiscoveryTarget|null); + + /** DiscoveryTarget cloudSqlTarget */ + cloudSqlTarget?: (google.privacy.dlp.v2.ICloudSqlDiscoveryTarget|null); + + /** DiscoveryTarget secretsTarget */ + secretsTarget?: (google.privacy.dlp.v2.ISecretsDiscoveryTarget|null); + + /** DiscoveryTarget cloudStorageTarget */ + cloudStorageTarget?: (google.privacy.dlp.v2.ICloudStorageDiscoveryTarget|null); + + /** DiscoveryTarget otherCloudTarget */ + otherCloudTarget?: (google.privacy.dlp.v2.IOtherCloudDiscoveryTarget|null); + + /** DiscoveryTarget vertexDatasetTarget */ + vertexDatasetTarget?: (google.privacy.dlp.v2.IVertexDatasetDiscoveryTarget|null); + } + + /** Represents a DiscoveryTarget. */ + class DiscoveryTarget implements IDiscoveryTarget { + + /** + * Constructs a new DiscoveryTarget. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoveryTarget); + + /** DiscoveryTarget bigQueryTarget. */ + public bigQueryTarget?: (google.privacy.dlp.v2.IBigQueryDiscoveryTarget|null); + + /** DiscoveryTarget cloudSqlTarget. */ + public cloudSqlTarget?: (google.privacy.dlp.v2.ICloudSqlDiscoveryTarget|null); + + /** DiscoveryTarget secretsTarget. */ + public secretsTarget?: (google.privacy.dlp.v2.ISecretsDiscoveryTarget|null); + + /** DiscoveryTarget cloudStorageTarget. */ + public cloudStorageTarget?: (google.privacy.dlp.v2.ICloudStorageDiscoveryTarget|null); + + /** DiscoveryTarget otherCloudTarget. */ + public otherCloudTarget?: (google.privacy.dlp.v2.IOtherCloudDiscoveryTarget|null); + + /** DiscoveryTarget vertexDatasetTarget. */ + public vertexDatasetTarget?: (google.privacy.dlp.v2.IVertexDatasetDiscoveryTarget|null); + + /** DiscoveryTarget target. */ + public target?: ("bigQueryTarget"|"cloudSqlTarget"|"secretsTarget"|"cloudStorageTarget"|"otherCloudTarget"|"vertexDatasetTarget"); + + /** + * Creates a new DiscoveryTarget instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryTarget instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoveryTarget): google.privacy.dlp.v2.DiscoveryTarget; + + /** + * Encodes the specified DiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryTarget.verify|verify} messages. + * @param message DiscoveryTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoveryTarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryTarget.verify|verify} messages. + * @param message DiscoveryTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryTarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryTarget message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryTarget; + + /** + * Decodes a DiscoveryTarget message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryTarget; + + /** + * Verifies a DiscoveryTarget message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryTarget message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryTarget + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryTarget; + + /** + * Creates a plain object from a DiscoveryTarget message. Also converts values to other types if specified. + * @param message DiscoveryTarget + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryTarget, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryTarget to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryTarget + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BigQueryDiscoveryTarget. */ + interface IBigQueryDiscoveryTarget { + + /** BigQueryDiscoveryTarget filter */ + filter?: (google.privacy.dlp.v2.IDiscoveryBigQueryFilter|null); + + /** BigQueryDiscoveryTarget conditions */ + conditions?: (google.privacy.dlp.v2.IDiscoveryBigQueryConditions|null); + + /** BigQueryDiscoveryTarget cadence */ + cadence?: (google.privacy.dlp.v2.IDiscoveryGenerationCadence|null); + + /** BigQueryDiscoveryTarget disabled */ + disabled?: (google.privacy.dlp.v2.IDisabled|null); + } + + /** Represents a BigQueryDiscoveryTarget. */ + class BigQueryDiscoveryTarget implements IBigQueryDiscoveryTarget { + + /** + * Constructs a new BigQueryDiscoveryTarget. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IBigQueryDiscoveryTarget); + + /** BigQueryDiscoveryTarget filter. */ + public filter?: (google.privacy.dlp.v2.IDiscoveryBigQueryFilter|null); + + /** BigQueryDiscoveryTarget conditions. */ + public conditions?: (google.privacy.dlp.v2.IDiscoveryBigQueryConditions|null); + + /** BigQueryDiscoveryTarget cadence. */ + public cadence?: (google.privacy.dlp.v2.IDiscoveryGenerationCadence|null); + + /** BigQueryDiscoveryTarget disabled. */ + public disabled?: (google.privacy.dlp.v2.IDisabled|null); + + /** BigQueryDiscoveryTarget frequency. */ + public frequency?: ("cadence"|"disabled"); + + /** + * Creates a new BigQueryDiscoveryTarget instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryDiscoveryTarget instance + */ + public static create(properties?: google.privacy.dlp.v2.IBigQueryDiscoveryTarget): google.privacy.dlp.v2.BigQueryDiscoveryTarget; + + /** + * Encodes the specified BigQueryDiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryDiscoveryTarget.verify|verify} messages. + * @param message BigQueryDiscoveryTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IBigQueryDiscoveryTarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryDiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryDiscoveryTarget.verify|verify} messages. + * @param message BigQueryDiscoveryTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IBigQueryDiscoveryTarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryDiscoveryTarget message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.BigQueryDiscoveryTarget; + + /** + * Decodes a BigQueryDiscoveryTarget message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.BigQueryDiscoveryTarget; + + /** + * Verifies a BigQueryDiscoveryTarget message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryDiscoveryTarget message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryDiscoveryTarget + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.BigQueryDiscoveryTarget; + + /** + * Creates a plain object from a BigQueryDiscoveryTarget message. Also converts values to other types if specified. + * @param message BigQueryDiscoveryTarget + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.BigQueryDiscoveryTarget, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryDiscoveryTarget to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryDiscoveryTarget + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DiscoveryBigQueryFilter. */ + interface IDiscoveryBigQueryFilter { + + /** DiscoveryBigQueryFilter tables */ + tables?: (google.privacy.dlp.v2.IBigQueryTableCollection|null); + + /** DiscoveryBigQueryFilter otherTables */ + otherTables?: (google.privacy.dlp.v2.DiscoveryBigQueryFilter.IAllOtherBigQueryTables|null); + + /** DiscoveryBigQueryFilter tableReference */ + tableReference?: (google.privacy.dlp.v2.ITableReference|null); + } + + /** Represents a DiscoveryBigQueryFilter. */ + class DiscoveryBigQueryFilter implements IDiscoveryBigQueryFilter { + + /** + * Constructs a new DiscoveryBigQueryFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoveryBigQueryFilter); + + /** DiscoveryBigQueryFilter tables. */ + public tables?: (google.privacy.dlp.v2.IBigQueryTableCollection|null); + + /** DiscoveryBigQueryFilter otherTables. */ + public otherTables?: (google.privacy.dlp.v2.DiscoveryBigQueryFilter.IAllOtherBigQueryTables|null); + + /** DiscoveryBigQueryFilter tableReference. */ + public tableReference?: (google.privacy.dlp.v2.ITableReference|null); + + /** DiscoveryBigQueryFilter filter. */ + public filter?: ("tables"|"otherTables"|"tableReference"); + + /** + * Creates a new DiscoveryBigQueryFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryBigQueryFilter instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoveryBigQueryFilter): google.privacy.dlp.v2.DiscoveryBigQueryFilter; + + /** + * Encodes the specified DiscoveryBigQueryFilter message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryFilter.verify|verify} messages. + * @param message DiscoveryBigQueryFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoveryBigQueryFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryBigQueryFilter message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryFilter.verify|verify} messages. + * @param message DiscoveryBigQueryFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryBigQueryFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryBigQueryFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryBigQueryFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryBigQueryFilter; + + /** + * Decodes a DiscoveryBigQueryFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryBigQueryFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryBigQueryFilter; + + /** + * Verifies a DiscoveryBigQueryFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryBigQueryFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryBigQueryFilter + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryBigQueryFilter; + + /** + * Creates a plain object from a DiscoveryBigQueryFilter message. Also converts values to other types if specified. + * @param message DiscoveryBigQueryFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryBigQueryFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryBigQueryFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryBigQueryFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DiscoveryBigQueryFilter { + + /** Properties of an AllOtherBigQueryTables. */ + interface IAllOtherBigQueryTables { + } + + /** Represents an AllOtherBigQueryTables. */ + class AllOtherBigQueryTables implements IAllOtherBigQueryTables { + + /** + * Constructs a new AllOtherBigQueryTables. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.DiscoveryBigQueryFilter.IAllOtherBigQueryTables); + + /** + * Creates a new AllOtherBigQueryTables instance using the specified properties. + * @param [properties] Properties to set + * @returns AllOtherBigQueryTables instance + */ + public static create(properties?: google.privacy.dlp.v2.DiscoveryBigQueryFilter.IAllOtherBigQueryTables): google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables; + + /** + * Encodes the specified AllOtherBigQueryTables message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables.verify|verify} messages. + * @param message AllOtherBigQueryTables message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.DiscoveryBigQueryFilter.IAllOtherBigQueryTables, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AllOtherBigQueryTables message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables.verify|verify} messages. + * @param message AllOtherBigQueryTables message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.DiscoveryBigQueryFilter.IAllOtherBigQueryTables, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AllOtherBigQueryTables message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AllOtherBigQueryTables + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables; + + /** + * Decodes an AllOtherBigQueryTables message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AllOtherBigQueryTables + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables; + + /** + * Verifies an AllOtherBigQueryTables message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AllOtherBigQueryTables message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AllOtherBigQueryTables + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables; + + /** + * Creates a plain object from an AllOtherBigQueryTables message. Also converts values to other types if specified. + * @param message AllOtherBigQueryTables + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AllOtherBigQueryTables to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AllOtherBigQueryTables + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a BigQueryTableCollection. */ + interface IBigQueryTableCollection { + + /** BigQueryTableCollection includeRegexes */ + includeRegexes?: (google.privacy.dlp.v2.IBigQueryRegexes|null); + } + + /** Represents a BigQueryTableCollection. */ + class BigQueryTableCollection implements IBigQueryTableCollection { + + /** + * Constructs a new BigQueryTableCollection. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IBigQueryTableCollection); + + /** BigQueryTableCollection includeRegexes. */ + public includeRegexes?: (google.privacy.dlp.v2.IBigQueryRegexes|null); + + /** BigQueryTableCollection pattern. */ + public pattern?: "includeRegexes"; + + /** + * Creates a new BigQueryTableCollection instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryTableCollection instance + */ + public static create(properties?: google.privacy.dlp.v2.IBigQueryTableCollection): google.privacy.dlp.v2.BigQueryTableCollection; + + /** + * Encodes the specified BigQueryTableCollection message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryTableCollection.verify|verify} messages. + * @param message BigQueryTableCollection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IBigQueryTableCollection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryTableCollection message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryTableCollection.verify|verify} messages. + * @param message BigQueryTableCollection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IBigQueryTableCollection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryTableCollection message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryTableCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.BigQueryTableCollection; + + /** + * Decodes a BigQueryTableCollection message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryTableCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.BigQueryTableCollection; + + /** + * Verifies a BigQueryTableCollection message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryTableCollection message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryTableCollection + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.BigQueryTableCollection; + + /** + * Creates a plain object from a BigQueryTableCollection message. Also converts values to other types if specified. + * @param message BigQueryTableCollection + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.BigQueryTableCollection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryTableCollection to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryTableCollection + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DiscoveryBigQueryConditions. */ + interface IDiscoveryBigQueryConditions { + + /** DiscoveryBigQueryConditions createdAfter */ + createdAfter?: (google.protobuf.ITimestamp|null); + + /** DiscoveryBigQueryConditions types */ + types?: (google.privacy.dlp.v2.IBigQueryTableTypes|null); + + /** DiscoveryBigQueryConditions typeCollection */ + typeCollection?: (google.privacy.dlp.v2.BigQueryTableTypeCollection|keyof typeof google.privacy.dlp.v2.BigQueryTableTypeCollection|null); + + /** DiscoveryBigQueryConditions orConditions */ + orConditions?: (google.privacy.dlp.v2.DiscoveryBigQueryConditions.IOrConditions|null); + } + + /** Represents a DiscoveryBigQueryConditions. */ + class DiscoveryBigQueryConditions implements IDiscoveryBigQueryConditions { + + /** + * Constructs a new DiscoveryBigQueryConditions. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoveryBigQueryConditions); + + /** DiscoveryBigQueryConditions createdAfter. */ + public createdAfter?: (google.protobuf.ITimestamp|null); + + /** DiscoveryBigQueryConditions types. */ + public types?: (google.privacy.dlp.v2.IBigQueryTableTypes|null); + + /** DiscoveryBigQueryConditions typeCollection. */ + public typeCollection?: (google.privacy.dlp.v2.BigQueryTableTypeCollection|keyof typeof google.privacy.dlp.v2.BigQueryTableTypeCollection|null); + + /** DiscoveryBigQueryConditions orConditions. */ + public orConditions?: (google.privacy.dlp.v2.DiscoveryBigQueryConditions.IOrConditions|null); + + /** DiscoveryBigQueryConditions includedTypes. */ + public includedTypes?: ("types"|"typeCollection"); + + /** + * Creates a new DiscoveryBigQueryConditions instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryBigQueryConditions instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoveryBigQueryConditions): google.privacy.dlp.v2.DiscoveryBigQueryConditions; + + /** + * Encodes the specified DiscoveryBigQueryConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryConditions.verify|verify} messages. + * @param message DiscoveryBigQueryConditions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoveryBigQueryConditions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryBigQueryConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryConditions.verify|verify} messages. + * @param message DiscoveryBigQueryConditions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryBigQueryConditions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryBigQueryConditions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryBigQueryConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryBigQueryConditions; + + /** + * Decodes a DiscoveryBigQueryConditions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryBigQueryConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryBigQueryConditions; + + /** + * Verifies a DiscoveryBigQueryConditions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryBigQueryConditions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryBigQueryConditions + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryBigQueryConditions; + + /** + * Creates a plain object from a DiscoveryBigQueryConditions message. Also converts values to other types if specified. + * @param message DiscoveryBigQueryConditions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryBigQueryConditions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryBigQueryConditions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryBigQueryConditions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DiscoveryBigQueryConditions { + + /** Properties of an OrConditions. */ + interface IOrConditions { + + /** OrConditions minRowCount */ + minRowCount?: (number|null); + + /** OrConditions minAge */ + minAge?: (google.protobuf.IDuration|null); + } + + /** Represents an OrConditions. */ + class OrConditions implements IOrConditions { + + /** + * Constructs a new OrConditions. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.DiscoveryBigQueryConditions.IOrConditions); + + /** OrConditions minRowCount. */ + public minRowCount: number; + + /** OrConditions minAge. */ + public minAge?: (google.protobuf.IDuration|null); + + /** + * Creates a new OrConditions instance using the specified properties. + * @param [properties] Properties to set + * @returns OrConditions instance + */ + public static create(properties?: google.privacy.dlp.v2.DiscoveryBigQueryConditions.IOrConditions): google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions; + + /** + * Encodes the specified OrConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.verify|verify} messages. + * @param message OrConditions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.DiscoveryBigQueryConditions.IOrConditions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OrConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.verify|verify} messages. + * @param message OrConditions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.DiscoveryBigQueryConditions.IOrConditions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OrConditions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OrConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions; + + /** + * Decodes an OrConditions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OrConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions; + + /** + * Verifies an OrConditions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OrConditions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OrConditions + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions; + + /** + * Creates a plain object from an OrConditions message. Also converts values to other types if specified. + * @param message OrConditions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OrConditions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OrConditions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DiscoveryGenerationCadence. */ + interface IDiscoveryGenerationCadence { + + /** DiscoveryGenerationCadence schemaModifiedCadence */ + schemaModifiedCadence?: (google.privacy.dlp.v2.IDiscoverySchemaModifiedCadence|null); + + /** DiscoveryGenerationCadence tableModifiedCadence */ + tableModifiedCadence?: (google.privacy.dlp.v2.IDiscoveryTableModifiedCadence|null); + + /** DiscoveryGenerationCadence inspectTemplateModifiedCadence */ + inspectTemplateModifiedCadence?: (google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null); + + /** DiscoveryGenerationCadence refreshFrequency */ + refreshFrequency?: (google.privacy.dlp.v2.DataProfileUpdateFrequency|keyof typeof google.privacy.dlp.v2.DataProfileUpdateFrequency|null); + } + + /** Represents a DiscoveryGenerationCadence. */ + class DiscoveryGenerationCadence implements IDiscoveryGenerationCadence { + + /** + * Constructs a new DiscoveryGenerationCadence. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoveryGenerationCadence); + + /** DiscoveryGenerationCadence schemaModifiedCadence. */ + public schemaModifiedCadence?: (google.privacy.dlp.v2.IDiscoverySchemaModifiedCadence|null); + + /** DiscoveryGenerationCadence tableModifiedCadence. */ + public tableModifiedCadence?: (google.privacy.dlp.v2.IDiscoveryTableModifiedCadence|null); + + /** DiscoveryGenerationCadence inspectTemplateModifiedCadence. */ + public inspectTemplateModifiedCadence?: (google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null); + + /** DiscoveryGenerationCadence refreshFrequency. */ + public refreshFrequency: (google.privacy.dlp.v2.DataProfileUpdateFrequency|keyof typeof google.privacy.dlp.v2.DataProfileUpdateFrequency); + + /** + * Creates a new DiscoveryGenerationCadence instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryGenerationCadence instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoveryGenerationCadence): google.privacy.dlp.v2.DiscoveryGenerationCadence; + + /** + * Encodes the specified DiscoveryGenerationCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryGenerationCadence.verify|verify} messages. + * @param message DiscoveryGenerationCadence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoveryGenerationCadence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryGenerationCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryGenerationCadence.verify|verify} messages. + * @param message DiscoveryGenerationCadence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryGenerationCadence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryGenerationCadence message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryGenerationCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryGenerationCadence; + + /** + * Decodes a DiscoveryGenerationCadence message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryGenerationCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryGenerationCadence; + + /** + * Verifies a DiscoveryGenerationCadence message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryGenerationCadence message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryGenerationCadence + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryGenerationCadence; + + /** + * Creates a plain object from a DiscoveryGenerationCadence message. Also converts values to other types if specified. + * @param message DiscoveryGenerationCadence + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryGenerationCadence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryGenerationCadence to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryGenerationCadence + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DiscoveryTableModifiedCadence. */ + interface IDiscoveryTableModifiedCadence { + + /** DiscoveryTableModifiedCadence types */ + types?: (google.privacy.dlp.v2.BigQueryTableModification[]|null); + + /** DiscoveryTableModifiedCadence frequency */ + frequency?: (google.privacy.dlp.v2.DataProfileUpdateFrequency|keyof typeof google.privacy.dlp.v2.DataProfileUpdateFrequency|null); + } + + /** Represents a DiscoveryTableModifiedCadence. */ + class DiscoveryTableModifiedCadence implements IDiscoveryTableModifiedCadence { + + /** + * Constructs a new DiscoveryTableModifiedCadence. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoveryTableModifiedCadence); + + /** DiscoveryTableModifiedCadence types. */ + public types: google.privacy.dlp.v2.BigQueryTableModification[]; + + /** DiscoveryTableModifiedCadence frequency. */ + public frequency: (google.privacy.dlp.v2.DataProfileUpdateFrequency|keyof typeof google.privacy.dlp.v2.DataProfileUpdateFrequency); + + /** + * Creates a new DiscoveryTableModifiedCadence instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryTableModifiedCadence instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoveryTableModifiedCadence): google.privacy.dlp.v2.DiscoveryTableModifiedCadence; + + /** + * Encodes the specified DiscoveryTableModifiedCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryTableModifiedCadence.verify|verify} messages. + * @param message DiscoveryTableModifiedCadence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoveryTableModifiedCadence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryTableModifiedCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryTableModifiedCadence.verify|verify} messages. + * @param message DiscoveryTableModifiedCadence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryTableModifiedCadence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryTableModifiedCadence message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryTableModifiedCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryTableModifiedCadence; + + /** + * Decodes a DiscoveryTableModifiedCadence message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryTableModifiedCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryTableModifiedCadence; + + /** + * Verifies a DiscoveryTableModifiedCadence message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryTableModifiedCadence message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryTableModifiedCadence + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryTableModifiedCadence; + + /** + * Creates a plain object from a DiscoveryTableModifiedCadence message. Also converts values to other types if specified. + * @param message DiscoveryTableModifiedCadence + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryTableModifiedCadence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryTableModifiedCadence to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryTableModifiedCadence + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** BigQueryTableModification enum. */ + enum BigQueryTableModification { + TABLE_MODIFICATION_UNSPECIFIED = 0, + TABLE_MODIFIED_TIMESTAMP = 1 + } + + /** Properties of a DiscoverySchemaModifiedCadence. */ + interface IDiscoverySchemaModifiedCadence { + + /** DiscoverySchemaModifiedCadence types */ + types?: (google.privacy.dlp.v2.BigQuerySchemaModification[]|null); + + /** DiscoverySchemaModifiedCadence frequency */ + frequency?: (google.privacy.dlp.v2.DataProfileUpdateFrequency|keyof typeof google.privacy.dlp.v2.DataProfileUpdateFrequency|null); + } + + /** Represents a DiscoverySchemaModifiedCadence. */ + class DiscoverySchemaModifiedCadence implements IDiscoverySchemaModifiedCadence { + + /** + * Constructs a new DiscoverySchemaModifiedCadence. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoverySchemaModifiedCadence); + + /** DiscoverySchemaModifiedCadence types. */ + public types: google.privacy.dlp.v2.BigQuerySchemaModification[]; + + /** DiscoverySchemaModifiedCadence frequency. */ + public frequency: (google.privacy.dlp.v2.DataProfileUpdateFrequency|keyof typeof google.privacy.dlp.v2.DataProfileUpdateFrequency); + + /** + * Creates a new DiscoverySchemaModifiedCadence instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoverySchemaModifiedCadence instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoverySchemaModifiedCadence): google.privacy.dlp.v2.DiscoverySchemaModifiedCadence; + + /** + * Encodes the specified DiscoverySchemaModifiedCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.verify|verify} messages. + * @param message DiscoverySchemaModifiedCadence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoverySchemaModifiedCadence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoverySchemaModifiedCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.verify|verify} messages. + * @param message DiscoverySchemaModifiedCadence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoverySchemaModifiedCadence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoverySchemaModifiedCadence message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoverySchemaModifiedCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoverySchemaModifiedCadence; + + /** + * Decodes a DiscoverySchemaModifiedCadence message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoverySchemaModifiedCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoverySchemaModifiedCadence; + + /** + * Verifies a DiscoverySchemaModifiedCadence message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoverySchemaModifiedCadence message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoverySchemaModifiedCadence + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoverySchemaModifiedCadence; + + /** + * Creates a plain object from a DiscoverySchemaModifiedCadence message. Also converts values to other types if specified. + * @param message DiscoverySchemaModifiedCadence + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoverySchemaModifiedCadence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoverySchemaModifiedCadence to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoverySchemaModifiedCadence + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** BigQuerySchemaModification enum. */ + enum BigQuerySchemaModification { + SCHEMA_MODIFICATION_UNSPECIFIED = 0, + SCHEMA_NEW_COLUMNS = 1, + SCHEMA_REMOVED_COLUMNS = 2 + } + + /** Properties of a DiscoveryInspectTemplateModifiedCadence. */ + interface IDiscoveryInspectTemplateModifiedCadence { + + /** DiscoveryInspectTemplateModifiedCadence frequency */ + frequency?: (google.privacy.dlp.v2.DataProfileUpdateFrequency|keyof typeof google.privacy.dlp.v2.DataProfileUpdateFrequency|null); + } + + /** Represents a DiscoveryInspectTemplateModifiedCadence. */ + class DiscoveryInspectTemplateModifiedCadence implements IDiscoveryInspectTemplateModifiedCadence { + + /** + * Constructs a new DiscoveryInspectTemplateModifiedCadence. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence); + + /** DiscoveryInspectTemplateModifiedCadence frequency. */ + public frequency: (google.privacy.dlp.v2.DataProfileUpdateFrequency|keyof typeof google.privacy.dlp.v2.DataProfileUpdateFrequency); + + /** + * Creates a new DiscoveryInspectTemplateModifiedCadence instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryInspectTemplateModifiedCadence instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence): google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence; + + /** + * Encodes the specified DiscoveryInspectTemplateModifiedCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.verify|verify} messages. + * @param message DiscoveryInspectTemplateModifiedCadence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryInspectTemplateModifiedCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.verify|verify} messages. + * @param message DiscoveryInspectTemplateModifiedCadence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryInspectTemplateModifiedCadence message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryInspectTemplateModifiedCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence; + + /** + * Decodes a DiscoveryInspectTemplateModifiedCadence message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryInspectTemplateModifiedCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence; + + /** + * Verifies a DiscoveryInspectTemplateModifiedCadence message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryInspectTemplateModifiedCadence message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryInspectTemplateModifiedCadence + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence; + + /** + * Creates a plain object from a DiscoveryInspectTemplateModifiedCadence message. Also converts values to other types if specified. + * @param message DiscoveryInspectTemplateModifiedCadence + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryInspectTemplateModifiedCadence to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryInspectTemplateModifiedCadence + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudSqlDiscoveryTarget. */ + interface ICloudSqlDiscoveryTarget { + + /** CloudSqlDiscoveryTarget filter */ + filter?: (google.privacy.dlp.v2.IDiscoveryCloudSqlFilter|null); + + /** CloudSqlDiscoveryTarget conditions */ + conditions?: (google.privacy.dlp.v2.IDiscoveryCloudSqlConditions|null); + + /** CloudSqlDiscoveryTarget generationCadence */ + generationCadence?: (google.privacy.dlp.v2.IDiscoveryCloudSqlGenerationCadence|null); + + /** CloudSqlDiscoveryTarget disabled */ + disabled?: (google.privacy.dlp.v2.IDisabled|null); + } + + /** Represents a CloudSqlDiscoveryTarget. */ + class CloudSqlDiscoveryTarget implements ICloudSqlDiscoveryTarget { + + /** + * Constructs a new CloudSqlDiscoveryTarget. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ICloudSqlDiscoveryTarget); + + /** CloudSqlDiscoveryTarget filter. */ + public filter?: (google.privacy.dlp.v2.IDiscoveryCloudSqlFilter|null); + + /** CloudSqlDiscoveryTarget conditions. */ + public conditions?: (google.privacy.dlp.v2.IDiscoveryCloudSqlConditions|null); + + /** CloudSqlDiscoveryTarget generationCadence. */ + public generationCadence?: (google.privacy.dlp.v2.IDiscoveryCloudSqlGenerationCadence|null); + + /** CloudSqlDiscoveryTarget disabled. */ + public disabled?: (google.privacy.dlp.v2.IDisabled|null); + + /** CloudSqlDiscoveryTarget cadence. */ + public cadence?: ("generationCadence"|"disabled"); + + /** + * Creates a new CloudSqlDiscoveryTarget instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudSqlDiscoveryTarget instance + */ + public static create(properties?: google.privacy.dlp.v2.ICloudSqlDiscoveryTarget): google.privacy.dlp.v2.CloudSqlDiscoveryTarget; + + /** + * Encodes the specified CloudSqlDiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.CloudSqlDiscoveryTarget.verify|verify} messages. + * @param message CloudSqlDiscoveryTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ICloudSqlDiscoveryTarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudSqlDiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudSqlDiscoveryTarget.verify|verify} messages. + * @param message CloudSqlDiscoveryTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ICloudSqlDiscoveryTarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudSqlDiscoveryTarget message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudSqlDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CloudSqlDiscoveryTarget; + + /** + * Decodes a CloudSqlDiscoveryTarget message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudSqlDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CloudSqlDiscoveryTarget; + + /** + * Verifies a CloudSqlDiscoveryTarget message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudSqlDiscoveryTarget message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudSqlDiscoveryTarget + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CloudSqlDiscoveryTarget; + + /** + * Creates a plain object from a CloudSqlDiscoveryTarget message. Also converts values to other types if specified. + * @param message CloudSqlDiscoveryTarget + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CloudSqlDiscoveryTarget, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudSqlDiscoveryTarget to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudSqlDiscoveryTarget + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DiscoveryCloudSqlFilter. */ + interface IDiscoveryCloudSqlFilter { + + /** DiscoveryCloudSqlFilter collection */ + collection?: (google.privacy.dlp.v2.IDatabaseResourceCollection|null); + + /** DiscoveryCloudSqlFilter others */ + others?: (google.privacy.dlp.v2.IAllOtherDatabaseResources|null); + + /** DiscoveryCloudSqlFilter databaseResourceReference */ + databaseResourceReference?: (google.privacy.dlp.v2.IDatabaseResourceReference|null); + } + + /** Represents a DiscoveryCloudSqlFilter. */ + class DiscoveryCloudSqlFilter implements IDiscoveryCloudSqlFilter { + + /** + * Constructs a new DiscoveryCloudSqlFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoveryCloudSqlFilter); + + /** DiscoveryCloudSqlFilter collection. */ + public collection?: (google.privacy.dlp.v2.IDatabaseResourceCollection|null); + + /** DiscoveryCloudSqlFilter others. */ + public others?: (google.privacy.dlp.v2.IAllOtherDatabaseResources|null); + + /** DiscoveryCloudSqlFilter databaseResourceReference. */ + public databaseResourceReference?: (google.privacy.dlp.v2.IDatabaseResourceReference|null); + + /** DiscoveryCloudSqlFilter filter. */ + public filter?: ("collection"|"others"|"databaseResourceReference"); + + /** + * Creates a new DiscoveryCloudSqlFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryCloudSqlFilter instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoveryCloudSqlFilter): google.privacy.dlp.v2.DiscoveryCloudSqlFilter; + + /** + * Encodes the specified DiscoveryCloudSqlFilter message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlFilter.verify|verify} messages. + * @param message DiscoveryCloudSqlFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoveryCloudSqlFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryCloudSqlFilter message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlFilter.verify|verify} messages. + * @param message DiscoveryCloudSqlFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryCloudSqlFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryCloudSqlFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryCloudSqlFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryCloudSqlFilter; + + /** + * Decodes a DiscoveryCloudSqlFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryCloudSqlFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryCloudSqlFilter; + + /** + * Verifies a DiscoveryCloudSqlFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryCloudSqlFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryCloudSqlFilter + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryCloudSqlFilter; + + /** + * Creates a plain object from a DiscoveryCloudSqlFilter message. Also converts values to other types if specified. + * @param message DiscoveryCloudSqlFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryCloudSqlFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryCloudSqlFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryCloudSqlFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DatabaseResourceCollection. */ + interface IDatabaseResourceCollection { + + /** DatabaseResourceCollection includeRegexes */ + includeRegexes?: (google.privacy.dlp.v2.IDatabaseResourceRegexes|null); + } + + /** Represents a DatabaseResourceCollection. */ + class DatabaseResourceCollection implements IDatabaseResourceCollection { + + /** + * Constructs a new DatabaseResourceCollection. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDatabaseResourceCollection); + + /** DatabaseResourceCollection includeRegexes. */ + public includeRegexes?: (google.privacy.dlp.v2.IDatabaseResourceRegexes|null); + + /** DatabaseResourceCollection pattern. */ + public pattern?: "includeRegexes"; + + /** + * Creates a new DatabaseResourceCollection instance using the specified properties. + * @param [properties] Properties to set + * @returns DatabaseResourceCollection instance + */ + public static create(properties?: google.privacy.dlp.v2.IDatabaseResourceCollection): google.privacy.dlp.v2.DatabaseResourceCollection; + + /** + * Encodes the specified DatabaseResourceCollection message. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceCollection.verify|verify} messages. + * @param message DatabaseResourceCollection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDatabaseResourceCollection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatabaseResourceCollection message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceCollection.verify|verify} messages. + * @param message DatabaseResourceCollection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDatabaseResourceCollection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatabaseResourceCollection message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatabaseResourceCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DatabaseResourceCollection; + + /** + * Decodes a DatabaseResourceCollection message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatabaseResourceCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DatabaseResourceCollection; + + /** + * Verifies a DatabaseResourceCollection message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DatabaseResourceCollection message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatabaseResourceCollection + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DatabaseResourceCollection; + + /** + * Creates a plain object from a DatabaseResourceCollection message. Also converts values to other types if specified. + * @param message DatabaseResourceCollection + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DatabaseResourceCollection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatabaseResourceCollection to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatabaseResourceCollection + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DatabaseResourceRegexes. */ + interface IDatabaseResourceRegexes { + + /** DatabaseResourceRegexes patterns */ + patterns?: (google.privacy.dlp.v2.IDatabaseResourceRegex[]|null); + } + + /** Represents a DatabaseResourceRegexes. */ + class DatabaseResourceRegexes implements IDatabaseResourceRegexes { + + /** + * Constructs a new DatabaseResourceRegexes. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDatabaseResourceRegexes); + + /** DatabaseResourceRegexes patterns. */ + public patterns: google.privacy.dlp.v2.IDatabaseResourceRegex[]; + + /** + * Creates a new DatabaseResourceRegexes instance using the specified properties. + * @param [properties] Properties to set + * @returns DatabaseResourceRegexes instance + */ + public static create(properties?: google.privacy.dlp.v2.IDatabaseResourceRegexes): google.privacy.dlp.v2.DatabaseResourceRegexes; + + /** + * Encodes the specified DatabaseResourceRegexes message. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceRegexes.verify|verify} messages. + * @param message DatabaseResourceRegexes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDatabaseResourceRegexes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatabaseResourceRegexes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceRegexes.verify|verify} messages. + * @param message DatabaseResourceRegexes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDatabaseResourceRegexes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatabaseResourceRegexes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatabaseResourceRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DatabaseResourceRegexes; + + /** + * Decodes a DatabaseResourceRegexes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatabaseResourceRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DatabaseResourceRegexes; + + /** + * Verifies a DatabaseResourceRegexes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DatabaseResourceRegexes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatabaseResourceRegexes + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DatabaseResourceRegexes; + + /** + * Creates a plain object from a DatabaseResourceRegexes message. Also converts values to other types if specified. + * @param message DatabaseResourceRegexes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DatabaseResourceRegexes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatabaseResourceRegexes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatabaseResourceRegexes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DatabaseResourceRegex. */ + interface IDatabaseResourceRegex { + + /** DatabaseResourceRegex projectIdRegex */ + projectIdRegex?: (string|null); + + /** DatabaseResourceRegex instanceRegex */ + instanceRegex?: (string|null); + + /** DatabaseResourceRegex databaseRegex */ + databaseRegex?: (string|null); + + /** DatabaseResourceRegex databaseResourceNameRegex */ + databaseResourceNameRegex?: (string|null); + } + + /** Represents a DatabaseResourceRegex. */ + class DatabaseResourceRegex implements IDatabaseResourceRegex { + + /** + * Constructs a new DatabaseResourceRegex. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDatabaseResourceRegex); + + /** DatabaseResourceRegex projectIdRegex. */ + public projectIdRegex: string; + + /** DatabaseResourceRegex instanceRegex. */ + public instanceRegex: string; + + /** DatabaseResourceRegex databaseRegex. */ + public databaseRegex: string; + + /** DatabaseResourceRegex databaseResourceNameRegex. */ + public databaseResourceNameRegex: string; + + /** + * Creates a new DatabaseResourceRegex instance using the specified properties. + * @param [properties] Properties to set + * @returns DatabaseResourceRegex instance + */ + public static create(properties?: google.privacy.dlp.v2.IDatabaseResourceRegex): google.privacy.dlp.v2.DatabaseResourceRegex; + + /** + * Encodes the specified DatabaseResourceRegex message. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceRegex.verify|verify} messages. + * @param message DatabaseResourceRegex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDatabaseResourceRegex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatabaseResourceRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceRegex.verify|verify} messages. + * @param message DatabaseResourceRegex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDatabaseResourceRegex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatabaseResourceRegex message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatabaseResourceRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DatabaseResourceRegex; + + /** + * Decodes a DatabaseResourceRegex message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatabaseResourceRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DatabaseResourceRegex; + + /** + * Verifies a DatabaseResourceRegex message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DatabaseResourceRegex message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatabaseResourceRegex + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DatabaseResourceRegex; + + /** + * Creates a plain object from a DatabaseResourceRegex message. Also converts values to other types if specified. + * @param message DatabaseResourceRegex + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DatabaseResourceRegex, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatabaseResourceRegex to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatabaseResourceRegex + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AllOtherDatabaseResources. */ + interface IAllOtherDatabaseResources { + } + + /** Represents an AllOtherDatabaseResources. */ + class AllOtherDatabaseResources implements IAllOtherDatabaseResources { + + /** + * Constructs a new AllOtherDatabaseResources. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IAllOtherDatabaseResources); + + /** + * Creates a new AllOtherDatabaseResources instance using the specified properties. + * @param [properties] Properties to set + * @returns AllOtherDatabaseResources instance + */ + public static create(properties?: google.privacy.dlp.v2.IAllOtherDatabaseResources): google.privacy.dlp.v2.AllOtherDatabaseResources; + + /** + * Encodes the specified AllOtherDatabaseResources message. Does not implicitly {@link google.privacy.dlp.v2.AllOtherDatabaseResources.verify|verify} messages. + * @param message AllOtherDatabaseResources message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IAllOtherDatabaseResources, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AllOtherDatabaseResources message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AllOtherDatabaseResources.verify|verify} messages. + * @param message AllOtherDatabaseResources message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IAllOtherDatabaseResources, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AllOtherDatabaseResources message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AllOtherDatabaseResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AllOtherDatabaseResources; + + /** + * Decodes an AllOtherDatabaseResources message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AllOtherDatabaseResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AllOtherDatabaseResources; + + /** + * Verifies an AllOtherDatabaseResources message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AllOtherDatabaseResources message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AllOtherDatabaseResources + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AllOtherDatabaseResources; + + /** + * Creates a plain object from an AllOtherDatabaseResources message. Also converts values to other types if specified. + * @param message AllOtherDatabaseResources + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AllOtherDatabaseResources, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AllOtherDatabaseResources to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AllOtherDatabaseResources + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DatabaseResourceReference. */ + interface IDatabaseResourceReference { + + /** DatabaseResourceReference projectId */ + projectId?: (string|null); + + /** DatabaseResourceReference instance */ + instance?: (string|null); + + /** DatabaseResourceReference database */ + database?: (string|null); + + /** DatabaseResourceReference databaseResource */ + databaseResource?: (string|null); + } + + /** Represents a DatabaseResourceReference. */ + class DatabaseResourceReference implements IDatabaseResourceReference { + + /** + * Constructs a new DatabaseResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDatabaseResourceReference); + + /** DatabaseResourceReference projectId. */ + public projectId: string; + + /** DatabaseResourceReference instance. */ + public instance: string; + + /** DatabaseResourceReference database. */ + public database: string; + + /** DatabaseResourceReference databaseResource. */ + public databaseResource: string; + + /** + * Creates a new DatabaseResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns DatabaseResourceReference instance + */ + public static create(properties?: google.privacy.dlp.v2.IDatabaseResourceReference): google.privacy.dlp.v2.DatabaseResourceReference; + + /** + * Encodes the specified DatabaseResourceReference message. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceReference.verify|verify} messages. + * @param message DatabaseResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDatabaseResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatabaseResourceReference message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceReference.verify|verify} messages. + * @param message DatabaseResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDatabaseResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatabaseResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatabaseResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DatabaseResourceReference; + + /** + * Decodes a DatabaseResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatabaseResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DatabaseResourceReference; + + /** + * Verifies a DatabaseResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DatabaseResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatabaseResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DatabaseResourceReference; + + /** + * Creates a plain object from a DatabaseResourceReference message. Also converts values to other types if specified. + * @param message DatabaseResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DatabaseResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatabaseResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatabaseResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DiscoveryCloudSqlConditions. */ + interface IDiscoveryCloudSqlConditions { + + /** DiscoveryCloudSqlConditions databaseEngines */ + databaseEngines?: (google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseEngine[]|null); + + /** DiscoveryCloudSqlConditions types */ + types?: (google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseResourceType[]|null); + } + + /** Represents a DiscoveryCloudSqlConditions. */ + class DiscoveryCloudSqlConditions implements IDiscoveryCloudSqlConditions { + + /** + * Constructs a new DiscoveryCloudSqlConditions. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoveryCloudSqlConditions); + + /** DiscoveryCloudSqlConditions databaseEngines. */ + public databaseEngines: google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseEngine[]; + + /** DiscoveryCloudSqlConditions types. */ + public types: google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseResourceType[]; + + /** + * Creates a new DiscoveryCloudSqlConditions instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryCloudSqlConditions instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoveryCloudSqlConditions): google.privacy.dlp.v2.DiscoveryCloudSqlConditions; + + /** + * Encodes the specified DiscoveryCloudSqlConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlConditions.verify|verify} messages. + * @param message DiscoveryCloudSqlConditions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoveryCloudSqlConditions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryCloudSqlConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlConditions.verify|verify} messages. + * @param message DiscoveryCloudSqlConditions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryCloudSqlConditions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryCloudSqlConditions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryCloudSqlConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryCloudSqlConditions; + + /** + * Decodes a DiscoveryCloudSqlConditions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryCloudSqlConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryCloudSqlConditions; + + /** + * Verifies a DiscoveryCloudSqlConditions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryCloudSqlConditions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryCloudSqlConditions + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryCloudSqlConditions; + + /** + * Creates a plain object from a DiscoveryCloudSqlConditions message. Also converts values to other types if specified. + * @param message DiscoveryCloudSqlConditions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryCloudSqlConditions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryCloudSqlConditions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryCloudSqlConditions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DiscoveryCloudSqlConditions { + + /** DatabaseEngine enum. */ + enum DatabaseEngine { + DATABASE_ENGINE_UNSPECIFIED = 0, + ALL_SUPPORTED_DATABASE_ENGINES = 1, + MYSQL = 2, + POSTGRES = 3 + } + + /** DatabaseResourceType enum. */ + enum DatabaseResourceType { + DATABASE_RESOURCE_TYPE_UNSPECIFIED = 0, + DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES = 1, + DATABASE_RESOURCE_TYPE_TABLE = 2 + } + } + + /** Properties of a DiscoveryCloudSqlGenerationCadence. */ + interface IDiscoveryCloudSqlGenerationCadence { + + /** DiscoveryCloudSqlGenerationCadence schemaModifiedCadence */ + schemaModifiedCadence?: (google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.ISchemaModifiedCadence|null); + + /** DiscoveryCloudSqlGenerationCadence refreshFrequency */ + refreshFrequency?: (google.privacy.dlp.v2.DataProfileUpdateFrequency|keyof typeof google.privacy.dlp.v2.DataProfileUpdateFrequency|null); + + /** DiscoveryCloudSqlGenerationCadence inspectTemplateModifiedCadence */ + inspectTemplateModifiedCadence?: (google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null); + } + + /** Represents a DiscoveryCloudSqlGenerationCadence. */ + class DiscoveryCloudSqlGenerationCadence implements IDiscoveryCloudSqlGenerationCadence { + + /** + * Constructs a new DiscoveryCloudSqlGenerationCadence. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoveryCloudSqlGenerationCadence); + + /** DiscoveryCloudSqlGenerationCadence schemaModifiedCadence. */ + public schemaModifiedCadence?: (google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.ISchemaModifiedCadence|null); + + /** DiscoveryCloudSqlGenerationCadence refreshFrequency. */ + public refreshFrequency: (google.privacy.dlp.v2.DataProfileUpdateFrequency|keyof typeof google.privacy.dlp.v2.DataProfileUpdateFrequency); + + /** DiscoveryCloudSqlGenerationCadence inspectTemplateModifiedCadence. */ + public inspectTemplateModifiedCadence?: (google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null); + + /** + * Creates a new DiscoveryCloudSqlGenerationCadence instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryCloudSqlGenerationCadence instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoveryCloudSqlGenerationCadence): google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence; + + /** + * Encodes the specified DiscoveryCloudSqlGenerationCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.verify|verify} messages. + * @param message DiscoveryCloudSqlGenerationCadence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoveryCloudSqlGenerationCadence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryCloudSqlGenerationCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.verify|verify} messages. + * @param message DiscoveryCloudSqlGenerationCadence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryCloudSqlGenerationCadence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryCloudSqlGenerationCadence message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryCloudSqlGenerationCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence; + + /** + * Decodes a DiscoveryCloudSqlGenerationCadence message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryCloudSqlGenerationCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence; + + /** + * Verifies a DiscoveryCloudSqlGenerationCadence message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryCloudSqlGenerationCadence message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryCloudSqlGenerationCadence + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence; + + /** + * Creates a plain object from a DiscoveryCloudSqlGenerationCadence message. Also converts values to other types if specified. + * @param message DiscoveryCloudSqlGenerationCadence + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryCloudSqlGenerationCadence to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryCloudSqlGenerationCadence + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DiscoveryCloudSqlGenerationCadence { + + /** Properties of a SchemaModifiedCadence. */ + interface ISchemaModifiedCadence { + + /** SchemaModifiedCadence types */ + types?: (google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.CloudSqlSchemaModification[]|null); + + /** SchemaModifiedCadence frequency */ + frequency?: (google.privacy.dlp.v2.DataProfileUpdateFrequency|keyof typeof google.privacy.dlp.v2.DataProfileUpdateFrequency|null); + } + + /** Represents a SchemaModifiedCadence. */ + class SchemaModifiedCadence implements ISchemaModifiedCadence { + + /** + * Constructs a new SchemaModifiedCadence. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.ISchemaModifiedCadence); + + /** SchemaModifiedCadence types. */ + public types: google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.CloudSqlSchemaModification[]; + + /** SchemaModifiedCadence frequency. */ + public frequency: (google.privacy.dlp.v2.DataProfileUpdateFrequency|keyof typeof google.privacy.dlp.v2.DataProfileUpdateFrequency); + + /** + * Creates a new SchemaModifiedCadence instance using the specified properties. + * @param [properties] Properties to set + * @returns SchemaModifiedCadence instance + */ + public static create(properties?: google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.ISchemaModifiedCadence): google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence; + + /** + * Encodes the specified SchemaModifiedCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.verify|verify} messages. + * @param message SchemaModifiedCadence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.ISchemaModifiedCadence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchemaModifiedCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.verify|verify} messages. + * @param message SchemaModifiedCadence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.ISchemaModifiedCadence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchemaModifiedCadence message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchemaModifiedCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence; + + /** + * Decodes a SchemaModifiedCadence message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchemaModifiedCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence; + + /** + * Verifies a SchemaModifiedCadence message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchemaModifiedCadence message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchemaModifiedCadence + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence; + + /** + * Creates a plain object from a SchemaModifiedCadence message. Also converts values to other types if specified. + * @param message SchemaModifiedCadence + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchemaModifiedCadence to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchemaModifiedCadence + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SchemaModifiedCadence { + + /** CloudSqlSchemaModification enum. */ + enum CloudSqlSchemaModification { + SQL_SCHEMA_MODIFICATION_UNSPECIFIED = 0, + NEW_COLUMNS = 1, + REMOVED_COLUMNS = 2 + } + } + } + + /** Properties of a SecretsDiscoveryTarget. */ + interface ISecretsDiscoveryTarget { + } + + /** Represents a SecretsDiscoveryTarget. */ + class SecretsDiscoveryTarget implements ISecretsDiscoveryTarget { + + /** + * Constructs a new SecretsDiscoveryTarget. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ISecretsDiscoveryTarget); + + /** + * Creates a new SecretsDiscoveryTarget instance using the specified properties. + * @param [properties] Properties to set + * @returns SecretsDiscoveryTarget instance + */ + public static create(properties?: google.privacy.dlp.v2.ISecretsDiscoveryTarget): google.privacy.dlp.v2.SecretsDiscoveryTarget; + + /** + * Encodes the specified SecretsDiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.SecretsDiscoveryTarget.verify|verify} messages. + * @param message SecretsDiscoveryTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ISecretsDiscoveryTarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecretsDiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.SecretsDiscoveryTarget.verify|verify} messages. + * @param message SecretsDiscoveryTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ISecretsDiscoveryTarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecretsDiscoveryTarget message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecretsDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.SecretsDiscoveryTarget; + + /** + * Decodes a SecretsDiscoveryTarget message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecretsDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.SecretsDiscoveryTarget; + + /** + * Verifies a SecretsDiscoveryTarget message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SecretsDiscoveryTarget message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecretsDiscoveryTarget + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.SecretsDiscoveryTarget; + + /** + * Creates a plain object from a SecretsDiscoveryTarget message. Also converts values to other types if specified. + * @param message SecretsDiscoveryTarget + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.SecretsDiscoveryTarget, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecretsDiscoveryTarget to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecretsDiscoveryTarget + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudStorageDiscoveryTarget. */ + interface ICloudStorageDiscoveryTarget { + + /** CloudStorageDiscoveryTarget filter */ + filter?: (google.privacy.dlp.v2.IDiscoveryCloudStorageFilter|null); + + /** CloudStorageDiscoveryTarget conditions */ + conditions?: (google.privacy.dlp.v2.IDiscoveryFileStoreConditions|null); + + /** CloudStorageDiscoveryTarget generationCadence */ + generationCadence?: (google.privacy.dlp.v2.IDiscoveryCloudStorageGenerationCadence|null); + + /** CloudStorageDiscoveryTarget disabled */ + disabled?: (google.privacy.dlp.v2.IDisabled|null); + } + + /** Represents a CloudStorageDiscoveryTarget. */ + class CloudStorageDiscoveryTarget implements ICloudStorageDiscoveryTarget { + + /** + * Constructs a new CloudStorageDiscoveryTarget. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ICloudStorageDiscoveryTarget); + + /** CloudStorageDiscoveryTarget filter. */ + public filter?: (google.privacy.dlp.v2.IDiscoveryCloudStorageFilter|null); + + /** CloudStorageDiscoveryTarget conditions. */ + public conditions?: (google.privacy.dlp.v2.IDiscoveryFileStoreConditions|null); + + /** CloudStorageDiscoveryTarget generationCadence. */ + public generationCadence?: (google.privacy.dlp.v2.IDiscoveryCloudStorageGenerationCadence|null); + + /** CloudStorageDiscoveryTarget disabled. */ + public disabled?: (google.privacy.dlp.v2.IDisabled|null); + + /** CloudStorageDiscoveryTarget cadence. */ + public cadence?: ("generationCadence"|"disabled"); + + /** + * Creates a new CloudStorageDiscoveryTarget instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudStorageDiscoveryTarget instance + */ + public static create(properties?: google.privacy.dlp.v2.ICloudStorageDiscoveryTarget): google.privacy.dlp.v2.CloudStorageDiscoveryTarget; + + /** + * Encodes the specified CloudStorageDiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageDiscoveryTarget.verify|verify} messages. + * @param message CloudStorageDiscoveryTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ICloudStorageDiscoveryTarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudStorageDiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageDiscoveryTarget.verify|verify} messages. + * @param message CloudStorageDiscoveryTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ICloudStorageDiscoveryTarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudStorageDiscoveryTarget message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudStorageDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CloudStorageDiscoveryTarget; + + /** + * Decodes a CloudStorageDiscoveryTarget message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudStorageDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CloudStorageDiscoveryTarget; + + /** + * Verifies a CloudStorageDiscoveryTarget message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudStorageDiscoveryTarget message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudStorageDiscoveryTarget + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CloudStorageDiscoveryTarget; + + /** + * Creates a plain object from a CloudStorageDiscoveryTarget message. Also converts values to other types if specified. + * @param message CloudStorageDiscoveryTarget + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CloudStorageDiscoveryTarget, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudStorageDiscoveryTarget to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudStorageDiscoveryTarget + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DiscoveryCloudStorageFilter. */ + interface IDiscoveryCloudStorageFilter { + + /** DiscoveryCloudStorageFilter collection */ + collection?: (google.privacy.dlp.v2.IFileStoreCollection|null); + + /** DiscoveryCloudStorageFilter cloudStorageResourceReference */ + cloudStorageResourceReference?: (google.privacy.dlp.v2.ICloudStorageResourceReference|null); + + /** DiscoveryCloudStorageFilter others */ + others?: (google.privacy.dlp.v2.IAllOtherResources|null); + } + + /** Represents a DiscoveryCloudStorageFilter. */ + class DiscoveryCloudStorageFilter implements IDiscoveryCloudStorageFilter { + + /** + * Constructs a new DiscoveryCloudStorageFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoveryCloudStorageFilter); + + /** DiscoveryCloudStorageFilter collection. */ + public collection?: (google.privacy.dlp.v2.IFileStoreCollection|null); + + /** DiscoveryCloudStorageFilter cloudStorageResourceReference. */ + public cloudStorageResourceReference?: (google.privacy.dlp.v2.ICloudStorageResourceReference|null); + + /** DiscoveryCloudStorageFilter others. */ + public others?: (google.privacy.dlp.v2.IAllOtherResources|null); + + /** DiscoveryCloudStorageFilter filter. */ + public filter?: ("collection"|"cloudStorageResourceReference"|"others"); + + /** + * Creates a new DiscoveryCloudStorageFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryCloudStorageFilter instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoveryCloudStorageFilter): google.privacy.dlp.v2.DiscoveryCloudStorageFilter; + + /** + * Encodes the specified DiscoveryCloudStorageFilter message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudStorageFilter.verify|verify} messages. + * @param message DiscoveryCloudStorageFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoveryCloudStorageFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryCloudStorageFilter message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudStorageFilter.verify|verify} messages. + * @param message DiscoveryCloudStorageFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryCloudStorageFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryCloudStorageFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryCloudStorageFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryCloudStorageFilter; + + /** + * Decodes a DiscoveryCloudStorageFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryCloudStorageFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryCloudStorageFilter; + + /** + * Verifies a DiscoveryCloudStorageFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryCloudStorageFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryCloudStorageFilter + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryCloudStorageFilter; + + /** + * Creates a plain object from a DiscoveryCloudStorageFilter message. Also converts values to other types if specified. + * @param message DiscoveryCloudStorageFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryCloudStorageFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryCloudStorageFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryCloudStorageFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileStoreCollection. */ + interface IFileStoreCollection { + + /** FileStoreCollection includeRegexes */ + includeRegexes?: (google.privacy.dlp.v2.IFileStoreRegexes|null); + + /** FileStoreCollection includeTags */ + includeTags?: (google.privacy.dlp.v2.ITagFilters|null); + } + + /** Represents a FileStoreCollection. */ + class FileStoreCollection implements IFileStoreCollection { + + /** + * Constructs a new FileStoreCollection. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IFileStoreCollection); + + /** FileStoreCollection includeRegexes. */ + public includeRegexes?: (google.privacy.dlp.v2.IFileStoreRegexes|null); + + /** FileStoreCollection includeTags. */ + public includeTags?: (google.privacy.dlp.v2.ITagFilters|null); + + /** FileStoreCollection pattern. */ + public pattern?: "includeRegexes"; + + /** + * Creates a new FileStoreCollection instance using the specified properties. + * @param [properties] Properties to set + * @returns FileStoreCollection instance + */ + public static create(properties?: google.privacy.dlp.v2.IFileStoreCollection): google.privacy.dlp.v2.FileStoreCollection; + + /** + * Encodes the specified FileStoreCollection message. Does not implicitly {@link google.privacy.dlp.v2.FileStoreCollection.verify|verify} messages. + * @param message FileStoreCollection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IFileStoreCollection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileStoreCollection message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FileStoreCollection.verify|verify} messages. + * @param message FileStoreCollection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IFileStoreCollection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileStoreCollection message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileStoreCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.FileStoreCollection; + + /** + * Decodes a FileStoreCollection message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileStoreCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.FileStoreCollection; + + /** + * Verifies a FileStoreCollection message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileStoreCollection message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileStoreCollection + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.FileStoreCollection; + + /** + * Creates a plain object from a FileStoreCollection message. Also converts values to other types if specified. + * @param message FileStoreCollection + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.FileStoreCollection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileStoreCollection to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileStoreCollection + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileStoreRegexes. */ + interface IFileStoreRegexes { + + /** FileStoreRegexes patterns */ + patterns?: (google.privacy.dlp.v2.IFileStoreRegex[]|null); + } + + /** Represents a FileStoreRegexes. */ + class FileStoreRegexes implements IFileStoreRegexes { + + /** + * Constructs a new FileStoreRegexes. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IFileStoreRegexes); + + /** FileStoreRegexes patterns. */ + public patterns: google.privacy.dlp.v2.IFileStoreRegex[]; + + /** + * Creates a new FileStoreRegexes instance using the specified properties. + * @param [properties] Properties to set + * @returns FileStoreRegexes instance + */ + public static create(properties?: google.privacy.dlp.v2.IFileStoreRegexes): google.privacy.dlp.v2.FileStoreRegexes; + + /** + * Encodes the specified FileStoreRegexes message. Does not implicitly {@link google.privacy.dlp.v2.FileStoreRegexes.verify|verify} messages. + * @param message FileStoreRegexes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IFileStoreRegexes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileStoreRegexes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FileStoreRegexes.verify|verify} messages. + * @param message FileStoreRegexes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IFileStoreRegexes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileStoreRegexes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileStoreRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.FileStoreRegexes; + + /** + * Decodes a FileStoreRegexes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileStoreRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.FileStoreRegexes; + + /** + * Verifies a FileStoreRegexes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileStoreRegexes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileStoreRegexes + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.FileStoreRegexes; + + /** + * Creates a plain object from a FileStoreRegexes message. Also converts values to other types if specified. + * @param message FileStoreRegexes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.FileStoreRegexes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileStoreRegexes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileStoreRegexes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileStoreRegex. */ + interface IFileStoreRegex { + + /** FileStoreRegex cloudStorageRegex */ + cloudStorageRegex?: (google.privacy.dlp.v2.ICloudStorageRegex|null); + } + + /** Represents a FileStoreRegex. */ + class FileStoreRegex implements IFileStoreRegex { + + /** + * Constructs a new FileStoreRegex. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IFileStoreRegex); + + /** FileStoreRegex cloudStorageRegex. */ + public cloudStorageRegex?: (google.privacy.dlp.v2.ICloudStorageRegex|null); + + /** FileStoreRegex resourceRegex. */ + public resourceRegex?: "cloudStorageRegex"; + + /** + * Creates a new FileStoreRegex instance using the specified properties. + * @param [properties] Properties to set + * @returns FileStoreRegex instance + */ + public static create(properties?: google.privacy.dlp.v2.IFileStoreRegex): google.privacy.dlp.v2.FileStoreRegex; + + /** + * Encodes the specified FileStoreRegex message. Does not implicitly {@link google.privacy.dlp.v2.FileStoreRegex.verify|verify} messages. + * @param message FileStoreRegex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IFileStoreRegex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileStoreRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FileStoreRegex.verify|verify} messages. + * @param message FileStoreRegex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IFileStoreRegex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileStoreRegex message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileStoreRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.FileStoreRegex; + + /** + * Decodes a FileStoreRegex message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileStoreRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.FileStoreRegex; + + /** + * Verifies a FileStoreRegex message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileStoreRegex message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileStoreRegex + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.FileStoreRegex; + + /** + * Creates a plain object from a FileStoreRegex message. Also converts values to other types if specified. + * @param message FileStoreRegex + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.FileStoreRegex, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileStoreRegex to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileStoreRegex + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudStorageRegex. */ + interface ICloudStorageRegex { + + /** CloudStorageRegex projectIdRegex */ + projectIdRegex?: (string|null); + + /** CloudStorageRegex bucketNameRegex */ + bucketNameRegex?: (string|null); + } + + /** Represents a CloudStorageRegex. */ + class CloudStorageRegex implements ICloudStorageRegex { + + /** + * Constructs a new CloudStorageRegex. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ICloudStorageRegex); + + /** CloudStorageRegex projectIdRegex. */ + public projectIdRegex: string; + + /** CloudStorageRegex bucketNameRegex. */ + public bucketNameRegex: string; + + /** + * Creates a new CloudStorageRegex instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudStorageRegex instance + */ + public static create(properties?: google.privacy.dlp.v2.ICloudStorageRegex): google.privacy.dlp.v2.CloudStorageRegex; + + /** + * Encodes the specified CloudStorageRegex message. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageRegex.verify|verify} messages. + * @param message CloudStorageRegex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ICloudStorageRegex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudStorageRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageRegex.verify|verify} messages. + * @param message CloudStorageRegex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ICloudStorageRegex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudStorageRegex message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudStorageRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CloudStorageRegex; + + /** + * Decodes a CloudStorageRegex message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudStorageRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CloudStorageRegex; + + /** + * Verifies a CloudStorageRegex message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudStorageRegex message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudStorageRegex + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CloudStorageRegex; + + /** + * Creates a plain object from a CloudStorageRegex message. Also converts values to other types if specified. + * @param message CloudStorageRegex + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CloudStorageRegex, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudStorageRegex to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudStorageRegex + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudStorageResourceReference. */ + interface ICloudStorageResourceReference { + + /** CloudStorageResourceReference bucketName */ + bucketName?: (string|null); + + /** CloudStorageResourceReference projectId */ + projectId?: (string|null); + } + + /** Represents a CloudStorageResourceReference. */ + class CloudStorageResourceReference implements ICloudStorageResourceReference { + + /** + * Constructs a new CloudStorageResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ICloudStorageResourceReference); + + /** CloudStorageResourceReference bucketName. */ + public bucketName: string; + + /** CloudStorageResourceReference projectId. */ + public projectId: string; + + /** + * Creates a new CloudStorageResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudStorageResourceReference instance + */ + public static create(properties?: google.privacy.dlp.v2.ICloudStorageResourceReference): google.privacy.dlp.v2.CloudStorageResourceReference; + + /** + * Encodes the specified CloudStorageResourceReference message. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageResourceReference.verify|verify} messages. + * @param message CloudStorageResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ICloudStorageResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudStorageResourceReference message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageResourceReference.verify|verify} messages. + * @param message CloudStorageResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ICloudStorageResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudStorageResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudStorageResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CloudStorageResourceReference; + + /** + * Decodes a CloudStorageResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudStorageResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CloudStorageResourceReference; + + /** + * Verifies a CloudStorageResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudStorageResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudStorageResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CloudStorageResourceReference; + + /** + * Creates a plain object from a CloudStorageResourceReference message. Also converts values to other types if specified. + * @param message CloudStorageResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CloudStorageResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudStorageResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudStorageResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DiscoveryCloudStorageGenerationCadence. */ + interface IDiscoveryCloudStorageGenerationCadence { + + /** DiscoveryCloudStorageGenerationCadence refreshFrequency */ + refreshFrequency?: (google.privacy.dlp.v2.DataProfileUpdateFrequency|keyof typeof google.privacy.dlp.v2.DataProfileUpdateFrequency|null); + + /** DiscoveryCloudStorageGenerationCadence inspectTemplateModifiedCadence */ + inspectTemplateModifiedCadence?: (google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null); + } + + /** Represents a DiscoveryCloudStorageGenerationCadence. */ + class DiscoveryCloudStorageGenerationCadence implements IDiscoveryCloudStorageGenerationCadence { + + /** + * Constructs a new DiscoveryCloudStorageGenerationCadence. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoveryCloudStorageGenerationCadence); + + /** DiscoveryCloudStorageGenerationCadence refreshFrequency. */ + public refreshFrequency: (google.privacy.dlp.v2.DataProfileUpdateFrequency|keyof typeof google.privacy.dlp.v2.DataProfileUpdateFrequency); + + /** DiscoveryCloudStorageGenerationCadence inspectTemplateModifiedCadence. */ + public inspectTemplateModifiedCadence?: (google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null); + + /** + * Creates a new DiscoveryCloudStorageGenerationCadence instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryCloudStorageGenerationCadence instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoveryCloudStorageGenerationCadence): google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence; + + /** + * Encodes the specified DiscoveryCloudStorageGenerationCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.verify|verify} messages. + * @param message DiscoveryCloudStorageGenerationCadence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoveryCloudStorageGenerationCadence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryCloudStorageGenerationCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.verify|verify} messages. + * @param message DiscoveryCloudStorageGenerationCadence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryCloudStorageGenerationCadence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryCloudStorageGenerationCadence message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryCloudStorageGenerationCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence; + + /** + * Decodes a DiscoveryCloudStorageGenerationCadence message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryCloudStorageGenerationCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence; + + /** + * Verifies a DiscoveryCloudStorageGenerationCadence message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryCloudStorageGenerationCadence message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryCloudStorageGenerationCadence + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence; + + /** + * Creates a plain object from a DiscoveryCloudStorageGenerationCadence message. Also converts values to other types if specified. + * @param message DiscoveryCloudStorageGenerationCadence + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryCloudStorageGenerationCadence to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryCloudStorageGenerationCadence + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DiscoveryCloudStorageConditions. */ + interface IDiscoveryCloudStorageConditions { + + /** DiscoveryCloudStorageConditions includedObjectAttributes */ + includedObjectAttributes?: (google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageObjectAttribute[]|null); + + /** DiscoveryCloudStorageConditions includedBucketAttributes */ + includedBucketAttributes?: (google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageBucketAttribute[]|null); + } + + /** Represents a DiscoveryCloudStorageConditions. */ + class DiscoveryCloudStorageConditions implements IDiscoveryCloudStorageConditions { + + /** + * Constructs a new DiscoveryCloudStorageConditions. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoveryCloudStorageConditions); + + /** DiscoveryCloudStorageConditions includedObjectAttributes. */ + public includedObjectAttributes: google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageObjectAttribute[]; + + /** DiscoveryCloudStorageConditions includedBucketAttributes. */ + public includedBucketAttributes: google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageBucketAttribute[]; + + /** + * Creates a new DiscoveryCloudStorageConditions instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryCloudStorageConditions instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoveryCloudStorageConditions): google.privacy.dlp.v2.DiscoveryCloudStorageConditions; + + /** + * Encodes the specified DiscoveryCloudStorageConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudStorageConditions.verify|verify} messages. + * @param message DiscoveryCloudStorageConditions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoveryCloudStorageConditions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryCloudStorageConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudStorageConditions.verify|verify} messages. + * @param message DiscoveryCloudStorageConditions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryCloudStorageConditions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryCloudStorageConditions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryCloudStorageConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryCloudStorageConditions; + + /** + * Decodes a DiscoveryCloudStorageConditions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryCloudStorageConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryCloudStorageConditions; + + /** + * Verifies a DiscoveryCloudStorageConditions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryCloudStorageConditions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryCloudStorageConditions + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryCloudStorageConditions; + + /** + * Creates a plain object from a DiscoveryCloudStorageConditions message. Also converts values to other types if specified. + * @param message DiscoveryCloudStorageConditions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryCloudStorageConditions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryCloudStorageConditions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryCloudStorageConditions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DiscoveryCloudStorageConditions { + + /** CloudStorageObjectAttribute enum. */ + enum CloudStorageObjectAttribute { + CLOUD_STORAGE_OBJECT_ATTRIBUTE_UNSPECIFIED = 0, + ALL_SUPPORTED_OBJECTS = 1, + STANDARD = 2, + NEARLINE = 3, + COLDLINE = 4, + ARCHIVE = 5, + REGIONAL = 6, + MULTI_REGIONAL = 7, + DURABLE_REDUCED_AVAILABILITY = 8 + } + + /** CloudStorageBucketAttribute enum. */ + enum CloudStorageBucketAttribute { + CLOUD_STORAGE_BUCKET_ATTRIBUTE_UNSPECIFIED = 0, + ALL_SUPPORTED_BUCKETS = 1, + AUTOCLASS_DISABLED = 2, + AUTOCLASS_ENABLED = 3 + } + } + + /** Properties of a DiscoveryFileStoreConditions. */ + interface IDiscoveryFileStoreConditions { + + /** DiscoveryFileStoreConditions createdAfter */ + createdAfter?: (google.protobuf.ITimestamp|null); + + /** DiscoveryFileStoreConditions minAge */ + minAge?: (google.protobuf.IDuration|null); + + /** DiscoveryFileStoreConditions cloudStorageConditions */ + cloudStorageConditions?: (google.privacy.dlp.v2.IDiscoveryCloudStorageConditions|null); + } + + /** Represents a DiscoveryFileStoreConditions. */ + class DiscoveryFileStoreConditions implements IDiscoveryFileStoreConditions { + + /** + * Constructs a new DiscoveryFileStoreConditions. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoveryFileStoreConditions); + + /** DiscoveryFileStoreConditions createdAfter. */ + public createdAfter?: (google.protobuf.ITimestamp|null); + + /** DiscoveryFileStoreConditions minAge. */ + public minAge?: (google.protobuf.IDuration|null); + + /** DiscoveryFileStoreConditions cloudStorageConditions. */ + public cloudStorageConditions?: (google.privacy.dlp.v2.IDiscoveryCloudStorageConditions|null); + + /** DiscoveryFileStoreConditions conditions. */ + public conditions?: "cloudStorageConditions"; + + /** + * Creates a new DiscoveryFileStoreConditions instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryFileStoreConditions instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoveryFileStoreConditions): google.privacy.dlp.v2.DiscoveryFileStoreConditions; + + /** + * Encodes the specified DiscoveryFileStoreConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryFileStoreConditions.verify|verify} messages. + * @param message DiscoveryFileStoreConditions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoveryFileStoreConditions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryFileStoreConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryFileStoreConditions.verify|verify} messages. + * @param message DiscoveryFileStoreConditions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryFileStoreConditions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryFileStoreConditions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryFileStoreConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryFileStoreConditions; + + /** + * Decodes a DiscoveryFileStoreConditions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryFileStoreConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryFileStoreConditions; + + /** + * Verifies a DiscoveryFileStoreConditions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryFileStoreConditions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryFileStoreConditions + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryFileStoreConditions; + + /** + * Creates a plain object from a DiscoveryFileStoreConditions message. Also converts values to other types if specified. + * @param message DiscoveryFileStoreConditions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryFileStoreConditions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryFileStoreConditions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryFileStoreConditions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OtherCloudDiscoveryTarget. */ + interface IOtherCloudDiscoveryTarget { + + /** OtherCloudDiscoveryTarget dataSourceType */ + dataSourceType?: (google.privacy.dlp.v2.IDataSourceType|null); + + /** OtherCloudDiscoveryTarget filter */ + filter?: (google.privacy.dlp.v2.IDiscoveryOtherCloudFilter|null); + + /** OtherCloudDiscoveryTarget conditions */ + conditions?: (google.privacy.dlp.v2.IDiscoveryOtherCloudConditions|null); + + /** OtherCloudDiscoveryTarget generationCadence */ + generationCadence?: (google.privacy.dlp.v2.IDiscoveryOtherCloudGenerationCadence|null); + + /** OtherCloudDiscoveryTarget disabled */ + disabled?: (google.privacy.dlp.v2.IDisabled|null); + } + + /** Represents an OtherCloudDiscoveryTarget. */ + class OtherCloudDiscoveryTarget implements IOtherCloudDiscoveryTarget { + + /** + * Constructs a new OtherCloudDiscoveryTarget. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IOtherCloudDiscoveryTarget); + + /** OtherCloudDiscoveryTarget dataSourceType. */ + public dataSourceType?: (google.privacy.dlp.v2.IDataSourceType|null); + + /** OtherCloudDiscoveryTarget filter. */ + public filter?: (google.privacy.dlp.v2.IDiscoveryOtherCloudFilter|null); + + /** OtherCloudDiscoveryTarget conditions. */ + public conditions?: (google.privacy.dlp.v2.IDiscoveryOtherCloudConditions|null); + + /** OtherCloudDiscoveryTarget generationCadence. */ + public generationCadence?: (google.privacy.dlp.v2.IDiscoveryOtherCloudGenerationCadence|null); + + /** OtherCloudDiscoveryTarget disabled. */ + public disabled?: (google.privacy.dlp.v2.IDisabled|null); + + /** OtherCloudDiscoveryTarget cadence. */ + public cadence?: ("generationCadence"|"disabled"); + + /** + * Creates a new OtherCloudDiscoveryTarget instance using the specified properties. + * @param [properties] Properties to set + * @returns OtherCloudDiscoveryTarget instance + */ + public static create(properties?: google.privacy.dlp.v2.IOtherCloudDiscoveryTarget): google.privacy.dlp.v2.OtherCloudDiscoveryTarget; + + /** + * Encodes the specified OtherCloudDiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudDiscoveryTarget.verify|verify} messages. + * @param message OtherCloudDiscoveryTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IOtherCloudDiscoveryTarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OtherCloudDiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudDiscoveryTarget.verify|verify} messages. + * @param message OtherCloudDiscoveryTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IOtherCloudDiscoveryTarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OtherCloudDiscoveryTarget message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OtherCloudDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.OtherCloudDiscoveryTarget; + + /** + * Decodes an OtherCloudDiscoveryTarget message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OtherCloudDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.OtherCloudDiscoveryTarget; + + /** + * Verifies an OtherCloudDiscoveryTarget message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OtherCloudDiscoveryTarget message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OtherCloudDiscoveryTarget + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.OtherCloudDiscoveryTarget; + + /** + * Creates a plain object from an OtherCloudDiscoveryTarget message. Also converts values to other types if specified. + * @param message OtherCloudDiscoveryTarget + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.OtherCloudDiscoveryTarget, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OtherCloudDiscoveryTarget to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OtherCloudDiscoveryTarget + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DiscoveryOtherCloudFilter. */ + interface IDiscoveryOtherCloudFilter { + + /** DiscoveryOtherCloudFilter collection */ + collection?: (google.privacy.dlp.v2.IOtherCloudResourceCollection|null); + + /** DiscoveryOtherCloudFilter singleResource */ + singleResource?: (google.privacy.dlp.v2.IOtherCloudSingleResourceReference|null); + + /** DiscoveryOtherCloudFilter others */ + others?: (google.privacy.dlp.v2.IAllOtherResources|null); + } + + /** Represents a DiscoveryOtherCloudFilter. */ + class DiscoveryOtherCloudFilter implements IDiscoveryOtherCloudFilter { + + /** + * Constructs a new DiscoveryOtherCloudFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoveryOtherCloudFilter); + + /** DiscoveryOtherCloudFilter collection. */ + public collection?: (google.privacy.dlp.v2.IOtherCloudResourceCollection|null); + + /** DiscoveryOtherCloudFilter singleResource. */ + public singleResource?: (google.privacy.dlp.v2.IOtherCloudSingleResourceReference|null); + + /** DiscoveryOtherCloudFilter others. */ + public others?: (google.privacy.dlp.v2.IAllOtherResources|null); + + /** DiscoveryOtherCloudFilter filter. */ + public filter?: ("collection"|"singleResource"|"others"); + + /** + * Creates a new DiscoveryOtherCloudFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryOtherCloudFilter instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoveryOtherCloudFilter): google.privacy.dlp.v2.DiscoveryOtherCloudFilter; + + /** + * Encodes the specified DiscoveryOtherCloudFilter message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryOtherCloudFilter.verify|verify} messages. + * @param message DiscoveryOtherCloudFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoveryOtherCloudFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryOtherCloudFilter message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryOtherCloudFilter.verify|verify} messages. + * @param message DiscoveryOtherCloudFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryOtherCloudFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryOtherCloudFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryOtherCloudFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryOtherCloudFilter; + + /** + * Decodes a DiscoveryOtherCloudFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryOtherCloudFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryOtherCloudFilter; + + /** + * Verifies a DiscoveryOtherCloudFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryOtherCloudFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryOtherCloudFilter + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryOtherCloudFilter; + + /** + * Creates a plain object from a DiscoveryOtherCloudFilter message. Also converts values to other types if specified. + * @param message DiscoveryOtherCloudFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryOtherCloudFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryOtherCloudFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryOtherCloudFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OtherCloudResourceCollection. */ + interface IOtherCloudResourceCollection { + + /** OtherCloudResourceCollection includeRegexes */ + includeRegexes?: (google.privacy.dlp.v2.IOtherCloudResourceRegexes|null); + } + + /** Represents an OtherCloudResourceCollection. */ + class OtherCloudResourceCollection implements IOtherCloudResourceCollection { + + /** + * Constructs a new OtherCloudResourceCollection. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IOtherCloudResourceCollection); + + /** OtherCloudResourceCollection includeRegexes. */ + public includeRegexes?: (google.privacy.dlp.v2.IOtherCloudResourceRegexes|null); + + /** OtherCloudResourceCollection pattern. */ + public pattern?: "includeRegexes"; + + /** + * Creates a new OtherCloudResourceCollection instance using the specified properties. + * @param [properties] Properties to set + * @returns OtherCloudResourceCollection instance + */ + public static create(properties?: google.privacy.dlp.v2.IOtherCloudResourceCollection): google.privacy.dlp.v2.OtherCloudResourceCollection; + + /** + * Encodes the specified OtherCloudResourceCollection message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudResourceCollection.verify|verify} messages. + * @param message OtherCloudResourceCollection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IOtherCloudResourceCollection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OtherCloudResourceCollection message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudResourceCollection.verify|verify} messages. + * @param message OtherCloudResourceCollection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IOtherCloudResourceCollection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OtherCloudResourceCollection message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OtherCloudResourceCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.OtherCloudResourceCollection; + + /** + * Decodes an OtherCloudResourceCollection message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OtherCloudResourceCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.OtherCloudResourceCollection; + + /** + * Verifies an OtherCloudResourceCollection message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OtherCloudResourceCollection message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OtherCloudResourceCollection + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.OtherCloudResourceCollection; + + /** + * Creates a plain object from an OtherCloudResourceCollection message. Also converts values to other types if specified. + * @param message OtherCloudResourceCollection + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.OtherCloudResourceCollection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OtherCloudResourceCollection to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OtherCloudResourceCollection + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OtherCloudResourceRegexes. */ + interface IOtherCloudResourceRegexes { + + /** OtherCloudResourceRegexes patterns */ + patterns?: (google.privacy.dlp.v2.IOtherCloudResourceRegex[]|null); + } + + /** Represents an OtherCloudResourceRegexes. */ + class OtherCloudResourceRegexes implements IOtherCloudResourceRegexes { + + /** + * Constructs a new OtherCloudResourceRegexes. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IOtherCloudResourceRegexes); + + /** OtherCloudResourceRegexes patterns. */ + public patterns: google.privacy.dlp.v2.IOtherCloudResourceRegex[]; + + /** + * Creates a new OtherCloudResourceRegexes instance using the specified properties. + * @param [properties] Properties to set + * @returns OtherCloudResourceRegexes instance + */ + public static create(properties?: google.privacy.dlp.v2.IOtherCloudResourceRegexes): google.privacy.dlp.v2.OtherCloudResourceRegexes; + + /** + * Encodes the specified OtherCloudResourceRegexes message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudResourceRegexes.verify|verify} messages. + * @param message OtherCloudResourceRegexes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IOtherCloudResourceRegexes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OtherCloudResourceRegexes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudResourceRegexes.verify|verify} messages. + * @param message OtherCloudResourceRegexes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IOtherCloudResourceRegexes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OtherCloudResourceRegexes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OtherCloudResourceRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.OtherCloudResourceRegexes; + + /** + * Decodes an OtherCloudResourceRegexes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OtherCloudResourceRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.OtherCloudResourceRegexes; + + /** + * Verifies an OtherCloudResourceRegexes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OtherCloudResourceRegexes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OtherCloudResourceRegexes + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.OtherCloudResourceRegexes; + + /** + * Creates a plain object from an OtherCloudResourceRegexes message. Also converts values to other types if specified. + * @param message OtherCloudResourceRegexes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.OtherCloudResourceRegexes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OtherCloudResourceRegexes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OtherCloudResourceRegexes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OtherCloudResourceRegex. */ + interface IOtherCloudResourceRegex { + + /** OtherCloudResourceRegex amazonS3BucketRegex */ + amazonS3BucketRegex?: (google.privacy.dlp.v2.IAmazonS3BucketRegex|null); + } + + /** Represents an OtherCloudResourceRegex. */ + class OtherCloudResourceRegex implements IOtherCloudResourceRegex { + + /** + * Constructs a new OtherCloudResourceRegex. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IOtherCloudResourceRegex); + + /** OtherCloudResourceRegex amazonS3BucketRegex. */ + public amazonS3BucketRegex?: (google.privacy.dlp.v2.IAmazonS3BucketRegex|null); + + /** OtherCloudResourceRegex resourceRegex. */ + public resourceRegex?: "amazonS3BucketRegex"; + + /** + * Creates a new OtherCloudResourceRegex instance using the specified properties. + * @param [properties] Properties to set + * @returns OtherCloudResourceRegex instance + */ + public static create(properties?: google.privacy.dlp.v2.IOtherCloudResourceRegex): google.privacy.dlp.v2.OtherCloudResourceRegex; + + /** + * Encodes the specified OtherCloudResourceRegex message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudResourceRegex.verify|verify} messages. + * @param message OtherCloudResourceRegex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IOtherCloudResourceRegex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OtherCloudResourceRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudResourceRegex.verify|verify} messages. + * @param message OtherCloudResourceRegex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IOtherCloudResourceRegex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OtherCloudResourceRegex message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OtherCloudResourceRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.OtherCloudResourceRegex; + + /** + * Decodes an OtherCloudResourceRegex message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OtherCloudResourceRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.OtherCloudResourceRegex; + + /** + * Verifies an OtherCloudResourceRegex message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OtherCloudResourceRegex message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OtherCloudResourceRegex + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.OtherCloudResourceRegex; + + /** + * Creates a plain object from an OtherCloudResourceRegex message. Also converts values to other types if specified. + * @param message OtherCloudResourceRegex + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.OtherCloudResourceRegex, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OtherCloudResourceRegex to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OtherCloudResourceRegex + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AwsAccountRegex. */ + interface IAwsAccountRegex { + + /** AwsAccountRegex accountIdRegex */ + accountIdRegex?: (string|null); + } + + /** Represents an AwsAccountRegex. */ + class AwsAccountRegex implements IAwsAccountRegex { + + /** + * Constructs a new AwsAccountRegex. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IAwsAccountRegex); + + /** AwsAccountRegex accountIdRegex. */ + public accountIdRegex: string; + + /** + * Creates a new AwsAccountRegex instance using the specified properties. + * @param [properties] Properties to set + * @returns AwsAccountRegex instance + */ + public static create(properties?: google.privacy.dlp.v2.IAwsAccountRegex): google.privacy.dlp.v2.AwsAccountRegex; + + /** + * Encodes the specified AwsAccountRegex message. Does not implicitly {@link google.privacy.dlp.v2.AwsAccountRegex.verify|verify} messages. + * @param message AwsAccountRegex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IAwsAccountRegex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AwsAccountRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AwsAccountRegex.verify|verify} messages. + * @param message AwsAccountRegex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IAwsAccountRegex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AwsAccountRegex message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AwsAccountRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AwsAccountRegex; + + /** + * Decodes an AwsAccountRegex message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AwsAccountRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AwsAccountRegex; + + /** + * Verifies an AwsAccountRegex message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AwsAccountRegex message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AwsAccountRegex + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AwsAccountRegex; + + /** + * Creates a plain object from an AwsAccountRegex message. Also converts values to other types if specified. + * @param message AwsAccountRegex + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AwsAccountRegex, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AwsAccountRegex to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AwsAccountRegex + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AmazonS3BucketRegex. */ + interface IAmazonS3BucketRegex { + + /** AmazonS3BucketRegex awsAccountRegex */ + awsAccountRegex?: (google.privacy.dlp.v2.IAwsAccountRegex|null); + + /** AmazonS3BucketRegex bucketNameRegex */ + bucketNameRegex?: (string|null); + } + + /** Represents an AmazonS3BucketRegex. */ + class AmazonS3BucketRegex implements IAmazonS3BucketRegex { + + /** + * Constructs a new AmazonS3BucketRegex. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IAmazonS3BucketRegex); + + /** AmazonS3BucketRegex awsAccountRegex. */ + public awsAccountRegex?: (google.privacy.dlp.v2.IAwsAccountRegex|null); + + /** AmazonS3BucketRegex bucketNameRegex. */ + public bucketNameRegex: string; + + /** + * Creates a new AmazonS3BucketRegex instance using the specified properties. + * @param [properties] Properties to set + * @returns AmazonS3BucketRegex instance + */ + public static create(properties?: google.privacy.dlp.v2.IAmazonS3BucketRegex): google.privacy.dlp.v2.AmazonS3BucketRegex; + + /** + * Encodes the specified AmazonS3BucketRegex message. Does not implicitly {@link google.privacy.dlp.v2.AmazonS3BucketRegex.verify|verify} messages. + * @param message AmazonS3BucketRegex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IAmazonS3BucketRegex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AmazonS3BucketRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AmazonS3BucketRegex.verify|verify} messages. + * @param message AmazonS3BucketRegex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IAmazonS3BucketRegex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AmazonS3BucketRegex message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AmazonS3BucketRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AmazonS3BucketRegex; + + /** + * Decodes an AmazonS3BucketRegex message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AmazonS3BucketRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AmazonS3BucketRegex; + + /** + * Verifies an AmazonS3BucketRegex message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AmazonS3BucketRegex message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AmazonS3BucketRegex + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AmazonS3BucketRegex; + + /** + * Creates a plain object from an AmazonS3BucketRegex message. Also converts values to other types if specified. + * @param message AmazonS3BucketRegex + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AmazonS3BucketRegex, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AmazonS3BucketRegex to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AmazonS3BucketRegex + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OtherCloudSingleResourceReference. */ + interface IOtherCloudSingleResourceReference { + + /** OtherCloudSingleResourceReference amazonS3Bucket */ + amazonS3Bucket?: (google.privacy.dlp.v2.IAmazonS3Bucket|null); + } + + /** Represents an OtherCloudSingleResourceReference. */ + class OtherCloudSingleResourceReference implements IOtherCloudSingleResourceReference { + + /** + * Constructs a new OtherCloudSingleResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IOtherCloudSingleResourceReference); + + /** OtherCloudSingleResourceReference amazonS3Bucket. */ + public amazonS3Bucket?: (google.privacy.dlp.v2.IAmazonS3Bucket|null); + + /** OtherCloudSingleResourceReference resource. */ + public resource?: "amazonS3Bucket"; + + /** + * Creates a new OtherCloudSingleResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns OtherCloudSingleResourceReference instance + */ + public static create(properties?: google.privacy.dlp.v2.IOtherCloudSingleResourceReference): google.privacy.dlp.v2.OtherCloudSingleResourceReference; + + /** + * Encodes the specified OtherCloudSingleResourceReference message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudSingleResourceReference.verify|verify} messages. + * @param message OtherCloudSingleResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IOtherCloudSingleResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OtherCloudSingleResourceReference message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudSingleResourceReference.verify|verify} messages. + * @param message OtherCloudSingleResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IOtherCloudSingleResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OtherCloudSingleResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OtherCloudSingleResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.OtherCloudSingleResourceReference; + + /** + * Decodes an OtherCloudSingleResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OtherCloudSingleResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.OtherCloudSingleResourceReference; + + /** + * Verifies an OtherCloudSingleResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OtherCloudSingleResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OtherCloudSingleResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.OtherCloudSingleResourceReference; + + /** + * Creates a plain object from an OtherCloudSingleResourceReference message. Also converts values to other types if specified. + * @param message OtherCloudSingleResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.OtherCloudSingleResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OtherCloudSingleResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OtherCloudSingleResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AwsAccount. */ + interface IAwsAccount { + + /** AwsAccount accountId */ + accountId?: (string|null); + } + + /** Represents an AwsAccount. */ + class AwsAccount implements IAwsAccount { + + /** + * Constructs a new AwsAccount. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IAwsAccount); + + /** AwsAccount accountId. */ + public accountId: string; + + /** + * Creates a new AwsAccount instance using the specified properties. + * @param [properties] Properties to set + * @returns AwsAccount instance + */ + public static create(properties?: google.privacy.dlp.v2.IAwsAccount): google.privacy.dlp.v2.AwsAccount; + + /** + * Encodes the specified AwsAccount message. Does not implicitly {@link google.privacy.dlp.v2.AwsAccount.verify|verify} messages. + * @param message AwsAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IAwsAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AwsAccount message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AwsAccount.verify|verify} messages. + * @param message AwsAccount message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IAwsAccount, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AwsAccount message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AwsAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AwsAccount; + + /** + * Decodes an AwsAccount message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AwsAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AwsAccount; + + /** + * Verifies an AwsAccount message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AwsAccount message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AwsAccount + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AwsAccount; + + /** + * Creates a plain object from an AwsAccount message. Also converts values to other types if specified. + * @param message AwsAccount + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AwsAccount, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AwsAccount to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AwsAccount + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AmazonS3Bucket. */ + interface IAmazonS3Bucket { + + /** AmazonS3Bucket awsAccount */ + awsAccount?: (google.privacy.dlp.v2.IAwsAccount|null); + + /** AmazonS3Bucket bucketName */ + bucketName?: (string|null); + } + + /** Represents an AmazonS3Bucket. */ + class AmazonS3Bucket implements IAmazonS3Bucket { + + /** + * Constructs a new AmazonS3Bucket. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IAmazonS3Bucket); + + /** AmazonS3Bucket awsAccount. */ + public awsAccount?: (google.privacy.dlp.v2.IAwsAccount|null); + + /** AmazonS3Bucket bucketName. */ + public bucketName: string; + + /** + * Creates a new AmazonS3Bucket instance using the specified properties. + * @param [properties] Properties to set + * @returns AmazonS3Bucket instance + */ + public static create(properties?: google.privacy.dlp.v2.IAmazonS3Bucket): google.privacy.dlp.v2.AmazonS3Bucket; + + /** + * Encodes the specified AmazonS3Bucket message. Does not implicitly {@link google.privacy.dlp.v2.AmazonS3Bucket.verify|verify} messages. + * @param message AmazonS3Bucket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IAmazonS3Bucket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AmazonS3Bucket message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AmazonS3Bucket.verify|verify} messages. + * @param message AmazonS3Bucket message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IAmazonS3Bucket, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AmazonS3Bucket message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AmazonS3Bucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AmazonS3Bucket; + + /** + * Decodes an AmazonS3Bucket message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AmazonS3Bucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AmazonS3Bucket; + + /** + * Verifies an AmazonS3Bucket message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AmazonS3Bucket message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AmazonS3Bucket + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AmazonS3Bucket; + + /** + * Creates a plain object from an AmazonS3Bucket message. Also converts values to other types if specified. + * @param message AmazonS3Bucket + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AmazonS3Bucket, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AmazonS3Bucket to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AmazonS3Bucket + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DiscoveryOtherCloudConditions. */ + interface IDiscoveryOtherCloudConditions { + + /** DiscoveryOtherCloudConditions minAge */ + minAge?: (google.protobuf.IDuration|null); + + /** DiscoveryOtherCloudConditions amazonS3BucketConditions */ + amazonS3BucketConditions?: (google.privacy.dlp.v2.IAmazonS3BucketConditions|null); + } + + /** Represents a DiscoveryOtherCloudConditions. */ + class DiscoveryOtherCloudConditions implements IDiscoveryOtherCloudConditions { + + /** + * Constructs a new DiscoveryOtherCloudConditions. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoveryOtherCloudConditions); + + /** DiscoveryOtherCloudConditions minAge. */ + public minAge?: (google.protobuf.IDuration|null); + + /** DiscoveryOtherCloudConditions amazonS3BucketConditions. */ + public amazonS3BucketConditions?: (google.privacy.dlp.v2.IAmazonS3BucketConditions|null); + + /** DiscoveryOtherCloudConditions conditions. */ + public conditions?: "amazonS3BucketConditions"; + + /** + * Creates a new DiscoveryOtherCloudConditions instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryOtherCloudConditions instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoveryOtherCloudConditions): google.privacy.dlp.v2.DiscoveryOtherCloudConditions; + + /** + * Encodes the specified DiscoveryOtherCloudConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryOtherCloudConditions.verify|verify} messages. + * @param message DiscoveryOtherCloudConditions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoveryOtherCloudConditions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryOtherCloudConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryOtherCloudConditions.verify|verify} messages. + * @param message DiscoveryOtherCloudConditions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryOtherCloudConditions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryOtherCloudConditions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryOtherCloudConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryOtherCloudConditions; + + /** + * Decodes a DiscoveryOtherCloudConditions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryOtherCloudConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryOtherCloudConditions; + + /** + * Verifies a DiscoveryOtherCloudConditions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryOtherCloudConditions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryOtherCloudConditions + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryOtherCloudConditions; + + /** + * Creates a plain object from a DiscoveryOtherCloudConditions message. Also converts values to other types if specified. + * @param message DiscoveryOtherCloudConditions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryOtherCloudConditions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryOtherCloudConditions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryOtherCloudConditions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AmazonS3BucketConditions. */ + interface IAmazonS3BucketConditions { + + /** AmazonS3BucketConditions bucketTypes */ + bucketTypes?: (google.privacy.dlp.v2.AmazonS3BucketConditions.BucketType[]|null); + + /** AmazonS3BucketConditions objectStorageClasses */ + objectStorageClasses?: (google.privacy.dlp.v2.AmazonS3BucketConditions.ObjectStorageClass[]|null); + } + + /** Represents an AmazonS3BucketConditions. */ + class AmazonS3BucketConditions implements IAmazonS3BucketConditions { + + /** + * Constructs a new AmazonS3BucketConditions. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IAmazonS3BucketConditions); + + /** AmazonS3BucketConditions bucketTypes. */ + public bucketTypes: google.privacy.dlp.v2.AmazonS3BucketConditions.BucketType[]; + + /** AmazonS3BucketConditions objectStorageClasses. */ + public objectStorageClasses: google.privacy.dlp.v2.AmazonS3BucketConditions.ObjectStorageClass[]; + + /** + * Creates a new AmazonS3BucketConditions instance using the specified properties. + * @param [properties] Properties to set + * @returns AmazonS3BucketConditions instance + */ + public static create(properties?: google.privacy.dlp.v2.IAmazonS3BucketConditions): google.privacy.dlp.v2.AmazonS3BucketConditions; + + /** + * Encodes the specified AmazonS3BucketConditions message. Does not implicitly {@link google.privacy.dlp.v2.AmazonS3BucketConditions.verify|verify} messages. + * @param message AmazonS3BucketConditions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IAmazonS3BucketConditions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AmazonS3BucketConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AmazonS3BucketConditions.verify|verify} messages. + * @param message AmazonS3BucketConditions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IAmazonS3BucketConditions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AmazonS3BucketConditions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AmazonS3BucketConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AmazonS3BucketConditions; + + /** + * Decodes an AmazonS3BucketConditions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AmazonS3BucketConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AmazonS3BucketConditions; + + /** + * Verifies an AmazonS3BucketConditions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AmazonS3BucketConditions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AmazonS3BucketConditions + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AmazonS3BucketConditions; + + /** + * Creates a plain object from an AmazonS3BucketConditions message. Also converts values to other types if specified. + * @param message AmazonS3BucketConditions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AmazonS3BucketConditions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AmazonS3BucketConditions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AmazonS3BucketConditions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AmazonS3BucketConditions { + + /** BucketType enum. */ + enum BucketType { + TYPE_UNSPECIFIED = 0, + TYPE_ALL_SUPPORTED = 1, + TYPE_GENERAL_PURPOSE = 2 + } + + /** ObjectStorageClass enum. */ + enum ObjectStorageClass { + UNSPECIFIED = 0, + ALL_SUPPORTED_CLASSES = 1, + STANDARD = 2, + STANDARD_INFREQUENT_ACCESS = 4, + GLACIER_INSTANT_RETRIEVAL = 6, + INTELLIGENT_TIERING = 7 + } + } + + /** Properties of a DiscoveryOtherCloudGenerationCadence. */ + interface IDiscoveryOtherCloudGenerationCadence { + + /** DiscoveryOtherCloudGenerationCadence refreshFrequency */ + refreshFrequency?: (google.privacy.dlp.v2.DataProfileUpdateFrequency|keyof typeof google.privacy.dlp.v2.DataProfileUpdateFrequency|null); + + /** DiscoveryOtherCloudGenerationCadence inspectTemplateModifiedCadence */ + inspectTemplateModifiedCadence?: (google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null); + } + + /** Represents a DiscoveryOtherCloudGenerationCadence. */ + class DiscoveryOtherCloudGenerationCadence implements IDiscoveryOtherCloudGenerationCadence { + + /** + * Constructs a new DiscoveryOtherCloudGenerationCadence. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoveryOtherCloudGenerationCadence); + + /** DiscoveryOtherCloudGenerationCadence refreshFrequency. */ + public refreshFrequency: (google.privacy.dlp.v2.DataProfileUpdateFrequency|keyof typeof google.privacy.dlp.v2.DataProfileUpdateFrequency); + + /** DiscoveryOtherCloudGenerationCadence inspectTemplateModifiedCadence. */ + public inspectTemplateModifiedCadence?: (google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null); + + /** + * Creates a new DiscoveryOtherCloudGenerationCadence instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryOtherCloudGenerationCadence instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoveryOtherCloudGenerationCadence): google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence; + + /** + * Encodes the specified DiscoveryOtherCloudGenerationCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence.verify|verify} messages. + * @param message DiscoveryOtherCloudGenerationCadence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoveryOtherCloudGenerationCadence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryOtherCloudGenerationCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence.verify|verify} messages. + * @param message DiscoveryOtherCloudGenerationCadence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryOtherCloudGenerationCadence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryOtherCloudGenerationCadence message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryOtherCloudGenerationCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence; + + /** + * Decodes a DiscoveryOtherCloudGenerationCadence message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryOtherCloudGenerationCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence; + + /** + * Verifies a DiscoveryOtherCloudGenerationCadence message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryOtherCloudGenerationCadence message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryOtherCloudGenerationCadence + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence; + + /** + * Creates a plain object from a DiscoveryOtherCloudGenerationCadence message. Also converts values to other types if specified. + * @param message DiscoveryOtherCloudGenerationCadence + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryOtherCloudGenerationCadence to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryOtherCloudGenerationCadence + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DiscoveryStartingLocation. */ + interface IDiscoveryStartingLocation { + + /** DiscoveryStartingLocation organizationId */ + organizationId?: (number|Long|string|null); + + /** DiscoveryStartingLocation folderId */ + folderId?: (number|Long|string|null); + } + + /** Represents a DiscoveryStartingLocation. */ + class DiscoveryStartingLocation implements IDiscoveryStartingLocation { + + /** + * Constructs a new DiscoveryStartingLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoveryStartingLocation); + + /** DiscoveryStartingLocation organizationId. */ + public organizationId?: (number|Long|string|null); + + /** DiscoveryStartingLocation folderId. */ + public folderId?: (number|Long|string|null); + + /** DiscoveryStartingLocation location. */ + public location?: ("organizationId"|"folderId"); + + /** + * Creates a new DiscoveryStartingLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryStartingLocation instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoveryStartingLocation): google.privacy.dlp.v2.DiscoveryStartingLocation; + + /** + * Encodes the specified DiscoveryStartingLocation message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryStartingLocation.verify|verify} messages. + * @param message DiscoveryStartingLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoveryStartingLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryStartingLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryStartingLocation.verify|verify} messages. + * @param message DiscoveryStartingLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryStartingLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryStartingLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryStartingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryStartingLocation; + + /** + * Decodes a DiscoveryStartingLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryStartingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryStartingLocation; + + /** + * Verifies a DiscoveryStartingLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryStartingLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryStartingLocation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryStartingLocation; + + /** + * Creates a plain object from a DiscoveryStartingLocation message. Also converts values to other types if specified. + * @param message DiscoveryStartingLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryStartingLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryStartingLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryStartingLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OtherCloudDiscoveryStartingLocation. */ + interface IOtherCloudDiscoveryStartingLocation { + + /** OtherCloudDiscoveryStartingLocation awsLocation */ + awsLocation?: (google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.IAwsDiscoveryStartingLocation|null); + } + + /** Represents an OtherCloudDiscoveryStartingLocation. */ + class OtherCloudDiscoveryStartingLocation implements IOtherCloudDiscoveryStartingLocation { + + /** + * Constructs a new OtherCloudDiscoveryStartingLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation); + + /** OtherCloudDiscoveryStartingLocation awsLocation. */ + public awsLocation?: (google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.IAwsDiscoveryStartingLocation|null); + + /** OtherCloudDiscoveryStartingLocation location. */ + public location?: "awsLocation"; + + /** + * Creates a new OtherCloudDiscoveryStartingLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns OtherCloudDiscoveryStartingLocation instance + */ + public static create(properties?: google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation): google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation; + + /** + * Encodes the specified OtherCloudDiscoveryStartingLocation message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.verify|verify} messages. + * @param message OtherCloudDiscoveryStartingLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OtherCloudDiscoveryStartingLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.verify|verify} messages. + * @param message OtherCloudDiscoveryStartingLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OtherCloudDiscoveryStartingLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OtherCloudDiscoveryStartingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation; + + /** + * Decodes an OtherCloudDiscoveryStartingLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OtherCloudDiscoveryStartingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation; + + /** + * Verifies an OtherCloudDiscoveryStartingLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OtherCloudDiscoveryStartingLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OtherCloudDiscoveryStartingLocation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation; + + /** + * Creates a plain object from an OtherCloudDiscoveryStartingLocation message. Also converts values to other types if specified. + * @param message OtherCloudDiscoveryStartingLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OtherCloudDiscoveryStartingLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OtherCloudDiscoveryStartingLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace OtherCloudDiscoveryStartingLocation { + + /** Properties of an AwsDiscoveryStartingLocation. */ + interface IAwsDiscoveryStartingLocation { + + /** AwsDiscoveryStartingLocation accountId */ + accountId?: (string|null); + + /** AwsDiscoveryStartingLocation allAssetInventoryAssets */ + allAssetInventoryAssets?: (boolean|null); + } + + /** Represents an AwsDiscoveryStartingLocation. */ + class AwsDiscoveryStartingLocation implements IAwsDiscoveryStartingLocation { + + /** + * Constructs a new AwsDiscoveryStartingLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.IAwsDiscoveryStartingLocation); + + /** AwsDiscoveryStartingLocation accountId. */ + public accountId?: (string|null); + + /** AwsDiscoveryStartingLocation allAssetInventoryAssets. */ + public allAssetInventoryAssets?: (boolean|null); + + /** AwsDiscoveryStartingLocation scope. */ + public scope?: ("accountId"|"allAssetInventoryAssets"); + + /** + * Creates a new AwsDiscoveryStartingLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns AwsDiscoveryStartingLocation instance + */ + public static create(properties?: google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.IAwsDiscoveryStartingLocation): google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation; + + /** + * Encodes the specified AwsDiscoveryStartingLocation message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation.verify|verify} messages. + * @param message AwsDiscoveryStartingLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.IAwsDiscoveryStartingLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AwsDiscoveryStartingLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation.verify|verify} messages. + * @param message AwsDiscoveryStartingLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.IAwsDiscoveryStartingLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AwsDiscoveryStartingLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AwsDiscoveryStartingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation; + + /** + * Decodes an AwsDiscoveryStartingLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AwsDiscoveryStartingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation; + + /** + * Verifies an AwsDiscoveryStartingLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AwsDiscoveryStartingLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AwsDiscoveryStartingLocation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation; + + /** + * Creates a plain object from an AwsDiscoveryStartingLocation message. Also converts values to other types if specified. + * @param message AwsDiscoveryStartingLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AwsDiscoveryStartingLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AwsDiscoveryStartingLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an AllOtherResources. */ + interface IAllOtherResources { + } + + /** Represents an AllOtherResources. */ + class AllOtherResources implements IAllOtherResources { + + /** + * Constructs a new AllOtherResources. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IAllOtherResources); + + /** + * Creates a new AllOtherResources instance using the specified properties. + * @param [properties] Properties to set + * @returns AllOtherResources instance + */ + public static create(properties?: google.privacy.dlp.v2.IAllOtherResources): google.privacy.dlp.v2.AllOtherResources; + + /** + * Encodes the specified AllOtherResources message. Does not implicitly {@link google.privacy.dlp.v2.AllOtherResources.verify|verify} messages. + * @param message AllOtherResources message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IAllOtherResources, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AllOtherResources message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AllOtherResources.verify|verify} messages. + * @param message AllOtherResources message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IAllOtherResources, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AllOtherResources message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AllOtherResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.AllOtherResources; + + /** + * Decodes an AllOtherResources message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AllOtherResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.AllOtherResources; + + /** + * Verifies an AllOtherResources message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AllOtherResources message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AllOtherResources + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.AllOtherResources; + + /** + * Creates a plain object from an AllOtherResources message. Also converts values to other types if specified. + * @param message AllOtherResources + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.AllOtherResources, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AllOtherResources to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AllOtherResources + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VertexDatasetDiscoveryTarget. */ + interface IVertexDatasetDiscoveryTarget { + + /** VertexDatasetDiscoveryTarget filter */ + filter?: (google.privacy.dlp.v2.IDiscoveryVertexDatasetFilter|null); + + /** VertexDatasetDiscoveryTarget conditions */ + conditions?: (google.privacy.dlp.v2.IDiscoveryVertexDatasetConditions|null); + + /** VertexDatasetDiscoveryTarget generationCadence */ + generationCadence?: (google.privacy.dlp.v2.IDiscoveryVertexDatasetGenerationCadence|null); + + /** VertexDatasetDiscoveryTarget disabled */ + disabled?: (google.privacy.dlp.v2.IDisabled|null); + } + + /** Represents a VertexDatasetDiscoveryTarget. */ + class VertexDatasetDiscoveryTarget implements IVertexDatasetDiscoveryTarget { + + /** + * Constructs a new VertexDatasetDiscoveryTarget. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IVertexDatasetDiscoveryTarget); + + /** VertexDatasetDiscoveryTarget filter. */ + public filter?: (google.privacy.dlp.v2.IDiscoveryVertexDatasetFilter|null); + + /** VertexDatasetDiscoveryTarget conditions. */ + public conditions?: (google.privacy.dlp.v2.IDiscoveryVertexDatasetConditions|null); + + /** VertexDatasetDiscoveryTarget generationCadence. */ + public generationCadence?: (google.privacy.dlp.v2.IDiscoveryVertexDatasetGenerationCadence|null); + + /** VertexDatasetDiscoveryTarget disabled. */ + public disabled?: (google.privacy.dlp.v2.IDisabled|null); + + /** VertexDatasetDiscoveryTarget cadence. */ + public cadence?: ("generationCadence"|"disabled"); + + /** + * Creates a new VertexDatasetDiscoveryTarget instance using the specified properties. + * @param [properties] Properties to set + * @returns VertexDatasetDiscoveryTarget instance + */ + public static create(properties?: google.privacy.dlp.v2.IVertexDatasetDiscoveryTarget): google.privacy.dlp.v2.VertexDatasetDiscoveryTarget; + + /** + * Encodes the specified VertexDatasetDiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.VertexDatasetDiscoveryTarget.verify|verify} messages. + * @param message VertexDatasetDiscoveryTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IVertexDatasetDiscoveryTarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VertexDatasetDiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.VertexDatasetDiscoveryTarget.verify|verify} messages. + * @param message VertexDatasetDiscoveryTarget message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IVertexDatasetDiscoveryTarget, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VertexDatasetDiscoveryTarget message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VertexDatasetDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.VertexDatasetDiscoveryTarget; + + /** + * Decodes a VertexDatasetDiscoveryTarget message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VertexDatasetDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.VertexDatasetDiscoveryTarget; + + /** + * Verifies a VertexDatasetDiscoveryTarget message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VertexDatasetDiscoveryTarget message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VertexDatasetDiscoveryTarget + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.VertexDatasetDiscoveryTarget; + + /** + * Creates a plain object from a VertexDatasetDiscoveryTarget message. Also converts values to other types if specified. + * @param message VertexDatasetDiscoveryTarget + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.VertexDatasetDiscoveryTarget, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VertexDatasetDiscoveryTarget to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VertexDatasetDiscoveryTarget + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DiscoveryVertexDatasetFilter. */ + interface IDiscoveryVertexDatasetFilter { + + /** DiscoveryVertexDatasetFilter collection */ + collection?: (google.privacy.dlp.v2.IVertexDatasetCollection|null); + + /** DiscoveryVertexDatasetFilter vertexDatasetResourceReference */ + vertexDatasetResourceReference?: (google.privacy.dlp.v2.IVertexDatasetResourceReference|null); + + /** DiscoveryVertexDatasetFilter others */ + others?: (google.privacy.dlp.v2.IAllOtherResources|null); + } + + /** Represents a DiscoveryVertexDatasetFilter. */ + class DiscoveryVertexDatasetFilter implements IDiscoveryVertexDatasetFilter { + + /** + * Constructs a new DiscoveryVertexDatasetFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoveryVertexDatasetFilter); + + /** DiscoveryVertexDatasetFilter collection. */ + public collection?: (google.privacy.dlp.v2.IVertexDatasetCollection|null); + + /** DiscoveryVertexDatasetFilter vertexDatasetResourceReference. */ + public vertexDatasetResourceReference?: (google.privacy.dlp.v2.IVertexDatasetResourceReference|null); + + /** DiscoveryVertexDatasetFilter others. */ + public others?: (google.privacy.dlp.v2.IAllOtherResources|null); + + /** DiscoveryVertexDatasetFilter filter. */ + public filter?: ("collection"|"vertexDatasetResourceReference"|"others"); + + /** + * Creates a new DiscoveryVertexDatasetFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryVertexDatasetFilter instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoveryVertexDatasetFilter): google.privacy.dlp.v2.DiscoveryVertexDatasetFilter; + + /** + * Encodes the specified DiscoveryVertexDatasetFilter message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryVertexDatasetFilter.verify|verify} messages. + * @param message DiscoveryVertexDatasetFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoveryVertexDatasetFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryVertexDatasetFilter message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryVertexDatasetFilter.verify|verify} messages. + * @param message DiscoveryVertexDatasetFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryVertexDatasetFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryVertexDatasetFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryVertexDatasetFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryVertexDatasetFilter; + + /** + * Decodes a DiscoveryVertexDatasetFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryVertexDatasetFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryVertexDatasetFilter; + + /** + * Verifies a DiscoveryVertexDatasetFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryVertexDatasetFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryVertexDatasetFilter + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryVertexDatasetFilter; + + /** + * Creates a plain object from a DiscoveryVertexDatasetFilter message. Also converts values to other types if specified. + * @param message DiscoveryVertexDatasetFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryVertexDatasetFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryVertexDatasetFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryVertexDatasetFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VertexDatasetCollection. */ + interface IVertexDatasetCollection { + + /** VertexDatasetCollection vertexDatasetRegexes */ + vertexDatasetRegexes?: (google.privacy.dlp.v2.IVertexDatasetRegexes|null); + } + + /** Represents a VertexDatasetCollection. */ + class VertexDatasetCollection implements IVertexDatasetCollection { + + /** + * Constructs a new VertexDatasetCollection. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IVertexDatasetCollection); + + /** VertexDatasetCollection vertexDatasetRegexes. */ + public vertexDatasetRegexes?: (google.privacy.dlp.v2.IVertexDatasetRegexes|null); + + /** VertexDatasetCollection pattern. */ + public pattern?: "vertexDatasetRegexes"; + + /** + * Creates a new VertexDatasetCollection instance using the specified properties. + * @param [properties] Properties to set + * @returns VertexDatasetCollection instance + */ + public static create(properties?: google.privacy.dlp.v2.IVertexDatasetCollection): google.privacy.dlp.v2.VertexDatasetCollection; + + /** + * Encodes the specified VertexDatasetCollection message. Does not implicitly {@link google.privacy.dlp.v2.VertexDatasetCollection.verify|verify} messages. + * @param message VertexDatasetCollection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IVertexDatasetCollection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VertexDatasetCollection message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.VertexDatasetCollection.verify|verify} messages. + * @param message VertexDatasetCollection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IVertexDatasetCollection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VertexDatasetCollection message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VertexDatasetCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.VertexDatasetCollection; + + /** + * Decodes a VertexDatasetCollection message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VertexDatasetCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.VertexDatasetCollection; + + /** + * Verifies a VertexDatasetCollection message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VertexDatasetCollection message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VertexDatasetCollection + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.VertexDatasetCollection; + + /** + * Creates a plain object from a VertexDatasetCollection message. Also converts values to other types if specified. + * @param message VertexDatasetCollection + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.VertexDatasetCollection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VertexDatasetCollection to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VertexDatasetCollection + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VertexDatasetRegexes. */ + interface IVertexDatasetRegexes { + + /** VertexDatasetRegexes patterns */ + patterns?: (google.privacy.dlp.v2.IVertexDatasetRegex[]|null); + } + + /** Represents a VertexDatasetRegexes. */ + class VertexDatasetRegexes implements IVertexDatasetRegexes { + + /** + * Constructs a new VertexDatasetRegexes. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IVertexDatasetRegexes); + + /** VertexDatasetRegexes patterns. */ + public patterns: google.privacy.dlp.v2.IVertexDatasetRegex[]; + + /** + * Creates a new VertexDatasetRegexes instance using the specified properties. + * @param [properties] Properties to set + * @returns VertexDatasetRegexes instance + */ + public static create(properties?: google.privacy.dlp.v2.IVertexDatasetRegexes): google.privacy.dlp.v2.VertexDatasetRegexes; + + /** + * Encodes the specified VertexDatasetRegexes message. Does not implicitly {@link google.privacy.dlp.v2.VertexDatasetRegexes.verify|verify} messages. + * @param message VertexDatasetRegexes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IVertexDatasetRegexes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VertexDatasetRegexes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.VertexDatasetRegexes.verify|verify} messages. + * @param message VertexDatasetRegexes message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IVertexDatasetRegexes, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VertexDatasetRegexes message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VertexDatasetRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.VertexDatasetRegexes; + + /** + * Decodes a VertexDatasetRegexes message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VertexDatasetRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.VertexDatasetRegexes; + + /** + * Verifies a VertexDatasetRegexes message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VertexDatasetRegexes message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VertexDatasetRegexes + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.VertexDatasetRegexes; + + /** + * Creates a plain object from a VertexDatasetRegexes message. Also converts values to other types if specified. + * @param message VertexDatasetRegexes + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.VertexDatasetRegexes, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VertexDatasetRegexes to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VertexDatasetRegexes + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VertexDatasetRegex. */ + interface IVertexDatasetRegex { + + /** VertexDatasetRegex projectIdRegex */ + projectIdRegex?: (string|null); + } + + /** Represents a VertexDatasetRegex. */ + class VertexDatasetRegex implements IVertexDatasetRegex { + + /** + * Constructs a new VertexDatasetRegex. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IVertexDatasetRegex); + + /** VertexDatasetRegex projectIdRegex. */ + public projectIdRegex: string; + + /** + * Creates a new VertexDatasetRegex instance using the specified properties. + * @param [properties] Properties to set + * @returns VertexDatasetRegex instance + */ + public static create(properties?: google.privacy.dlp.v2.IVertexDatasetRegex): google.privacy.dlp.v2.VertexDatasetRegex; + + /** + * Encodes the specified VertexDatasetRegex message. Does not implicitly {@link google.privacy.dlp.v2.VertexDatasetRegex.verify|verify} messages. + * @param message VertexDatasetRegex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IVertexDatasetRegex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VertexDatasetRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.VertexDatasetRegex.verify|verify} messages. + * @param message VertexDatasetRegex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IVertexDatasetRegex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VertexDatasetRegex message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VertexDatasetRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.VertexDatasetRegex; + + /** + * Decodes a VertexDatasetRegex message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VertexDatasetRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.VertexDatasetRegex; + + /** + * Verifies a VertexDatasetRegex message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VertexDatasetRegex message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VertexDatasetRegex + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.VertexDatasetRegex; + + /** + * Creates a plain object from a VertexDatasetRegex message. Also converts values to other types if specified. + * @param message VertexDatasetRegex + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.VertexDatasetRegex, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VertexDatasetRegex to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VertexDatasetRegex + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VertexDatasetResourceReference. */ + interface IVertexDatasetResourceReference { + + /** VertexDatasetResourceReference datasetResourceName */ + datasetResourceName?: (string|null); + } + + /** Represents a VertexDatasetResourceReference. */ + class VertexDatasetResourceReference implements IVertexDatasetResourceReference { + + /** + * Constructs a new VertexDatasetResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IVertexDatasetResourceReference); + + /** VertexDatasetResourceReference datasetResourceName. */ + public datasetResourceName: string; + + /** + * Creates a new VertexDatasetResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns VertexDatasetResourceReference instance + */ + public static create(properties?: google.privacy.dlp.v2.IVertexDatasetResourceReference): google.privacy.dlp.v2.VertexDatasetResourceReference; + + /** + * Encodes the specified VertexDatasetResourceReference message. Does not implicitly {@link google.privacy.dlp.v2.VertexDatasetResourceReference.verify|verify} messages. + * @param message VertexDatasetResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IVertexDatasetResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VertexDatasetResourceReference message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.VertexDatasetResourceReference.verify|verify} messages. + * @param message VertexDatasetResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IVertexDatasetResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VertexDatasetResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VertexDatasetResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.VertexDatasetResourceReference; + + /** + * Decodes a VertexDatasetResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VertexDatasetResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.VertexDatasetResourceReference; + + /** + * Verifies a VertexDatasetResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VertexDatasetResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VertexDatasetResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.VertexDatasetResourceReference; + + /** + * Creates a plain object from a VertexDatasetResourceReference message. Also converts values to other types if specified. + * @param message VertexDatasetResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.VertexDatasetResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VertexDatasetResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VertexDatasetResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DiscoveryVertexDatasetConditions. */ + interface IDiscoveryVertexDatasetConditions { + + /** DiscoveryVertexDatasetConditions createdAfter */ + createdAfter?: (google.protobuf.ITimestamp|null); + + /** DiscoveryVertexDatasetConditions minAge */ + minAge?: (google.protobuf.IDuration|null); + } + + /** Represents a DiscoveryVertexDatasetConditions. */ + class DiscoveryVertexDatasetConditions implements IDiscoveryVertexDatasetConditions { + + /** + * Constructs a new DiscoveryVertexDatasetConditions. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoveryVertexDatasetConditions); + + /** DiscoveryVertexDatasetConditions createdAfter. */ + public createdAfter?: (google.protobuf.ITimestamp|null); + + /** DiscoveryVertexDatasetConditions minAge. */ + public minAge?: (google.protobuf.IDuration|null); + + /** + * Creates a new DiscoveryVertexDatasetConditions instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryVertexDatasetConditions instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoveryVertexDatasetConditions): google.privacy.dlp.v2.DiscoveryVertexDatasetConditions; + + /** + * Encodes the specified DiscoveryVertexDatasetConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryVertexDatasetConditions.verify|verify} messages. + * @param message DiscoveryVertexDatasetConditions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoveryVertexDatasetConditions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryVertexDatasetConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryVertexDatasetConditions.verify|verify} messages. + * @param message DiscoveryVertexDatasetConditions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryVertexDatasetConditions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryVertexDatasetConditions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryVertexDatasetConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryVertexDatasetConditions; + + /** + * Decodes a DiscoveryVertexDatasetConditions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryVertexDatasetConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryVertexDatasetConditions; + + /** + * Verifies a DiscoveryVertexDatasetConditions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryVertexDatasetConditions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryVertexDatasetConditions + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryVertexDatasetConditions; + + /** + * Creates a plain object from a DiscoveryVertexDatasetConditions message. Also converts values to other types if specified. + * @param message DiscoveryVertexDatasetConditions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryVertexDatasetConditions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryVertexDatasetConditions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryVertexDatasetConditions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DiscoveryVertexDatasetGenerationCadence. */ + interface IDiscoveryVertexDatasetGenerationCadence { + + /** DiscoveryVertexDatasetGenerationCadence refreshFrequency */ + refreshFrequency?: (google.privacy.dlp.v2.DataProfileUpdateFrequency|keyof typeof google.privacy.dlp.v2.DataProfileUpdateFrequency|null); + + /** DiscoveryVertexDatasetGenerationCadence inspectTemplateModifiedCadence */ + inspectTemplateModifiedCadence?: (google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null); + } + + /** Represents a DiscoveryVertexDatasetGenerationCadence. */ + class DiscoveryVertexDatasetGenerationCadence implements IDiscoveryVertexDatasetGenerationCadence { + + /** + * Constructs a new DiscoveryVertexDatasetGenerationCadence. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDiscoveryVertexDatasetGenerationCadence); + + /** DiscoveryVertexDatasetGenerationCadence refreshFrequency. */ + public refreshFrequency: (google.privacy.dlp.v2.DataProfileUpdateFrequency|keyof typeof google.privacy.dlp.v2.DataProfileUpdateFrequency); + + /** DiscoveryVertexDatasetGenerationCadence inspectTemplateModifiedCadence. */ + public inspectTemplateModifiedCadence?: (google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null); + + /** + * Creates a new DiscoveryVertexDatasetGenerationCadence instance using the specified properties. + * @param [properties] Properties to set + * @returns DiscoveryVertexDatasetGenerationCadence instance + */ + public static create(properties?: google.privacy.dlp.v2.IDiscoveryVertexDatasetGenerationCadence): google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence; + + /** + * Encodes the specified DiscoveryVertexDatasetGenerationCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence.verify|verify} messages. + * @param message DiscoveryVertexDatasetGenerationCadence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDiscoveryVertexDatasetGenerationCadence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DiscoveryVertexDatasetGenerationCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence.verify|verify} messages. + * @param message DiscoveryVertexDatasetGenerationCadence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDiscoveryVertexDatasetGenerationCadence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DiscoveryVertexDatasetGenerationCadence message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DiscoveryVertexDatasetGenerationCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence; + + /** + * Decodes a DiscoveryVertexDatasetGenerationCadence message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DiscoveryVertexDatasetGenerationCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence; + + /** + * Verifies a DiscoveryVertexDatasetGenerationCadence message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DiscoveryVertexDatasetGenerationCadence message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DiscoveryVertexDatasetGenerationCadence + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence; + + /** + * Creates a plain object from a DiscoveryVertexDatasetGenerationCadence message. Also converts values to other types if specified. + * @param message DiscoveryVertexDatasetGenerationCadence + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DiscoveryVertexDatasetGenerationCadence to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DiscoveryVertexDatasetGenerationCadence + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DlpJob. */ + interface IDlpJob { + + /** DlpJob name */ + name?: (string|null); + + /** DlpJob type */ + type?: (google.privacy.dlp.v2.DlpJobType|keyof typeof google.privacy.dlp.v2.DlpJobType|null); + + /** DlpJob state */ + state?: (google.privacy.dlp.v2.DlpJob.JobState|keyof typeof google.privacy.dlp.v2.DlpJob.JobState|null); + + /** DlpJob riskDetails */ + riskDetails?: (google.privacy.dlp.v2.IAnalyzeDataSourceRiskDetails|null); + + /** DlpJob inspectDetails */ + inspectDetails?: (google.privacy.dlp.v2.IInspectDataSourceDetails|null); + + /** DlpJob createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** DlpJob startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** DlpJob endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** DlpJob lastModified */ + lastModified?: (google.protobuf.ITimestamp|null); + + /** DlpJob jobTriggerName */ + jobTriggerName?: (string|null); + + /** DlpJob errors */ + errors?: (google.privacy.dlp.v2.IError[]|null); + + /** DlpJob actionDetails */ + actionDetails?: (google.privacy.dlp.v2.IActionDetails[]|null); + } + + /** Represents a DlpJob. */ + class DlpJob implements IDlpJob { + + /** + * Constructs a new DlpJob. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDlpJob); + + /** DlpJob name. */ + public name: string; + + /** DlpJob type. */ + public type: (google.privacy.dlp.v2.DlpJobType|keyof typeof google.privacy.dlp.v2.DlpJobType); + + /** DlpJob state. */ + public state: (google.privacy.dlp.v2.DlpJob.JobState|keyof typeof google.privacy.dlp.v2.DlpJob.JobState); + + /** DlpJob riskDetails. */ + public riskDetails?: (google.privacy.dlp.v2.IAnalyzeDataSourceRiskDetails|null); + + /** DlpJob inspectDetails. */ + public inspectDetails?: (google.privacy.dlp.v2.IInspectDataSourceDetails|null); + + /** DlpJob createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** DlpJob startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** DlpJob endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** DlpJob lastModified. */ + public lastModified?: (google.protobuf.ITimestamp|null); + + /** DlpJob jobTriggerName. */ + public jobTriggerName: string; + + /** DlpJob errors. */ + public errors: google.privacy.dlp.v2.IError[]; + + /** DlpJob actionDetails. */ + public actionDetails: google.privacy.dlp.v2.IActionDetails[]; + + /** DlpJob details. */ + public details?: ("riskDetails"|"inspectDetails"); + + /** + * Creates a new DlpJob instance using the specified properties. + * @param [properties] Properties to set + * @returns DlpJob instance + */ + public static create(properties?: google.privacy.dlp.v2.IDlpJob): google.privacy.dlp.v2.DlpJob; + + /** + * Encodes the specified DlpJob message. Does not implicitly {@link google.privacy.dlp.v2.DlpJob.verify|verify} messages. + * @param message DlpJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDlpJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DlpJob message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DlpJob.verify|verify} messages. + * @param message DlpJob message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDlpJob, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DlpJob message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DlpJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DlpJob; + + /** + * Decodes a DlpJob message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DlpJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DlpJob; + + /** + * Verifies a DlpJob message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DlpJob message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DlpJob + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DlpJob; + + /** + * Creates a plain object from a DlpJob message. Also converts values to other types if specified. + * @param message DlpJob + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DlpJob, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DlpJob to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DlpJob + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DlpJob { + + /** JobState enum. */ + enum JobState { + JOB_STATE_UNSPECIFIED = 0, + PENDING = 1, + RUNNING = 2, + DONE = 3, + CANCELED = 4, + FAILED = 5, + ACTIVE = 6 + } + } + + /** Properties of a GetDlpJobRequest. */ + interface IGetDlpJobRequest { + + /** GetDlpJobRequest name */ + name?: (string|null); + } + + /** Represents a GetDlpJobRequest. */ + class GetDlpJobRequest implements IGetDlpJobRequest { + + /** + * Constructs a new GetDlpJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IGetDlpJobRequest); + + /** GetDlpJobRequest name. */ + public name: string; + + /** + * Creates a new GetDlpJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDlpJobRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IGetDlpJobRequest): google.privacy.dlp.v2.GetDlpJobRequest; + + /** + * Encodes the specified GetDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetDlpJobRequest.verify|verify} messages. + * @param message GetDlpJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IGetDlpJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetDlpJobRequest.verify|verify} messages. + * @param message GetDlpJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IGetDlpJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDlpJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.GetDlpJobRequest; + + /** + * Decodes a GetDlpJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.GetDlpJobRequest; + + /** + * Verifies a GetDlpJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDlpJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDlpJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.GetDlpJobRequest; + + /** + * Creates a plain object from a GetDlpJobRequest message. Also converts values to other types if specified. + * @param message GetDlpJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.GetDlpJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDlpJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDlpJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDlpJobsRequest. */ + interface IListDlpJobsRequest { + + /** ListDlpJobsRequest parent */ + parent?: (string|null); + + /** ListDlpJobsRequest filter */ + filter?: (string|null); + + /** ListDlpJobsRequest pageSize */ + pageSize?: (number|null); + + /** ListDlpJobsRequest pageToken */ + pageToken?: (string|null); + + /** ListDlpJobsRequest type */ + type?: (google.privacy.dlp.v2.DlpJobType|keyof typeof google.privacy.dlp.v2.DlpJobType|null); + + /** ListDlpJobsRequest orderBy */ + orderBy?: (string|null); + + /** ListDlpJobsRequest locationId */ + locationId?: (string|null); + } + + /** Represents a ListDlpJobsRequest. */ + class ListDlpJobsRequest implements IListDlpJobsRequest { + + /** + * Constructs a new ListDlpJobsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListDlpJobsRequest); + + /** ListDlpJobsRequest parent. */ + public parent: string; + + /** ListDlpJobsRequest filter. */ + public filter: string; + + /** ListDlpJobsRequest pageSize. */ + public pageSize: number; + + /** ListDlpJobsRequest pageToken. */ + public pageToken: string; + + /** ListDlpJobsRequest type. */ + public type: (google.privacy.dlp.v2.DlpJobType|keyof typeof google.privacy.dlp.v2.DlpJobType); + + /** ListDlpJobsRequest orderBy. */ + public orderBy: string; + + /** ListDlpJobsRequest locationId. */ + public locationId: string; + + /** + * Creates a new ListDlpJobsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDlpJobsRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IListDlpJobsRequest): google.privacy.dlp.v2.ListDlpJobsRequest; + + /** + * Encodes the specified ListDlpJobsRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListDlpJobsRequest.verify|verify} messages. + * @param message ListDlpJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListDlpJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDlpJobsRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListDlpJobsRequest.verify|verify} messages. + * @param message ListDlpJobsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListDlpJobsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDlpJobsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDlpJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ListDlpJobsRequest; + + /** + * Decodes a ListDlpJobsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDlpJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ListDlpJobsRequest; + + /** + * Verifies a ListDlpJobsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDlpJobsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDlpJobsRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListDlpJobsRequest; + + /** + * Creates a plain object from a ListDlpJobsRequest message. Also converts values to other types if specified. + * @param message ListDlpJobsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListDlpJobsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDlpJobsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDlpJobsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDlpJobsResponse. */ + interface IListDlpJobsResponse { + + /** ListDlpJobsResponse jobs */ + jobs?: (google.privacy.dlp.v2.IDlpJob[]|null); + + /** ListDlpJobsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListDlpJobsResponse. */ + class ListDlpJobsResponse implements IListDlpJobsResponse { + + /** + * Constructs a new ListDlpJobsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListDlpJobsResponse); + + /** ListDlpJobsResponse jobs. */ + public jobs: google.privacy.dlp.v2.IDlpJob[]; + + /** ListDlpJobsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListDlpJobsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDlpJobsResponse instance + */ + public static create(properties?: google.privacy.dlp.v2.IListDlpJobsResponse): google.privacy.dlp.v2.ListDlpJobsResponse; + + /** + * Encodes the specified ListDlpJobsResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListDlpJobsResponse.verify|verify} messages. + * @param message ListDlpJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListDlpJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDlpJobsResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListDlpJobsResponse.verify|verify} messages. + * @param message ListDlpJobsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListDlpJobsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDlpJobsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDlpJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ListDlpJobsResponse; + + /** + * Decodes a ListDlpJobsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDlpJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ListDlpJobsResponse; + + /** + * Verifies a ListDlpJobsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDlpJobsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDlpJobsResponse + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListDlpJobsResponse; + + /** + * Creates a plain object from a ListDlpJobsResponse message. Also converts values to other types if specified. + * @param message ListDlpJobsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListDlpJobsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDlpJobsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDlpJobsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CancelDlpJobRequest. */ + interface ICancelDlpJobRequest { + + /** CancelDlpJobRequest name */ + name?: (string|null); + } + + /** Represents a CancelDlpJobRequest. */ + class CancelDlpJobRequest implements ICancelDlpJobRequest { + + /** + * Constructs a new CancelDlpJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ICancelDlpJobRequest); + + /** CancelDlpJobRequest name. */ + public name: string; + + /** + * Creates a new CancelDlpJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelDlpJobRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.ICancelDlpJobRequest): google.privacy.dlp.v2.CancelDlpJobRequest; + + /** + * Encodes the specified CancelDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.CancelDlpJobRequest.verify|verify} messages. + * @param message CancelDlpJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ICancelDlpJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CancelDlpJobRequest.verify|verify} messages. + * @param message CancelDlpJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ICancelDlpJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelDlpJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CancelDlpJobRequest; + + /** + * Decodes a CancelDlpJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CancelDlpJobRequest; + + /** + * Verifies a CancelDlpJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelDlpJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelDlpJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CancelDlpJobRequest; + + /** + * Creates a plain object from a CancelDlpJobRequest message. Also converts values to other types if specified. + * @param message CancelDlpJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CancelDlpJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelDlpJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelDlpJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FinishDlpJobRequest. */ + interface IFinishDlpJobRequest { + + /** FinishDlpJobRequest name */ + name?: (string|null); + } + + /** Represents a FinishDlpJobRequest. */ + class FinishDlpJobRequest implements IFinishDlpJobRequest { + + /** + * Constructs a new FinishDlpJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IFinishDlpJobRequest); + + /** FinishDlpJobRequest name. */ + public name: string; + + /** + * Creates a new FinishDlpJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FinishDlpJobRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IFinishDlpJobRequest): google.privacy.dlp.v2.FinishDlpJobRequest; + + /** + * Encodes the specified FinishDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.FinishDlpJobRequest.verify|verify} messages. + * @param message FinishDlpJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IFinishDlpJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FinishDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FinishDlpJobRequest.verify|verify} messages. + * @param message FinishDlpJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IFinishDlpJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FinishDlpJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FinishDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.FinishDlpJobRequest; + + /** + * Decodes a FinishDlpJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FinishDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.FinishDlpJobRequest; + + /** + * Verifies a FinishDlpJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FinishDlpJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FinishDlpJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.FinishDlpJobRequest; + + /** + * Creates a plain object from a FinishDlpJobRequest message. Also converts values to other types if specified. + * @param message FinishDlpJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.FinishDlpJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FinishDlpJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FinishDlpJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteDlpJobRequest. */ + interface IDeleteDlpJobRequest { + + /** DeleteDlpJobRequest name */ + name?: (string|null); + } + + /** Represents a DeleteDlpJobRequest. */ + class DeleteDlpJobRequest implements IDeleteDlpJobRequest { + + /** + * Constructs a new DeleteDlpJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDeleteDlpJobRequest); + + /** DeleteDlpJobRequest name. */ + public name: string; + + /** + * Creates a new DeleteDlpJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteDlpJobRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IDeleteDlpJobRequest): google.privacy.dlp.v2.DeleteDlpJobRequest; + + /** + * Encodes the specified DeleteDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteDlpJobRequest.verify|verify} messages. + * @param message DeleteDlpJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDeleteDlpJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteDlpJobRequest.verify|verify} messages. + * @param message DeleteDlpJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDeleteDlpJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteDlpJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DeleteDlpJobRequest; + + /** + * Decodes a DeleteDlpJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DeleteDlpJobRequest; + + /** + * Verifies a DeleteDlpJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteDlpJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteDlpJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DeleteDlpJobRequest; + + /** + * Creates a plain object from a DeleteDlpJobRequest message. Also converts values to other types if specified. + * @param message DeleteDlpJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DeleteDlpJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteDlpJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteDlpJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateDeidentifyTemplateRequest. */ + interface ICreateDeidentifyTemplateRequest { + + /** CreateDeidentifyTemplateRequest parent */ + parent?: (string|null); + + /** CreateDeidentifyTemplateRequest deidentifyTemplate */ + deidentifyTemplate?: (google.privacy.dlp.v2.IDeidentifyTemplate|null); + + /** CreateDeidentifyTemplateRequest templateId */ + templateId?: (string|null); + + /** CreateDeidentifyTemplateRequest locationId */ + locationId?: (string|null); + } + + /** Represents a CreateDeidentifyTemplateRequest. */ + class CreateDeidentifyTemplateRequest implements ICreateDeidentifyTemplateRequest { + + /** + * Constructs a new CreateDeidentifyTemplateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest); + + /** CreateDeidentifyTemplateRequest parent. */ + public parent: string; + + /** CreateDeidentifyTemplateRequest deidentifyTemplate. */ + public deidentifyTemplate?: (google.privacy.dlp.v2.IDeidentifyTemplate|null); + + /** CreateDeidentifyTemplateRequest templateId. */ + public templateId: string; + + /** CreateDeidentifyTemplateRequest locationId. */ + public locationId: string; + + /** + * Creates a new CreateDeidentifyTemplateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateDeidentifyTemplateRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest): google.privacy.dlp.v2.CreateDeidentifyTemplateRequest; + + /** + * Encodes the specified CreateDeidentifyTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.verify|verify} messages. + * @param message CreateDeidentifyTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateDeidentifyTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.verify|verify} messages. + * @param message CreateDeidentifyTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateDeidentifyTemplateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateDeidentifyTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CreateDeidentifyTemplateRequest; + + /** + * Decodes a CreateDeidentifyTemplateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateDeidentifyTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CreateDeidentifyTemplateRequest; + + /** + * Verifies a CreateDeidentifyTemplateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateDeidentifyTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateDeidentifyTemplateRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CreateDeidentifyTemplateRequest; + + /** + * Creates a plain object from a CreateDeidentifyTemplateRequest message. Also converts values to other types if specified. + * @param message CreateDeidentifyTemplateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CreateDeidentifyTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateDeidentifyTemplateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateDeidentifyTemplateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateDeidentifyTemplateRequest. */ + interface IUpdateDeidentifyTemplateRequest { + + /** UpdateDeidentifyTemplateRequest name */ + name?: (string|null); + + /** UpdateDeidentifyTemplateRequest deidentifyTemplate */ + deidentifyTemplate?: (google.privacy.dlp.v2.IDeidentifyTemplate|null); + + /** UpdateDeidentifyTemplateRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateDeidentifyTemplateRequest. */ + class UpdateDeidentifyTemplateRequest implements IUpdateDeidentifyTemplateRequest { + + /** + * Constructs a new UpdateDeidentifyTemplateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest); + + /** UpdateDeidentifyTemplateRequest name. */ + public name: string; + + /** UpdateDeidentifyTemplateRequest deidentifyTemplate. */ + public deidentifyTemplate?: (google.privacy.dlp.v2.IDeidentifyTemplate|null); + + /** UpdateDeidentifyTemplateRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateDeidentifyTemplateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateDeidentifyTemplateRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest): google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest; + + /** + * Encodes the specified UpdateDeidentifyTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.verify|verify} messages. + * @param message UpdateDeidentifyTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateDeidentifyTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.verify|verify} messages. + * @param message UpdateDeidentifyTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateDeidentifyTemplateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateDeidentifyTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest; + + /** + * Decodes an UpdateDeidentifyTemplateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateDeidentifyTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest; + + /** + * Verifies an UpdateDeidentifyTemplateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateDeidentifyTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateDeidentifyTemplateRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest; + + /** + * Creates a plain object from an UpdateDeidentifyTemplateRequest message. Also converts values to other types if specified. + * @param message UpdateDeidentifyTemplateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateDeidentifyTemplateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateDeidentifyTemplateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetDeidentifyTemplateRequest. */ + interface IGetDeidentifyTemplateRequest { + + /** GetDeidentifyTemplateRequest name */ + name?: (string|null); + } + + /** Represents a GetDeidentifyTemplateRequest. */ + class GetDeidentifyTemplateRequest implements IGetDeidentifyTemplateRequest { + + /** + * Constructs a new GetDeidentifyTemplateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IGetDeidentifyTemplateRequest); + + /** GetDeidentifyTemplateRequest name. */ + public name: string; + + /** + * Creates a new GetDeidentifyTemplateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetDeidentifyTemplateRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IGetDeidentifyTemplateRequest): google.privacy.dlp.v2.GetDeidentifyTemplateRequest; + + /** + * Encodes the specified GetDeidentifyTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetDeidentifyTemplateRequest.verify|verify} messages. + * @param message GetDeidentifyTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IGetDeidentifyTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetDeidentifyTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetDeidentifyTemplateRequest.verify|verify} messages. + * @param message GetDeidentifyTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IGetDeidentifyTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetDeidentifyTemplateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetDeidentifyTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.GetDeidentifyTemplateRequest; + + /** + * Decodes a GetDeidentifyTemplateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetDeidentifyTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.GetDeidentifyTemplateRequest; + + /** + * Verifies a GetDeidentifyTemplateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetDeidentifyTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetDeidentifyTemplateRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.GetDeidentifyTemplateRequest; + + /** + * Creates a plain object from a GetDeidentifyTemplateRequest message. Also converts values to other types if specified. + * @param message GetDeidentifyTemplateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.GetDeidentifyTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetDeidentifyTemplateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetDeidentifyTemplateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDeidentifyTemplatesRequest. */ + interface IListDeidentifyTemplatesRequest { + + /** ListDeidentifyTemplatesRequest parent */ + parent?: (string|null); + + /** ListDeidentifyTemplatesRequest pageToken */ + pageToken?: (string|null); + + /** ListDeidentifyTemplatesRequest pageSize */ + pageSize?: (number|null); + + /** ListDeidentifyTemplatesRequest orderBy */ + orderBy?: (string|null); + + /** ListDeidentifyTemplatesRequest locationId */ + locationId?: (string|null); + } + + /** Represents a ListDeidentifyTemplatesRequest. */ + class ListDeidentifyTemplatesRequest implements IListDeidentifyTemplatesRequest { + + /** + * Constructs a new ListDeidentifyTemplatesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListDeidentifyTemplatesRequest); + + /** ListDeidentifyTemplatesRequest parent. */ + public parent: string; + + /** ListDeidentifyTemplatesRequest pageToken. */ + public pageToken: string; + + /** ListDeidentifyTemplatesRequest pageSize. */ + public pageSize: number; + + /** ListDeidentifyTemplatesRequest orderBy. */ + public orderBy: string; + + /** ListDeidentifyTemplatesRequest locationId. */ + public locationId: string; + + /** + * Creates a new ListDeidentifyTemplatesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDeidentifyTemplatesRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IListDeidentifyTemplatesRequest): google.privacy.dlp.v2.ListDeidentifyTemplatesRequest; + + /** + * Encodes the specified ListDeidentifyTemplatesRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.verify|verify} messages. + * @param message ListDeidentifyTemplatesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDeidentifyTemplatesRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.verify|verify} messages. + * @param message ListDeidentifyTemplatesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDeidentifyTemplatesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDeidentifyTemplatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ListDeidentifyTemplatesRequest; + + /** + * Decodes a ListDeidentifyTemplatesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDeidentifyTemplatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ListDeidentifyTemplatesRequest; + + /** + * Verifies a ListDeidentifyTemplatesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDeidentifyTemplatesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDeidentifyTemplatesRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListDeidentifyTemplatesRequest; + + /** + * Creates a plain object from a ListDeidentifyTemplatesRequest message. Also converts values to other types if specified. + * @param message ListDeidentifyTemplatesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListDeidentifyTemplatesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDeidentifyTemplatesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDeidentifyTemplatesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListDeidentifyTemplatesResponse. */ + interface IListDeidentifyTemplatesResponse { + + /** ListDeidentifyTemplatesResponse deidentifyTemplates */ + deidentifyTemplates?: (google.privacy.dlp.v2.IDeidentifyTemplate[]|null); + + /** ListDeidentifyTemplatesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListDeidentifyTemplatesResponse. */ + class ListDeidentifyTemplatesResponse implements IListDeidentifyTemplatesResponse { + + /** + * Constructs a new ListDeidentifyTemplatesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListDeidentifyTemplatesResponse); + + /** ListDeidentifyTemplatesResponse deidentifyTemplates. */ + public deidentifyTemplates: google.privacy.dlp.v2.IDeidentifyTemplate[]; + + /** ListDeidentifyTemplatesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListDeidentifyTemplatesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListDeidentifyTemplatesResponse instance + */ + public static create(properties?: google.privacy.dlp.v2.IListDeidentifyTemplatesResponse): google.privacy.dlp.v2.ListDeidentifyTemplatesResponse; + + /** + * Encodes the specified ListDeidentifyTemplatesResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.verify|verify} messages. + * @param message ListDeidentifyTemplatesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListDeidentifyTemplatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListDeidentifyTemplatesResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.verify|verify} messages. + * @param message ListDeidentifyTemplatesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListDeidentifyTemplatesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListDeidentifyTemplatesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListDeidentifyTemplatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ListDeidentifyTemplatesResponse; + + /** + * Decodes a ListDeidentifyTemplatesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListDeidentifyTemplatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ListDeidentifyTemplatesResponse; + + /** + * Verifies a ListDeidentifyTemplatesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListDeidentifyTemplatesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListDeidentifyTemplatesResponse + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListDeidentifyTemplatesResponse; + + /** + * Creates a plain object from a ListDeidentifyTemplatesResponse message. Also converts values to other types if specified. + * @param message ListDeidentifyTemplatesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListDeidentifyTemplatesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListDeidentifyTemplatesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListDeidentifyTemplatesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteDeidentifyTemplateRequest. */ + interface IDeleteDeidentifyTemplateRequest { + + /** DeleteDeidentifyTemplateRequest name */ + name?: (string|null); + } + + /** Represents a DeleteDeidentifyTemplateRequest. */ + class DeleteDeidentifyTemplateRequest implements IDeleteDeidentifyTemplateRequest { + + /** + * Constructs a new DeleteDeidentifyTemplateRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest); + + /** DeleteDeidentifyTemplateRequest name. */ + public name: string; + + /** + * Creates a new DeleteDeidentifyTemplateRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteDeidentifyTemplateRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest): google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest; + + /** + * Encodes the specified DeleteDeidentifyTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.verify|verify} messages. + * @param message DeleteDeidentifyTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteDeidentifyTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.verify|verify} messages. + * @param message DeleteDeidentifyTemplateRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteDeidentifyTemplateRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteDeidentifyTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest; + + /** + * Decodes a DeleteDeidentifyTemplateRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteDeidentifyTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest; + + /** + * Verifies a DeleteDeidentifyTemplateRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteDeidentifyTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteDeidentifyTemplateRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest; + + /** + * Creates a plain object from a DeleteDeidentifyTemplateRequest message. Also converts values to other types if specified. + * @param message DeleteDeidentifyTemplateRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteDeidentifyTemplateRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteDeidentifyTemplateRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LargeCustomDictionaryConfig. */ + interface ILargeCustomDictionaryConfig { + + /** LargeCustomDictionaryConfig outputPath */ + outputPath?: (google.privacy.dlp.v2.ICloudStoragePath|null); + + /** LargeCustomDictionaryConfig cloudStorageFileSet */ + cloudStorageFileSet?: (google.privacy.dlp.v2.ICloudStorageFileSet|null); + + /** LargeCustomDictionaryConfig bigQueryField */ + bigQueryField?: (google.privacy.dlp.v2.IBigQueryField|null); + } + + /** Represents a LargeCustomDictionaryConfig. */ + class LargeCustomDictionaryConfig implements ILargeCustomDictionaryConfig { + + /** + * Constructs a new LargeCustomDictionaryConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ILargeCustomDictionaryConfig); + + /** LargeCustomDictionaryConfig outputPath. */ + public outputPath?: (google.privacy.dlp.v2.ICloudStoragePath|null); + + /** LargeCustomDictionaryConfig cloudStorageFileSet. */ + public cloudStorageFileSet?: (google.privacy.dlp.v2.ICloudStorageFileSet|null); + + /** LargeCustomDictionaryConfig bigQueryField. */ + public bigQueryField?: (google.privacy.dlp.v2.IBigQueryField|null); + + /** LargeCustomDictionaryConfig source. */ + public source?: ("cloudStorageFileSet"|"bigQueryField"); + + /** + * Creates a new LargeCustomDictionaryConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns LargeCustomDictionaryConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.ILargeCustomDictionaryConfig): google.privacy.dlp.v2.LargeCustomDictionaryConfig; + + /** + * Encodes the specified LargeCustomDictionaryConfig message. Does not implicitly {@link google.privacy.dlp.v2.LargeCustomDictionaryConfig.verify|verify} messages. + * @param message LargeCustomDictionaryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ILargeCustomDictionaryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LargeCustomDictionaryConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.LargeCustomDictionaryConfig.verify|verify} messages. + * @param message LargeCustomDictionaryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ILargeCustomDictionaryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LargeCustomDictionaryConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LargeCustomDictionaryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.LargeCustomDictionaryConfig; + + /** + * Decodes a LargeCustomDictionaryConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LargeCustomDictionaryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.LargeCustomDictionaryConfig; + + /** + * Verifies a LargeCustomDictionaryConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LargeCustomDictionaryConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LargeCustomDictionaryConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.LargeCustomDictionaryConfig; + + /** + * Creates a plain object from a LargeCustomDictionaryConfig message. Also converts values to other types if specified. + * @param message LargeCustomDictionaryConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.LargeCustomDictionaryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LargeCustomDictionaryConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LargeCustomDictionaryConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LargeCustomDictionaryStats. */ + interface ILargeCustomDictionaryStats { + + /** LargeCustomDictionaryStats approxNumPhrases */ + approxNumPhrases?: (number|Long|string|null); + } + + /** Represents a LargeCustomDictionaryStats. */ + class LargeCustomDictionaryStats implements ILargeCustomDictionaryStats { + + /** + * Constructs a new LargeCustomDictionaryStats. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ILargeCustomDictionaryStats); + + /** LargeCustomDictionaryStats approxNumPhrases. */ + public approxNumPhrases: (number|Long|string); + + /** + * Creates a new LargeCustomDictionaryStats instance using the specified properties. + * @param [properties] Properties to set + * @returns LargeCustomDictionaryStats instance + */ + public static create(properties?: google.privacy.dlp.v2.ILargeCustomDictionaryStats): google.privacy.dlp.v2.LargeCustomDictionaryStats; + + /** + * Encodes the specified LargeCustomDictionaryStats message. Does not implicitly {@link google.privacy.dlp.v2.LargeCustomDictionaryStats.verify|verify} messages. + * @param message LargeCustomDictionaryStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ILargeCustomDictionaryStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LargeCustomDictionaryStats message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.LargeCustomDictionaryStats.verify|verify} messages. + * @param message LargeCustomDictionaryStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ILargeCustomDictionaryStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LargeCustomDictionaryStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LargeCustomDictionaryStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.LargeCustomDictionaryStats; + + /** + * Decodes a LargeCustomDictionaryStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LargeCustomDictionaryStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.LargeCustomDictionaryStats; + + /** + * Verifies a LargeCustomDictionaryStats message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LargeCustomDictionaryStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LargeCustomDictionaryStats + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.LargeCustomDictionaryStats; + + /** + * Creates a plain object from a LargeCustomDictionaryStats message. Also converts values to other types if specified. + * @param message LargeCustomDictionaryStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.LargeCustomDictionaryStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LargeCustomDictionaryStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LargeCustomDictionaryStats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StoredInfoTypeConfig. */ + interface IStoredInfoTypeConfig { + + /** StoredInfoTypeConfig displayName */ + displayName?: (string|null); + + /** StoredInfoTypeConfig description */ + description?: (string|null); + + /** StoredInfoTypeConfig largeCustomDictionary */ + largeCustomDictionary?: (google.privacy.dlp.v2.ILargeCustomDictionaryConfig|null); + + /** StoredInfoTypeConfig dictionary */ + dictionary?: (google.privacy.dlp.v2.CustomInfoType.IDictionary|null); + + /** StoredInfoTypeConfig regex */ + regex?: (google.privacy.dlp.v2.CustomInfoType.IRegex|null); + } + + /** Represents a StoredInfoTypeConfig. */ + class StoredInfoTypeConfig implements IStoredInfoTypeConfig { + + /** + * Constructs a new StoredInfoTypeConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IStoredInfoTypeConfig); + + /** StoredInfoTypeConfig displayName. */ + public displayName: string; + + /** StoredInfoTypeConfig description. */ + public description: string; + + /** StoredInfoTypeConfig largeCustomDictionary. */ + public largeCustomDictionary?: (google.privacy.dlp.v2.ILargeCustomDictionaryConfig|null); + + /** StoredInfoTypeConfig dictionary. */ + public dictionary?: (google.privacy.dlp.v2.CustomInfoType.IDictionary|null); + + /** StoredInfoTypeConfig regex. */ + public regex?: (google.privacy.dlp.v2.CustomInfoType.IRegex|null); + + /** StoredInfoTypeConfig type. */ + public type?: ("largeCustomDictionary"|"dictionary"|"regex"); + + /** + * Creates a new StoredInfoTypeConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns StoredInfoTypeConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.IStoredInfoTypeConfig): google.privacy.dlp.v2.StoredInfoTypeConfig; + + /** + * Encodes the specified StoredInfoTypeConfig message. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoTypeConfig.verify|verify} messages. + * @param message StoredInfoTypeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IStoredInfoTypeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StoredInfoTypeConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoTypeConfig.verify|verify} messages. + * @param message StoredInfoTypeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IStoredInfoTypeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StoredInfoTypeConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StoredInfoTypeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.StoredInfoTypeConfig; + + /** + * Decodes a StoredInfoTypeConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StoredInfoTypeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.StoredInfoTypeConfig; + + /** + * Verifies a StoredInfoTypeConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StoredInfoTypeConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StoredInfoTypeConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.StoredInfoTypeConfig; + + /** + * Creates a plain object from a StoredInfoTypeConfig message. Also converts values to other types if specified. + * @param message StoredInfoTypeConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.StoredInfoTypeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StoredInfoTypeConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StoredInfoTypeConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StoredInfoTypeStats. */ + interface IStoredInfoTypeStats { + + /** StoredInfoTypeStats largeCustomDictionary */ + largeCustomDictionary?: (google.privacy.dlp.v2.ILargeCustomDictionaryStats|null); + } + + /** Represents a StoredInfoTypeStats. */ + class StoredInfoTypeStats implements IStoredInfoTypeStats { + + /** + * Constructs a new StoredInfoTypeStats. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IStoredInfoTypeStats); + + /** StoredInfoTypeStats largeCustomDictionary. */ + public largeCustomDictionary?: (google.privacy.dlp.v2.ILargeCustomDictionaryStats|null); + + /** StoredInfoTypeStats type. */ + public type?: "largeCustomDictionary"; + + /** + * Creates a new StoredInfoTypeStats instance using the specified properties. + * @param [properties] Properties to set + * @returns StoredInfoTypeStats instance + */ + public static create(properties?: google.privacy.dlp.v2.IStoredInfoTypeStats): google.privacy.dlp.v2.StoredInfoTypeStats; + + /** + * Encodes the specified StoredInfoTypeStats message. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoTypeStats.verify|verify} messages. + * @param message StoredInfoTypeStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IStoredInfoTypeStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StoredInfoTypeStats message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoTypeStats.verify|verify} messages. + * @param message StoredInfoTypeStats message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IStoredInfoTypeStats, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StoredInfoTypeStats message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StoredInfoTypeStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.StoredInfoTypeStats; + + /** + * Decodes a StoredInfoTypeStats message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StoredInfoTypeStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.StoredInfoTypeStats; + + /** + * Verifies a StoredInfoTypeStats message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StoredInfoTypeStats message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StoredInfoTypeStats + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.StoredInfoTypeStats; + + /** + * Creates a plain object from a StoredInfoTypeStats message. Also converts values to other types if specified. + * @param message StoredInfoTypeStats + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.StoredInfoTypeStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StoredInfoTypeStats to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StoredInfoTypeStats + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StoredInfoTypeVersion. */ + interface IStoredInfoTypeVersion { + + /** StoredInfoTypeVersion config */ + config?: (google.privacy.dlp.v2.IStoredInfoTypeConfig|null); + + /** StoredInfoTypeVersion createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** StoredInfoTypeVersion state */ + state?: (google.privacy.dlp.v2.StoredInfoTypeState|keyof typeof google.privacy.dlp.v2.StoredInfoTypeState|null); + + /** StoredInfoTypeVersion errors */ + errors?: (google.privacy.dlp.v2.IError[]|null); + + /** StoredInfoTypeVersion stats */ + stats?: (google.privacy.dlp.v2.IStoredInfoTypeStats|null); + } + + /** Represents a StoredInfoTypeVersion. */ + class StoredInfoTypeVersion implements IStoredInfoTypeVersion { + + /** + * Constructs a new StoredInfoTypeVersion. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IStoredInfoTypeVersion); + + /** StoredInfoTypeVersion config. */ + public config?: (google.privacy.dlp.v2.IStoredInfoTypeConfig|null); + + /** StoredInfoTypeVersion createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** StoredInfoTypeVersion state. */ + public state: (google.privacy.dlp.v2.StoredInfoTypeState|keyof typeof google.privacy.dlp.v2.StoredInfoTypeState); + + /** StoredInfoTypeVersion errors. */ + public errors: google.privacy.dlp.v2.IError[]; + + /** StoredInfoTypeVersion stats. */ + public stats?: (google.privacy.dlp.v2.IStoredInfoTypeStats|null); + + /** + * Creates a new StoredInfoTypeVersion instance using the specified properties. + * @param [properties] Properties to set + * @returns StoredInfoTypeVersion instance + */ + public static create(properties?: google.privacy.dlp.v2.IStoredInfoTypeVersion): google.privacy.dlp.v2.StoredInfoTypeVersion; + + /** + * Encodes the specified StoredInfoTypeVersion message. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoTypeVersion.verify|verify} messages. + * @param message StoredInfoTypeVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IStoredInfoTypeVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StoredInfoTypeVersion message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoTypeVersion.verify|verify} messages. + * @param message StoredInfoTypeVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IStoredInfoTypeVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StoredInfoTypeVersion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StoredInfoTypeVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.StoredInfoTypeVersion; + + /** + * Decodes a StoredInfoTypeVersion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StoredInfoTypeVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.StoredInfoTypeVersion; + + /** + * Verifies a StoredInfoTypeVersion message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StoredInfoTypeVersion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StoredInfoTypeVersion + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.StoredInfoTypeVersion; + + /** + * Creates a plain object from a StoredInfoTypeVersion message. Also converts values to other types if specified. + * @param message StoredInfoTypeVersion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.StoredInfoTypeVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StoredInfoTypeVersion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StoredInfoTypeVersion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StoredInfoType. */ + interface IStoredInfoType { + + /** StoredInfoType name */ + name?: (string|null); + + /** StoredInfoType currentVersion */ + currentVersion?: (google.privacy.dlp.v2.IStoredInfoTypeVersion|null); + + /** StoredInfoType pendingVersions */ + pendingVersions?: (google.privacy.dlp.v2.IStoredInfoTypeVersion[]|null); + } + + /** Represents a StoredInfoType. */ + class StoredInfoType implements IStoredInfoType { + + /** + * Constructs a new StoredInfoType. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IStoredInfoType); + + /** StoredInfoType name. */ + public name: string; + + /** StoredInfoType currentVersion. */ + public currentVersion?: (google.privacy.dlp.v2.IStoredInfoTypeVersion|null); + + /** StoredInfoType pendingVersions. */ + public pendingVersions: google.privacy.dlp.v2.IStoredInfoTypeVersion[]; + + /** + * Creates a new StoredInfoType instance using the specified properties. + * @param [properties] Properties to set + * @returns StoredInfoType instance + */ + public static create(properties?: google.privacy.dlp.v2.IStoredInfoType): google.privacy.dlp.v2.StoredInfoType; + + /** + * Encodes the specified StoredInfoType message. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoType.verify|verify} messages. + * @param message StoredInfoType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IStoredInfoType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StoredInfoType message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoType.verify|verify} messages. + * @param message StoredInfoType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IStoredInfoType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StoredInfoType message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StoredInfoType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.StoredInfoType; + + /** + * Decodes a StoredInfoType message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StoredInfoType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.StoredInfoType; + + /** + * Verifies a StoredInfoType message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StoredInfoType message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StoredInfoType + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.StoredInfoType; + + /** + * Creates a plain object from a StoredInfoType message. Also converts values to other types if specified. + * @param message StoredInfoType + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.StoredInfoType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StoredInfoType to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StoredInfoType + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateStoredInfoTypeRequest. */ + interface ICreateStoredInfoTypeRequest { + + /** CreateStoredInfoTypeRequest parent */ + parent?: (string|null); + + /** CreateStoredInfoTypeRequest config */ + config?: (google.privacy.dlp.v2.IStoredInfoTypeConfig|null); + + /** CreateStoredInfoTypeRequest storedInfoTypeId */ + storedInfoTypeId?: (string|null); + + /** CreateStoredInfoTypeRequest locationId */ + locationId?: (string|null); + } + + /** Represents a CreateStoredInfoTypeRequest. */ + class CreateStoredInfoTypeRequest implements ICreateStoredInfoTypeRequest { + + /** + * Constructs a new CreateStoredInfoTypeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ICreateStoredInfoTypeRequest); + + /** CreateStoredInfoTypeRequest parent. */ + public parent: string; + + /** CreateStoredInfoTypeRequest config. */ + public config?: (google.privacy.dlp.v2.IStoredInfoTypeConfig|null); + + /** CreateStoredInfoTypeRequest storedInfoTypeId. */ + public storedInfoTypeId: string; + + /** CreateStoredInfoTypeRequest locationId. */ + public locationId: string; + + /** + * Creates a new CreateStoredInfoTypeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateStoredInfoTypeRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.ICreateStoredInfoTypeRequest): google.privacy.dlp.v2.CreateStoredInfoTypeRequest; + + /** + * Encodes the specified CreateStoredInfoTypeRequest message. Does not implicitly {@link google.privacy.dlp.v2.CreateStoredInfoTypeRequest.verify|verify} messages. + * @param message CreateStoredInfoTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ICreateStoredInfoTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateStoredInfoTypeRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CreateStoredInfoTypeRequest.verify|verify} messages. + * @param message CreateStoredInfoTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ICreateStoredInfoTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateStoredInfoTypeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateStoredInfoTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CreateStoredInfoTypeRequest; + + /** + * Decodes a CreateStoredInfoTypeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateStoredInfoTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CreateStoredInfoTypeRequest; + + /** + * Verifies a CreateStoredInfoTypeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateStoredInfoTypeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateStoredInfoTypeRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CreateStoredInfoTypeRequest; + + /** + * Creates a plain object from a CreateStoredInfoTypeRequest message. Also converts values to other types if specified. + * @param message CreateStoredInfoTypeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CreateStoredInfoTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateStoredInfoTypeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateStoredInfoTypeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateStoredInfoTypeRequest. */ + interface IUpdateStoredInfoTypeRequest { + + /** UpdateStoredInfoTypeRequest name */ + name?: (string|null); + + /** UpdateStoredInfoTypeRequest config */ + config?: (google.privacy.dlp.v2.IStoredInfoTypeConfig|null); + + /** UpdateStoredInfoTypeRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateStoredInfoTypeRequest. */ + class UpdateStoredInfoTypeRequest implements IUpdateStoredInfoTypeRequest { + + /** + * Constructs a new UpdateStoredInfoTypeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest); + + /** UpdateStoredInfoTypeRequest name. */ + public name: string; + + /** UpdateStoredInfoTypeRequest config. */ + public config?: (google.privacy.dlp.v2.IStoredInfoTypeConfig|null); + + /** UpdateStoredInfoTypeRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateStoredInfoTypeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateStoredInfoTypeRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest): google.privacy.dlp.v2.UpdateStoredInfoTypeRequest; + + /** + * Encodes the specified UpdateStoredInfoTypeRequest message. Does not implicitly {@link google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.verify|verify} messages. + * @param message UpdateStoredInfoTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateStoredInfoTypeRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.verify|verify} messages. + * @param message UpdateStoredInfoTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateStoredInfoTypeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateStoredInfoTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.UpdateStoredInfoTypeRequest; + + /** + * Decodes an UpdateStoredInfoTypeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateStoredInfoTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.UpdateStoredInfoTypeRequest; + + /** + * Verifies an UpdateStoredInfoTypeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateStoredInfoTypeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateStoredInfoTypeRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.UpdateStoredInfoTypeRequest; + + /** + * Creates a plain object from an UpdateStoredInfoTypeRequest message. Also converts values to other types if specified. + * @param message UpdateStoredInfoTypeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.UpdateStoredInfoTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateStoredInfoTypeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateStoredInfoTypeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetStoredInfoTypeRequest. */ + interface IGetStoredInfoTypeRequest { + + /** GetStoredInfoTypeRequest name */ + name?: (string|null); + } + + /** Represents a GetStoredInfoTypeRequest. */ + class GetStoredInfoTypeRequest implements IGetStoredInfoTypeRequest { + + /** + * Constructs a new GetStoredInfoTypeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IGetStoredInfoTypeRequest); + + /** GetStoredInfoTypeRequest name. */ + public name: string; + + /** + * Creates a new GetStoredInfoTypeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetStoredInfoTypeRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IGetStoredInfoTypeRequest): google.privacy.dlp.v2.GetStoredInfoTypeRequest; + + /** + * Encodes the specified GetStoredInfoTypeRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetStoredInfoTypeRequest.verify|verify} messages. + * @param message GetStoredInfoTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IGetStoredInfoTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetStoredInfoTypeRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetStoredInfoTypeRequest.verify|verify} messages. + * @param message GetStoredInfoTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IGetStoredInfoTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetStoredInfoTypeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetStoredInfoTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.GetStoredInfoTypeRequest; + + /** + * Decodes a GetStoredInfoTypeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetStoredInfoTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.GetStoredInfoTypeRequest; + + /** + * Verifies a GetStoredInfoTypeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetStoredInfoTypeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetStoredInfoTypeRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.GetStoredInfoTypeRequest; + + /** + * Creates a plain object from a GetStoredInfoTypeRequest message. Also converts values to other types if specified. + * @param message GetStoredInfoTypeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.GetStoredInfoTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetStoredInfoTypeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetStoredInfoTypeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListStoredInfoTypesRequest. */ + interface IListStoredInfoTypesRequest { + + /** ListStoredInfoTypesRequest parent */ + parent?: (string|null); + + /** ListStoredInfoTypesRequest pageToken */ + pageToken?: (string|null); + + /** ListStoredInfoTypesRequest pageSize */ + pageSize?: (number|null); + + /** ListStoredInfoTypesRequest orderBy */ + orderBy?: (string|null); + + /** ListStoredInfoTypesRequest locationId */ + locationId?: (string|null); + } + + /** Represents a ListStoredInfoTypesRequest. */ + class ListStoredInfoTypesRequest implements IListStoredInfoTypesRequest { + + /** + * Constructs a new ListStoredInfoTypesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListStoredInfoTypesRequest); + + /** ListStoredInfoTypesRequest parent. */ + public parent: string; + + /** ListStoredInfoTypesRequest pageToken. */ + public pageToken: string; + + /** ListStoredInfoTypesRequest pageSize. */ + public pageSize: number; + + /** ListStoredInfoTypesRequest orderBy. */ + public orderBy: string; + + /** ListStoredInfoTypesRequest locationId. */ + public locationId: string; + + /** + * Creates a new ListStoredInfoTypesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListStoredInfoTypesRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IListStoredInfoTypesRequest): google.privacy.dlp.v2.ListStoredInfoTypesRequest; + + /** + * Encodes the specified ListStoredInfoTypesRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListStoredInfoTypesRequest.verify|verify} messages. + * @param message ListStoredInfoTypesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListStoredInfoTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListStoredInfoTypesRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListStoredInfoTypesRequest.verify|verify} messages. + * @param message ListStoredInfoTypesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListStoredInfoTypesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListStoredInfoTypesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListStoredInfoTypesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ListStoredInfoTypesRequest; + + /** + * Decodes a ListStoredInfoTypesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListStoredInfoTypesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ListStoredInfoTypesRequest; + + /** + * Verifies a ListStoredInfoTypesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListStoredInfoTypesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListStoredInfoTypesRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListStoredInfoTypesRequest; + + /** + * Creates a plain object from a ListStoredInfoTypesRequest message. Also converts values to other types if specified. + * @param message ListStoredInfoTypesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListStoredInfoTypesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListStoredInfoTypesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListStoredInfoTypesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListStoredInfoTypesResponse. */ + interface IListStoredInfoTypesResponse { + + /** ListStoredInfoTypesResponse storedInfoTypes */ + storedInfoTypes?: (google.privacy.dlp.v2.IStoredInfoType[]|null); + + /** ListStoredInfoTypesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListStoredInfoTypesResponse. */ + class ListStoredInfoTypesResponse implements IListStoredInfoTypesResponse { + + /** + * Constructs a new ListStoredInfoTypesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListStoredInfoTypesResponse); + + /** ListStoredInfoTypesResponse storedInfoTypes. */ + public storedInfoTypes: google.privacy.dlp.v2.IStoredInfoType[]; + + /** ListStoredInfoTypesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListStoredInfoTypesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListStoredInfoTypesResponse instance + */ + public static create(properties?: google.privacy.dlp.v2.IListStoredInfoTypesResponse): google.privacy.dlp.v2.ListStoredInfoTypesResponse; + + /** + * Encodes the specified ListStoredInfoTypesResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListStoredInfoTypesResponse.verify|verify} messages. + * @param message ListStoredInfoTypesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListStoredInfoTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListStoredInfoTypesResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListStoredInfoTypesResponse.verify|verify} messages. + * @param message ListStoredInfoTypesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListStoredInfoTypesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListStoredInfoTypesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListStoredInfoTypesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ListStoredInfoTypesResponse; + + /** + * Decodes a ListStoredInfoTypesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListStoredInfoTypesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ListStoredInfoTypesResponse; + + /** + * Verifies a ListStoredInfoTypesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListStoredInfoTypesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListStoredInfoTypesResponse + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListStoredInfoTypesResponse; + + /** + * Creates a plain object from a ListStoredInfoTypesResponse message. Also converts values to other types if specified. + * @param message ListStoredInfoTypesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListStoredInfoTypesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListStoredInfoTypesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListStoredInfoTypesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteStoredInfoTypeRequest. */ + interface IDeleteStoredInfoTypeRequest { + + /** DeleteStoredInfoTypeRequest name */ + name?: (string|null); + } + + /** Represents a DeleteStoredInfoTypeRequest. */ + class DeleteStoredInfoTypeRequest implements IDeleteStoredInfoTypeRequest { + + /** + * Constructs a new DeleteStoredInfoTypeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest); + + /** DeleteStoredInfoTypeRequest name. */ + public name: string; + + /** + * Creates a new DeleteStoredInfoTypeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteStoredInfoTypeRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest): google.privacy.dlp.v2.DeleteStoredInfoTypeRequest; + + /** + * Encodes the specified DeleteStoredInfoTypeRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.verify|verify} messages. + * @param message DeleteStoredInfoTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteStoredInfoTypeRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.verify|verify} messages. + * @param message DeleteStoredInfoTypeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteStoredInfoTypeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteStoredInfoTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DeleteStoredInfoTypeRequest; + + /** + * Decodes a DeleteStoredInfoTypeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteStoredInfoTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DeleteStoredInfoTypeRequest; + + /** + * Verifies a DeleteStoredInfoTypeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteStoredInfoTypeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteStoredInfoTypeRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DeleteStoredInfoTypeRequest; + + /** + * Creates a plain object from a DeleteStoredInfoTypeRequest message. Also converts values to other types if specified. + * @param message DeleteStoredInfoTypeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DeleteStoredInfoTypeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteStoredInfoTypeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteStoredInfoTypeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HybridInspectJobTriggerRequest. */ + interface IHybridInspectJobTriggerRequest { + + /** HybridInspectJobTriggerRequest name */ + name?: (string|null); + + /** HybridInspectJobTriggerRequest hybridItem */ + hybridItem?: (google.privacy.dlp.v2.IHybridContentItem|null); + } + + /** Represents a HybridInspectJobTriggerRequest. */ + class HybridInspectJobTriggerRequest implements IHybridInspectJobTriggerRequest { + + /** + * Constructs a new HybridInspectJobTriggerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IHybridInspectJobTriggerRequest); + + /** HybridInspectJobTriggerRequest name. */ + public name: string; + + /** HybridInspectJobTriggerRequest hybridItem. */ + public hybridItem?: (google.privacy.dlp.v2.IHybridContentItem|null); + + /** + * Creates a new HybridInspectJobTriggerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns HybridInspectJobTriggerRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IHybridInspectJobTriggerRequest): google.privacy.dlp.v2.HybridInspectJobTriggerRequest; + + /** + * Encodes the specified HybridInspectJobTriggerRequest message. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectJobTriggerRequest.verify|verify} messages. + * @param message HybridInspectJobTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IHybridInspectJobTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HybridInspectJobTriggerRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectJobTriggerRequest.verify|verify} messages. + * @param message HybridInspectJobTriggerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IHybridInspectJobTriggerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HybridInspectJobTriggerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HybridInspectJobTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.HybridInspectJobTriggerRequest; + + /** + * Decodes a HybridInspectJobTriggerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HybridInspectJobTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.HybridInspectJobTriggerRequest; + + /** + * Verifies a HybridInspectJobTriggerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HybridInspectJobTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HybridInspectJobTriggerRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.HybridInspectJobTriggerRequest; + + /** + * Creates a plain object from a HybridInspectJobTriggerRequest message. Also converts values to other types if specified. + * @param message HybridInspectJobTriggerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.HybridInspectJobTriggerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HybridInspectJobTriggerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HybridInspectJobTriggerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HybridInspectDlpJobRequest. */ + interface IHybridInspectDlpJobRequest { + + /** HybridInspectDlpJobRequest name */ + name?: (string|null); + + /** HybridInspectDlpJobRequest hybridItem */ + hybridItem?: (google.privacy.dlp.v2.IHybridContentItem|null); + } + + /** Represents a HybridInspectDlpJobRequest. */ + class HybridInspectDlpJobRequest implements IHybridInspectDlpJobRequest { + + /** + * Constructs a new HybridInspectDlpJobRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IHybridInspectDlpJobRequest); + + /** HybridInspectDlpJobRequest name. */ + public name: string; + + /** HybridInspectDlpJobRequest hybridItem. */ + public hybridItem?: (google.privacy.dlp.v2.IHybridContentItem|null); + + /** + * Creates a new HybridInspectDlpJobRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns HybridInspectDlpJobRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IHybridInspectDlpJobRequest): google.privacy.dlp.v2.HybridInspectDlpJobRequest; + + /** + * Encodes the specified HybridInspectDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectDlpJobRequest.verify|verify} messages. + * @param message HybridInspectDlpJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IHybridInspectDlpJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HybridInspectDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectDlpJobRequest.verify|verify} messages. + * @param message HybridInspectDlpJobRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IHybridInspectDlpJobRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HybridInspectDlpJobRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HybridInspectDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.HybridInspectDlpJobRequest; + + /** + * Decodes a HybridInspectDlpJobRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HybridInspectDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.HybridInspectDlpJobRequest; + + /** + * Verifies a HybridInspectDlpJobRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HybridInspectDlpJobRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HybridInspectDlpJobRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.HybridInspectDlpJobRequest; + + /** + * Creates a plain object from a HybridInspectDlpJobRequest message. Also converts values to other types if specified. + * @param message HybridInspectDlpJobRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.HybridInspectDlpJobRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HybridInspectDlpJobRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HybridInspectDlpJobRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HybridContentItem. */ + interface IHybridContentItem { + + /** HybridContentItem item */ + item?: (google.privacy.dlp.v2.IContentItem|null); + + /** HybridContentItem findingDetails */ + findingDetails?: (google.privacy.dlp.v2.IHybridFindingDetails|null); + } + + /** Represents a HybridContentItem. */ + class HybridContentItem implements IHybridContentItem { + + /** + * Constructs a new HybridContentItem. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IHybridContentItem); + + /** HybridContentItem item. */ + public item?: (google.privacy.dlp.v2.IContentItem|null); + + /** HybridContentItem findingDetails. */ + public findingDetails?: (google.privacy.dlp.v2.IHybridFindingDetails|null); + + /** + * Creates a new HybridContentItem instance using the specified properties. + * @param [properties] Properties to set + * @returns HybridContentItem instance + */ + public static create(properties?: google.privacy.dlp.v2.IHybridContentItem): google.privacy.dlp.v2.HybridContentItem; + + /** + * Encodes the specified HybridContentItem message. Does not implicitly {@link google.privacy.dlp.v2.HybridContentItem.verify|verify} messages. + * @param message HybridContentItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IHybridContentItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HybridContentItem message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridContentItem.verify|verify} messages. + * @param message HybridContentItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IHybridContentItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HybridContentItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HybridContentItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.HybridContentItem; + + /** + * Decodes a HybridContentItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HybridContentItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.HybridContentItem; + + /** + * Verifies a HybridContentItem message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HybridContentItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HybridContentItem + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.HybridContentItem; + + /** + * Creates a plain object from a HybridContentItem message. Also converts values to other types if specified. + * @param message HybridContentItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.HybridContentItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HybridContentItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HybridContentItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HybridFindingDetails. */ + interface IHybridFindingDetails { + + /** HybridFindingDetails containerDetails */ + containerDetails?: (google.privacy.dlp.v2.IContainer|null); + + /** HybridFindingDetails fileOffset */ + fileOffset?: (number|Long|string|null); + + /** HybridFindingDetails rowOffset */ + rowOffset?: (number|Long|string|null); + + /** HybridFindingDetails tableOptions */ + tableOptions?: (google.privacy.dlp.v2.ITableOptions|null); + + /** HybridFindingDetails labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a HybridFindingDetails. */ + class HybridFindingDetails implements IHybridFindingDetails { + + /** + * Constructs a new HybridFindingDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IHybridFindingDetails); + + /** HybridFindingDetails containerDetails. */ + public containerDetails?: (google.privacy.dlp.v2.IContainer|null); + + /** HybridFindingDetails fileOffset. */ + public fileOffset: (number|Long|string); + + /** HybridFindingDetails rowOffset. */ + public rowOffset: (number|Long|string); + + /** HybridFindingDetails tableOptions. */ + public tableOptions?: (google.privacy.dlp.v2.ITableOptions|null); + + /** HybridFindingDetails labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new HybridFindingDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns HybridFindingDetails instance + */ + public static create(properties?: google.privacy.dlp.v2.IHybridFindingDetails): google.privacy.dlp.v2.HybridFindingDetails; + + /** + * Encodes the specified HybridFindingDetails message. Does not implicitly {@link google.privacy.dlp.v2.HybridFindingDetails.verify|verify} messages. + * @param message HybridFindingDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IHybridFindingDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HybridFindingDetails message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridFindingDetails.verify|verify} messages. + * @param message HybridFindingDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IHybridFindingDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HybridFindingDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HybridFindingDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.HybridFindingDetails; + + /** + * Decodes a HybridFindingDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HybridFindingDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.HybridFindingDetails; + + /** + * Verifies a HybridFindingDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HybridFindingDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HybridFindingDetails + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.HybridFindingDetails; + + /** + * Creates a plain object from a HybridFindingDetails message. Also converts values to other types if specified. + * @param message HybridFindingDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.HybridFindingDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HybridFindingDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HybridFindingDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HybridInspectResponse. */ + interface IHybridInspectResponse { + } + + /** Represents a HybridInspectResponse. */ + class HybridInspectResponse implements IHybridInspectResponse { + + /** + * Constructs a new HybridInspectResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IHybridInspectResponse); + + /** + * Creates a new HybridInspectResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns HybridInspectResponse instance + */ + public static create(properties?: google.privacy.dlp.v2.IHybridInspectResponse): google.privacy.dlp.v2.HybridInspectResponse; + + /** + * Encodes the specified HybridInspectResponse message. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectResponse.verify|verify} messages. + * @param message HybridInspectResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IHybridInspectResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HybridInspectResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectResponse.verify|verify} messages. + * @param message HybridInspectResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IHybridInspectResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HybridInspectResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HybridInspectResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.HybridInspectResponse; + + /** + * Decodes a HybridInspectResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HybridInspectResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.HybridInspectResponse; + + /** + * Verifies a HybridInspectResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HybridInspectResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HybridInspectResponse + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.HybridInspectResponse; + + /** + * Creates a plain object from a HybridInspectResponse message. Also converts values to other types if specified. + * @param message HybridInspectResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.HybridInspectResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HybridInspectResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HybridInspectResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** RelationalOperator enum. */ + enum RelationalOperator { + RELATIONAL_OPERATOR_UNSPECIFIED = 0, + EQUAL_TO = 1, + NOT_EQUAL_TO = 2, + GREATER_THAN = 3, + LESS_THAN = 4, + GREATER_THAN_OR_EQUALS = 5, + LESS_THAN_OR_EQUALS = 6, + EXISTS = 7 + } + + /** MatchingType enum. */ + enum MatchingType { + MATCHING_TYPE_UNSPECIFIED = 0, + MATCHING_TYPE_FULL_MATCH = 1, + MATCHING_TYPE_PARTIAL_MATCH = 2, + MATCHING_TYPE_INVERSE_MATCH = 3, + MATCHING_TYPE_RULE_SPECIFIC = 4 + } + + /** Properties of an ImageContainmentType. */ + interface IImageContainmentType { + + /** ImageContainmentType encloses */ + encloses?: (google.privacy.dlp.v2.IEncloses|null); + + /** ImageContainmentType fullyInside */ + fullyInside?: (google.privacy.dlp.v2.IFullyInside|null); + + /** ImageContainmentType overlaps */ + overlaps?: (google.privacy.dlp.v2.IOverlap|null); + } + + /** Represents an ImageContainmentType. */ + class ImageContainmentType implements IImageContainmentType { + + /** + * Constructs a new ImageContainmentType. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IImageContainmentType); + + /** ImageContainmentType encloses. */ + public encloses?: (google.privacy.dlp.v2.IEncloses|null); + + /** ImageContainmentType fullyInside. */ + public fullyInside?: (google.privacy.dlp.v2.IFullyInside|null); + + /** ImageContainmentType overlaps. */ + public overlaps?: (google.privacy.dlp.v2.IOverlap|null); + + /** ImageContainmentType type. */ + public type?: ("encloses"|"fullyInside"|"overlaps"); + + /** + * Creates a new ImageContainmentType instance using the specified properties. + * @param [properties] Properties to set + * @returns ImageContainmentType instance + */ + public static create(properties?: google.privacy.dlp.v2.IImageContainmentType): google.privacy.dlp.v2.ImageContainmentType; + + /** + * Encodes the specified ImageContainmentType message. Does not implicitly {@link google.privacy.dlp.v2.ImageContainmentType.verify|verify} messages. + * @param message ImageContainmentType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IImageContainmentType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImageContainmentType message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ImageContainmentType.verify|verify} messages. + * @param message ImageContainmentType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IImageContainmentType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImageContainmentType message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImageContainmentType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ImageContainmentType; + + /** + * Decodes an ImageContainmentType message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImageContainmentType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ImageContainmentType; + + /** + * Verifies an ImageContainmentType message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImageContainmentType message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImageContainmentType + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ImageContainmentType; + + /** + * Creates a plain object from an ImageContainmentType message. Also converts values to other types if specified. + * @param message ImageContainmentType + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ImageContainmentType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImageContainmentType to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImageContainmentType + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Overlap. */ + interface IOverlap { + } + + /** Represents an Overlap. */ + class Overlap implements IOverlap { + + /** + * Constructs a new Overlap. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IOverlap); + + /** + * Creates a new Overlap instance using the specified properties. + * @param [properties] Properties to set + * @returns Overlap instance + */ + public static create(properties?: google.privacy.dlp.v2.IOverlap): google.privacy.dlp.v2.Overlap; + + /** + * Encodes the specified Overlap message. Does not implicitly {@link google.privacy.dlp.v2.Overlap.verify|verify} messages. + * @param message Overlap message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IOverlap, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Overlap message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Overlap.verify|verify} messages. + * @param message Overlap message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IOverlap, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Overlap message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Overlap + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Overlap; + + /** + * Decodes an Overlap message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Overlap + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Overlap; + + /** + * Verifies an Overlap message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Overlap message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Overlap + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Overlap; + + /** + * Creates a plain object from an Overlap message. Also converts values to other types if specified. + * @param message Overlap + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Overlap, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Overlap to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Overlap + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Encloses. */ + interface IEncloses { + } + + /** Represents an Encloses. */ + class Encloses implements IEncloses { + + /** + * Constructs a new Encloses. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IEncloses); + + /** + * Creates a new Encloses instance using the specified properties. + * @param [properties] Properties to set + * @returns Encloses instance + */ + public static create(properties?: google.privacy.dlp.v2.IEncloses): google.privacy.dlp.v2.Encloses; + + /** + * Encodes the specified Encloses message. Does not implicitly {@link google.privacy.dlp.v2.Encloses.verify|verify} messages. + * @param message Encloses message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IEncloses, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Encloses message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Encloses.verify|verify} messages. + * @param message Encloses message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IEncloses, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Encloses message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Encloses + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Encloses; + + /** + * Decodes an Encloses message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Encloses + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Encloses; + + /** + * Verifies an Encloses message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Encloses message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Encloses + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Encloses; + + /** + * Creates a plain object from an Encloses message. Also converts values to other types if specified. + * @param message Encloses + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Encloses, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Encloses to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Encloses + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FullyInside. */ + interface IFullyInside { + } + + /** Represents a FullyInside. */ + class FullyInside implements IFullyInside { + + /** + * Constructs a new FullyInside. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IFullyInside); + + /** + * Creates a new FullyInside instance using the specified properties. + * @param [properties] Properties to set + * @returns FullyInside instance + */ + public static create(properties?: google.privacy.dlp.v2.IFullyInside): google.privacy.dlp.v2.FullyInside; + + /** + * Encodes the specified FullyInside message. Does not implicitly {@link google.privacy.dlp.v2.FullyInside.verify|verify} messages. + * @param message FullyInside message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IFullyInside, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FullyInside message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FullyInside.verify|verify} messages. + * @param message FullyInside message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IFullyInside, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FullyInside message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FullyInside + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.FullyInside; + + /** + * Decodes a FullyInside message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FullyInside + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.FullyInside; + + /** + * Verifies a FullyInside message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FullyInside message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FullyInside + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.FullyInside; + + /** + * Creates a plain object from a FullyInside message. Also converts values to other types if specified. + * @param message FullyInside + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.FullyInside, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FullyInside to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FullyInside + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** ContentOption enum. */ + enum ContentOption { + CONTENT_UNSPECIFIED = 0, + CONTENT_TEXT = 1, + CONTENT_IMAGE = 2 + } + + /** MetadataType enum. */ + enum MetadataType { + METADATATYPE_UNSPECIFIED = 0, + STORAGE_METADATA = 2, + CONTENT_METADATA = 3, + CLIENT_PROVIDED_METADATA = 4 + } + + /** InfoTypeSupportedBy enum. */ + enum InfoTypeSupportedBy { + ENUM_TYPE_UNSPECIFIED = 0, + INSPECT = 1, + RISK_ANALYSIS = 2 + } + + /** DlpJobType enum. */ + enum DlpJobType { + DLP_JOB_TYPE_UNSPECIFIED = 0, + INSPECT_JOB = 1, + RISK_ANALYSIS_JOB = 2 + } + + /** StoredInfoTypeState enum. */ + enum StoredInfoTypeState { + STORED_INFO_TYPE_STATE_UNSPECIFIED = 0, + PENDING = 1, + READY = 2, + FAILED = 3, + INVALID = 4 + } + + /** Properties of a ListProjectDataProfilesRequest. */ + interface IListProjectDataProfilesRequest { + + /** ListProjectDataProfilesRequest parent */ + parent?: (string|null); + + /** ListProjectDataProfilesRequest pageToken */ + pageToken?: (string|null); + + /** ListProjectDataProfilesRequest pageSize */ + pageSize?: (number|null); + + /** ListProjectDataProfilesRequest orderBy */ + orderBy?: (string|null); + + /** ListProjectDataProfilesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListProjectDataProfilesRequest. */ + class ListProjectDataProfilesRequest implements IListProjectDataProfilesRequest { + + /** + * Constructs a new ListProjectDataProfilesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListProjectDataProfilesRequest); + + /** ListProjectDataProfilesRequest parent. */ + public parent: string; + + /** ListProjectDataProfilesRequest pageToken. */ + public pageToken: string; + + /** ListProjectDataProfilesRequest pageSize. */ + public pageSize: number; + + /** ListProjectDataProfilesRequest orderBy. */ + public orderBy: string; + + /** ListProjectDataProfilesRequest filter. */ + public filter: string; + + /** + * Creates a new ListProjectDataProfilesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListProjectDataProfilesRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IListProjectDataProfilesRequest): google.privacy.dlp.v2.ListProjectDataProfilesRequest; + + /** + * Encodes the specified ListProjectDataProfilesRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListProjectDataProfilesRequest.verify|verify} messages. + * @param message ListProjectDataProfilesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListProjectDataProfilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListProjectDataProfilesRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListProjectDataProfilesRequest.verify|verify} messages. + * @param message ListProjectDataProfilesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListProjectDataProfilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListProjectDataProfilesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListProjectDataProfilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ListProjectDataProfilesRequest; + + /** + * Decodes a ListProjectDataProfilesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListProjectDataProfilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ListProjectDataProfilesRequest; + + /** + * Verifies a ListProjectDataProfilesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListProjectDataProfilesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListProjectDataProfilesRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListProjectDataProfilesRequest; + + /** + * Creates a plain object from a ListProjectDataProfilesRequest message. Also converts values to other types if specified. + * @param message ListProjectDataProfilesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListProjectDataProfilesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListProjectDataProfilesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListProjectDataProfilesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListProjectDataProfilesResponse. */ + interface IListProjectDataProfilesResponse { + + /** ListProjectDataProfilesResponse projectDataProfiles */ + projectDataProfiles?: (google.privacy.dlp.v2.IProjectDataProfile[]|null); + + /** ListProjectDataProfilesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListProjectDataProfilesResponse. */ + class ListProjectDataProfilesResponse implements IListProjectDataProfilesResponse { + + /** + * Constructs a new ListProjectDataProfilesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListProjectDataProfilesResponse); + + /** ListProjectDataProfilesResponse projectDataProfiles. */ + public projectDataProfiles: google.privacy.dlp.v2.IProjectDataProfile[]; + + /** ListProjectDataProfilesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListProjectDataProfilesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListProjectDataProfilesResponse instance + */ + public static create(properties?: google.privacy.dlp.v2.IListProjectDataProfilesResponse): google.privacy.dlp.v2.ListProjectDataProfilesResponse; + + /** + * Encodes the specified ListProjectDataProfilesResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListProjectDataProfilesResponse.verify|verify} messages. + * @param message ListProjectDataProfilesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListProjectDataProfilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListProjectDataProfilesResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListProjectDataProfilesResponse.verify|verify} messages. + * @param message ListProjectDataProfilesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListProjectDataProfilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListProjectDataProfilesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListProjectDataProfilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ListProjectDataProfilesResponse; + + /** + * Decodes a ListProjectDataProfilesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListProjectDataProfilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ListProjectDataProfilesResponse; + + /** + * Verifies a ListProjectDataProfilesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListProjectDataProfilesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListProjectDataProfilesResponse + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListProjectDataProfilesResponse; + + /** + * Creates a plain object from a ListProjectDataProfilesResponse message. Also converts values to other types if specified. + * @param message ListProjectDataProfilesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListProjectDataProfilesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListProjectDataProfilesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListProjectDataProfilesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListTableDataProfilesRequest. */ + interface IListTableDataProfilesRequest { + + /** ListTableDataProfilesRequest parent */ + parent?: (string|null); + + /** ListTableDataProfilesRequest pageToken */ + pageToken?: (string|null); + + /** ListTableDataProfilesRequest pageSize */ + pageSize?: (number|null); + + /** ListTableDataProfilesRequest orderBy */ + orderBy?: (string|null); + + /** ListTableDataProfilesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListTableDataProfilesRequest. */ + class ListTableDataProfilesRequest implements IListTableDataProfilesRequest { + + /** + * Constructs a new ListTableDataProfilesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListTableDataProfilesRequest); + + /** ListTableDataProfilesRequest parent. */ + public parent: string; + + /** ListTableDataProfilesRequest pageToken. */ + public pageToken: string; + + /** ListTableDataProfilesRequest pageSize. */ + public pageSize: number; + + /** ListTableDataProfilesRequest orderBy. */ + public orderBy: string; + + /** ListTableDataProfilesRequest filter. */ + public filter: string; + + /** + * Creates a new ListTableDataProfilesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTableDataProfilesRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IListTableDataProfilesRequest): google.privacy.dlp.v2.ListTableDataProfilesRequest; + + /** + * Encodes the specified ListTableDataProfilesRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListTableDataProfilesRequest.verify|verify} messages. + * @param message ListTableDataProfilesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListTableDataProfilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTableDataProfilesRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListTableDataProfilesRequest.verify|verify} messages. + * @param message ListTableDataProfilesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListTableDataProfilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTableDataProfilesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTableDataProfilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ListTableDataProfilesRequest; + + /** + * Decodes a ListTableDataProfilesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTableDataProfilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ListTableDataProfilesRequest; + + /** + * Verifies a ListTableDataProfilesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTableDataProfilesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTableDataProfilesRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListTableDataProfilesRequest; + + /** + * Creates a plain object from a ListTableDataProfilesRequest message. Also converts values to other types if specified. + * @param message ListTableDataProfilesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListTableDataProfilesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTableDataProfilesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTableDataProfilesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListTableDataProfilesResponse. */ + interface IListTableDataProfilesResponse { + + /** ListTableDataProfilesResponse tableDataProfiles */ + tableDataProfiles?: (google.privacy.dlp.v2.ITableDataProfile[]|null); + + /** ListTableDataProfilesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListTableDataProfilesResponse. */ + class ListTableDataProfilesResponse implements IListTableDataProfilesResponse { + + /** + * Constructs a new ListTableDataProfilesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListTableDataProfilesResponse); + + /** ListTableDataProfilesResponse tableDataProfiles. */ + public tableDataProfiles: google.privacy.dlp.v2.ITableDataProfile[]; + + /** ListTableDataProfilesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListTableDataProfilesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListTableDataProfilesResponse instance + */ + public static create(properties?: google.privacy.dlp.v2.IListTableDataProfilesResponse): google.privacy.dlp.v2.ListTableDataProfilesResponse; + + /** + * Encodes the specified ListTableDataProfilesResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListTableDataProfilesResponse.verify|verify} messages. + * @param message ListTableDataProfilesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListTableDataProfilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListTableDataProfilesResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListTableDataProfilesResponse.verify|verify} messages. + * @param message ListTableDataProfilesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListTableDataProfilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListTableDataProfilesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListTableDataProfilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ListTableDataProfilesResponse; + + /** + * Decodes a ListTableDataProfilesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListTableDataProfilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ListTableDataProfilesResponse; + + /** + * Verifies a ListTableDataProfilesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListTableDataProfilesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListTableDataProfilesResponse + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListTableDataProfilesResponse; + + /** + * Creates a plain object from a ListTableDataProfilesResponse message. Also converts values to other types if specified. + * @param message ListTableDataProfilesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListTableDataProfilesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListTableDataProfilesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListTableDataProfilesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListColumnDataProfilesRequest. */ + interface IListColumnDataProfilesRequest { + + /** ListColumnDataProfilesRequest parent */ + parent?: (string|null); + + /** ListColumnDataProfilesRequest pageToken */ + pageToken?: (string|null); + + /** ListColumnDataProfilesRequest pageSize */ + pageSize?: (number|null); + + /** ListColumnDataProfilesRequest orderBy */ + orderBy?: (string|null); + + /** ListColumnDataProfilesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListColumnDataProfilesRequest. */ + class ListColumnDataProfilesRequest implements IListColumnDataProfilesRequest { + + /** + * Constructs a new ListColumnDataProfilesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListColumnDataProfilesRequest); + + /** ListColumnDataProfilesRequest parent. */ + public parent: string; + + /** ListColumnDataProfilesRequest pageToken. */ + public pageToken: string; + + /** ListColumnDataProfilesRequest pageSize. */ + public pageSize: number; + + /** ListColumnDataProfilesRequest orderBy. */ + public orderBy: string; + + /** ListColumnDataProfilesRequest filter. */ + public filter: string; + + /** + * Creates a new ListColumnDataProfilesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListColumnDataProfilesRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IListColumnDataProfilesRequest): google.privacy.dlp.v2.ListColumnDataProfilesRequest; + + /** + * Encodes the specified ListColumnDataProfilesRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListColumnDataProfilesRequest.verify|verify} messages. + * @param message ListColumnDataProfilesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListColumnDataProfilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListColumnDataProfilesRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListColumnDataProfilesRequest.verify|verify} messages. + * @param message ListColumnDataProfilesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListColumnDataProfilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListColumnDataProfilesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListColumnDataProfilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ListColumnDataProfilesRequest; + + /** + * Decodes a ListColumnDataProfilesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListColumnDataProfilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ListColumnDataProfilesRequest; + + /** + * Verifies a ListColumnDataProfilesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListColumnDataProfilesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListColumnDataProfilesRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListColumnDataProfilesRequest; + + /** + * Creates a plain object from a ListColumnDataProfilesRequest message. Also converts values to other types if specified. + * @param message ListColumnDataProfilesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListColumnDataProfilesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListColumnDataProfilesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListColumnDataProfilesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListColumnDataProfilesResponse. */ + interface IListColumnDataProfilesResponse { + + /** ListColumnDataProfilesResponse columnDataProfiles */ + columnDataProfiles?: (google.privacy.dlp.v2.IColumnDataProfile[]|null); + + /** ListColumnDataProfilesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListColumnDataProfilesResponse. */ + class ListColumnDataProfilesResponse implements IListColumnDataProfilesResponse { + + /** + * Constructs a new ListColumnDataProfilesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListColumnDataProfilesResponse); + + /** ListColumnDataProfilesResponse columnDataProfiles. */ + public columnDataProfiles: google.privacy.dlp.v2.IColumnDataProfile[]; + + /** ListColumnDataProfilesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListColumnDataProfilesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListColumnDataProfilesResponse instance + */ + public static create(properties?: google.privacy.dlp.v2.IListColumnDataProfilesResponse): google.privacy.dlp.v2.ListColumnDataProfilesResponse; + + /** + * Encodes the specified ListColumnDataProfilesResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListColumnDataProfilesResponse.verify|verify} messages. + * @param message ListColumnDataProfilesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListColumnDataProfilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListColumnDataProfilesResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListColumnDataProfilesResponse.verify|verify} messages. + * @param message ListColumnDataProfilesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListColumnDataProfilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListColumnDataProfilesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListColumnDataProfilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ListColumnDataProfilesResponse; + + /** + * Decodes a ListColumnDataProfilesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListColumnDataProfilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ListColumnDataProfilesResponse; + + /** + * Verifies a ListColumnDataProfilesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListColumnDataProfilesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListColumnDataProfilesResponse + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListColumnDataProfilesResponse; + + /** + * Creates a plain object from a ListColumnDataProfilesResponse message. Also converts values to other types if specified. + * @param message ListColumnDataProfilesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListColumnDataProfilesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListColumnDataProfilesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListColumnDataProfilesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataRiskLevel. */ + interface IDataRiskLevel { + + /** DataRiskLevel score */ + score?: (google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore|keyof typeof google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore|null); + } + + /** Represents a DataRiskLevel. */ + class DataRiskLevel implements IDataRiskLevel { + + /** + * Constructs a new DataRiskLevel. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDataRiskLevel); + + /** DataRiskLevel score. */ + public score: (google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore|keyof typeof google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore); + + /** + * Creates a new DataRiskLevel instance using the specified properties. + * @param [properties] Properties to set + * @returns DataRiskLevel instance + */ + public static create(properties?: google.privacy.dlp.v2.IDataRiskLevel): google.privacy.dlp.v2.DataRiskLevel; + + /** + * Encodes the specified DataRiskLevel message. Does not implicitly {@link google.privacy.dlp.v2.DataRiskLevel.verify|verify} messages. + * @param message DataRiskLevel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDataRiskLevel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataRiskLevel message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataRiskLevel.verify|verify} messages. + * @param message DataRiskLevel message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDataRiskLevel, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataRiskLevel message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataRiskLevel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DataRiskLevel; + + /** + * Decodes a DataRiskLevel message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataRiskLevel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DataRiskLevel; + + /** + * Verifies a DataRiskLevel message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataRiskLevel message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataRiskLevel + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DataRiskLevel; + + /** + * Creates a plain object from a DataRiskLevel message. Also converts values to other types if specified. + * @param message DataRiskLevel + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DataRiskLevel, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataRiskLevel to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataRiskLevel + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataRiskLevel { + + /** DataRiskLevelScore enum. */ + enum DataRiskLevelScore { + RISK_SCORE_UNSPECIFIED = 0, + RISK_LOW = 10, + RISK_UNKNOWN = 12, + RISK_MODERATE = 20, + RISK_HIGH = 30 + } + } + + /** Properties of a ProjectDataProfile. */ + interface IProjectDataProfile { + + /** ProjectDataProfile name */ + name?: (string|null); + + /** ProjectDataProfile projectId */ + projectId?: (string|null); + + /** ProjectDataProfile profileLastGenerated */ + profileLastGenerated?: (google.protobuf.ITimestamp|null); + + /** ProjectDataProfile sensitivityScore */ + sensitivityScore?: (google.privacy.dlp.v2.ISensitivityScore|null); + + /** ProjectDataProfile dataRiskLevel */ + dataRiskLevel?: (google.privacy.dlp.v2.IDataRiskLevel|null); + + /** ProjectDataProfile profileStatus */ + profileStatus?: (google.privacy.dlp.v2.IProfileStatus|null); + + /** ProjectDataProfile tableDataProfileCount */ + tableDataProfileCount?: (number|Long|string|null); + + /** ProjectDataProfile fileStoreDataProfileCount */ + fileStoreDataProfileCount?: (number|Long|string|null); + } + + /** Represents a ProjectDataProfile. */ + class ProjectDataProfile implements IProjectDataProfile { + + /** + * Constructs a new ProjectDataProfile. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IProjectDataProfile); + + /** ProjectDataProfile name. */ + public name: string; + + /** ProjectDataProfile projectId. */ + public projectId: string; + + /** ProjectDataProfile profileLastGenerated. */ + public profileLastGenerated?: (google.protobuf.ITimestamp|null); + + /** ProjectDataProfile sensitivityScore. */ + public sensitivityScore?: (google.privacy.dlp.v2.ISensitivityScore|null); + + /** ProjectDataProfile dataRiskLevel. */ + public dataRiskLevel?: (google.privacy.dlp.v2.IDataRiskLevel|null); + + /** ProjectDataProfile profileStatus. */ + public profileStatus?: (google.privacy.dlp.v2.IProfileStatus|null); + + /** ProjectDataProfile tableDataProfileCount. */ + public tableDataProfileCount: (number|Long|string); + + /** ProjectDataProfile fileStoreDataProfileCount. */ + public fileStoreDataProfileCount: (number|Long|string); + + /** + * Creates a new ProjectDataProfile instance using the specified properties. + * @param [properties] Properties to set + * @returns ProjectDataProfile instance + */ + public static create(properties?: google.privacy.dlp.v2.IProjectDataProfile): google.privacy.dlp.v2.ProjectDataProfile; + + /** + * Encodes the specified ProjectDataProfile message. Does not implicitly {@link google.privacy.dlp.v2.ProjectDataProfile.verify|verify} messages. + * @param message ProjectDataProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IProjectDataProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProjectDataProfile message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ProjectDataProfile.verify|verify} messages. + * @param message ProjectDataProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IProjectDataProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProjectDataProfile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProjectDataProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ProjectDataProfile; + + /** + * Decodes a ProjectDataProfile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProjectDataProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ProjectDataProfile; + + /** + * Verifies a ProjectDataProfile message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProjectDataProfile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProjectDataProfile + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ProjectDataProfile; + + /** + * Creates a plain object from a ProjectDataProfile message. Also converts values to other types if specified. + * @param message ProjectDataProfile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ProjectDataProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProjectDataProfile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProjectDataProfile + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** ResourceVisibility enum. */ + enum ResourceVisibility { + RESOURCE_VISIBILITY_UNSPECIFIED = 0, + RESOURCE_VISIBILITY_PUBLIC = 10, + RESOURCE_VISIBILITY_INCONCLUSIVE = 15, + RESOURCE_VISIBILITY_RESTRICTED = 20 + } + + /** Properties of a DataProfileConfigSnapshot. */ + interface IDataProfileConfigSnapshot { + + /** DataProfileConfigSnapshot inspectConfig */ + inspectConfig?: (google.privacy.dlp.v2.IInspectConfig|null); + + /** DataProfileConfigSnapshot dataProfileJob */ + dataProfileJob?: (google.privacy.dlp.v2.IDataProfileJobConfig|null); + + /** DataProfileConfigSnapshot discoveryConfig */ + discoveryConfig?: (google.privacy.dlp.v2.IDiscoveryConfig|null); + + /** DataProfileConfigSnapshot inspectTemplateName */ + inspectTemplateName?: (string|null); + + /** DataProfileConfigSnapshot inspectTemplateModifiedTime */ + inspectTemplateModifiedTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a DataProfileConfigSnapshot. */ + class DataProfileConfigSnapshot implements IDataProfileConfigSnapshot { + + /** + * Constructs a new DataProfileConfigSnapshot. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDataProfileConfigSnapshot); + + /** DataProfileConfigSnapshot inspectConfig. */ + public inspectConfig?: (google.privacy.dlp.v2.IInspectConfig|null); + + /** DataProfileConfigSnapshot dataProfileJob. */ + public dataProfileJob?: (google.privacy.dlp.v2.IDataProfileJobConfig|null); + + /** DataProfileConfigSnapshot discoveryConfig. */ + public discoveryConfig?: (google.privacy.dlp.v2.IDiscoveryConfig|null); + + /** DataProfileConfigSnapshot inspectTemplateName. */ + public inspectTemplateName: string; + + /** DataProfileConfigSnapshot inspectTemplateModifiedTime. */ + public inspectTemplateModifiedTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new DataProfileConfigSnapshot instance using the specified properties. + * @param [properties] Properties to set + * @returns DataProfileConfigSnapshot instance + */ + public static create(properties?: google.privacy.dlp.v2.IDataProfileConfigSnapshot): google.privacy.dlp.v2.DataProfileConfigSnapshot; + + /** + * Encodes the specified DataProfileConfigSnapshot message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileConfigSnapshot.verify|verify} messages. + * @param message DataProfileConfigSnapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDataProfileConfigSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataProfileConfigSnapshot message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileConfigSnapshot.verify|verify} messages. + * @param message DataProfileConfigSnapshot message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDataProfileConfigSnapshot, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataProfileConfigSnapshot message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataProfileConfigSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DataProfileConfigSnapshot; + + /** + * Decodes a DataProfileConfigSnapshot message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataProfileConfigSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DataProfileConfigSnapshot; + + /** + * Verifies a DataProfileConfigSnapshot message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataProfileConfigSnapshot message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataProfileConfigSnapshot + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DataProfileConfigSnapshot; + + /** + * Creates a plain object from a DataProfileConfigSnapshot message. Also converts values to other types if specified. + * @param message DataProfileConfigSnapshot + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DataProfileConfigSnapshot, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataProfileConfigSnapshot to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataProfileConfigSnapshot + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TableDataProfile. */ + interface ITableDataProfile { + + /** TableDataProfile name */ + name?: (string|null); + + /** TableDataProfile dataSourceType */ + dataSourceType?: (google.privacy.dlp.v2.IDataSourceType|null); + + /** TableDataProfile projectDataProfile */ + projectDataProfile?: (string|null); + + /** TableDataProfile datasetProjectId */ + datasetProjectId?: (string|null); + + /** TableDataProfile datasetLocation */ + datasetLocation?: (string|null); + + /** TableDataProfile datasetId */ + datasetId?: (string|null); + + /** TableDataProfile tableId */ + tableId?: (string|null); + + /** TableDataProfile fullResource */ + fullResource?: (string|null); + + /** TableDataProfile profileStatus */ + profileStatus?: (google.privacy.dlp.v2.IProfileStatus|null); + + /** TableDataProfile state */ + state?: (google.privacy.dlp.v2.TableDataProfile.State|keyof typeof google.privacy.dlp.v2.TableDataProfile.State|null); + + /** TableDataProfile sensitivityScore */ + sensitivityScore?: (google.privacy.dlp.v2.ISensitivityScore|null); + + /** TableDataProfile dataRiskLevel */ + dataRiskLevel?: (google.privacy.dlp.v2.IDataRiskLevel|null); + + /** TableDataProfile predictedInfoTypes */ + predictedInfoTypes?: (google.privacy.dlp.v2.IInfoTypeSummary[]|null); + + /** TableDataProfile otherInfoTypes */ + otherInfoTypes?: (google.privacy.dlp.v2.IOtherInfoTypeSummary[]|null); + + /** TableDataProfile configSnapshot */ + configSnapshot?: (google.privacy.dlp.v2.IDataProfileConfigSnapshot|null); + + /** TableDataProfile lastModifiedTime */ + lastModifiedTime?: (google.protobuf.ITimestamp|null); + + /** TableDataProfile expirationTime */ + expirationTime?: (google.protobuf.ITimestamp|null); + + /** TableDataProfile scannedColumnCount */ + scannedColumnCount?: (number|Long|string|null); + + /** TableDataProfile failedColumnCount */ + failedColumnCount?: (number|Long|string|null); + + /** TableDataProfile tableSizeBytes */ + tableSizeBytes?: (number|Long|string|null); + + /** TableDataProfile rowCount */ + rowCount?: (number|Long|string|null); + + /** TableDataProfile encryptionStatus */ + encryptionStatus?: (google.privacy.dlp.v2.EncryptionStatus|keyof typeof google.privacy.dlp.v2.EncryptionStatus|null); + + /** TableDataProfile resourceVisibility */ + resourceVisibility?: (google.privacy.dlp.v2.ResourceVisibility|keyof typeof google.privacy.dlp.v2.ResourceVisibility|null); + + /** TableDataProfile profileLastGenerated */ + profileLastGenerated?: (google.protobuf.ITimestamp|null); + + /** TableDataProfile resourceLabels */ + resourceLabels?: ({ [k: string]: string }|null); + + /** TableDataProfile createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** TableDataProfile sampleFindingsTable */ + sampleFindingsTable?: (google.privacy.dlp.v2.IBigQueryTable|null); + + /** TableDataProfile tags */ + tags?: (google.privacy.dlp.v2.ITag[]|null); + + /** TableDataProfile relatedResources */ + relatedResources?: (google.privacy.dlp.v2.IRelatedResource[]|null); + + /** TableDataProfile domains */ + domains?: (google.privacy.dlp.v2.IDomain[]|null); + } + + /** Represents a TableDataProfile. */ + class TableDataProfile implements ITableDataProfile { + + /** + * Constructs a new TableDataProfile. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ITableDataProfile); + + /** TableDataProfile name. */ + public name: string; + + /** TableDataProfile dataSourceType. */ + public dataSourceType?: (google.privacy.dlp.v2.IDataSourceType|null); + + /** TableDataProfile projectDataProfile. */ + public projectDataProfile: string; + + /** TableDataProfile datasetProjectId. */ + public datasetProjectId: string; + + /** TableDataProfile datasetLocation. */ + public datasetLocation: string; + + /** TableDataProfile datasetId. */ + public datasetId: string; + + /** TableDataProfile tableId. */ + public tableId: string; + + /** TableDataProfile fullResource. */ + public fullResource: string; + + /** TableDataProfile profileStatus. */ + public profileStatus?: (google.privacy.dlp.v2.IProfileStatus|null); + + /** TableDataProfile state. */ + public state: (google.privacy.dlp.v2.TableDataProfile.State|keyof typeof google.privacy.dlp.v2.TableDataProfile.State); + + /** TableDataProfile sensitivityScore. */ + public sensitivityScore?: (google.privacy.dlp.v2.ISensitivityScore|null); + + /** TableDataProfile dataRiskLevel. */ + public dataRiskLevel?: (google.privacy.dlp.v2.IDataRiskLevel|null); + + /** TableDataProfile predictedInfoTypes. */ + public predictedInfoTypes: google.privacy.dlp.v2.IInfoTypeSummary[]; + + /** TableDataProfile otherInfoTypes. */ + public otherInfoTypes: google.privacy.dlp.v2.IOtherInfoTypeSummary[]; + + /** TableDataProfile configSnapshot. */ + public configSnapshot?: (google.privacy.dlp.v2.IDataProfileConfigSnapshot|null); + + /** TableDataProfile lastModifiedTime. */ + public lastModifiedTime?: (google.protobuf.ITimestamp|null); + + /** TableDataProfile expirationTime. */ + public expirationTime?: (google.protobuf.ITimestamp|null); + + /** TableDataProfile scannedColumnCount. */ + public scannedColumnCount: (number|Long|string); + + /** TableDataProfile failedColumnCount. */ + public failedColumnCount: (number|Long|string); + + /** TableDataProfile tableSizeBytes. */ + public tableSizeBytes: (number|Long|string); + + /** TableDataProfile rowCount. */ + public rowCount: (number|Long|string); + + /** TableDataProfile encryptionStatus. */ + public encryptionStatus: (google.privacy.dlp.v2.EncryptionStatus|keyof typeof google.privacy.dlp.v2.EncryptionStatus); + + /** TableDataProfile resourceVisibility. */ + public resourceVisibility: (google.privacy.dlp.v2.ResourceVisibility|keyof typeof google.privacy.dlp.v2.ResourceVisibility); + + /** TableDataProfile profileLastGenerated. */ + public profileLastGenerated?: (google.protobuf.ITimestamp|null); + + /** TableDataProfile resourceLabels. */ + public resourceLabels: { [k: string]: string }; + + /** TableDataProfile createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** TableDataProfile sampleFindingsTable. */ + public sampleFindingsTable?: (google.privacy.dlp.v2.IBigQueryTable|null); + + /** TableDataProfile tags. */ + public tags: google.privacy.dlp.v2.ITag[]; + + /** TableDataProfile relatedResources. */ + public relatedResources: google.privacy.dlp.v2.IRelatedResource[]; + + /** TableDataProfile domains. */ + public domains: google.privacy.dlp.v2.IDomain[]; + + /** + * Creates a new TableDataProfile instance using the specified properties. + * @param [properties] Properties to set + * @returns TableDataProfile instance + */ + public static create(properties?: google.privacy.dlp.v2.ITableDataProfile): google.privacy.dlp.v2.TableDataProfile; + + /** + * Encodes the specified TableDataProfile message. Does not implicitly {@link google.privacy.dlp.v2.TableDataProfile.verify|verify} messages. + * @param message TableDataProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ITableDataProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TableDataProfile message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TableDataProfile.verify|verify} messages. + * @param message TableDataProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ITableDataProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TableDataProfile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TableDataProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TableDataProfile; + + /** + * Decodes a TableDataProfile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TableDataProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TableDataProfile; + + /** + * Verifies a TableDataProfile message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TableDataProfile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TableDataProfile + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TableDataProfile; + + /** + * Creates a plain object from a TableDataProfile message. Also converts values to other types if specified. + * @param message TableDataProfile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.TableDataProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TableDataProfile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TableDataProfile + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TableDataProfile { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + DONE = 2 + } + } + + /** Properties of a ProfileStatus. */ + interface IProfileStatus { + + /** ProfileStatus status */ + status?: (google.rpc.IStatus|null); + + /** ProfileStatus timestamp */ + timestamp?: (google.protobuf.ITimestamp|null); + } + + /** Represents a ProfileStatus. */ + class ProfileStatus implements IProfileStatus { + + /** + * Constructs a new ProfileStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IProfileStatus); + + /** ProfileStatus status. */ + public status?: (google.rpc.IStatus|null); + + /** ProfileStatus timestamp. */ + public timestamp?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new ProfileStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns ProfileStatus instance + */ + public static create(properties?: google.privacy.dlp.v2.IProfileStatus): google.privacy.dlp.v2.ProfileStatus; + + /** + * Encodes the specified ProfileStatus message. Does not implicitly {@link google.privacy.dlp.v2.ProfileStatus.verify|verify} messages. + * @param message ProfileStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IProfileStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProfileStatus message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ProfileStatus.verify|verify} messages. + * @param message ProfileStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IProfileStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProfileStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProfileStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ProfileStatus; + + /** + * Decodes a ProfileStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProfileStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ProfileStatus; + + /** + * Verifies a ProfileStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProfileStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProfileStatus + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ProfileStatus; + + /** + * Creates a plain object from a ProfileStatus message. Also converts values to other types if specified. + * @param message ProfileStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ProfileStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProfileStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProfileStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** EncryptionStatus enum. */ + enum EncryptionStatus { + ENCRYPTION_STATUS_UNSPECIFIED = 0, + ENCRYPTION_GOOGLE_MANAGED = 1, + ENCRYPTION_CUSTOMER_MANAGED = 2 + } + + /** Properties of an InfoTypeSummary. */ + interface IInfoTypeSummary { + + /** InfoTypeSummary infoType */ + infoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** InfoTypeSummary estimatedPrevalence */ + estimatedPrevalence?: (number|null); + } + + /** Represents an InfoTypeSummary. */ + class InfoTypeSummary implements IInfoTypeSummary { + + /** + * Constructs a new InfoTypeSummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IInfoTypeSummary); + + /** InfoTypeSummary infoType. */ + public infoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** InfoTypeSummary estimatedPrevalence. */ + public estimatedPrevalence: number; + + /** + * Creates a new InfoTypeSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns InfoTypeSummary instance + */ + public static create(properties?: google.privacy.dlp.v2.IInfoTypeSummary): google.privacy.dlp.v2.InfoTypeSummary; + + /** + * Encodes the specified InfoTypeSummary message. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeSummary.verify|verify} messages. + * @param message InfoTypeSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IInfoTypeSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InfoTypeSummary message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeSummary.verify|verify} messages. + * @param message InfoTypeSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IInfoTypeSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InfoTypeSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InfoTypeSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.InfoTypeSummary; + + /** + * Decodes an InfoTypeSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InfoTypeSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.InfoTypeSummary; + + /** + * Verifies an InfoTypeSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InfoTypeSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InfoTypeSummary + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.InfoTypeSummary; + + /** + * Creates a plain object from an InfoTypeSummary message. Also converts values to other types if specified. + * @param message InfoTypeSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.InfoTypeSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InfoTypeSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InfoTypeSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an OtherInfoTypeSummary. */ + interface IOtherInfoTypeSummary { + + /** OtherInfoTypeSummary infoType */ + infoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** OtherInfoTypeSummary estimatedPrevalence */ + estimatedPrevalence?: (number|null); + + /** OtherInfoTypeSummary excludedFromAnalysis */ + excludedFromAnalysis?: (boolean|null); + } + + /** Represents an OtherInfoTypeSummary. */ + class OtherInfoTypeSummary implements IOtherInfoTypeSummary { + + /** + * Constructs a new OtherInfoTypeSummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IOtherInfoTypeSummary); + + /** OtherInfoTypeSummary infoType. */ + public infoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** OtherInfoTypeSummary estimatedPrevalence. */ + public estimatedPrevalence: number; + + /** OtherInfoTypeSummary excludedFromAnalysis. */ + public excludedFromAnalysis: boolean; + + /** + * Creates a new OtherInfoTypeSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns OtherInfoTypeSummary instance + */ + public static create(properties?: google.privacy.dlp.v2.IOtherInfoTypeSummary): google.privacy.dlp.v2.OtherInfoTypeSummary; + + /** + * Encodes the specified OtherInfoTypeSummary message. Does not implicitly {@link google.privacy.dlp.v2.OtherInfoTypeSummary.verify|verify} messages. + * @param message OtherInfoTypeSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IOtherInfoTypeSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OtherInfoTypeSummary message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherInfoTypeSummary.verify|verify} messages. + * @param message OtherInfoTypeSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IOtherInfoTypeSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OtherInfoTypeSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OtherInfoTypeSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.OtherInfoTypeSummary; + + /** + * Decodes an OtherInfoTypeSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OtherInfoTypeSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.OtherInfoTypeSummary; + + /** + * Verifies an OtherInfoTypeSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OtherInfoTypeSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OtherInfoTypeSummary + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.OtherInfoTypeSummary; + + /** + * Creates a plain object from an OtherInfoTypeSummary message. Also converts values to other types if specified. + * @param message OtherInfoTypeSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.OtherInfoTypeSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OtherInfoTypeSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OtherInfoTypeSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** NullPercentageLevel enum. */ + enum NullPercentageLevel { + NULL_PERCENTAGE_LEVEL_UNSPECIFIED = 0, + NULL_PERCENTAGE_VERY_LOW = 1, + NULL_PERCENTAGE_LOW = 2, + NULL_PERCENTAGE_MEDIUM = 3, + NULL_PERCENTAGE_HIGH = 4 + } + + /** UniquenessScoreLevel enum. */ + enum UniquenessScoreLevel { + UNIQUENESS_SCORE_LEVEL_UNSPECIFIED = 0, + UNIQUENESS_SCORE_LOW = 1, + UNIQUENESS_SCORE_MEDIUM = 2, + UNIQUENESS_SCORE_HIGH = 3 + } + + /** Properties of a ColumnDataProfile. */ + interface IColumnDataProfile { + + /** ColumnDataProfile name */ + name?: (string|null); + + /** ColumnDataProfile profileStatus */ + profileStatus?: (google.privacy.dlp.v2.IProfileStatus|null); + + /** ColumnDataProfile state */ + state?: (google.privacy.dlp.v2.ColumnDataProfile.State|keyof typeof google.privacy.dlp.v2.ColumnDataProfile.State|null); + + /** ColumnDataProfile profileLastGenerated */ + profileLastGenerated?: (google.protobuf.ITimestamp|null); + + /** ColumnDataProfile tableDataProfile */ + tableDataProfile?: (string|null); + + /** ColumnDataProfile tableFullResource */ + tableFullResource?: (string|null); + + /** ColumnDataProfile datasetProjectId */ + datasetProjectId?: (string|null); + + /** ColumnDataProfile datasetLocation */ + datasetLocation?: (string|null); + + /** ColumnDataProfile datasetId */ + datasetId?: (string|null); + + /** ColumnDataProfile tableId */ + tableId?: (string|null); + + /** ColumnDataProfile column */ + column?: (string|null); + + /** ColumnDataProfile sensitivityScore */ + sensitivityScore?: (google.privacy.dlp.v2.ISensitivityScore|null); + + /** ColumnDataProfile dataRiskLevel */ + dataRiskLevel?: (google.privacy.dlp.v2.IDataRiskLevel|null); + + /** ColumnDataProfile columnInfoType */ + columnInfoType?: (google.privacy.dlp.v2.IInfoTypeSummary|null); + + /** ColumnDataProfile otherMatches */ + otherMatches?: (google.privacy.dlp.v2.IOtherInfoTypeSummary[]|null); + + /** ColumnDataProfile estimatedNullPercentage */ + estimatedNullPercentage?: (google.privacy.dlp.v2.NullPercentageLevel|keyof typeof google.privacy.dlp.v2.NullPercentageLevel|null); + + /** ColumnDataProfile estimatedUniquenessScore */ + estimatedUniquenessScore?: (google.privacy.dlp.v2.UniquenessScoreLevel|keyof typeof google.privacy.dlp.v2.UniquenessScoreLevel|null); + + /** ColumnDataProfile freeTextScore */ + freeTextScore?: (number|null); + + /** ColumnDataProfile columnType */ + columnType?: (google.privacy.dlp.v2.ColumnDataProfile.ColumnDataType|keyof typeof google.privacy.dlp.v2.ColumnDataProfile.ColumnDataType|null); + + /** ColumnDataProfile policyState */ + policyState?: (google.privacy.dlp.v2.ColumnDataProfile.ColumnPolicyState|keyof typeof google.privacy.dlp.v2.ColumnDataProfile.ColumnPolicyState|null); + } + + /** Represents a ColumnDataProfile. */ + class ColumnDataProfile implements IColumnDataProfile { + + /** + * Constructs a new ColumnDataProfile. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IColumnDataProfile); + + /** ColumnDataProfile name. */ + public name: string; + + /** ColumnDataProfile profileStatus. */ + public profileStatus?: (google.privacy.dlp.v2.IProfileStatus|null); + + /** ColumnDataProfile state. */ + public state: (google.privacy.dlp.v2.ColumnDataProfile.State|keyof typeof google.privacy.dlp.v2.ColumnDataProfile.State); + + /** ColumnDataProfile profileLastGenerated. */ + public profileLastGenerated?: (google.protobuf.ITimestamp|null); + + /** ColumnDataProfile tableDataProfile. */ + public tableDataProfile: string; + + /** ColumnDataProfile tableFullResource. */ + public tableFullResource: string; + + /** ColumnDataProfile datasetProjectId. */ + public datasetProjectId: string; + + /** ColumnDataProfile datasetLocation. */ + public datasetLocation: string; + + /** ColumnDataProfile datasetId. */ + public datasetId: string; + + /** ColumnDataProfile tableId. */ + public tableId: string; + + /** ColumnDataProfile column. */ + public column: string; + + /** ColumnDataProfile sensitivityScore. */ + public sensitivityScore?: (google.privacy.dlp.v2.ISensitivityScore|null); + + /** ColumnDataProfile dataRiskLevel. */ + public dataRiskLevel?: (google.privacy.dlp.v2.IDataRiskLevel|null); + + /** ColumnDataProfile columnInfoType. */ + public columnInfoType?: (google.privacy.dlp.v2.IInfoTypeSummary|null); + + /** ColumnDataProfile otherMatches. */ + public otherMatches: google.privacy.dlp.v2.IOtherInfoTypeSummary[]; + + /** ColumnDataProfile estimatedNullPercentage. */ + public estimatedNullPercentage: (google.privacy.dlp.v2.NullPercentageLevel|keyof typeof google.privacy.dlp.v2.NullPercentageLevel); + + /** ColumnDataProfile estimatedUniquenessScore. */ + public estimatedUniquenessScore: (google.privacy.dlp.v2.UniquenessScoreLevel|keyof typeof google.privacy.dlp.v2.UniquenessScoreLevel); + + /** ColumnDataProfile freeTextScore. */ + public freeTextScore: number; + + /** ColumnDataProfile columnType. */ + public columnType: (google.privacy.dlp.v2.ColumnDataProfile.ColumnDataType|keyof typeof google.privacy.dlp.v2.ColumnDataProfile.ColumnDataType); + + /** ColumnDataProfile policyState. */ + public policyState: (google.privacy.dlp.v2.ColumnDataProfile.ColumnPolicyState|keyof typeof google.privacy.dlp.v2.ColumnDataProfile.ColumnPolicyState); + + /** + * Creates a new ColumnDataProfile instance using the specified properties. + * @param [properties] Properties to set + * @returns ColumnDataProfile instance + */ + public static create(properties?: google.privacy.dlp.v2.IColumnDataProfile): google.privacy.dlp.v2.ColumnDataProfile; + + /** + * Encodes the specified ColumnDataProfile message. Does not implicitly {@link google.privacy.dlp.v2.ColumnDataProfile.verify|verify} messages. + * @param message ColumnDataProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IColumnDataProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ColumnDataProfile message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ColumnDataProfile.verify|verify} messages. + * @param message ColumnDataProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IColumnDataProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ColumnDataProfile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ColumnDataProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ColumnDataProfile; + + /** + * Decodes a ColumnDataProfile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ColumnDataProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ColumnDataProfile; + + /** + * Verifies a ColumnDataProfile message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ColumnDataProfile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ColumnDataProfile + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ColumnDataProfile; + + /** + * Creates a plain object from a ColumnDataProfile message. Also converts values to other types if specified. + * @param message ColumnDataProfile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ColumnDataProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ColumnDataProfile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ColumnDataProfile + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ColumnDataProfile { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + DONE = 2 + } + + /** ColumnDataType enum. */ + enum ColumnDataType { + COLUMN_DATA_TYPE_UNSPECIFIED = 0, + TYPE_INT64 = 1, + TYPE_BOOL = 2, + TYPE_FLOAT64 = 3, + TYPE_STRING = 4, + TYPE_BYTES = 5, + TYPE_TIMESTAMP = 6, + TYPE_DATE = 7, + TYPE_TIME = 8, + TYPE_DATETIME = 9, + TYPE_GEOGRAPHY = 10, + TYPE_NUMERIC = 11, + TYPE_RECORD = 12, + TYPE_BIGNUMERIC = 13, + TYPE_JSON = 14, + TYPE_INTERVAL = 15, + TYPE_RANGE_DATE = 16, + TYPE_RANGE_DATETIME = 17, + TYPE_RANGE_TIMESTAMP = 18 + } + + /** ColumnPolicyState enum. */ + enum ColumnPolicyState { + COLUMN_POLICY_STATE_UNSPECIFIED = 0, + COLUMN_POLICY_TAGGED = 1 + } + } + + /** Properties of a FileStoreDataProfile. */ + interface IFileStoreDataProfile { + + /** FileStoreDataProfile name */ + name?: (string|null); + + /** FileStoreDataProfile dataSourceType */ + dataSourceType?: (google.privacy.dlp.v2.IDataSourceType|null); + + /** FileStoreDataProfile projectDataProfile */ + projectDataProfile?: (string|null); + + /** FileStoreDataProfile projectId */ + projectId?: (string|null); + + /** FileStoreDataProfile fileStoreLocation */ + fileStoreLocation?: (string|null); + + /** FileStoreDataProfile dataStorageLocations */ + dataStorageLocations?: (string[]|null); + + /** FileStoreDataProfile locationType */ + locationType?: (string|null); + + /** FileStoreDataProfile fileStorePath */ + fileStorePath?: (string|null); + + /** FileStoreDataProfile fullResource */ + fullResource?: (string|null); + + /** FileStoreDataProfile configSnapshot */ + configSnapshot?: (google.privacy.dlp.v2.IDataProfileConfigSnapshot|null); + + /** FileStoreDataProfile profileStatus */ + profileStatus?: (google.privacy.dlp.v2.IProfileStatus|null); + + /** FileStoreDataProfile state */ + state?: (google.privacy.dlp.v2.FileStoreDataProfile.State|keyof typeof google.privacy.dlp.v2.FileStoreDataProfile.State|null); + + /** FileStoreDataProfile profileLastGenerated */ + profileLastGenerated?: (google.protobuf.ITimestamp|null); + + /** FileStoreDataProfile resourceVisibility */ + resourceVisibility?: (google.privacy.dlp.v2.ResourceVisibility|keyof typeof google.privacy.dlp.v2.ResourceVisibility|null); + + /** FileStoreDataProfile sensitivityScore */ + sensitivityScore?: (google.privacy.dlp.v2.ISensitivityScore|null); + + /** FileStoreDataProfile dataRiskLevel */ + dataRiskLevel?: (google.privacy.dlp.v2.IDataRiskLevel|null); + + /** FileStoreDataProfile createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** FileStoreDataProfile lastModifiedTime */ + lastModifiedTime?: (google.protobuf.ITimestamp|null); + + /** FileStoreDataProfile fileClusterSummaries */ + fileClusterSummaries?: (google.privacy.dlp.v2.IFileClusterSummary[]|null); + + /** FileStoreDataProfile resourceAttributes */ + resourceAttributes?: ({ [k: string]: google.privacy.dlp.v2.IValue }|null); + + /** FileStoreDataProfile resourceLabels */ + resourceLabels?: ({ [k: string]: string }|null); + + /** FileStoreDataProfile fileStoreInfoTypeSummaries */ + fileStoreInfoTypeSummaries?: (google.privacy.dlp.v2.IFileStoreInfoTypeSummary[]|null); + + /** FileStoreDataProfile sampleFindingsTable */ + sampleFindingsTable?: (google.privacy.dlp.v2.IBigQueryTable|null); + + /** FileStoreDataProfile fileStoreIsEmpty */ + fileStoreIsEmpty?: (boolean|null); + + /** FileStoreDataProfile tags */ + tags?: (google.privacy.dlp.v2.ITag[]|null); + + /** FileStoreDataProfile relatedResources */ + relatedResources?: (google.privacy.dlp.v2.IRelatedResource[]|null); + + /** FileStoreDataProfile domains */ + domains?: (google.privacy.dlp.v2.IDomain[]|null); + } + + /** Represents a FileStoreDataProfile. */ + class FileStoreDataProfile implements IFileStoreDataProfile { + + /** + * Constructs a new FileStoreDataProfile. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IFileStoreDataProfile); + + /** FileStoreDataProfile name. */ + public name: string; + + /** FileStoreDataProfile dataSourceType. */ + public dataSourceType?: (google.privacy.dlp.v2.IDataSourceType|null); + + /** FileStoreDataProfile projectDataProfile. */ + public projectDataProfile: string; + + /** FileStoreDataProfile projectId. */ + public projectId: string; + + /** FileStoreDataProfile fileStoreLocation. */ + public fileStoreLocation: string; + + /** FileStoreDataProfile dataStorageLocations. */ + public dataStorageLocations: string[]; + + /** FileStoreDataProfile locationType. */ + public locationType: string; + + /** FileStoreDataProfile fileStorePath. */ + public fileStorePath: string; + + /** FileStoreDataProfile fullResource. */ + public fullResource: string; + + /** FileStoreDataProfile configSnapshot. */ + public configSnapshot?: (google.privacy.dlp.v2.IDataProfileConfigSnapshot|null); + + /** FileStoreDataProfile profileStatus. */ + public profileStatus?: (google.privacy.dlp.v2.IProfileStatus|null); + + /** FileStoreDataProfile state. */ + public state: (google.privacy.dlp.v2.FileStoreDataProfile.State|keyof typeof google.privacy.dlp.v2.FileStoreDataProfile.State); + + /** FileStoreDataProfile profileLastGenerated. */ + public profileLastGenerated?: (google.protobuf.ITimestamp|null); + + /** FileStoreDataProfile resourceVisibility. */ + public resourceVisibility: (google.privacy.dlp.v2.ResourceVisibility|keyof typeof google.privacy.dlp.v2.ResourceVisibility); + + /** FileStoreDataProfile sensitivityScore. */ + public sensitivityScore?: (google.privacy.dlp.v2.ISensitivityScore|null); + + /** FileStoreDataProfile dataRiskLevel. */ + public dataRiskLevel?: (google.privacy.dlp.v2.IDataRiskLevel|null); + + /** FileStoreDataProfile createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** FileStoreDataProfile lastModifiedTime. */ + public lastModifiedTime?: (google.protobuf.ITimestamp|null); + + /** FileStoreDataProfile fileClusterSummaries. */ + public fileClusterSummaries: google.privacy.dlp.v2.IFileClusterSummary[]; + + /** FileStoreDataProfile resourceAttributes. */ + public resourceAttributes: { [k: string]: google.privacy.dlp.v2.IValue }; + + /** FileStoreDataProfile resourceLabels. */ + public resourceLabels: { [k: string]: string }; + + /** FileStoreDataProfile fileStoreInfoTypeSummaries. */ + public fileStoreInfoTypeSummaries: google.privacy.dlp.v2.IFileStoreInfoTypeSummary[]; + + /** FileStoreDataProfile sampleFindingsTable. */ + public sampleFindingsTable?: (google.privacy.dlp.v2.IBigQueryTable|null); + + /** FileStoreDataProfile fileStoreIsEmpty. */ + public fileStoreIsEmpty: boolean; + + /** FileStoreDataProfile tags. */ + public tags: google.privacy.dlp.v2.ITag[]; + + /** FileStoreDataProfile relatedResources. */ + public relatedResources: google.privacy.dlp.v2.IRelatedResource[]; + + /** FileStoreDataProfile domains. */ + public domains: google.privacy.dlp.v2.IDomain[]; + + /** + * Creates a new FileStoreDataProfile instance using the specified properties. + * @param [properties] Properties to set + * @returns FileStoreDataProfile instance + */ + public static create(properties?: google.privacy.dlp.v2.IFileStoreDataProfile): google.privacy.dlp.v2.FileStoreDataProfile; + + /** + * Encodes the specified FileStoreDataProfile message. Does not implicitly {@link google.privacy.dlp.v2.FileStoreDataProfile.verify|verify} messages. + * @param message FileStoreDataProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IFileStoreDataProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileStoreDataProfile message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FileStoreDataProfile.verify|verify} messages. + * @param message FileStoreDataProfile message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IFileStoreDataProfile, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileStoreDataProfile message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileStoreDataProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.FileStoreDataProfile; + + /** + * Decodes a FileStoreDataProfile message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileStoreDataProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.FileStoreDataProfile; + + /** + * Verifies a FileStoreDataProfile message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileStoreDataProfile message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileStoreDataProfile + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.FileStoreDataProfile; + + /** + * Creates a plain object from a FileStoreDataProfile message. Also converts values to other types if specified. + * @param message FileStoreDataProfile + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.FileStoreDataProfile, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileStoreDataProfile to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileStoreDataProfile + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileStoreDataProfile { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + RUNNING = 1, + DONE = 2 + } + } + + /** Properties of a Tag. */ + interface ITag { + + /** Tag namespacedTagValue */ + namespacedTagValue?: (string|null); + + /** Tag key */ + key?: (string|null); + + /** Tag value */ + value?: (string|null); + } + + /** Represents a Tag. */ + class Tag implements ITag { + + /** + * Constructs a new Tag. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ITag); + + /** Tag namespacedTagValue. */ + public namespacedTagValue: string; + + /** Tag key. */ + public key: string; + + /** Tag value. */ + public value: string; + + /** + * Creates a new Tag instance using the specified properties. + * @param [properties] Properties to set + * @returns Tag instance + */ + public static create(properties?: google.privacy.dlp.v2.ITag): google.privacy.dlp.v2.Tag; + + /** + * Encodes the specified Tag message. Does not implicitly {@link google.privacy.dlp.v2.Tag.verify|verify} messages. + * @param message Tag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ITag, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Tag message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Tag.verify|verify} messages. + * @param message Tag message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ITag, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Tag message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Tag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Tag; + + /** + * Decodes a Tag message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Tag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Tag; + + /** + * Verifies a Tag message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Tag message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Tag + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Tag; + + /** + * Creates a plain object from a Tag message. Also converts values to other types if specified. + * @param message Tag + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Tag, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Tag to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Tag + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TagFilters. */ + interface ITagFilters { + + /** TagFilters tagFilters */ + tagFilters?: (google.privacy.dlp.v2.ITagFilter[]|null); + } + + /** Represents a TagFilters. */ + class TagFilters implements ITagFilters { + + /** + * Constructs a new TagFilters. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ITagFilters); + + /** TagFilters tagFilters. */ + public tagFilters: google.privacy.dlp.v2.ITagFilter[]; + + /** + * Creates a new TagFilters instance using the specified properties. + * @param [properties] Properties to set + * @returns TagFilters instance + */ + public static create(properties?: google.privacy.dlp.v2.ITagFilters): google.privacy.dlp.v2.TagFilters; + + /** + * Encodes the specified TagFilters message. Does not implicitly {@link google.privacy.dlp.v2.TagFilters.verify|verify} messages. + * @param message TagFilters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ITagFilters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TagFilters message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TagFilters.verify|verify} messages. + * @param message TagFilters message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ITagFilters, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TagFilters message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TagFilters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TagFilters; + + /** + * Decodes a TagFilters message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TagFilters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TagFilters; + + /** + * Verifies a TagFilters message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TagFilters message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TagFilters + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TagFilters; + + /** + * Creates a plain object from a TagFilters message. Also converts values to other types if specified. + * @param message TagFilters + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.TagFilters, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TagFilters to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TagFilters + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TagFilter. */ + interface ITagFilter { + + /** TagFilter namespacedTagValue */ + namespacedTagValue?: (string|null); + + /** TagFilter namespacedTagKey */ + namespacedTagKey?: (string|null); + } + + /** Represents a TagFilter. */ + class TagFilter implements ITagFilter { + + /** + * Constructs a new TagFilter. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ITagFilter); + + /** TagFilter namespacedTagValue. */ + public namespacedTagValue?: (string|null); + + /** TagFilter namespacedTagKey. */ + public namespacedTagKey?: (string|null); + + /** TagFilter format. */ + public format?: ("namespacedTagValue"|"namespacedTagKey"); + + /** + * Creates a new TagFilter instance using the specified properties. + * @param [properties] Properties to set + * @returns TagFilter instance + */ + public static create(properties?: google.privacy.dlp.v2.ITagFilter): google.privacy.dlp.v2.TagFilter; + + /** + * Encodes the specified TagFilter message. Does not implicitly {@link google.privacy.dlp.v2.TagFilter.verify|verify} messages. + * @param message TagFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ITagFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TagFilter message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TagFilter.verify|verify} messages. + * @param message TagFilter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ITagFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TagFilter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TagFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TagFilter; + + /** + * Decodes a TagFilter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TagFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TagFilter; + + /** + * Verifies a TagFilter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TagFilter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TagFilter + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TagFilter; + + /** + * Creates a plain object from a TagFilter message. Also converts values to other types if specified. + * @param message TagFilter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.TagFilter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TagFilter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TagFilter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RelatedResource. */ + interface IRelatedResource { + + /** RelatedResource fullResource */ + fullResource?: (string|null); + } + + /** Represents a RelatedResource. */ + class RelatedResource implements IRelatedResource { + + /** + * Constructs a new RelatedResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IRelatedResource); + + /** RelatedResource fullResource. */ + public fullResource: string; + + /** + * Creates a new RelatedResource instance using the specified properties. + * @param [properties] Properties to set + * @returns RelatedResource instance + */ + public static create(properties?: google.privacy.dlp.v2.IRelatedResource): google.privacy.dlp.v2.RelatedResource; + + /** + * Encodes the specified RelatedResource message. Does not implicitly {@link google.privacy.dlp.v2.RelatedResource.verify|verify} messages. + * @param message RelatedResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IRelatedResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RelatedResource message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RelatedResource.verify|verify} messages. + * @param message RelatedResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IRelatedResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RelatedResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RelatedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RelatedResource; + + /** + * Decodes a RelatedResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RelatedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RelatedResource; + + /** + * Verifies a RelatedResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RelatedResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RelatedResource + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RelatedResource; + + /** + * Creates a plain object from a RelatedResource message. Also converts values to other types if specified. + * @param message RelatedResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.RelatedResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RelatedResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RelatedResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileStoreInfoTypeSummary. */ + interface IFileStoreInfoTypeSummary { + + /** FileStoreInfoTypeSummary infoType */ + infoType?: (google.privacy.dlp.v2.IInfoType|null); + } + + /** Represents a FileStoreInfoTypeSummary. */ + class FileStoreInfoTypeSummary implements IFileStoreInfoTypeSummary { + + /** + * Constructs a new FileStoreInfoTypeSummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IFileStoreInfoTypeSummary); + + /** FileStoreInfoTypeSummary infoType. */ + public infoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** + * Creates a new FileStoreInfoTypeSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns FileStoreInfoTypeSummary instance + */ + public static create(properties?: google.privacy.dlp.v2.IFileStoreInfoTypeSummary): google.privacy.dlp.v2.FileStoreInfoTypeSummary; + + /** + * Encodes the specified FileStoreInfoTypeSummary message. Does not implicitly {@link google.privacy.dlp.v2.FileStoreInfoTypeSummary.verify|verify} messages. + * @param message FileStoreInfoTypeSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IFileStoreInfoTypeSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileStoreInfoTypeSummary message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FileStoreInfoTypeSummary.verify|verify} messages. + * @param message FileStoreInfoTypeSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IFileStoreInfoTypeSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileStoreInfoTypeSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileStoreInfoTypeSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.FileStoreInfoTypeSummary; + + /** + * Decodes a FileStoreInfoTypeSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileStoreInfoTypeSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.FileStoreInfoTypeSummary; + + /** + * Verifies a FileStoreInfoTypeSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileStoreInfoTypeSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileStoreInfoTypeSummary + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.FileStoreInfoTypeSummary; + + /** + * Creates a plain object from a FileStoreInfoTypeSummary message. Also converts values to other types if specified. + * @param message FileStoreInfoTypeSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.FileStoreInfoTypeSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileStoreInfoTypeSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileStoreInfoTypeSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileExtensionInfo. */ + interface IFileExtensionInfo { + + /** FileExtensionInfo fileExtension */ + fileExtension?: (string|null); + } + + /** Represents a FileExtensionInfo. */ + class FileExtensionInfo implements IFileExtensionInfo { + + /** + * Constructs a new FileExtensionInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IFileExtensionInfo); + + /** FileExtensionInfo fileExtension. */ + public fileExtension: string; + + /** + * Creates a new FileExtensionInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns FileExtensionInfo instance + */ + public static create(properties?: google.privacy.dlp.v2.IFileExtensionInfo): google.privacy.dlp.v2.FileExtensionInfo; + + /** + * Encodes the specified FileExtensionInfo message. Does not implicitly {@link google.privacy.dlp.v2.FileExtensionInfo.verify|verify} messages. + * @param message FileExtensionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IFileExtensionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileExtensionInfo message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FileExtensionInfo.verify|verify} messages. + * @param message FileExtensionInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IFileExtensionInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileExtensionInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileExtensionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.FileExtensionInfo; + + /** + * Decodes a FileExtensionInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileExtensionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.FileExtensionInfo; + + /** + * Verifies a FileExtensionInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileExtensionInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileExtensionInfo + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.FileExtensionInfo; + + /** + * Creates a plain object from a FileExtensionInfo message. Also converts values to other types if specified. + * @param message FileExtensionInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.FileExtensionInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileExtensionInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileExtensionInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileClusterSummary. */ + interface IFileClusterSummary { + + /** FileClusterSummary fileClusterType */ + fileClusterType?: (google.privacy.dlp.v2.IFileClusterType|null); + + /** FileClusterSummary fileStoreInfoTypeSummaries */ + fileStoreInfoTypeSummaries?: (google.privacy.dlp.v2.IFileStoreInfoTypeSummary[]|null); + + /** FileClusterSummary sensitivityScore */ + sensitivityScore?: (google.privacy.dlp.v2.ISensitivityScore|null); + + /** FileClusterSummary dataRiskLevel */ + dataRiskLevel?: (google.privacy.dlp.v2.IDataRiskLevel|null); + + /** FileClusterSummary errors */ + errors?: (google.privacy.dlp.v2.IError[]|null); + + /** FileClusterSummary fileExtensionsScanned */ + fileExtensionsScanned?: (google.privacy.dlp.v2.IFileExtensionInfo[]|null); + + /** FileClusterSummary fileExtensionsSeen */ + fileExtensionsSeen?: (google.privacy.dlp.v2.IFileExtensionInfo[]|null); + + /** FileClusterSummary noFilesExist */ + noFilesExist?: (boolean|null); + } + + /** Represents a FileClusterSummary. */ + class FileClusterSummary implements IFileClusterSummary { + + /** + * Constructs a new FileClusterSummary. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IFileClusterSummary); + + /** FileClusterSummary fileClusterType. */ + public fileClusterType?: (google.privacy.dlp.v2.IFileClusterType|null); + + /** FileClusterSummary fileStoreInfoTypeSummaries. */ + public fileStoreInfoTypeSummaries: google.privacy.dlp.v2.IFileStoreInfoTypeSummary[]; + + /** FileClusterSummary sensitivityScore. */ + public sensitivityScore?: (google.privacy.dlp.v2.ISensitivityScore|null); + + /** FileClusterSummary dataRiskLevel. */ + public dataRiskLevel?: (google.privacy.dlp.v2.IDataRiskLevel|null); + + /** FileClusterSummary errors. */ + public errors: google.privacy.dlp.v2.IError[]; + + /** FileClusterSummary fileExtensionsScanned. */ + public fileExtensionsScanned: google.privacy.dlp.v2.IFileExtensionInfo[]; + + /** FileClusterSummary fileExtensionsSeen. */ + public fileExtensionsSeen: google.privacy.dlp.v2.IFileExtensionInfo[]; + + /** FileClusterSummary noFilesExist. */ + public noFilesExist: boolean; + + /** + * Creates a new FileClusterSummary instance using the specified properties. + * @param [properties] Properties to set + * @returns FileClusterSummary instance + */ + public static create(properties?: google.privacy.dlp.v2.IFileClusterSummary): google.privacy.dlp.v2.FileClusterSummary; + + /** + * Encodes the specified FileClusterSummary message. Does not implicitly {@link google.privacy.dlp.v2.FileClusterSummary.verify|verify} messages. + * @param message FileClusterSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IFileClusterSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileClusterSummary message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FileClusterSummary.verify|verify} messages. + * @param message FileClusterSummary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IFileClusterSummary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileClusterSummary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileClusterSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.FileClusterSummary; + + /** + * Decodes a FileClusterSummary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileClusterSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.FileClusterSummary; + + /** + * Verifies a FileClusterSummary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileClusterSummary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileClusterSummary + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.FileClusterSummary; + + /** + * Creates a plain object from a FileClusterSummary message. Also converts values to other types if specified. + * @param message FileClusterSummary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.FileClusterSummary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileClusterSummary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileClusterSummary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetProjectDataProfileRequest. */ + interface IGetProjectDataProfileRequest { + + /** GetProjectDataProfileRequest name */ + name?: (string|null); + } + + /** Represents a GetProjectDataProfileRequest. */ + class GetProjectDataProfileRequest implements IGetProjectDataProfileRequest { + + /** + * Constructs a new GetProjectDataProfileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IGetProjectDataProfileRequest); + + /** GetProjectDataProfileRequest name. */ + public name: string; + + /** + * Creates a new GetProjectDataProfileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetProjectDataProfileRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IGetProjectDataProfileRequest): google.privacy.dlp.v2.GetProjectDataProfileRequest; + + /** + * Encodes the specified GetProjectDataProfileRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetProjectDataProfileRequest.verify|verify} messages. + * @param message GetProjectDataProfileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IGetProjectDataProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetProjectDataProfileRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetProjectDataProfileRequest.verify|verify} messages. + * @param message GetProjectDataProfileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IGetProjectDataProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetProjectDataProfileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetProjectDataProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.GetProjectDataProfileRequest; + + /** + * Decodes a GetProjectDataProfileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetProjectDataProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.GetProjectDataProfileRequest; + + /** + * Verifies a GetProjectDataProfileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetProjectDataProfileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetProjectDataProfileRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.GetProjectDataProfileRequest; + + /** + * Creates a plain object from a GetProjectDataProfileRequest message. Also converts values to other types if specified. + * @param message GetProjectDataProfileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.GetProjectDataProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetProjectDataProfileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetProjectDataProfileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetFileStoreDataProfileRequest. */ + interface IGetFileStoreDataProfileRequest { + + /** GetFileStoreDataProfileRequest name */ + name?: (string|null); + } + + /** Represents a GetFileStoreDataProfileRequest. */ + class GetFileStoreDataProfileRequest implements IGetFileStoreDataProfileRequest { + + /** + * Constructs a new GetFileStoreDataProfileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IGetFileStoreDataProfileRequest); + + /** GetFileStoreDataProfileRequest name. */ + public name: string; + + /** + * Creates a new GetFileStoreDataProfileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetFileStoreDataProfileRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IGetFileStoreDataProfileRequest): google.privacy.dlp.v2.GetFileStoreDataProfileRequest; + + /** + * Encodes the specified GetFileStoreDataProfileRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetFileStoreDataProfileRequest.verify|verify} messages. + * @param message GetFileStoreDataProfileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IGetFileStoreDataProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetFileStoreDataProfileRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetFileStoreDataProfileRequest.verify|verify} messages. + * @param message GetFileStoreDataProfileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IGetFileStoreDataProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetFileStoreDataProfileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetFileStoreDataProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.GetFileStoreDataProfileRequest; + + /** + * Decodes a GetFileStoreDataProfileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetFileStoreDataProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.GetFileStoreDataProfileRequest; + + /** + * Verifies a GetFileStoreDataProfileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetFileStoreDataProfileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetFileStoreDataProfileRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.GetFileStoreDataProfileRequest; + + /** + * Creates a plain object from a GetFileStoreDataProfileRequest message. Also converts values to other types if specified. + * @param message GetFileStoreDataProfileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.GetFileStoreDataProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetFileStoreDataProfileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetFileStoreDataProfileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListFileStoreDataProfilesRequest. */ + interface IListFileStoreDataProfilesRequest { + + /** ListFileStoreDataProfilesRequest parent */ + parent?: (string|null); + + /** ListFileStoreDataProfilesRequest pageToken */ + pageToken?: (string|null); + + /** ListFileStoreDataProfilesRequest pageSize */ + pageSize?: (number|null); + + /** ListFileStoreDataProfilesRequest orderBy */ + orderBy?: (string|null); + + /** ListFileStoreDataProfilesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListFileStoreDataProfilesRequest. */ + class ListFileStoreDataProfilesRequest implements IListFileStoreDataProfilesRequest { + + /** + * Constructs a new ListFileStoreDataProfilesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListFileStoreDataProfilesRequest); + + /** ListFileStoreDataProfilesRequest parent. */ + public parent: string; + + /** ListFileStoreDataProfilesRequest pageToken. */ + public pageToken: string; + + /** ListFileStoreDataProfilesRequest pageSize. */ + public pageSize: number; + + /** ListFileStoreDataProfilesRequest orderBy. */ + public orderBy: string; + + /** ListFileStoreDataProfilesRequest filter. */ + public filter: string; + + /** + * Creates a new ListFileStoreDataProfilesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFileStoreDataProfilesRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IListFileStoreDataProfilesRequest): google.privacy.dlp.v2.ListFileStoreDataProfilesRequest; + + /** + * Encodes the specified ListFileStoreDataProfilesRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListFileStoreDataProfilesRequest.verify|verify} messages. + * @param message ListFileStoreDataProfilesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListFileStoreDataProfilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFileStoreDataProfilesRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListFileStoreDataProfilesRequest.verify|verify} messages. + * @param message ListFileStoreDataProfilesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListFileStoreDataProfilesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFileStoreDataProfilesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFileStoreDataProfilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ListFileStoreDataProfilesRequest; + + /** + * Decodes a ListFileStoreDataProfilesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFileStoreDataProfilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ListFileStoreDataProfilesRequest; + + /** + * Verifies a ListFileStoreDataProfilesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListFileStoreDataProfilesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFileStoreDataProfilesRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListFileStoreDataProfilesRequest; + + /** + * Creates a plain object from a ListFileStoreDataProfilesRequest message. Also converts values to other types if specified. + * @param message ListFileStoreDataProfilesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListFileStoreDataProfilesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFileStoreDataProfilesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFileStoreDataProfilesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListFileStoreDataProfilesResponse. */ + interface IListFileStoreDataProfilesResponse { + + /** ListFileStoreDataProfilesResponse fileStoreDataProfiles */ + fileStoreDataProfiles?: (google.privacy.dlp.v2.IFileStoreDataProfile[]|null); + + /** ListFileStoreDataProfilesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListFileStoreDataProfilesResponse. */ + class ListFileStoreDataProfilesResponse implements IListFileStoreDataProfilesResponse { + + /** + * Constructs a new ListFileStoreDataProfilesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListFileStoreDataProfilesResponse); + + /** ListFileStoreDataProfilesResponse fileStoreDataProfiles. */ + public fileStoreDataProfiles: google.privacy.dlp.v2.IFileStoreDataProfile[]; + + /** ListFileStoreDataProfilesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListFileStoreDataProfilesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListFileStoreDataProfilesResponse instance + */ + public static create(properties?: google.privacy.dlp.v2.IListFileStoreDataProfilesResponse): google.privacy.dlp.v2.ListFileStoreDataProfilesResponse; + + /** + * Encodes the specified ListFileStoreDataProfilesResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListFileStoreDataProfilesResponse.verify|verify} messages. + * @param message ListFileStoreDataProfilesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListFileStoreDataProfilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListFileStoreDataProfilesResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListFileStoreDataProfilesResponse.verify|verify} messages. + * @param message ListFileStoreDataProfilesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListFileStoreDataProfilesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListFileStoreDataProfilesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListFileStoreDataProfilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ListFileStoreDataProfilesResponse; + + /** + * Decodes a ListFileStoreDataProfilesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListFileStoreDataProfilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ListFileStoreDataProfilesResponse; + + /** + * Verifies a ListFileStoreDataProfilesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListFileStoreDataProfilesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListFileStoreDataProfilesResponse + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListFileStoreDataProfilesResponse; + + /** + * Creates a plain object from a ListFileStoreDataProfilesResponse message. Also converts values to other types if specified. + * @param message ListFileStoreDataProfilesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListFileStoreDataProfilesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListFileStoreDataProfilesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListFileStoreDataProfilesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteFileStoreDataProfileRequest. */ + interface IDeleteFileStoreDataProfileRequest { + + /** DeleteFileStoreDataProfileRequest name */ + name?: (string|null); + } + + /** Represents a DeleteFileStoreDataProfileRequest. */ + class DeleteFileStoreDataProfileRequest implements IDeleteFileStoreDataProfileRequest { + + /** + * Constructs a new DeleteFileStoreDataProfileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDeleteFileStoreDataProfileRequest); + + /** DeleteFileStoreDataProfileRequest name. */ + public name: string; + + /** + * Creates a new DeleteFileStoreDataProfileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteFileStoreDataProfileRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IDeleteFileStoreDataProfileRequest): google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest; + + /** + * Encodes the specified DeleteFileStoreDataProfileRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest.verify|verify} messages. + * @param message DeleteFileStoreDataProfileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDeleteFileStoreDataProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteFileStoreDataProfileRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest.verify|verify} messages. + * @param message DeleteFileStoreDataProfileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDeleteFileStoreDataProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteFileStoreDataProfileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteFileStoreDataProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest; + + /** + * Decodes a DeleteFileStoreDataProfileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteFileStoreDataProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest; + + /** + * Verifies a DeleteFileStoreDataProfileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteFileStoreDataProfileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteFileStoreDataProfileRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest; + + /** + * Creates a plain object from a DeleteFileStoreDataProfileRequest message. Also converts values to other types if specified. + * @param message DeleteFileStoreDataProfileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteFileStoreDataProfileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteFileStoreDataProfileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetTableDataProfileRequest. */ + interface IGetTableDataProfileRequest { + + /** GetTableDataProfileRequest name */ + name?: (string|null); + } + + /** Represents a GetTableDataProfileRequest. */ + class GetTableDataProfileRequest implements IGetTableDataProfileRequest { + + /** + * Constructs a new GetTableDataProfileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IGetTableDataProfileRequest); + + /** GetTableDataProfileRequest name. */ + public name: string; + + /** + * Creates a new GetTableDataProfileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetTableDataProfileRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IGetTableDataProfileRequest): google.privacy.dlp.v2.GetTableDataProfileRequest; + + /** + * Encodes the specified GetTableDataProfileRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetTableDataProfileRequest.verify|verify} messages. + * @param message GetTableDataProfileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IGetTableDataProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetTableDataProfileRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetTableDataProfileRequest.verify|verify} messages. + * @param message GetTableDataProfileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IGetTableDataProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetTableDataProfileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetTableDataProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.GetTableDataProfileRequest; + + /** + * Decodes a GetTableDataProfileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetTableDataProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.GetTableDataProfileRequest; + + /** + * Verifies a GetTableDataProfileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetTableDataProfileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetTableDataProfileRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.GetTableDataProfileRequest; + + /** + * Creates a plain object from a GetTableDataProfileRequest message. Also converts values to other types if specified. + * @param message GetTableDataProfileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.GetTableDataProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetTableDataProfileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetTableDataProfileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetColumnDataProfileRequest. */ + interface IGetColumnDataProfileRequest { + + /** GetColumnDataProfileRequest name */ + name?: (string|null); + } + + /** Represents a GetColumnDataProfileRequest. */ + class GetColumnDataProfileRequest implements IGetColumnDataProfileRequest { + + /** + * Constructs a new GetColumnDataProfileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IGetColumnDataProfileRequest); + + /** GetColumnDataProfileRequest name. */ + public name: string; + + /** + * Creates a new GetColumnDataProfileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetColumnDataProfileRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IGetColumnDataProfileRequest): google.privacy.dlp.v2.GetColumnDataProfileRequest; + + /** + * Encodes the specified GetColumnDataProfileRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetColumnDataProfileRequest.verify|verify} messages. + * @param message GetColumnDataProfileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IGetColumnDataProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetColumnDataProfileRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetColumnDataProfileRequest.verify|verify} messages. + * @param message GetColumnDataProfileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IGetColumnDataProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetColumnDataProfileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetColumnDataProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.GetColumnDataProfileRequest; + + /** + * Decodes a GetColumnDataProfileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetColumnDataProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.GetColumnDataProfileRequest; + + /** + * Verifies a GetColumnDataProfileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetColumnDataProfileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetColumnDataProfileRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.GetColumnDataProfileRequest; + + /** + * Creates a plain object from a GetColumnDataProfileRequest message. Also converts values to other types if specified. + * @param message GetColumnDataProfileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.GetColumnDataProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetColumnDataProfileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetColumnDataProfileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataProfilePubSubCondition. */ + interface IDataProfilePubSubCondition { + + /** DataProfilePubSubCondition expressions */ + expressions?: (google.privacy.dlp.v2.DataProfilePubSubCondition.IPubSubExpressions|null); + } + + /** Represents a DataProfilePubSubCondition. */ + class DataProfilePubSubCondition implements IDataProfilePubSubCondition { + + /** + * Constructs a new DataProfilePubSubCondition. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDataProfilePubSubCondition); + + /** DataProfilePubSubCondition expressions. */ + public expressions?: (google.privacy.dlp.v2.DataProfilePubSubCondition.IPubSubExpressions|null); + + /** + * Creates a new DataProfilePubSubCondition instance using the specified properties. + * @param [properties] Properties to set + * @returns DataProfilePubSubCondition instance + */ + public static create(properties?: google.privacy.dlp.v2.IDataProfilePubSubCondition): google.privacy.dlp.v2.DataProfilePubSubCondition; + + /** + * Encodes the specified DataProfilePubSubCondition message. Does not implicitly {@link google.privacy.dlp.v2.DataProfilePubSubCondition.verify|verify} messages. + * @param message DataProfilePubSubCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDataProfilePubSubCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataProfilePubSubCondition message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfilePubSubCondition.verify|verify} messages. + * @param message DataProfilePubSubCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDataProfilePubSubCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataProfilePubSubCondition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataProfilePubSubCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DataProfilePubSubCondition; + + /** + * Decodes a DataProfilePubSubCondition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataProfilePubSubCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DataProfilePubSubCondition; + + /** + * Verifies a DataProfilePubSubCondition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataProfilePubSubCondition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataProfilePubSubCondition + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DataProfilePubSubCondition; + + /** + * Creates a plain object from a DataProfilePubSubCondition message. Also converts values to other types if specified. + * @param message DataProfilePubSubCondition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DataProfilePubSubCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataProfilePubSubCondition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataProfilePubSubCondition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DataProfilePubSubCondition { + + /** ProfileScoreBucket enum. */ + enum ProfileScoreBucket { + PROFILE_SCORE_BUCKET_UNSPECIFIED = 0, + HIGH = 1, + MEDIUM_OR_HIGH = 2 + } + + /** Properties of a PubSubCondition. */ + interface IPubSubCondition { + + /** PubSubCondition minimumRiskScore */ + minimumRiskScore?: (google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket|keyof typeof google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket|null); + + /** PubSubCondition minimumSensitivityScore */ + minimumSensitivityScore?: (google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket|keyof typeof google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket|null); + } + + /** Represents a PubSubCondition. */ + class PubSubCondition implements IPubSubCondition { + + /** + * Constructs a new PubSubCondition. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.DataProfilePubSubCondition.IPubSubCondition); + + /** PubSubCondition minimumRiskScore. */ + public minimumRiskScore?: (google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket|keyof typeof google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket|null); + + /** PubSubCondition minimumSensitivityScore. */ + public minimumSensitivityScore?: (google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket|keyof typeof google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket|null); + + /** PubSubCondition value. */ + public value?: ("minimumRiskScore"|"minimumSensitivityScore"); + + /** + * Creates a new PubSubCondition instance using the specified properties. + * @param [properties] Properties to set + * @returns PubSubCondition instance + */ + public static create(properties?: google.privacy.dlp.v2.DataProfilePubSubCondition.IPubSubCondition): google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition; + + /** + * Encodes the specified PubSubCondition message. Does not implicitly {@link google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.verify|verify} messages. + * @param message PubSubCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.DataProfilePubSubCondition.IPubSubCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PubSubCondition message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.verify|verify} messages. + * @param message PubSubCondition message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.DataProfilePubSubCondition.IPubSubCondition, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PubSubCondition message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PubSubCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition; + + /** + * Decodes a PubSubCondition message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PubSubCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition; + + /** + * Verifies a PubSubCondition message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PubSubCondition message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PubSubCondition + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition; + + /** + * Creates a plain object from a PubSubCondition message. Also converts values to other types if specified. + * @param message PubSubCondition + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PubSubCondition to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PubSubCondition + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PubSubExpressions. */ + interface IPubSubExpressions { + + /** PubSubExpressions logicalOperator */ + logicalOperator?: (google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator|keyof typeof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator|null); + + /** PubSubExpressions conditions */ + conditions?: (google.privacy.dlp.v2.DataProfilePubSubCondition.IPubSubCondition[]|null); + } + + /** Represents a PubSubExpressions. */ + class PubSubExpressions implements IPubSubExpressions { + + /** + * Constructs a new PubSubExpressions. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.DataProfilePubSubCondition.IPubSubExpressions); + + /** PubSubExpressions logicalOperator. */ + public logicalOperator: (google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator|keyof typeof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator); + + /** PubSubExpressions conditions. */ + public conditions: google.privacy.dlp.v2.DataProfilePubSubCondition.IPubSubCondition[]; + + /** + * Creates a new PubSubExpressions instance using the specified properties. + * @param [properties] Properties to set + * @returns PubSubExpressions instance + */ + public static create(properties?: google.privacy.dlp.v2.DataProfilePubSubCondition.IPubSubExpressions): google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions; + + /** + * Encodes the specified PubSubExpressions message. Does not implicitly {@link google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.verify|verify} messages. + * @param message PubSubExpressions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.DataProfilePubSubCondition.IPubSubExpressions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PubSubExpressions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.verify|verify} messages. + * @param message PubSubExpressions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.DataProfilePubSubCondition.IPubSubExpressions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PubSubExpressions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PubSubExpressions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions; + + /** + * Decodes a PubSubExpressions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PubSubExpressions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions; + + /** + * Verifies a PubSubExpressions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PubSubExpressions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PubSubExpressions + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions; + + /** + * Creates a plain object from a PubSubExpressions message. Also converts values to other types if specified. + * @param message PubSubExpressions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PubSubExpressions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PubSubExpressions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PubSubExpressions { + + /** PubSubLogicalOperator enum. */ + enum PubSubLogicalOperator { + LOGICAL_OPERATOR_UNSPECIFIED = 0, + OR = 1, + AND = 2 + } + } + } + + /** Properties of a DataProfilePubSubMessage. */ + interface IDataProfilePubSubMessage { + + /** DataProfilePubSubMessage profile */ + profile?: (google.privacy.dlp.v2.ITableDataProfile|null); + + /** DataProfilePubSubMessage fileStoreProfile */ + fileStoreProfile?: (google.privacy.dlp.v2.IFileStoreDataProfile|null); + + /** DataProfilePubSubMessage event */ + event?: (google.privacy.dlp.v2.DataProfileAction.EventType|keyof typeof google.privacy.dlp.v2.DataProfileAction.EventType|null); + } + + /** Represents a DataProfilePubSubMessage. */ + class DataProfilePubSubMessage implements IDataProfilePubSubMessage { + + /** + * Constructs a new DataProfilePubSubMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDataProfilePubSubMessage); + + /** DataProfilePubSubMessage profile. */ + public profile?: (google.privacy.dlp.v2.ITableDataProfile|null); + + /** DataProfilePubSubMessage fileStoreProfile. */ + public fileStoreProfile?: (google.privacy.dlp.v2.IFileStoreDataProfile|null); + + /** DataProfilePubSubMessage event. */ + public event: (google.privacy.dlp.v2.DataProfileAction.EventType|keyof typeof google.privacy.dlp.v2.DataProfileAction.EventType); + + /** + * Creates a new DataProfilePubSubMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns DataProfilePubSubMessage instance + */ + public static create(properties?: google.privacy.dlp.v2.IDataProfilePubSubMessage): google.privacy.dlp.v2.DataProfilePubSubMessage; + + /** + * Encodes the specified DataProfilePubSubMessage message. Does not implicitly {@link google.privacy.dlp.v2.DataProfilePubSubMessage.verify|verify} messages. + * @param message DataProfilePubSubMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDataProfilePubSubMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataProfilePubSubMessage message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfilePubSubMessage.verify|verify} messages. + * @param message DataProfilePubSubMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDataProfilePubSubMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataProfilePubSubMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataProfilePubSubMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DataProfilePubSubMessage; + + /** + * Decodes a DataProfilePubSubMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataProfilePubSubMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DataProfilePubSubMessage; + + /** + * Verifies a DataProfilePubSubMessage message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataProfilePubSubMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataProfilePubSubMessage + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DataProfilePubSubMessage; + + /** + * Creates a plain object from a DataProfilePubSubMessage message. Also converts values to other types if specified. + * @param message DataProfilePubSubMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DataProfilePubSubMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataProfilePubSubMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataProfilePubSubMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateConnectionRequest. */ + interface ICreateConnectionRequest { + + /** CreateConnectionRequest parent */ + parent?: (string|null); + + /** CreateConnectionRequest connection */ + connection?: (google.privacy.dlp.v2.IConnection|null); + } + + /** Represents a CreateConnectionRequest. */ + class CreateConnectionRequest implements ICreateConnectionRequest { + + /** + * Constructs a new CreateConnectionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ICreateConnectionRequest); + + /** CreateConnectionRequest parent. */ + public parent: string; + + /** CreateConnectionRequest connection. */ + public connection?: (google.privacy.dlp.v2.IConnection|null); + + /** + * Creates a new CreateConnectionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateConnectionRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.ICreateConnectionRequest): google.privacy.dlp.v2.CreateConnectionRequest; + + /** + * Encodes the specified CreateConnectionRequest message. Does not implicitly {@link google.privacy.dlp.v2.CreateConnectionRequest.verify|verify} messages. + * @param message CreateConnectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ICreateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateConnectionRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CreateConnectionRequest.verify|verify} messages. + * @param message CreateConnectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ICreateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateConnectionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CreateConnectionRequest; + + /** + * Decodes a CreateConnectionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CreateConnectionRequest; + + /** + * Verifies a CreateConnectionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateConnectionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateConnectionRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CreateConnectionRequest; + + /** + * Creates a plain object from a CreateConnectionRequest message. Also converts values to other types if specified. + * @param message CreateConnectionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CreateConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateConnectionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateConnectionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetConnectionRequest. */ + interface IGetConnectionRequest { + + /** GetConnectionRequest name */ + name?: (string|null); + } + + /** Represents a GetConnectionRequest. */ + class GetConnectionRequest implements IGetConnectionRequest { + + /** + * Constructs a new GetConnectionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IGetConnectionRequest); + + /** GetConnectionRequest name. */ + public name: string; + + /** + * Creates a new GetConnectionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetConnectionRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IGetConnectionRequest): google.privacy.dlp.v2.GetConnectionRequest; + + /** + * Encodes the specified GetConnectionRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetConnectionRequest.verify|verify} messages. + * @param message GetConnectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IGetConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetConnectionRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetConnectionRequest.verify|verify} messages. + * @param message GetConnectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IGetConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetConnectionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.GetConnectionRequest; + + /** + * Decodes a GetConnectionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.GetConnectionRequest; + + /** + * Verifies a GetConnectionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetConnectionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetConnectionRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.GetConnectionRequest; + + /** + * Creates a plain object from a GetConnectionRequest message. Also converts values to other types if specified. + * @param message GetConnectionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.GetConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetConnectionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetConnectionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConnectionsRequest. */ + interface IListConnectionsRequest { + + /** ListConnectionsRequest parent */ + parent?: (string|null); + + /** ListConnectionsRequest pageSize */ + pageSize?: (number|null); + + /** ListConnectionsRequest pageToken */ + pageToken?: (string|null); + + /** ListConnectionsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListConnectionsRequest. */ + class ListConnectionsRequest implements IListConnectionsRequest { + + /** + * Constructs a new ListConnectionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListConnectionsRequest); + + /** ListConnectionsRequest parent. */ + public parent: string; + + /** ListConnectionsRequest pageSize. */ + public pageSize: number; + + /** ListConnectionsRequest pageToken. */ + public pageToken: string; + + /** ListConnectionsRequest filter. */ + public filter: string; + + /** + * Creates a new ListConnectionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConnectionsRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IListConnectionsRequest): google.privacy.dlp.v2.ListConnectionsRequest; + + /** + * Encodes the specified ListConnectionsRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListConnectionsRequest.verify|verify} messages. + * @param message ListConnectionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListConnectionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConnectionsRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListConnectionsRequest.verify|verify} messages. + * @param message ListConnectionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListConnectionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConnectionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConnectionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ListConnectionsRequest; + + /** + * Decodes a ListConnectionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConnectionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ListConnectionsRequest; + + /** + * Verifies a ListConnectionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConnectionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConnectionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListConnectionsRequest; + + /** + * Creates a plain object from a ListConnectionsRequest message. Also converts values to other types if specified. + * @param message ListConnectionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListConnectionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConnectionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConnectionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchConnectionsRequest. */ + interface ISearchConnectionsRequest { + + /** SearchConnectionsRequest parent */ + parent?: (string|null); + + /** SearchConnectionsRequest pageSize */ + pageSize?: (number|null); + + /** SearchConnectionsRequest pageToken */ + pageToken?: (string|null); + + /** SearchConnectionsRequest filter */ + filter?: (string|null); + } + + /** Represents a SearchConnectionsRequest. */ + class SearchConnectionsRequest implements ISearchConnectionsRequest { + + /** + * Constructs a new SearchConnectionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ISearchConnectionsRequest); + + /** SearchConnectionsRequest parent. */ + public parent: string; + + /** SearchConnectionsRequest pageSize. */ + public pageSize: number; + + /** SearchConnectionsRequest pageToken. */ + public pageToken: string; + + /** SearchConnectionsRequest filter. */ + public filter: string; + + /** + * Creates a new SearchConnectionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchConnectionsRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.ISearchConnectionsRequest): google.privacy.dlp.v2.SearchConnectionsRequest; + + /** + * Encodes the specified SearchConnectionsRequest message. Does not implicitly {@link google.privacy.dlp.v2.SearchConnectionsRequest.verify|verify} messages. + * @param message SearchConnectionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ISearchConnectionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchConnectionsRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.SearchConnectionsRequest.verify|verify} messages. + * @param message SearchConnectionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ISearchConnectionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchConnectionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchConnectionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.SearchConnectionsRequest; + + /** + * Decodes a SearchConnectionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchConnectionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.SearchConnectionsRequest; + + /** + * Verifies a SearchConnectionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchConnectionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchConnectionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.SearchConnectionsRequest; + + /** + * Creates a plain object from a SearchConnectionsRequest message. Also converts values to other types if specified. + * @param message SearchConnectionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.SearchConnectionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchConnectionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchConnectionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListConnectionsResponse. */ + interface IListConnectionsResponse { + + /** ListConnectionsResponse connections */ + connections?: (google.privacy.dlp.v2.IConnection[]|null); + + /** ListConnectionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListConnectionsResponse. */ + class ListConnectionsResponse implements IListConnectionsResponse { + + /** + * Constructs a new ListConnectionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IListConnectionsResponse); + + /** ListConnectionsResponse connections. */ + public connections: google.privacy.dlp.v2.IConnection[]; + + /** ListConnectionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListConnectionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListConnectionsResponse instance + */ + public static create(properties?: google.privacy.dlp.v2.IListConnectionsResponse): google.privacy.dlp.v2.ListConnectionsResponse; + + /** + * Encodes the specified ListConnectionsResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListConnectionsResponse.verify|verify} messages. + * @param message ListConnectionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IListConnectionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListConnectionsResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListConnectionsResponse.verify|verify} messages. + * @param message ListConnectionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IListConnectionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListConnectionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListConnectionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ListConnectionsResponse; + + /** + * Decodes a ListConnectionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListConnectionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ListConnectionsResponse; + + /** + * Verifies a ListConnectionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListConnectionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListConnectionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ListConnectionsResponse; + + /** + * Creates a plain object from a ListConnectionsResponse message. Also converts values to other types if specified. + * @param message ListConnectionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ListConnectionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListConnectionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListConnectionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SearchConnectionsResponse. */ + interface ISearchConnectionsResponse { + + /** SearchConnectionsResponse connections */ + connections?: (google.privacy.dlp.v2.IConnection[]|null); + + /** SearchConnectionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a SearchConnectionsResponse. */ + class SearchConnectionsResponse implements ISearchConnectionsResponse { + + /** + * Constructs a new SearchConnectionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ISearchConnectionsResponse); + + /** SearchConnectionsResponse connections. */ + public connections: google.privacy.dlp.v2.IConnection[]; + + /** SearchConnectionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new SearchConnectionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SearchConnectionsResponse instance + */ + public static create(properties?: google.privacy.dlp.v2.ISearchConnectionsResponse): google.privacy.dlp.v2.SearchConnectionsResponse; + + /** + * Encodes the specified SearchConnectionsResponse message. Does not implicitly {@link google.privacy.dlp.v2.SearchConnectionsResponse.verify|verify} messages. + * @param message SearchConnectionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ISearchConnectionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SearchConnectionsResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.SearchConnectionsResponse.verify|verify} messages. + * @param message SearchConnectionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ISearchConnectionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SearchConnectionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SearchConnectionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.SearchConnectionsResponse; + + /** + * Decodes a SearchConnectionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SearchConnectionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.SearchConnectionsResponse; + + /** + * Verifies a SearchConnectionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SearchConnectionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SearchConnectionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.SearchConnectionsResponse; + + /** + * Creates a plain object from a SearchConnectionsResponse message. Also converts values to other types if specified. + * @param message SearchConnectionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.SearchConnectionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SearchConnectionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SearchConnectionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateConnectionRequest. */ + interface IUpdateConnectionRequest { + + /** UpdateConnectionRequest name */ + name?: (string|null); + + /** UpdateConnectionRequest connection */ + connection?: (google.privacy.dlp.v2.IConnection|null); + + /** UpdateConnectionRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateConnectionRequest. */ + class UpdateConnectionRequest implements IUpdateConnectionRequest { + + /** + * Constructs a new UpdateConnectionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IUpdateConnectionRequest); + + /** UpdateConnectionRequest name. */ + public name: string; + + /** UpdateConnectionRequest connection. */ + public connection?: (google.privacy.dlp.v2.IConnection|null); + + /** UpdateConnectionRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateConnectionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateConnectionRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IUpdateConnectionRequest): google.privacy.dlp.v2.UpdateConnectionRequest; + + /** + * Encodes the specified UpdateConnectionRequest message. Does not implicitly {@link google.privacy.dlp.v2.UpdateConnectionRequest.verify|verify} messages. + * @param message UpdateConnectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IUpdateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateConnectionRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.UpdateConnectionRequest.verify|verify} messages. + * @param message UpdateConnectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IUpdateConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateConnectionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.UpdateConnectionRequest; + + /** + * Decodes an UpdateConnectionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.UpdateConnectionRequest; + + /** + * Verifies an UpdateConnectionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateConnectionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateConnectionRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.UpdateConnectionRequest; + + /** + * Creates a plain object from an UpdateConnectionRequest message. Also converts values to other types if specified. + * @param message UpdateConnectionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.UpdateConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateConnectionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateConnectionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteConnectionRequest. */ + interface IDeleteConnectionRequest { + + /** DeleteConnectionRequest name */ + name?: (string|null); + } + + /** Represents a DeleteConnectionRequest. */ + class DeleteConnectionRequest implements IDeleteConnectionRequest { + + /** + * Constructs a new DeleteConnectionRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDeleteConnectionRequest); + + /** DeleteConnectionRequest name. */ + public name: string; + + /** + * Creates a new DeleteConnectionRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteConnectionRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IDeleteConnectionRequest): google.privacy.dlp.v2.DeleteConnectionRequest; + + /** + * Encodes the specified DeleteConnectionRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteConnectionRequest.verify|verify} messages. + * @param message DeleteConnectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDeleteConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteConnectionRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteConnectionRequest.verify|verify} messages. + * @param message DeleteConnectionRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDeleteConnectionRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteConnectionRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DeleteConnectionRequest; + + /** + * Decodes a DeleteConnectionRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DeleteConnectionRequest; + + /** + * Verifies a DeleteConnectionRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteConnectionRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteConnectionRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DeleteConnectionRequest; + + /** + * Creates a plain object from a DeleteConnectionRequest message. Also converts values to other types if specified. + * @param message DeleteConnectionRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DeleteConnectionRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteConnectionRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteConnectionRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Connection. */ + interface IConnection { + + /** Connection name */ + name?: (string|null); + + /** Connection state */ + state?: (google.privacy.dlp.v2.ConnectionState|keyof typeof google.privacy.dlp.v2.ConnectionState|null); + + /** Connection errors */ + errors?: (google.privacy.dlp.v2.IError[]|null); + + /** Connection cloudSql */ + cloudSql?: (google.privacy.dlp.v2.ICloudSqlProperties|null); + } + + /** Represents a Connection. */ + class Connection implements IConnection { + + /** + * Constructs a new Connection. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IConnection); + + /** Connection name. */ + public name: string; + + /** Connection state. */ + public state: (google.privacy.dlp.v2.ConnectionState|keyof typeof google.privacy.dlp.v2.ConnectionState); + + /** Connection errors. */ + public errors: google.privacy.dlp.v2.IError[]; + + /** Connection cloudSql. */ + public cloudSql?: (google.privacy.dlp.v2.ICloudSqlProperties|null); + + /** Connection properties. */ + public properties?: "cloudSql"; + + /** + * Creates a new Connection instance using the specified properties. + * @param [properties] Properties to set + * @returns Connection instance + */ + public static create(properties?: google.privacy.dlp.v2.IConnection): google.privacy.dlp.v2.Connection; + + /** + * Encodes the specified Connection message. Does not implicitly {@link google.privacy.dlp.v2.Connection.verify|verify} messages. + * @param message Connection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IConnection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Connection message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Connection.verify|verify} messages. + * @param message Connection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IConnection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Connection message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Connection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Connection; + + /** + * Decodes a Connection message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Connection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Connection; + + /** + * Verifies a Connection message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Connection message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Connection + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Connection; + + /** + * Creates a plain object from a Connection message. Also converts values to other types if specified. + * @param message Connection + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Connection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Connection to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Connection + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** ConnectionState enum. */ + enum ConnectionState { + CONNECTION_STATE_UNSPECIFIED = 0, + MISSING_CREDENTIALS = 1, + AVAILABLE = 2, + ERROR = 3 + } + + /** Properties of a SecretManagerCredential. */ + interface ISecretManagerCredential { + + /** SecretManagerCredential username */ + username?: (string|null); + + /** SecretManagerCredential passwordSecretVersionName */ + passwordSecretVersionName?: (string|null); + } + + /** Represents a SecretManagerCredential. */ + class SecretManagerCredential implements ISecretManagerCredential { + + /** + * Constructs a new SecretManagerCredential. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ISecretManagerCredential); + + /** SecretManagerCredential username. */ + public username: string; + + /** SecretManagerCredential passwordSecretVersionName. */ + public passwordSecretVersionName: string; + + /** + * Creates a new SecretManagerCredential instance using the specified properties. + * @param [properties] Properties to set + * @returns SecretManagerCredential instance + */ + public static create(properties?: google.privacy.dlp.v2.ISecretManagerCredential): google.privacy.dlp.v2.SecretManagerCredential; + + /** + * Encodes the specified SecretManagerCredential message. Does not implicitly {@link google.privacy.dlp.v2.SecretManagerCredential.verify|verify} messages. + * @param message SecretManagerCredential message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ISecretManagerCredential, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecretManagerCredential message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.SecretManagerCredential.verify|verify} messages. + * @param message SecretManagerCredential message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ISecretManagerCredential, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecretManagerCredential message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecretManagerCredential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.SecretManagerCredential; + + /** + * Decodes a SecretManagerCredential message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecretManagerCredential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.SecretManagerCredential; + + /** + * Verifies a SecretManagerCredential message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SecretManagerCredential message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecretManagerCredential + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.SecretManagerCredential; + + /** + * Creates a plain object from a SecretManagerCredential message. Also converts values to other types if specified. + * @param message SecretManagerCredential + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.SecretManagerCredential, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecretManagerCredential to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecretManagerCredential + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudSqlIamCredential. */ + interface ICloudSqlIamCredential { + } + + /** Represents a CloudSqlIamCredential. */ + class CloudSqlIamCredential implements ICloudSqlIamCredential { + + /** + * Constructs a new CloudSqlIamCredential. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ICloudSqlIamCredential); + + /** + * Creates a new CloudSqlIamCredential instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudSqlIamCredential instance + */ + public static create(properties?: google.privacy.dlp.v2.ICloudSqlIamCredential): google.privacy.dlp.v2.CloudSqlIamCredential; + + /** + * Encodes the specified CloudSqlIamCredential message. Does not implicitly {@link google.privacy.dlp.v2.CloudSqlIamCredential.verify|verify} messages. + * @param message CloudSqlIamCredential message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ICloudSqlIamCredential, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudSqlIamCredential message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudSqlIamCredential.verify|verify} messages. + * @param message CloudSqlIamCredential message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ICloudSqlIamCredential, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudSqlIamCredential message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudSqlIamCredential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CloudSqlIamCredential; + + /** + * Decodes a CloudSqlIamCredential message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudSqlIamCredential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CloudSqlIamCredential; + + /** + * Verifies a CloudSqlIamCredential message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudSqlIamCredential message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudSqlIamCredential + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CloudSqlIamCredential; + + /** + * Creates a plain object from a CloudSqlIamCredential message. Also converts values to other types if specified. + * @param message CloudSqlIamCredential + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CloudSqlIamCredential, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudSqlIamCredential to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudSqlIamCredential + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudSqlProperties. */ + interface ICloudSqlProperties { + + /** CloudSqlProperties connectionName */ + connectionName?: (string|null); + + /** CloudSqlProperties usernamePassword */ + usernamePassword?: (google.privacy.dlp.v2.ISecretManagerCredential|null); + + /** CloudSqlProperties cloudSqlIam */ + cloudSqlIam?: (google.privacy.dlp.v2.ICloudSqlIamCredential|null); + + /** CloudSqlProperties maxConnections */ + maxConnections?: (number|null); + + /** CloudSqlProperties databaseEngine */ + databaseEngine?: (google.privacy.dlp.v2.CloudSqlProperties.DatabaseEngine|keyof typeof google.privacy.dlp.v2.CloudSqlProperties.DatabaseEngine|null); + } + + /** Represents a CloudSqlProperties. */ + class CloudSqlProperties implements ICloudSqlProperties { + + /** + * Constructs a new CloudSqlProperties. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ICloudSqlProperties); + + /** CloudSqlProperties connectionName. */ + public connectionName: string; + + /** CloudSqlProperties usernamePassword. */ + public usernamePassword?: (google.privacy.dlp.v2.ISecretManagerCredential|null); + + /** CloudSqlProperties cloudSqlIam. */ + public cloudSqlIam?: (google.privacy.dlp.v2.ICloudSqlIamCredential|null); + + /** CloudSqlProperties maxConnections. */ + public maxConnections: number; + + /** CloudSqlProperties databaseEngine. */ + public databaseEngine: (google.privacy.dlp.v2.CloudSqlProperties.DatabaseEngine|keyof typeof google.privacy.dlp.v2.CloudSqlProperties.DatabaseEngine); + + /** CloudSqlProperties credential. */ + public credential?: ("usernamePassword"|"cloudSqlIam"); + + /** + * Creates a new CloudSqlProperties instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudSqlProperties instance + */ + public static create(properties?: google.privacy.dlp.v2.ICloudSqlProperties): google.privacy.dlp.v2.CloudSqlProperties; + + /** + * Encodes the specified CloudSqlProperties message. Does not implicitly {@link google.privacy.dlp.v2.CloudSqlProperties.verify|verify} messages. + * @param message CloudSqlProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ICloudSqlProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudSqlProperties message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudSqlProperties.verify|verify} messages. + * @param message CloudSqlProperties message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ICloudSqlProperties, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudSqlProperties message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudSqlProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CloudSqlProperties; + + /** + * Decodes a CloudSqlProperties message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudSqlProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CloudSqlProperties; + + /** + * Verifies a CloudSqlProperties message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudSqlProperties message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudSqlProperties + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CloudSqlProperties; + + /** + * Creates a plain object from a CloudSqlProperties message. Also converts values to other types if specified. + * @param message CloudSqlProperties + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CloudSqlProperties, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudSqlProperties to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudSqlProperties + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CloudSqlProperties { + + /** DatabaseEngine enum. */ + enum DatabaseEngine { + DATABASE_ENGINE_UNKNOWN = 0, + DATABASE_ENGINE_MYSQL = 1, + DATABASE_ENGINE_POSTGRES = 2 + } + } + + /** Properties of a DeleteTableDataProfileRequest. */ + interface IDeleteTableDataProfileRequest { + + /** DeleteTableDataProfileRequest name */ + name?: (string|null); + } + + /** Represents a DeleteTableDataProfileRequest. */ + class DeleteTableDataProfileRequest implements IDeleteTableDataProfileRequest { + + /** + * Constructs a new DeleteTableDataProfileRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDeleteTableDataProfileRequest); + + /** DeleteTableDataProfileRequest name. */ + public name: string; + + /** + * Creates a new DeleteTableDataProfileRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteTableDataProfileRequest instance + */ + public static create(properties?: google.privacy.dlp.v2.IDeleteTableDataProfileRequest): google.privacy.dlp.v2.DeleteTableDataProfileRequest; + + /** + * Encodes the specified DeleteTableDataProfileRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteTableDataProfileRequest.verify|verify} messages. + * @param message DeleteTableDataProfileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDeleteTableDataProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteTableDataProfileRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteTableDataProfileRequest.verify|verify} messages. + * @param message DeleteTableDataProfileRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDeleteTableDataProfileRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteTableDataProfileRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteTableDataProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DeleteTableDataProfileRequest; + + /** + * Decodes a DeleteTableDataProfileRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteTableDataProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DeleteTableDataProfileRequest; + + /** + * Verifies a DeleteTableDataProfileRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteTableDataProfileRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteTableDataProfileRequest + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DeleteTableDataProfileRequest; + + /** + * Creates a plain object from a DeleteTableDataProfileRequest message. Also converts values to other types if specified. + * @param message DeleteTableDataProfileRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DeleteTableDataProfileRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteTableDataProfileRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteTableDataProfileRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DataSourceType. */ + interface IDataSourceType { + + /** DataSourceType dataSource */ + dataSource?: (string|null); + } + + /** Represents a DataSourceType. */ + class DataSourceType implements IDataSourceType { + + /** + * Constructs a new DataSourceType. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDataSourceType); + + /** DataSourceType dataSource. */ + public dataSource: string; + + /** + * Creates a new DataSourceType instance using the specified properties. + * @param [properties] Properties to set + * @returns DataSourceType instance + */ + public static create(properties?: google.privacy.dlp.v2.IDataSourceType): google.privacy.dlp.v2.DataSourceType; + + /** + * Encodes the specified DataSourceType message. Does not implicitly {@link google.privacy.dlp.v2.DataSourceType.verify|verify} messages. + * @param message DataSourceType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDataSourceType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataSourceType message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataSourceType.verify|verify} messages. + * @param message DataSourceType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDataSourceType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataSourceType message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataSourceType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DataSourceType; + + /** + * Decodes a DataSourceType message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataSourceType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DataSourceType; + + /** + * Verifies a DataSourceType message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataSourceType message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataSourceType + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DataSourceType; + + /** + * Creates a plain object from a DataSourceType message. Also converts values to other types if specified. + * @param message DataSourceType + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DataSourceType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataSourceType to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataSourceType + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileClusterType. */ + interface IFileClusterType { + + /** FileClusterType cluster */ + cluster?: (google.privacy.dlp.v2.FileClusterType.Cluster|keyof typeof google.privacy.dlp.v2.FileClusterType.Cluster|null); + } + + /** Represents a FileClusterType. */ + class FileClusterType implements IFileClusterType { + + /** + * Constructs a new FileClusterType. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IFileClusterType); + + /** FileClusterType cluster. */ + public cluster?: (google.privacy.dlp.v2.FileClusterType.Cluster|keyof typeof google.privacy.dlp.v2.FileClusterType.Cluster|null); + + /** FileClusterType fileClusterType. */ + public fileClusterType?: "cluster"; + + /** + * Creates a new FileClusterType instance using the specified properties. + * @param [properties] Properties to set + * @returns FileClusterType instance + */ + public static create(properties?: google.privacy.dlp.v2.IFileClusterType): google.privacy.dlp.v2.FileClusterType; + + /** + * Encodes the specified FileClusterType message. Does not implicitly {@link google.privacy.dlp.v2.FileClusterType.verify|verify} messages. + * @param message FileClusterType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IFileClusterType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileClusterType message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FileClusterType.verify|verify} messages. + * @param message FileClusterType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IFileClusterType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileClusterType message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileClusterType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.FileClusterType; + + /** + * Decodes a FileClusterType message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileClusterType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.FileClusterType; + + /** + * Verifies a FileClusterType message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileClusterType message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileClusterType + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.FileClusterType; + + /** + * Creates a plain object from a FileClusterType message. Also converts values to other types if specified. + * @param message FileClusterType + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.FileClusterType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileClusterType to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileClusterType + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileClusterType { + + /** Cluster enum. */ + enum Cluster { + CLUSTER_UNSPECIFIED = 0, + CLUSTER_UNKNOWN = 1, + CLUSTER_TEXT = 2, + CLUSTER_STRUCTURED_DATA = 3, + CLUSTER_SOURCE_CODE = 4, + CLUSTER_RICH_DOCUMENT = 5, + CLUSTER_IMAGE = 6, + CLUSTER_ARCHIVE = 7, + CLUSTER_MULTIMEDIA = 8, + CLUSTER_EXECUTABLE = 9, + CLUSTER_AI_MODEL = 10 + } + } + + /** Properties of a ProcessingLocation. */ + interface IProcessingLocation { + + /** ProcessingLocation imageFallbackLocation */ + imageFallbackLocation?: (google.privacy.dlp.v2.ProcessingLocation.IImageFallbackLocation|null); + + /** ProcessingLocation documentFallbackLocation */ + documentFallbackLocation?: (google.privacy.dlp.v2.ProcessingLocation.IDocumentFallbackLocation|null); + } + + /** Represents a ProcessingLocation. */ + class ProcessingLocation implements IProcessingLocation { + + /** + * Constructs a new ProcessingLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IProcessingLocation); + + /** ProcessingLocation imageFallbackLocation. */ + public imageFallbackLocation?: (google.privacy.dlp.v2.ProcessingLocation.IImageFallbackLocation|null); + + /** ProcessingLocation documentFallbackLocation. */ + public documentFallbackLocation?: (google.privacy.dlp.v2.ProcessingLocation.IDocumentFallbackLocation|null); + + /** + * Creates a new ProcessingLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns ProcessingLocation instance + */ + public static create(properties?: google.privacy.dlp.v2.IProcessingLocation): google.privacy.dlp.v2.ProcessingLocation; + + /** + * Encodes the specified ProcessingLocation message. Does not implicitly {@link google.privacy.dlp.v2.ProcessingLocation.verify|verify} messages. + * @param message ProcessingLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IProcessingLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ProcessingLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ProcessingLocation.verify|verify} messages. + * @param message ProcessingLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IProcessingLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ProcessingLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ProcessingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ProcessingLocation; + + /** + * Decodes a ProcessingLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ProcessingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ProcessingLocation; + + /** + * Verifies a ProcessingLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ProcessingLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ProcessingLocation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ProcessingLocation; + + /** + * Creates a plain object from a ProcessingLocation message. Also converts values to other types if specified. + * @param message ProcessingLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ProcessingLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ProcessingLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ProcessingLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ProcessingLocation { + + /** Properties of a MultiRegionProcessing. */ + interface IMultiRegionProcessing { + } + + /** Represents a MultiRegionProcessing. */ + class MultiRegionProcessing implements IMultiRegionProcessing { + + /** + * Constructs a new MultiRegionProcessing. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ProcessingLocation.IMultiRegionProcessing); + + /** + * Creates a new MultiRegionProcessing instance using the specified properties. + * @param [properties] Properties to set + * @returns MultiRegionProcessing instance + */ + public static create(properties?: google.privacy.dlp.v2.ProcessingLocation.IMultiRegionProcessing): google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing; + + /** + * Encodes the specified MultiRegionProcessing message. Does not implicitly {@link google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing.verify|verify} messages. + * @param message MultiRegionProcessing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ProcessingLocation.IMultiRegionProcessing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MultiRegionProcessing message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing.verify|verify} messages. + * @param message MultiRegionProcessing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ProcessingLocation.IMultiRegionProcessing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MultiRegionProcessing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MultiRegionProcessing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing; + + /** + * Decodes a MultiRegionProcessing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MultiRegionProcessing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing; + + /** + * Verifies a MultiRegionProcessing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MultiRegionProcessing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MultiRegionProcessing + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing; + + /** + * Creates a plain object from a MultiRegionProcessing message. Also converts values to other types if specified. + * @param message MultiRegionProcessing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MultiRegionProcessing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MultiRegionProcessing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GlobalProcessing. */ + interface IGlobalProcessing { + } + + /** Represents a GlobalProcessing. */ + class GlobalProcessing implements IGlobalProcessing { + + /** + * Constructs a new GlobalProcessing. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ProcessingLocation.IGlobalProcessing); + + /** + * Creates a new GlobalProcessing instance using the specified properties. + * @param [properties] Properties to set + * @returns GlobalProcessing instance + */ + public static create(properties?: google.privacy.dlp.v2.ProcessingLocation.IGlobalProcessing): google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing; + + /** + * Encodes the specified GlobalProcessing message. Does not implicitly {@link google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing.verify|verify} messages. + * @param message GlobalProcessing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ProcessingLocation.IGlobalProcessing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GlobalProcessing message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing.verify|verify} messages. + * @param message GlobalProcessing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ProcessingLocation.IGlobalProcessing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GlobalProcessing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GlobalProcessing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing; + + /** + * Decodes a GlobalProcessing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GlobalProcessing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing; + + /** + * Verifies a GlobalProcessing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GlobalProcessing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GlobalProcessing + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing; + + /** + * Creates a plain object from a GlobalProcessing message. Also converts values to other types if specified. + * @param message GlobalProcessing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GlobalProcessing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GlobalProcessing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImageFallbackLocation. */ + interface IImageFallbackLocation { + + /** ImageFallbackLocation multiRegionProcessing */ + multiRegionProcessing?: (google.privacy.dlp.v2.ProcessingLocation.IMultiRegionProcessing|null); + + /** ImageFallbackLocation globalProcessing */ + globalProcessing?: (google.privacy.dlp.v2.ProcessingLocation.IGlobalProcessing|null); + } + + /** Represents an ImageFallbackLocation. */ + class ImageFallbackLocation implements IImageFallbackLocation { + + /** + * Constructs a new ImageFallbackLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ProcessingLocation.IImageFallbackLocation); + + /** ImageFallbackLocation multiRegionProcessing. */ + public multiRegionProcessing?: (google.privacy.dlp.v2.ProcessingLocation.IMultiRegionProcessing|null); + + /** ImageFallbackLocation globalProcessing. */ + public globalProcessing?: (google.privacy.dlp.v2.ProcessingLocation.IGlobalProcessing|null); + + /** + * Creates a new ImageFallbackLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns ImageFallbackLocation instance + */ + public static create(properties?: google.privacy.dlp.v2.ProcessingLocation.IImageFallbackLocation): google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation; + + /** + * Encodes the specified ImageFallbackLocation message. Does not implicitly {@link google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation.verify|verify} messages. + * @param message ImageFallbackLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ProcessingLocation.IImageFallbackLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImageFallbackLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation.verify|verify} messages. + * @param message ImageFallbackLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ProcessingLocation.IImageFallbackLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImageFallbackLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImageFallbackLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation; + + /** + * Decodes an ImageFallbackLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImageFallbackLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation; + + /** + * Verifies an ImageFallbackLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ImageFallbackLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImageFallbackLocation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation; + + /** + * Creates a plain object from an ImageFallbackLocation message. Also converts values to other types if specified. + * @param message ImageFallbackLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImageFallbackLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImageFallbackLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DocumentFallbackLocation. */ + interface IDocumentFallbackLocation { + + /** DocumentFallbackLocation multiRegionProcessing */ + multiRegionProcessing?: (google.privacy.dlp.v2.ProcessingLocation.IMultiRegionProcessing|null); + + /** DocumentFallbackLocation globalProcessing */ + globalProcessing?: (google.privacy.dlp.v2.ProcessingLocation.IGlobalProcessing|null); + } + + /** Represents a DocumentFallbackLocation. */ + class DocumentFallbackLocation implements IDocumentFallbackLocation { + + /** + * Constructs a new DocumentFallbackLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ProcessingLocation.IDocumentFallbackLocation); + + /** DocumentFallbackLocation multiRegionProcessing. */ + public multiRegionProcessing?: (google.privacy.dlp.v2.ProcessingLocation.IMultiRegionProcessing|null); + + /** DocumentFallbackLocation globalProcessing. */ + public globalProcessing?: (google.privacy.dlp.v2.ProcessingLocation.IGlobalProcessing|null); + + /** + * Creates a new DocumentFallbackLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns DocumentFallbackLocation instance + */ + public static create(properties?: google.privacy.dlp.v2.ProcessingLocation.IDocumentFallbackLocation): google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation; + + /** + * Encodes the specified DocumentFallbackLocation message. Does not implicitly {@link google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation.verify|verify} messages. + * @param message DocumentFallbackLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ProcessingLocation.IDocumentFallbackLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DocumentFallbackLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation.verify|verify} messages. + * @param message DocumentFallbackLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ProcessingLocation.IDocumentFallbackLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DocumentFallbackLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DocumentFallbackLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation; + + /** + * Decodes a DocumentFallbackLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DocumentFallbackLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation; + + /** + * Verifies a DocumentFallbackLocation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DocumentFallbackLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DocumentFallbackLocation + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation; + + /** + * Creates a plain object from a DocumentFallbackLocation message. Also converts values to other types if specified. + * @param message DocumentFallbackLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DocumentFallbackLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DocumentFallbackLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SaveToGcsFindingsOutput. */ + interface ISaveToGcsFindingsOutput { + + /** SaveToGcsFindingsOutput findings */ + findings?: (google.privacy.dlp.v2.IFinding[]|null); + } + + /** Represents a SaveToGcsFindingsOutput. */ + class SaveToGcsFindingsOutput implements ISaveToGcsFindingsOutput { + + /** + * Constructs a new SaveToGcsFindingsOutput. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ISaveToGcsFindingsOutput); + + /** SaveToGcsFindingsOutput findings. */ + public findings: google.privacy.dlp.v2.IFinding[]; + + /** + * Creates a new SaveToGcsFindingsOutput instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveToGcsFindingsOutput instance + */ + public static create(properties?: google.privacy.dlp.v2.ISaveToGcsFindingsOutput): google.privacy.dlp.v2.SaveToGcsFindingsOutput; + + /** + * Encodes the specified SaveToGcsFindingsOutput message. Does not implicitly {@link google.privacy.dlp.v2.SaveToGcsFindingsOutput.verify|verify} messages. + * @param message SaveToGcsFindingsOutput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ISaveToGcsFindingsOutput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveToGcsFindingsOutput message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.SaveToGcsFindingsOutput.verify|verify} messages. + * @param message SaveToGcsFindingsOutput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ISaveToGcsFindingsOutput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveToGcsFindingsOutput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveToGcsFindingsOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.SaveToGcsFindingsOutput; + + /** + * Decodes a SaveToGcsFindingsOutput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveToGcsFindingsOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.SaveToGcsFindingsOutput; + + /** + * Verifies a SaveToGcsFindingsOutput message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveToGcsFindingsOutput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveToGcsFindingsOutput + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.SaveToGcsFindingsOutput; + + /** + * Creates a plain object from a SaveToGcsFindingsOutput message. Also converts values to other types if specified. + * @param message SaveToGcsFindingsOutput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.SaveToGcsFindingsOutput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveToGcsFindingsOutput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveToGcsFindingsOutput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Domain. */ + interface IDomain { + + /** Domain category */ + category?: (google.privacy.dlp.v2.Domain.Category|keyof typeof google.privacy.dlp.v2.Domain.Category|null); + + /** Domain signals */ + signals?: (google.privacy.dlp.v2.Domain.Signal[]|null); + } + + /** Represents a Domain. */ + class Domain implements IDomain { + + /** + * Constructs a new Domain. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDomain); + + /** Domain category. */ + public category: (google.privacy.dlp.v2.Domain.Category|keyof typeof google.privacy.dlp.v2.Domain.Category); + + /** Domain signals. */ + public signals: google.privacy.dlp.v2.Domain.Signal[]; + + /** + * Creates a new Domain instance using the specified properties. + * @param [properties] Properties to set + * @returns Domain instance + */ + public static create(properties?: google.privacy.dlp.v2.IDomain): google.privacy.dlp.v2.Domain; + + /** + * Encodes the specified Domain message. Does not implicitly {@link google.privacy.dlp.v2.Domain.verify|verify} messages. + * @param message Domain message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDomain, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Domain message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Domain.verify|verify} messages. + * @param message Domain message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDomain, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Domain message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Domain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Domain; + + /** + * Decodes a Domain message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Domain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Domain; + + /** + * Verifies a Domain message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Domain message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Domain + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Domain; + + /** + * Creates a plain object from a Domain message. Also converts values to other types if specified. + * @param message Domain + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Domain, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Domain to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Domain + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Domain { + + /** Category enum. */ + enum Category { + CATEGORY_UNSPECIFIED = 0, + AI = 1, + CODE = 2 + } + + /** Signal enum. */ + enum Signal { + SIGNAL_UNSPECIFIED = 0, + MODEL = 1, + TEXT_EMBEDDING = 2, + EMBEDDING = 7, + VERTEX_PLUGIN = 3, + VECTOR_PLUGIN = 4, + SOURCE_CODE = 5, + SERVICE = 6 + } + } + + /** Properties of an InfoType. */ + interface IInfoType { + + /** InfoType name */ + name?: (string|null); + + /** InfoType version */ + version?: (string|null); + + /** InfoType sensitivityScore */ + sensitivityScore?: (google.privacy.dlp.v2.ISensitivityScore|null); + } + + /** Represents an InfoType. */ + class InfoType implements IInfoType { + + /** + * Constructs a new InfoType. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IInfoType); + + /** InfoType name. */ + public name: string; + + /** InfoType version. */ + public version: string; + + /** InfoType sensitivityScore. */ + public sensitivityScore?: (google.privacy.dlp.v2.ISensitivityScore|null); + + /** + * Creates a new InfoType instance using the specified properties. + * @param [properties] Properties to set + * @returns InfoType instance + */ + public static create(properties?: google.privacy.dlp.v2.IInfoType): google.privacy.dlp.v2.InfoType; + + /** + * Encodes the specified InfoType message. Does not implicitly {@link google.privacy.dlp.v2.InfoType.verify|verify} messages. + * @param message InfoType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IInfoType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified InfoType message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InfoType.verify|verify} messages. + * @param message InfoType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IInfoType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an InfoType message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns InfoType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.InfoType; + + /** + * Decodes an InfoType message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns InfoType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.InfoType; + + /** + * Verifies an InfoType message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an InfoType message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns InfoType + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.InfoType; + + /** + * Creates a plain object from an InfoType message. Also converts values to other types if specified. + * @param message InfoType + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.InfoType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this InfoType to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for InfoType + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SensitivityScore. */ + interface ISensitivityScore { + + /** SensitivityScore score */ + score?: (google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel|keyof typeof google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel|null); + } + + /** Represents a SensitivityScore. */ + class SensitivityScore implements ISensitivityScore { + + /** + * Constructs a new SensitivityScore. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ISensitivityScore); + + /** SensitivityScore score. */ + public score: (google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel|keyof typeof google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel); + + /** + * Creates a new SensitivityScore instance using the specified properties. + * @param [properties] Properties to set + * @returns SensitivityScore instance + */ + public static create(properties?: google.privacy.dlp.v2.ISensitivityScore): google.privacy.dlp.v2.SensitivityScore; + + /** + * Encodes the specified SensitivityScore message. Does not implicitly {@link google.privacy.dlp.v2.SensitivityScore.verify|verify} messages. + * @param message SensitivityScore message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ISensitivityScore, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SensitivityScore message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.SensitivityScore.verify|verify} messages. + * @param message SensitivityScore message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ISensitivityScore, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SensitivityScore message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SensitivityScore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.SensitivityScore; + + /** + * Decodes a SensitivityScore message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SensitivityScore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.SensitivityScore; + + /** + * Verifies a SensitivityScore message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SensitivityScore message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SensitivityScore + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.SensitivityScore; + + /** + * Creates a plain object from a SensitivityScore message. Also converts values to other types if specified. + * @param message SensitivityScore + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.SensitivityScore, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SensitivityScore to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SensitivityScore + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SensitivityScore { + + /** SensitivityScoreLevel enum. */ + enum SensitivityScoreLevel { + SENSITIVITY_SCORE_UNSPECIFIED = 0, + SENSITIVITY_LOW = 10, + SENSITIVITY_UNKNOWN = 12, + SENSITIVITY_MODERATE = 20, + SENSITIVITY_HIGH = 30 + } + } + + /** Likelihood enum. */ + enum Likelihood { + LIKELIHOOD_UNSPECIFIED = 0, + VERY_UNLIKELY = 1, + UNLIKELY = 2, + POSSIBLE = 3, + LIKELY = 4, + VERY_LIKELY = 5 + } + + /** Properties of a StoredType. */ + interface IStoredType { + + /** StoredType name */ + name?: (string|null); + + /** StoredType createTime */ + createTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a StoredType. */ + class StoredType implements IStoredType { + + /** + * Constructs a new StoredType. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IStoredType); + + /** StoredType name. */ + public name: string; + + /** StoredType createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new StoredType instance using the specified properties. + * @param [properties] Properties to set + * @returns StoredType instance + */ + public static create(properties?: google.privacy.dlp.v2.IStoredType): google.privacy.dlp.v2.StoredType; + + /** + * Encodes the specified StoredType message. Does not implicitly {@link google.privacy.dlp.v2.StoredType.verify|verify} messages. + * @param message StoredType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IStoredType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StoredType message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StoredType.verify|verify} messages. + * @param message StoredType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IStoredType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StoredType message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StoredType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.StoredType; + + /** + * Decodes a StoredType message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StoredType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.StoredType; + + /** + * Verifies a StoredType message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StoredType message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StoredType + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.StoredType; + + /** + * Creates a plain object from a StoredType message. Also converts values to other types if specified. + * @param message StoredType + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.StoredType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StoredType to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StoredType + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomInfoType. */ + interface ICustomInfoType { + + /** CustomInfoType infoType */ + infoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** CustomInfoType likelihood */ + likelihood?: (google.privacy.dlp.v2.Likelihood|keyof typeof google.privacy.dlp.v2.Likelihood|null); + + /** CustomInfoType dictionary */ + dictionary?: (google.privacy.dlp.v2.CustomInfoType.IDictionary|null); + + /** CustomInfoType regex */ + regex?: (google.privacy.dlp.v2.CustomInfoType.IRegex|null); + + /** CustomInfoType surrogateType */ + surrogateType?: (google.privacy.dlp.v2.CustomInfoType.ISurrogateType|null); + + /** CustomInfoType storedType */ + storedType?: (google.privacy.dlp.v2.IStoredType|null); + + /** CustomInfoType metadataKeyValueExpression */ + metadataKeyValueExpression?: (google.privacy.dlp.v2.CustomInfoType.IMetadataKeyValueExpression|null); + + /** CustomInfoType detectionRules */ + detectionRules?: (google.privacy.dlp.v2.CustomInfoType.IDetectionRule[]|null); + + /** CustomInfoType exclusionType */ + exclusionType?: (google.privacy.dlp.v2.CustomInfoType.ExclusionType|keyof typeof google.privacy.dlp.v2.CustomInfoType.ExclusionType|null); + + /** CustomInfoType sensitivityScore */ + sensitivityScore?: (google.privacy.dlp.v2.ISensitivityScore|null); + } + + /** Represents a CustomInfoType. */ + class CustomInfoType implements ICustomInfoType { + + /** + * Constructs a new CustomInfoType. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ICustomInfoType); + + /** CustomInfoType infoType. */ + public infoType?: (google.privacy.dlp.v2.IInfoType|null); + + /** CustomInfoType likelihood. */ + public likelihood: (google.privacy.dlp.v2.Likelihood|keyof typeof google.privacy.dlp.v2.Likelihood); + + /** CustomInfoType dictionary. */ + public dictionary?: (google.privacy.dlp.v2.CustomInfoType.IDictionary|null); + + /** CustomInfoType regex. */ + public regex?: (google.privacy.dlp.v2.CustomInfoType.IRegex|null); + + /** CustomInfoType surrogateType. */ + public surrogateType?: (google.privacy.dlp.v2.CustomInfoType.ISurrogateType|null); + + /** CustomInfoType storedType. */ + public storedType?: (google.privacy.dlp.v2.IStoredType|null); + + /** CustomInfoType metadataKeyValueExpression. */ + public metadataKeyValueExpression?: (google.privacy.dlp.v2.CustomInfoType.IMetadataKeyValueExpression|null); + + /** CustomInfoType detectionRules. */ + public detectionRules: google.privacy.dlp.v2.CustomInfoType.IDetectionRule[]; + + /** CustomInfoType exclusionType. */ + public exclusionType: (google.privacy.dlp.v2.CustomInfoType.ExclusionType|keyof typeof google.privacy.dlp.v2.CustomInfoType.ExclusionType); + + /** CustomInfoType sensitivityScore. */ + public sensitivityScore?: (google.privacy.dlp.v2.ISensitivityScore|null); + + /** CustomInfoType type. */ + public type?: ("dictionary"|"regex"|"surrogateType"|"storedType"|"metadataKeyValueExpression"); + + /** + * Creates a new CustomInfoType instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomInfoType instance + */ + public static create(properties?: google.privacy.dlp.v2.ICustomInfoType): google.privacy.dlp.v2.CustomInfoType; + + /** + * Encodes the specified CustomInfoType message. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.verify|verify} messages. + * @param message CustomInfoType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ICustomInfoType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomInfoType message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.verify|verify} messages. + * @param message CustomInfoType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ICustomInfoType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomInfoType message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomInfoType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CustomInfoType; + + /** + * Decodes a CustomInfoType message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomInfoType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CustomInfoType; + + /** + * Verifies a CustomInfoType message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomInfoType message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomInfoType + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CustomInfoType; + + /** + * Creates a plain object from a CustomInfoType message. Also converts values to other types if specified. + * @param message CustomInfoType + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CustomInfoType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomInfoType to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomInfoType + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CustomInfoType { + + /** Properties of a Dictionary. */ + interface IDictionary { + + /** Dictionary wordList */ + wordList?: (google.privacy.dlp.v2.CustomInfoType.Dictionary.IWordList|null); + + /** Dictionary cloudStoragePath */ + cloudStoragePath?: (google.privacy.dlp.v2.ICloudStoragePath|null); + } + + /** Represents a Dictionary. */ + class Dictionary implements IDictionary { + + /** + * Constructs a new Dictionary. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.CustomInfoType.IDictionary); + + /** Dictionary wordList. */ + public wordList?: (google.privacy.dlp.v2.CustomInfoType.Dictionary.IWordList|null); + + /** Dictionary cloudStoragePath. */ + public cloudStoragePath?: (google.privacy.dlp.v2.ICloudStoragePath|null); + + /** Dictionary source. */ + public source?: ("wordList"|"cloudStoragePath"); + + /** + * Creates a new Dictionary instance using the specified properties. + * @param [properties] Properties to set + * @returns Dictionary instance + */ + public static create(properties?: google.privacy.dlp.v2.CustomInfoType.IDictionary): google.privacy.dlp.v2.CustomInfoType.Dictionary; + + /** + * Encodes the specified Dictionary message. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.Dictionary.verify|verify} messages. + * @param message Dictionary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.CustomInfoType.IDictionary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Dictionary message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.Dictionary.verify|verify} messages. + * @param message Dictionary message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.CustomInfoType.IDictionary, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Dictionary message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Dictionary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CustomInfoType.Dictionary; + + /** + * Decodes a Dictionary message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Dictionary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CustomInfoType.Dictionary; + + /** + * Verifies a Dictionary message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Dictionary message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Dictionary + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CustomInfoType.Dictionary; + + /** + * Creates a plain object from a Dictionary message. Also converts values to other types if specified. + * @param message Dictionary + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CustomInfoType.Dictionary, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Dictionary to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Dictionary + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Dictionary { + + /** Properties of a WordList. */ + interface IWordList { + + /** WordList words */ + words?: (string[]|null); + } + + /** Represents a WordList. */ + class WordList implements IWordList { + + /** + * Constructs a new WordList. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.CustomInfoType.Dictionary.IWordList); + + /** WordList words. */ + public words: string[]; + + /** + * Creates a new WordList instance using the specified properties. + * @param [properties] Properties to set + * @returns WordList instance + */ + public static create(properties?: google.privacy.dlp.v2.CustomInfoType.Dictionary.IWordList): google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList; + + /** + * Encodes the specified WordList message. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.verify|verify} messages. + * @param message WordList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.CustomInfoType.Dictionary.IWordList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WordList message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.verify|verify} messages. + * @param message WordList message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.CustomInfoType.Dictionary.IWordList, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WordList message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WordList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList; + + /** + * Decodes a WordList message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WordList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList; + + /** + * Verifies a WordList message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WordList message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WordList + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList; + + /** + * Creates a plain object from a WordList message. Also converts values to other types if specified. + * @param message WordList + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WordList to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WordList + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Regex. */ + interface IRegex { + + /** Regex pattern */ + pattern?: (string|null); + + /** Regex groupIndexes */ + groupIndexes?: (number[]|null); + } + + /** Represents a Regex. */ + class Regex implements IRegex { + + /** + * Constructs a new Regex. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.CustomInfoType.IRegex); + + /** Regex pattern. */ + public pattern: string; + + /** Regex groupIndexes. */ + public groupIndexes: number[]; + + /** + * Creates a new Regex instance using the specified properties. + * @param [properties] Properties to set + * @returns Regex instance + */ + public static create(properties?: google.privacy.dlp.v2.CustomInfoType.IRegex): google.privacy.dlp.v2.CustomInfoType.Regex; + + /** + * Encodes the specified Regex message. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.Regex.verify|verify} messages. + * @param message Regex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.CustomInfoType.IRegex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Regex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.Regex.verify|verify} messages. + * @param message Regex message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.CustomInfoType.IRegex, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Regex message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Regex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CustomInfoType.Regex; + + /** + * Decodes a Regex message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Regex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CustomInfoType.Regex; + + /** + * Verifies a Regex message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Regex message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Regex + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CustomInfoType.Regex; + + /** + * Creates a plain object from a Regex message. Also converts values to other types if specified. + * @param message Regex + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CustomInfoType.Regex, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Regex to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Regex + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SurrogateType. */ + interface ISurrogateType { + } + + /** Represents a SurrogateType. */ + class SurrogateType implements ISurrogateType { + + /** + * Constructs a new SurrogateType. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.CustomInfoType.ISurrogateType); + + /** + * Creates a new SurrogateType instance using the specified properties. + * @param [properties] Properties to set + * @returns SurrogateType instance + */ + public static create(properties?: google.privacy.dlp.v2.CustomInfoType.ISurrogateType): google.privacy.dlp.v2.CustomInfoType.SurrogateType; + + /** + * Encodes the specified SurrogateType message. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.SurrogateType.verify|verify} messages. + * @param message SurrogateType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.CustomInfoType.ISurrogateType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SurrogateType message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.SurrogateType.verify|verify} messages. + * @param message SurrogateType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.CustomInfoType.ISurrogateType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SurrogateType message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SurrogateType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CustomInfoType.SurrogateType; + + /** + * Decodes a SurrogateType message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SurrogateType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CustomInfoType.SurrogateType; + + /** + * Verifies a SurrogateType message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SurrogateType message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SurrogateType + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CustomInfoType.SurrogateType; + + /** + * Creates a plain object from a SurrogateType message. Also converts values to other types if specified. + * @param message SurrogateType + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CustomInfoType.SurrogateType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SurrogateType to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SurrogateType + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MetadataKeyValueExpression. */ + interface IMetadataKeyValueExpression { + + /** MetadataKeyValueExpression keyRegex */ + keyRegex?: (string|null); + + /** MetadataKeyValueExpression valueRegex */ + valueRegex?: (string|null); + } + + /** Represents a MetadataKeyValueExpression. */ + class MetadataKeyValueExpression implements IMetadataKeyValueExpression { + + /** + * Constructs a new MetadataKeyValueExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.CustomInfoType.IMetadataKeyValueExpression); + + /** MetadataKeyValueExpression keyRegex. */ + public keyRegex: string; + + /** MetadataKeyValueExpression valueRegex. */ + public valueRegex: string; + + /** + * Creates a new MetadataKeyValueExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns MetadataKeyValueExpression instance + */ + public static create(properties?: google.privacy.dlp.v2.CustomInfoType.IMetadataKeyValueExpression): google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression; + + /** + * Encodes the specified MetadataKeyValueExpression message. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression.verify|verify} messages. + * @param message MetadataKeyValueExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.CustomInfoType.IMetadataKeyValueExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetadataKeyValueExpression message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression.verify|verify} messages. + * @param message MetadataKeyValueExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.CustomInfoType.IMetadataKeyValueExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetadataKeyValueExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetadataKeyValueExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression; + + /** + * Decodes a MetadataKeyValueExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetadataKeyValueExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression; + + /** + * Verifies a MetadataKeyValueExpression message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MetadataKeyValueExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetadataKeyValueExpression + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression; + + /** + * Creates a plain object from a MetadataKeyValueExpression message. Also converts values to other types if specified. + * @param message MetadataKeyValueExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetadataKeyValueExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetadataKeyValueExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DetectionRule. */ + interface IDetectionRule { + + /** DetectionRule hotwordRule */ + hotwordRule?: (google.privacy.dlp.v2.CustomInfoType.DetectionRule.IHotwordRule|null); + } + + /** Represents a DetectionRule. */ + class DetectionRule implements IDetectionRule { + + /** + * Constructs a new DetectionRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.CustomInfoType.IDetectionRule); + + /** DetectionRule hotwordRule. */ + public hotwordRule?: (google.privacy.dlp.v2.CustomInfoType.DetectionRule.IHotwordRule|null); + + /** DetectionRule type. */ + public type?: "hotwordRule"; + + /** + * Creates a new DetectionRule instance using the specified properties. + * @param [properties] Properties to set + * @returns DetectionRule instance + */ + public static create(properties?: google.privacy.dlp.v2.CustomInfoType.IDetectionRule): google.privacy.dlp.v2.CustomInfoType.DetectionRule; + + /** + * Encodes the specified DetectionRule message. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.DetectionRule.verify|verify} messages. + * @param message DetectionRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.CustomInfoType.IDetectionRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DetectionRule message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.DetectionRule.verify|verify} messages. + * @param message DetectionRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.CustomInfoType.IDetectionRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DetectionRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DetectionRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CustomInfoType.DetectionRule; + + /** + * Decodes a DetectionRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DetectionRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CustomInfoType.DetectionRule; + + /** + * Verifies a DetectionRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DetectionRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DetectionRule + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CustomInfoType.DetectionRule; + + /** + * Creates a plain object from a DetectionRule message. Also converts values to other types if specified. + * @param message DetectionRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CustomInfoType.DetectionRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DetectionRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DetectionRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DetectionRule { + + /** Properties of a Proximity. */ + interface IProximity { + + /** Proximity windowBefore */ + windowBefore?: (number|null); + + /** Proximity windowAfter */ + windowAfter?: (number|null); + } + + /** Represents a Proximity. */ + class Proximity implements IProximity { + + /** + * Constructs a new Proximity. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.CustomInfoType.DetectionRule.IProximity); + + /** Proximity windowBefore. */ + public windowBefore: number; + + /** Proximity windowAfter. */ + public windowAfter: number; + + /** + * Creates a new Proximity instance using the specified properties. + * @param [properties] Properties to set + * @returns Proximity instance + */ + public static create(properties?: google.privacy.dlp.v2.CustomInfoType.DetectionRule.IProximity): google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity; + + /** + * Encodes the specified Proximity message. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.verify|verify} messages. + * @param message Proximity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.CustomInfoType.DetectionRule.IProximity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Proximity message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.verify|verify} messages. + * @param message Proximity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.CustomInfoType.DetectionRule.IProximity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Proximity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Proximity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity; + + /** + * Decodes a Proximity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Proximity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity; + + /** + * Verifies a Proximity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Proximity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Proximity + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity; + + /** + * Creates a plain object from a Proximity message. Also converts values to other types if specified. + * @param message Proximity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Proximity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Proximity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LikelihoodAdjustment. */ + interface ILikelihoodAdjustment { + + /** LikelihoodAdjustment fixedLikelihood */ + fixedLikelihood?: (google.privacy.dlp.v2.Likelihood|keyof typeof google.privacy.dlp.v2.Likelihood|null); + + /** LikelihoodAdjustment relativeLikelihood */ + relativeLikelihood?: (number|null); + } + + /** Represents a LikelihoodAdjustment. */ + class LikelihoodAdjustment implements ILikelihoodAdjustment { + + /** + * Constructs a new LikelihoodAdjustment. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.CustomInfoType.DetectionRule.ILikelihoodAdjustment); + + /** LikelihoodAdjustment fixedLikelihood. */ + public fixedLikelihood?: (google.privacy.dlp.v2.Likelihood|keyof typeof google.privacy.dlp.v2.Likelihood|null); + + /** LikelihoodAdjustment relativeLikelihood. */ + public relativeLikelihood?: (number|null); + + /** LikelihoodAdjustment adjustment. */ + public adjustment?: ("fixedLikelihood"|"relativeLikelihood"); + + /** + * Creates a new LikelihoodAdjustment instance using the specified properties. + * @param [properties] Properties to set + * @returns LikelihoodAdjustment instance + */ + public static create(properties?: google.privacy.dlp.v2.CustomInfoType.DetectionRule.ILikelihoodAdjustment): google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment; + + /** + * Encodes the specified LikelihoodAdjustment message. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.verify|verify} messages. + * @param message LikelihoodAdjustment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.CustomInfoType.DetectionRule.ILikelihoodAdjustment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LikelihoodAdjustment message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.verify|verify} messages. + * @param message LikelihoodAdjustment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.CustomInfoType.DetectionRule.ILikelihoodAdjustment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LikelihoodAdjustment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LikelihoodAdjustment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment; + + /** + * Decodes a LikelihoodAdjustment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LikelihoodAdjustment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment; + + /** + * Verifies a LikelihoodAdjustment message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LikelihoodAdjustment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LikelihoodAdjustment + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment; + + /** + * Creates a plain object from a LikelihoodAdjustment message. Also converts values to other types if specified. + * @param message LikelihoodAdjustment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LikelihoodAdjustment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LikelihoodAdjustment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HotwordRule. */ + interface IHotwordRule { + + /** HotwordRule hotwordRegex */ + hotwordRegex?: (google.privacy.dlp.v2.CustomInfoType.IRegex|null); + + /** HotwordRule proximity */ + proximity?: (google.privacy.dlp.v2.CustomInfoType.DetectionRule.IProximity|null); + + /** HotwordRule likelihoodAdjustment */ + likelihoodAdjustment?: (google.privacy.dlp.v2.CustomInfoType.DetectionRule.ILikelihoodAdjustment|null); + } + + /** Represents a HotwordRule. */ + class HotwordRule implements IHotwordRule { + + /** + * Constructs a new HotwordRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.CustomInfoType.DetectionRule.IHotwordRule); + + /** HotwordRule hotwordRegex. */ + public hotwordRegex?: (google.privacy.dlp.v2.CustomInfoType.IRegex|null); + + /** HotwordRule proximity. */ + public proximity?: (google.privacy.dlp.v2.CustomInfoType.DetectionRule.IProximity|null); + + /** HotwordRule likelihoodAdjustment. */ + public likelihoodAdjustment?: (google.privacy.dlp.v2.CustomInfoType.DetectionRule.ILikelihoodAdjustment|null); + + /** + * Creates a new HotwordRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HotwordRule instance + */ + public static create(properties?: google.privacy.dlp.v2.CustomInfoType.DetectionRule.IHotwordRule): google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule; + + /** + * Encodes the specified HotwordRule message. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.verify|verify} messages. + * @param message HotwordRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.CustomInfoType.DetectionRule.IHotwordRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HotwordRule message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.verify|verify} messages. + * @param message HotwordRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.CustomInfoType.DetectionRule.IHotwordRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HotwordRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HotwordRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule; + + /** + * Decodes a HotwordRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HotwordRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule; + + /** + * Verifies a HotwordRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HotwordRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HotwordRule + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule; + + /** + * Creates a plain object from a HotwordRule message. Also converts values to other types if specified. + * @param message HotwordRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HotwordRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HotwordRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ExclusionType enum. */ + enum ExclusionType { + EXCLUSION_TYPE_UNSPECIFIED = 0, + EXCLUSION_TYPE_EXCLUDE = 1 + } + } + + /** Properties of a FieldId. */ + interface IFieldId { + + /** FieldId name */ + name?: (string|null); + } + + /** Represents a FieldId. */ + class FieldId implements IFieldId { + + /** + * Constructs a new FieldId. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IFieldId); + + /** FieldId name. */ + public name: string; + + /** + * Creates a new FieldId instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldId instance + */ + public static create(properties?: google.privacy.dlp.v2.IFieldId): google.privacy.dlp.v2.FieldId; + + /** + * Encodes the specified FieldId message. Does not implicitly {@link google.privacy.dlp.v2.FieldId.verify|verify} messages. + * @param message FieldId message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IFieldId, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldId message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FieldId.verify|verify} messages. + * @param message FieldId message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IFieldId, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldId message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.FieldId; + + /** + * Decodes a FieldId message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.FieldId; + + /** + * Verifies a FieldId message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldId message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldId + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.FieldId; + + /** + * Creates a plain object from a FieldId message. Also converts values to other types if specified. + * @param message FieldId + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.FieldId, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldId to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldId + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PartitionId. */ + interface IPartitionId { + + /** PartitionId projectId */ + projectId?: (string|null); + + /** PartitionId namespaceId */ + namespaceId?: (string|null); + } + + /** Represents a PartitionId. */ + class PartitionId implements IPartitionId { + + /** + * Constructs a new PartitionId. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IPartitionId); + + /** PartitionId projectId. */ + public projectId: string; + + /** PartitionId namespaceId. */ + public namespaceId: string; + + /** + * Creates a new PartitionId instance using the specified properties. + * @param [properties] Properties to set + * @returns PartitionId instance + */ + public static create(properties?: google.privacy.dlp.v2.IPartitionId): google.privacy.dlp.v2.PartitionId; + + /** + * Encodes the specified PartitionId message. Does not implicitly {@link google.privacy.dlp.v2.PartitionId.verify|verify} messages. + * @param message PartitionId message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IPartitionId, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PartitionId message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PartitionId.verify|verify} messages. + * @param message PartitionId message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IPartitionId, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PartitionId message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PartitionId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.PartitionId; + + /** + * Decodes a PartitionId message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PartitionId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.PartitionId; + + /** + * Verifies a PartitionId message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PartitionId message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartitionId + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.PartitionId; + + /** + * Creates a plain object from a PartitionId message. Also converts values to other types if specified. + * @param message PartitionId + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.PartitionId, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PartitionId to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PartitionId + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a KindExpression. */ + interface IKindExpression { + + /** KindExpression name */ + name?: (string|null); + } + + /** Represents a KindExpression. */ + class KindExpression implements IKindExpression { + + /** + * Constructs a new KindExpression. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IKindExpression); + + /** KindExpression name. */ + public name: string; + + /** + * Creates a new KindExpression instance using the specified properties. + * @param [properties] Properties to set + * @returns KindExpression instance + */ + public static create(properties?: google.privacy.dlp.v2.IKindExpression): google.privacy.dlp.v2.KindExpression; + + /** + * Encodes the specified KindExpression message. Does not implicitly {@link google.privacy.dlp.v2.KindExpression.verify|verify} messages. + * @param message KindExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IKindExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KindExpression message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.KindExpression.verify|verify} messages. + * @param message KindExpression message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IKindExpression, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KindExpression message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KindExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.KindExpression; + + /** + * Decodes a KindExpression message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KindExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.KindExpression; + + /** + * Verifies a KindExpression message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KindExpression message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KindExpression + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.KindExpression; + + /** + * Creates a plain object from a KindExpression message. Also converts values to other types if specified. + * @param message KindExpression + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.KindExpression, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KindExpression to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KindExpression + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DatastoreOptions. */ + interface IDatastoreOptions { + + /** DatastoreOptions partitionId */ + partitionId?: (google.privacy.dlp.v2.IPartitionId|null); + + /** DatastoreOptions kind */ + kind?: (google.privacy.dlp.v2.IKindExpression|null); + } + + /** Represents a DatastoreOptions. */ + class DatastoreOptions implements IDatastoreOptions { + + /** + * Constructs a new DatastoreOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDatastoreOptions); + + /** DatastoreOptions partitionId. */ + public partitionId?: (google.privacy.dlp.v2.IPartitionId|null); + + /** DatastoreOptions kind. */ + public kind?: (google.privacy.dlp.v2.IKindExpression|null); + + /** + * Creates a new DatastoreOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns DatastoreOptions instance + */ + public static create(properties?: google.privacy.dlp.v2.IDatastoreOptions): google.privacy.dlp.v2.DatastoreOptions; + + /** + * Encodes the specified DatastoreOptions message. Does not implicitly {@link google.privacy.dlp.v2.DatastoreOptions.verify|verify} messages. + * @param message DatastoreOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDatastoreOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatastoreOptions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DatastoreOptions.verify|verify} messages. + * @param message DatastoreOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDatastoreOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatastoreOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatastoreOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DatastoreOptions; + + /** + * Decodes a DatastoreOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatastoreOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DatastoreOptions; + + /** + * Verifies a DatastoreOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DatastoreOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatastoreOptions + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DatastoreOptions; + + /** + * Creates a plain object from a DatastoreOptions message. Also converts values to other types if specified. + * @param message DatastoreOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DatastoreOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatastoreOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatastoreOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** FileType enum. */ + enum FileType { + FILE_TYPE_UNSPECIFIED = 0, + BINARY_FILE = 1, + TEXT_FILE = 2, + IMAGE = 3, + WORD = 5, + PDF = 6, + AVRO = 7, + CSV = 8, + TSV = 9, + POWERPOINT = 11, + EXCEL = 12 + } + + /** Properties of a CloudStorageRegexFileSet. */ + interface ICloudStorageRegexFileSet { + + /** CloudStorageRegexFileSet bucketName */ + bucketName?: (string|null); + + /** CloudStorageRegexFileSet includeRegex */ + includeRegex?: (string[]|null); + + /** CloudStorageRegexFileSet excludeRegex */ + excludeRegex?: (string[]|null); + } + + /** Represents a CloudStorageRegexFileSet. */ + class CloudStorageRegexFileSet implements ICloudStorageRegexFileSet { + + /** + * Constructs a new CloudStorageRegexFileSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ICloudStorageRegexFileSet); + + /** CloudStorageRegexFileSet bucketName. */ + public bucketName: string; + + /** CloudStorageRegexFileSet includeRegex. */ + public includeRegex: string[]; + + /** CloudStorageRegexFileSet excludeRegex. */ + public excludeRegex: string[]; + + /** + * Creates a new CloudStorageRegexFileSet instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudStorageRegexFileSet instance + */ + public static create(properties?: google.privacy.dlp.v2.ICloudStorageRegexFileSet): google.privacy.dlp.v2.CloudStorageRegexFileSet; + + /** + * Encodes the specified CloudStorageRegexFileSet message. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageRegexFileSet.verify|verify} messages. + * @param message CloudStorageRegexFileSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ICloudStorageRegexFileSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudStorageRegexFileSet message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageRegexFileSet.verify|verify} messages. + * @param message CloudStorageRegexFileSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ICloudStorageRegexFileSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudStorageRegexFileSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudStorageRegexFileSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CloudStorageRegexFileSet; + + /** + * Decodes a CloudStorageRegexFileSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudStorageRegexFileSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CloudStorageRegexFileSet; + + /** + * Verifies a CloudStorageRegexFileSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudStorageRegexFileSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudStorageRegexFileSet + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CloudStorageRegexFileSet; + + /** + * Creates a plain object from a CloudStorageRegexFileSet message. Also converts values to other types if specified. + * @param message CloudStorageRegexFileSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CloudStorageRegexFileSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudStorageRegexFileSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudStorageRegexFileSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudStorageOptions. */ + interface ICloudStorageOptions { + + /** CloudStorageOptions fileSet */ + fileSet?: (google.privacy.dlp.v2.CloudStorageOptions.IFileSet|null); + + /** CloudStorageOptions bytesLimitPerFile */ + bytesLimitPerFile?: (number|Long|string|null); + + /** CloudStorageOptions bytesLimitPerFilePercent */ + bytesLimitPerFilePercent?: (number|null); + + /** CloudStorageOptions fileTypes */ + fileTypes?: (google.privacy.dlp.v2.FileType[]|null); + + /** CloudStorageOptions sampleMethod */ + sampleMethod?: (google.privacy.dlp.v2.CloudStorageOptions.SampleMethod|keyof typeof google.privacy.dlp.v2.CloudStorageOptions.SampleMethod|null); + + /** CloudStorageOptions filesLimitPercent */ + filesLimitPercent?: (number|null); + } + + /** Represents a CloudStorageOptions. */ + class CloudStorageOptions implements ICloudStorageOptions { + + /** + * Constructs a new CloudStorageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ICloudStorageOptions); + + /** CloudStorageOptions fileSet. */ + public fileSet?: (google.privacy.dlp.v2.CloudStorageOptions.IFileSet|null); + + /** CloudStorageOptions bytesLimitPerFile. */ + public bytesLimitPerFile: (number|Long|string); + + /** CloudStorageOptions bytesLimitPerFilePercent. */ + public bytesLimitPerFilePercent: number; + + /** CloudStorageOptions fileTypes. */ + public fileTypes: google.privacy.dlp.v2.FileType[]; + + /** CloudStorageOptions sampleMethod. */ + public sampleMethod: (google.privacy.dlp.v2.CloudStorageOptions.SampleMethod|keyof typeof google.privacy.dlp.v2.CloudStorageOptions.SampleMethod); + + /** CloudStorageOptions filesLimitPercent. */ + public filesLimitPercent: number; + + /** + * Creates a new CloudStorageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudStorageOptions instance + */ + public static create(properties?: google.privacy.dlp.v2.ICloudStorageOptions): google.privacy.dlp.v2.CloudStorageOptions; + + /** + * Encodes the specified CloudStorageOptions message. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageOptions.verify|verify} messages. + * @param message CloudStorageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ICloudStorageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudStorageOptions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageOptions.verify|verify} messages. + * @param message CloudStorageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ICloudStorageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudStorageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudStorageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CloudStorageOptions; + + /** + * Decodes a CloudStorageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudStorageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CloudStorageOptions; + + /** + * Verifies a CloudStorageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudStorageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudStorageOptions + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CloudStorageOptions; + + /** + * Creates a plain object from a CloudStorageOptions message. Also converts values to other types if specified. + * @param message CloudStorageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CloudStorageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudStorageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudStorageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CloudStorageOptions { + + /** Properties of a FileSet. */ + interface IFileSet { + + /** FileSet url */ + url?: (string|null); + + /** FileSet regexFileSet */ + regexFileSet?: (google.privacy.dlp.v2.ICloudStorageRegexFileSet|null); + } + + /** Represents a FileSet. */ + class FileSet implements IFileSet { + + /** + * Constructs a new FileSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.CloudStorageOptions.IFileSet); + + /** FileSet url. */ + public url: string; + + /** FileSet regexFileSet. */ + public regexFileSet?: (google.privacy.dlp.v2.ICloudStorageRegexFileSet|null); + + /** + * Creates a new FileSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileSet instance + */ + public static create(properties?: google.privacy.dlp.v2.CloudStorageOptions.IFileSet): google.privacy.dlp.v2.CloudStorageOptions.FileSet; + + /** + * Encodes the specified FileSet message. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageOptions.FileSet.verify|verify} messages. + * @param message FileSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.CloudStorageOptions.IFileSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileSet message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageOptions.FileSet.verify|verify} messages. + * @param message FileSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.CloudStorageOptions.IFileSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CloudStorageOptions.FileSet; + + /** + * Decodes a FileSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CloudStorageOptions.FileSet; + + /** + * Verifies a FileSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileSet + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CloudStorageOptions.FileSet; + + /** + * Creates a plain object from a FileSet message. Also converts values to other types if specified. + * @param message FileSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CloudStorageOptions.FileSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** SampleMethod enum. */ + enum SampleMethod { + SAMPLE_METHOD_UNSPECIFIED = 0, + TOP = 1, + RANDOM_START = 2 + } + } + + /** Properties of a CloudStorageFileSet. */ + interface ICloudStorageFileSet { + + /** CloudStorageFileSet url */ + url?: (string|null); + } + + /** Represents a CloudStorageFileSet. */ + class CloudStorageFileSet implements ICloudStorageFileSet { + + /** + * Constructs a new CloudStorageFileSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ICloudStorageFileSet); + + /** CloudStorageFileSet url. */ + public url: string; + + /** + * Creates a new CloudStorageFileSet instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudStorageFileSet instance + */ + public static create(properties?: google.privacy.dlp.v2.ICloudStorageFileSet): google.privacy.dlp.v2.CloudStorageFileSet; + + /** + * Encodes the specified CloudStorageFileSet message. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageFileSet.verify|verify} messages. + * @param message CloudStorageFileSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ICloudStorageFileSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudStorageFileSet message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageFileSet.verify|verify} messages. + * @param message CloudStorageFileSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ICloudStorageFileSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudStorageFileSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudStorageFileSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CloudStorageFileSet; + + /** + * Decodes a CloudStorageFileSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudStorageFileSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CloudStorageFileSet; + + /** + * Verifies a CloudStorageFileSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudStorageFileSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudStorageFileSet + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CloudStorageFileSet; + + /** + * Creates a plain object from a CloudStorageFileSet message. Also converts values to other types if specified. + * @param message CloudStorageFileSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CloudStorageFileSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudStorageFileSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudStorageFileSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CloudStoragePath. */ + interface ICloudStoragePath { + + /** CloudStoragePath path */ + path?: (string|null); + } + + /** Represents a CloudStoragePath. */ + class CloudStoragePath implements ICloudStoragePath { + + /** + * Constructs a new CloudStoragePath. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ICloudStoragePath); + + /** CloudStoragePath path. */ + public path: string; + + /** + * Creates a new CloudStoragePath instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudStoragePath instance + */ + public static create(properties?: google.privacy.dlp.v2.ICloudStoragePath): google.privacy.dlp.v2.CloudStoragePath; + + /** + * Encodes the specified CloudStoragePath message. Does not implicitly {@link google.privacy.dlp.v2.CloudStoragePath.verify|verify} messages. + * @param message CloudStoragePath message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ICloudStoragePath, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudStoragePath message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudStoragePath.verify|verify} messages. + * @param message CloudStoragePath message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ICloudStoragePath, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudStoragePath message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudStoragePath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.CloudStoragePath; + + /** + * Decodes a CloudStoragePath message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudStoragePath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.CloudStoragePath; + + /** + * Verifies a CloudStoragePath message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudStoragePath message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudStoragePath + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.CloudStoragePath; + + /** + * Creates a plain object from a CloudStoragePath message. Also converts values to other types if specified. + * @param message CloudStoragePath + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.CloudStoragePath, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudStoragePath to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudStoragePath + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BigQueryOptions. */ + interface IBigQueryOptions { + + /** BigQueryOptions tableReference */ + tableReference?: (google.privacy.dlp.v2.IBigQueryTable|null); + + /** BigQueryOptions identifyingFields */ + identifyingFields?: (google.privacy.dlp.v2.IFieldId[]|null); + + /** BigQueryOptions rowsLimit */ + rowsLimit?: (number|Long|string|null); + + /** BigQueryOptions rowsLimitPercent */ + rowsLimitPercent?: (number|null); + + /** BigQueryOptions sampleMethod */ + sampleMethod?: (google.privacy.dlp.v2.BigQueryOptions.SampleMethod|keyof typeof google.privacy.dlp.v2.BigQueryOptions.SampleMethod|null); + + /** BigQueryOptions excludedFields */ + excludedFields?: (google.privacy.dlp.v2.IFieldId[]|null); + + /** BigQueryOptions includedFields */ + includedFields?: (google.privacy.dlp.v2.IFieldId[]|null); + } + + /** Represents a BigQueryOptions. */ + class BigQueryOptions implements IBigQueryOptions { + + /** + * Constructs a new BigQueryOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IBigQueryOptions); + + /** BigQueryOptions tableReference. */ + public tableReference?: (google.privacy.dlp.v2.IBigQueryTable|null); + + /** BigQueryOptions identifyingFields. */ + public identifyingFields: google.privacy.dlp.v2.IFieldId[]; + + /** BigQueryOptions rowsLimit. */ + public rowsLimit: (number|Long|string); + + /** BigQueryOptions rowsLimitPercent. */ + public rowsLimitPercent: number; + + /** BigQueryOptions sampleMethod. */ + public sampleMethod: (google.privacy.dlp.v2.BigQueryOptions.SampleMethod|keyof typeof google.privacy.dlp.v2.BigQueryOptions.SampleMethod); + + /** BigQueryOptions excludedFields. */ + public excludedFields: google.privacy.dlp.v2.IFieldId[]; + + /** BigQueryOptions includedFields. */ + public includedFields: google.privacy.dlp.v2.IFieldId[]; + + /** + * Creates a new BigQueryOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryOptions instance + */ + public static create(properties?: google.privacy.dlp.v2.IBigQueryOptions): google.privacy.dlp.v2.BigQueryOptions; + + /** + * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryOptions.verify|verify} messages. + * @param message BigQueryOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryOptions.verify|verify} messages. + * @param message BigQueryOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IBigQueryOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.BigQueryOptions; + + /** + * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.BigQueryOptions; + + /** + * Verifies a BigQueryOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryOptions + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.BigQueryOptions; + + /** + * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. + * @param message BigQueryOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.BigQueryOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BigQueryOptions { + + /** SampleMethod enum. */ + enum SampleMethod { + SAMPLE_METHOD_UNSPECIFIED = 0, + TOP = 1, + RANDOM_START = 2 + } + } + + /** Properties of a StorageConfig. */ + interface IStorageConfig { + + /** StorageConfig datastoreOptions */ + datastoreOptions?: (google.privacy.dlp.v2.IDatastoreOptions|null); + + /** StorageConfig cloudStorageOptions */ + cloudStorageOptions?: (google.privacy.dlp.v2.ICloudStorageOptions|null); + + /** StorageConfig bigQueryOptions */ + bigQueryOptions?: (google.privacy.dlp.v2.IBigQueryOptions|null); + + /** StorageConfig hybridOptions */ + hybridOptions?: (google.privacy.dlp.v2.IHybridOptions|null); + + /** StorageConfig timespanConfig */ + timespanConfig?: (google.privacy.dlp.v2.StorageConfig.ITimespanConfig|null); + } + + /** Represents a StorageConfig. */ + class StorageConfig implements IStorageConfig { + + /** + * Constructs a new StorageConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IStorageConfig); + + /** StorageConfig datastoreOptions. */ + public datastoreOptions?: (google.privacy.dlp.v2.IDatastoreOptions|null); + + /** StorageConfig cloudStorageOptions. */ + public cloudStorageOptions?: (google.privacy.dlp.v2.ICloudStorageOptions|null); + + /** StorageConfig bigQueryOptions. */ + public bigQueryOptions?: (google.privacy.dlp.v2.IBigQueryOptions|null); + + /** StorageConfig hybridOptions. */ + public hybridOptions?: (google.privacy.dlp.v2.IHybridOptions|null); + + /** StorageConfig timespanConfig. */ + public timespanConfig?: (google.privacy.dlp.v2.StorageConfig.ITimespanConfig|null); + + /** StorageConfig type. */ + public type?: ("datastoreOptions"|"cloudStorageOptions"|"bigQueryOptions"|"hybridOptions"); + + /** + * Creates a new StorageConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns StorageConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.IStorageConfig): google.privacy.dlp.v2.StorageConfig; + + /** + * Encodes the specified StorageConfig message. Does not implicitly {@link google.privacy.dlp.v2.StorageConfig.verify|verify} messages. + * @param message StorageConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StorageConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StorageConfig.verify|verify} messages. + * @param message StorageConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StorageConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.StorageConfig; + + /** + * Decodes a StorageConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.StorageConfig; + + /** + * Verifies a StorageConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StorageConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StorageConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.StorageConfig; + + /** + * Creates a plain object from a StorageConfig message. Also converts values to other types if specified. + * @param message StorageConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.StorageConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StorageConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StorageConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace StorageConfig { + + /** Properties of a TimespanConfig. */ + interface ITimespanConfig { + + /** TimespanConfig startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** TimespanConfig endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** TimespanConfig timestampField */ + timestampField?: (google.privacy.dlp.v2.IFieldId|null); + + /** TimespanConfig enableAutoPopulationOfTimespanConfig */ + enableAutoPopulationOfTimespanConfig?: (boolean|null); + } + + /** Represents a TimespanConfig. */ + class TimespanConfig implements ITimespanConfig { + + /** + * Constructs a new TimespanConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.StorageConfig.ITimespanConfig); + + /** TimespanConfig startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** TimespanConfig endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** TimespanConfig timestampField. */ + public timestampField?: (google.privacy.dlp.v2.IFieldId|null); + + /** TimespanConfig enableAutoPopulationOfTimespanConfig. */ + public enableAutoPopulationOfTimespanConfig: boolean; + + /** + * Creates a new TimespanConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns TimespanConfig instance + */ + public static create(properties?: google.privacy.dlp.v2.StorageConfig.ITimespanConfig): google.privacy.dlp.v2.StorageConfig.TimespanConfig; + + /** + * Encodes the specified TimespanConfig message. Does not implicitly {@link google.privacy.dlp.v2.StorageConfig.TimespanConfig.verify|verify} messages. + * @param message TimespanConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.StorageConfig.ITimespanConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimespanConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StorageConfig.TimespanConfig.verify|verify} messages. + * @param message TimespanConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.StorageConfig.ITimespanConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimespanConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimespanConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.StorageConfig.TimespanConfig; + + /** + * Decodes a TimespanConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimespanConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.StorageConfig.TimespanConfig; + + /** + * Verifies a TimespanConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimespanConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimespanConfig + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.StorageConfig.TimespanConfig; + + /** + * Creates a plain object from a TimespanConfig message. Also converts values to other types if specified. + * @param message TimespanConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.StorageConfig.TimespanConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimespanConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimespanConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a HybridOptions. */ + interface IHybridOptions { + + /** HybridOptions description */ + description?: (string|null); + + /** HybridOptions requiredFindingLabelKeys */ + requiredFindingLabelKeys?: (string[]|null); + + /** HybridOptions labels */ + labels?: ({ [k: string]: string }|null); + + /** HybridOptions tableOptions */ + tableOptions?: (google.privacy.dlp.v2.ITableOptions|null); + } + + /** Represents a HybridOptions. */ + class HybridOptions implements IHybridOptions { + + /** + * Constructs a new HybridOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IHybridOptions); + + /** HybridOptions description. */ + public description: string; + + /** HybridOptions requiredFindingLabelKeys. */ + public requiredFindingLabelKeys: string[]; + + /** HybridOptions labels. */ + public labels: { [k: string]: string }; + + /** HybridOptions tableOptions. */ + public tableOptions?: (google.privacy.dlp.v2.ITableOptions|null); + + /** + * Creates a new HybridOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns HybridOptions instance + */ + public static create(properties?: google.privacy.dlp.v2.IHybridOptions): google.privacy.dlp.v2.HybridOptions; + + /** + * Encodes the specified HybridOptions message. Does not implicitly {@link google.privacy.dlp.v2.HybridOptions.verify|verify} messages. + * @param message HybridOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IHybridOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HybridOptions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridOptions.verify|verify} messages. + * @param message HybridOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IHybridOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HybridOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HybridOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.HybridOptions; + + /** + * Decodes a HybridOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HybridOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.HybridOptions; + + /** + * Verifies a HybridOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HybridOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HybridOptions + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.HybridOptions; + + /** + * Creates a plain object from a HybridOptions message. Also converts values to other types if specified. + * @param message HybridOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.HybridOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HybridOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HybridOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BigQueryKey. */ + interface IBigQueryKey { + + /** BigQueryKey tableReference */ + tableReference?: (google.privacy.dlp.v2.IBigQueryTable|null); + + /** BigQueryKey rowNumber */ + rowNumber?: (number|Long|string|null); + } + + /** Represents a BigQueryKey. */ + class BigQueryKey implements IBigQueryKey { + + /** + * Constructs a new BigQueryKey. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IBigQueryKey); + + /** BigQueryKey tableReference. */ + public tableReference?: (google.privacy.dlp.v2.IBigQueryTable|null); + + /** BigQueryKey rowNumber. */ + public rowNumber: (number|Long|string); + + /** + * Creates a new BigQueryKey instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryKey instance + */ + public static create(properties?: google.privacy.dlp.v2.IBigQueryKey): google.privacy.dlp.v2.BigQueryKey; + + /** + * Encodes the specified BigQueryKey message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryKey.verify|verify} messages. + * @param message BigQueryKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IBigQueryKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryKey message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryKey.verify|verify} messages. + * @param message BigQueryKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IBigQueryKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.BigQueryKey; + + /** + * Decodes a BigQueryKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.BigQueryKey; + + /** + * Verifies a BigQueryKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryKey + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.BigQueryKey; + + /** + * Creates a plain object from a BigQueryKey message. Also converts values to other types if specified. + * @param message BigQueryKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.BigQueryKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DatastoreKey. */ + interface IDatastoreKey { + + /** DatastoreKey entityKey */ + entityKey?: (google.privacy.dlp.v2.IKey|null); + } + + /** Represents a DatastoreKey. */ + class DatastoreKey implements IDatastoreKey { + + /** + * Constructs a new DatastoreKey. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IDatastoreKey); + + /** DatastoreKey entityKey. */ + public entityKey?: (google.privacy.dlp.v2.IKey|null); + + /** + * Creates a new DatastoreKey instance using the specified properties. + * @param [properties] Properties to set + * @returns DatastoreKey instance + */ + public static create(properties?: google.privacy.dlp.v2.IDatastoreKey): google.privacy.dlp.v2.DatastoreKey; + + /** + * Encodes the specified DatastoreKey message. Does not implicitly {@link google.privacy.dlp.v2.DatastoreKey.verify|verify} messages. + * @param message DatastoreKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IDatastoreKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatastoreKey message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DatastoreKey.verify|verify} messages. + * @param message DatastoreKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IDatastoreKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatastoreKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatastoreKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.DatastoreKey; + + /** + * Decodes a DatastoreKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatastoreKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.DatastoreKey; + + /** + * Verifies a DatastoreKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DatastoreKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatastoreKey + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.DatastoreKey; + + /** + * Creates a plain object from a DatastoreKey message. Also converts values to other types if specified. + * @param message DatastoreKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.DatastoreKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatastoreKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatastoreKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Key. */ + interface IKey { + + /** Key partitionId */ + partitionId?: (google.privacy.dlp.v2.IPartitionId|null); + + /** Key path */ + path?: (google.privacy.dlp.v2.Key.IPathElement[]|null); + } + + /** Represents a Key. */ + class Key implements IKey { + + /** + * Constructs a new Key. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IKey); + + /** Key partitionId. */ + public partitionId?: (google.privacy.dlp.v2.IPartitionId|null); + + /** Key path. */ + public path: google.privacy.dlp.v2.Key.IPathElement[]; + + /** + * Creates a new Key instance using the specified properties. + * @param [properties] Properties to set + * @returns Key instance + */ + public static create(properties?: google.privacy.dlp.v2.IKey): google.privacy.dlp.v2.Key; + + /** + * Encodes the specified Key message. Does not implicitly {@link google.privacy.dlp.v2.Key.verify|verify} messages. + * @param message Key message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Key message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Key.verify|verify} messages. + * @param message Key message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Key message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Key + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Key; + + /** + * Decodes a Key message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Key + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Key; + + /** + * Verifies a Key message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Key message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Key + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Key; + + /** + * Creates a plain object from a Key message. Also converts values to other types if specified. + * @param message Key + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Key, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Key to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Key + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Key { + + /** Properties of a PathElement. */ + interface IPathElement { + + /** PathElement kind */ + kind?: (string|null); + + /** PathElement id */ + id?: (number|Long|string|null); + + /** PathElement name */ + name?: (string|null); + } + + /** Represents a PathElement. */ + class PathElement implements IPathElement { + + /** + * Constructs a new PathElement. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.Key.IPathElement); + + /** PathElement kind. */ + public kind: string; + + /** PathElement id. */ + public id?: (number|Long|string|null); + + /** PathElement name. */ + public name?: (string|null); + + /** PathElement idType. */ + public idType?: ("id"|"name"); + + /** + * Creates a new PathElement instance using the specified properties. + * @param [properties] Properties to set + * @returns PathElement instance + */ + public static create(properties?: google.privacy.dlp.v2.Key.IPathElement): google.privacy.dlp.v2.Key.PathElement; + + /** + * Encodes the specified PathElement message. Does not implicitly {@link google.privacy.dlp.v2.Key.PathElement.verify|verify} messages. + * @param message PathElement message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.Key.IPathElement, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PathElement message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Key.PathElement.verify|verify} messages. + * @param message PathElement message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.Key.IPathElement, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PathElement message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PathElement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.Key.PathElement; + + /** + * Decodes a PathElement message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PathElement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.Key.PathElement; + + /** + * Verifies a PathElement message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PathElement message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PathElement + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.Key.PathElement; + + /** + * Creates a plain object from a PathElement message. Also converts values to other types if specified. + * @param message PathElement + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.Key.PathElement, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PathElement to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PathElement + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a RecordKey. */ + interface IRecordKey { + + /** RecordKey datastoreKey */ + datastoreKey?: (google.privacy.dlp.v2.IDatastoreKey|null); + + /** RecordKey bigQueryKey */ + bigQueryKey?: (google.privacy.dlp.v2.IBigQueryKey|null); + + /** RecordKey idValues */ + idValues?: (string[]|null); + } + + /** Represents a RecordKey. */ + class RecordKey implements IRecordKey { + + /** + * Constructs a new RecordKey. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IRecordKey); + + /** RecordKey datastoreKey. */ + public datastoreKey?: (google.privacy.dlp.v2.IDatastoreKey|null); + + /** RecordKey bigQueryKey. */ + public bigQueryKey?: (google.privacy.dlp.v2.IBigQueryKey|null); + + /** RecordKey idValues. */ + public idValues: string[]; + + /** RecordKey type. */ + public type?: ("datastoreKey"|"bigQueryKey"); + + /** + * Creates a new RecordKey instance using the specified properties. + * @param [properties] Properties to set + * @returns RecordKey instance + */ + public static create(properties?: google.privacy.dlp.v2.IRecordKey): google.privacy.dlp.v2.RecordKey; + + /** + * Encodes the specified RecordKey message. Does not implicitly {@link google.privacy.dlp.v2.RecordKey.verify|verify} messages. + * @param message RecordKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IRecordKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecordKey message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordKey.verify|verify} messages. + * @param message RecordKey message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IRecordKey, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecordKey message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecordKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.RecordKey; + + /** + * Decodes a RecordKey message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecordKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.RecordKey; + + /** + * Verifies a RecordKey message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RecordKey message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecordKey + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.RecordKey; + + /** + * Creates a plain object from a RecordKey message. Also converts values to other types if specified. + * @param message RecordKey + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.RecordKey, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecordKey to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RecordKey + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BigQueryTable. */ + interface IBigQueryTable { + + /** BigQueryTable projectId */ + projectId?: (string|null); + + /** BigQueryTable datasetId */ + datasetId?: (string|null); + + /** BigQueryTable tableId */ + tableId?: (string|null); + } + + /** Represents a BigQueryTable. */ + class BigQueryTable implements IBigQueryTable { + + /** + * Constructs a new BigQueryTable. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IBigQueryTable); + + /** BigQueryTable projectId. */ + public projectId: string; + + /** BigQueryTable datasetId. */ + public datasetId: string; + + /** BigQueryTable tableId. */ + public tableId: string; + + /** + * Creates a new BigQueryTable instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryTable instance + */ + public static create(properties?: google.privacy.dlp.v2.IBigQueryTable): google.privacy.dlp.v2.BigQueryTable; + + /** + * Encodes the specified BigQueryTable message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryTable.verify|verify} messages. + * @param message BigQueryTable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IBigQueryTable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryTable message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryTable.verify|verify} messages. + * @param message BigQueryTable message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IBigQueryTable, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryTable message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.BigQueryTable; + + /** + * Decodes a BigQueryTable message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.BigQueryTable; + + /** + * Verifies a BigQueryTable message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryTable message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryTable + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.BigQueryTable; + + /** + * Creates a plain object from a BigQueryTable message. Also converts values to other types if specified. + * @param message BigQueryTable + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.BigQueryTable, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryTable to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryTable + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TableReference. */ + interface ITableReference { + + /** TableReference datasetId */ + datasetId?: (string|null); + + /** TableReference tableId */ + tableId?: (string|null); + + /** TableReference projectId */ + projectId?: (string|null); + } + + /** Represents a TableReference. */ + class TableReference implements ITableReference { + + /** + * Constructs a new TableReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ITableReference); + + /** TableReference datasetId. */ + public datasetId: string; + + /** TableReference tableId. */ + public tableId: string; + + /** TableReference projectId. */ + public projectId: string; + + /** + * Creates a new TableReference instance using the specified properties. + * @param [properties] Properties to set + * @returns TableReference instance + */ + public static create(properties?: google.privacy.dlp.v2.ITableReference): google.privacy.dlp.v2.TableReference; + + /** + * Encodes the specified TableReference message. Does not implicitly {@link google.privacy.dlp.v2.TableReference.verify|verify} messages. + * @param message TableReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ITableReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TableReference message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TableReference.verify|verify} messages. + * @param message TableReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ITableReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TableReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TableReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TableReference; + + /** + * Decodes a TableReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TableReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TableReference; + + /** + * Verifies a TableReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TableReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TableReference + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TableReference; + + /** + * Creates a plain object from a TableReference message. Also converts values to other types if specified. + * @param message TableReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.TableReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TableReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TableReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BigQueryField. */ + interface IBigQueryField { + + /** BigQueryField table */ + table?: (google.privacy.dlp.v2.IBigQueryTable|null); + + /** BigQueryField field */ + field?: (google.privacy.dlp.v2.IFieldId|null); + } + + /** Represents a BigQueryField. */ + class BigQueryField implements IBigQueryField { + + /** + * Constructs a new BigQueryField. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IBigQueryField); + + /** BigQueryField table. */ + public table?: (google.privacy.dlp.v2.IBigQueryTable|null); + + /** BigQueryField field. */ + public field?: (google.privacy.dlp.v2.IFieldId|null); + + /** + * Creates a new BigQueryField instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryField instance + */ + public static create(properties?: google.privacy.dlp.v2.IBigQueryField): google.privacy.dlp.v2.BigQueryField; + + /** + * Encodes the specified BigQueryField message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryField.verify|verify} messages. + * @param message BigQueryField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IBigQueryField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryField message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryField.verify|verify} messages. + * @param message BigQueryField message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IBigQueryField, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryField message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.BigQueryField; + + /** + * Decodes a BigQueryField message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.BigQueryField; + + /** + * Verifies a BigQueryField message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BigQueryField message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryField + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.BigQueryField; + + /** + * Creates a plain object from a BigQueryField message. Also converts values to other types if specified. + * @param message BigQueryField + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.BigQueryField, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryField to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryField + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EntityId. */ + interface IEntityId { + + /** EntityId field */ + field?: (google.privacy.dlp.v2.IFieldId|null); + } + + /** Represents an EntityId. */ + class EntityId implements IEntityId { + + /** + * Constructs a new EntityId. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.IEntityId); + + /** EntityId field. */ + public field?: (google.privacy.dlp.v2.IFieldId|null); + + /** + * Creates a new EntityId instance using the specified properties. + * @param [properties] Properties to set + * @returns EntityId instance + */ + public static create(properties?: google.privacy.dlp.v2.IEntityId): google.privacy.dlp.v2.EntityId; + + /** + * Encodes the specified EntityId message. Does not implicitly {@link google.privacy.dlp.v2.EntityId.verify|verify} messages. + * @param message EntityId message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.IEntityId, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EntityId message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.EntityId.verify|verify} messages. + * @param message EntityId message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.IEntityId, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EntityId message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EntityId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.EntityId; + + /** + * Decodes an EntityId message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EntityId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.EntityId; + + /** + * Verifies an EntityId message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EntityId message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EntityId + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.EntityId; + + /** + * Creates a plain object from an EntityId message. Also converts values to other types if specified. + * @param message EntityId + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.EntityId, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EntityId to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EntityId + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TableOptions. */ + interface ITableOptions { + + /** TableOptions identifyingFields */ + identifyingFields?: (google.privacy.dlp.v2.IFieldId[]|null); + } + + /** Represents a TableOptions. */ + class TableOptions implements ITableOptions { + + /** + * Constructs a new TableOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.privacy.dlp.v2.ITableOptions); + + /** TableOptions identifyingFields. */ + public identifyingFields: google.privacy.dlp.v2.IFieldId[]; + + /** + * Creates a new TableOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns TableOptions instance + */ + public static create(properties?: google.privacy.dlp.v2.ITableOptions): google.privacy.dlp.v2.TableOptions; + + /** + * Encodes the specified TableOptions message. Does not implicitly {@link google.privacy.dlp.v2.TableOptions.verify|verify} messages. + * @param message TableOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.privacy.dlp.v2.ITableOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TableOptions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TableOptions.verify|verify} messages. + * @param message TableOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.privacy.dlp.v2.ITableOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TableOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TableOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.privacy.dlp.v2.TableOptions; + + /** + * Decodes a TableOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TableOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.privacy.dlp.v2.TableOptions; + + /** + * Verifies a TableOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TableOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TableOptions + */ + public static fromObject(object: { [k: string]: any }): google.privacy.dlp.v2.TableOptions; + + /** + * Creates a plain object from a TableOptions message. Also converts values to other types if specified. + * @param message TableOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.privacy.dlp.v2.TableOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TableOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TableOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Http; + + /** + * Verifies a Http message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.HttpRule; + + /** + * Verifies a HttpRule message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { + + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); + + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + + /** CommonLanguageSettings selectiveGapicGeneration */ + selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); + } + + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { + + /** + * Constructs a new CommonLanguageSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICommonLanguageSettings); + + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; + + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; + + /** CommonLanguageSettings selectiveGapicGeneration. */ + public selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CommonLanguageSettings; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CommonLanguageSettings; + + /** + * Verifies a CommonLanguageSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { + + /** ClientLibrarySettings version */ + version?: (string|null); + + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); + + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } + + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { + + /** + * Constructs a new ClientLibrarySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IClientLibrarySettings); + + /** ClientLibrarySettings version. */ + public version: string; + + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; + + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientLibrarySettings instance + */ + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ClientLibrarySettings; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ClientLibrarySettings; + + /** + * Verifies a ClientLibrarySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientLibrarySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientLibrarySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publishing. */ + interface IPublishing { + + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); + + /** Publishing newIssueUri */ + newIssueUri?: (string|null); + + /** Publishing documentationUri */ + documentationUri?: (string|null); + + /** Publishing apiShortName */ + apiShortName?: (string|null); + + /** Publishing githubLabel */ + githubLabel?: (string|null); + + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); + + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); + + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); + + /** Publishing restReferenceDocumentationUri */ + restReferenceDocumentationUri?: (string|null); + } + + /** Represents a Publishing. */ + class Publishing implements IPublishing { + + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); + + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; + + /** Publishing newIssueUri. */ + public newIssueUri: string; + + /** Publishing documentationUri. */ + public documentationUri: string; + + /** Publishing apiShortName. */ + public apiShortName: string; + + /** Publishing githubLabel. */ + public githubLabel: string; + + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; + + /** Publishing docTagPrefix. */ + public docTagPrefix: string; + + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; + + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + + /** Publishing restReferenceDocumentationUri. */ + public restReferenceDocumentationUri: string; + + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; + + /** + * Verifies a Publishing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; + + /** + * Verifies a JavaSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; + + /** + * Verifies a CppSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; + + /** + * Verifies a PhpSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** PythonSettings experimentalFeatures */ + experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** PythonSettings experimentalFeatures. */ + public experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; + + /** + * Verifies a PythonSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PythonSettings { + + /** Properties of an ExperimentalFeatures. */ + interface IExperimentalFeatures { + + /** ExperimentalFeatures restAsyncIoEnabled */ + restAsyncIoEnabled?: (boolean|null); + + /** ExperimentalFeatures protobufPythonicTypesEnabled */ + protobufPythonicTypesEnabled?: (boolean|null); + + /** ExperimentalFeatures unversionedPackageDisabled */ + unversionedPackageDisabled?: (boolean|null); + } + + /** Represents an ExperimentalFeatures. */ + class ExperimentalFeatures implements IExperimentalFeatures { + + /** + * Constructs a new ExperimentalFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.PythonSettings.IExperimentalFeatures); + + /** ExperimentalFeatures restAsyncIoEnabled. */ + public restAsyncIoEnabled: boolean; + + /** ExperimentalFeatures protobufPythonicTypesEnabled. */ + public protobufPythonicTypesEnabled: boolean; + + /** ExperimentalFeatures unversionedPackageDisabled. */ + public unversionedPackageDisabled: boolean; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @param [properties] Properties to set + * @returns ExperimentalFeatures instance + */ + public static create(properties?: google.api.PythonSettings.IExperimentalFeatures): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Verifies an ExperimentalFeatures message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExperimentalFeatures + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @param message ExperimentalFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings.ExperimentalFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExperimentalFeatures + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; + + /** + * Verifies a NodeSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); + } + + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { + + /** + * Constructs a new DotnetSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDotnetSettings); + + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DotnetSettings instance + */ + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; + + /** + * Verifies a DotnetSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DotnetSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DotnetSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DotnetSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RubySettings. */ + interface IRubySettings { + + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { + + /** + * Constructs a new RubySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRubySettings); + + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new RubySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RubySettings instance + */ + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; + + /** + * Verifies a RubySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RubySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RubySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RubySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoSettings. */ + interface IGoSettings { + + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** GoSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** GoSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; + + /** + * Verifies a GoSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields */ + autoPopulatedFields?: (string[]|null); + } + + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { + + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); + + /** MethodSettings selector. */ + public selector: string; + + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodSettings instance + */ + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; + + /** + * Verifies a MethodSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodSettings { + + /** Properties of a LongRunning. */ + interface ILongRunning { + + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); + + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { + + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); + + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; + + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; + + /** + * Verifies a LongRunning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4, + SHOPPING = 5, + GEO = 6, + GENERATIVE_AI = 7 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** Properties of a SelectiveGapicGeneration. */ + interface ISelectiveGapicGeneration { + + /** SelectiveGapicGeneration methods */ + methods?: (string[]|null); + + /** SelectiveGapicGeneration generateOmittedAsInternal */ + generateOmittedAsInternal?: (boolean|null); + } + + /** Represents a SelectiveGapicGeneration. */ + class SelectiveGapicGeneration implements ISelectiveGapicGeneration { + + /** + * Constructs a new SelectiveGapicGeneration. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ISelectiveGapicGeneration); + + /** SelectiveGapicGeneration methods. */ + public methods: string[]; + + /** SelectiveGapicGeneration generateOmittedAsInternal. */ + public generateOmittedAsInternal: boolean; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @param [properties] Properties to set + * @returns SelectiveGapicGeneration instance + */ + public static create(properties?: google.api.ISelectiveGapicGeneration): google.api.SelectiveGapicGeneration; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.SelectiveGapicGeneration; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.SelectiveGapicGeneration; + + /** + * Verifies a SelectiveGapicGeneration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SelectiveGapicGeneration + */ + public static fromObject(object: { [k: string]: any }): google.api.SelectiveGapicGeneration; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @param message SelectiveGapicGeneration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.SelectiveGapicGeneration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7, + IDENTIFIER = 8 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_LEGACY = 900, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto optionDependency */ + optionDependency?: (string[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto optionDependency. */ + public optionDependency: string[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + + /** DescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** DescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Verifies a Declaration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + + /** EnumDescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** EnumDescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions debugRedact. */ + public debugRedact: boolean; + + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + + /** FieldOptions targets. */ + public targets: google.protobuf.FieldOptions.OptionTargetType[]; + + /** FieldOptions editionDefaults. */ + public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + + /** FieldOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } + + /** OptionTargetType enum. */ + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9 + } + + /** Properties of an EditionDefault. */ + interface IEditionDefault { + + /** EditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** EditionDefault value */ + value?: (string|null); + } + + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { + + /** + * Constructs a new EditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + + /** EditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** EditionDefault value. */ + public value: string; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns EditionDefault instance + */ + public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; + + /** + * Verifies an EditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @param message EditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FeatureSupport. */ + interface IFeatureSupport { + + /** FeatureSupport editionIntroduced */ + editionIntroduced?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport editionDeprecated */ + editionDeprecated?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport deprecationWarning */ + deprecationWarning?: (string|null); + + /** FeatureSupport editionRemoved */ + editionRemoved?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSupport. */ + class FeatureSupport implements IFeatureSupport { + + /** + * Constructs a new FeatureSupport. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IFeatureSupport); + + /** FeatureSupport editionIntroduced. */ + public editionIntroduced: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport editionDeprecated. */ + public editionDeprecated: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport deprecationWarning. */ + public deprecationWarning: string; + + /** FeatureSupport editionRemoved. */ + public editionRemoved: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSupport instance + */ + public static create(properties?: google.protobuf.FieldOptions.IFeatureSupport): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Verifies a FeatureSupport message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSupport + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @param message FeatureSupport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.FeatureSupport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSupport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSupport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** EnumOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** EnumOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact */ + debugRedact?: (boolean|null); + + /** EnumValueOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact. */ + public debugRedact: boolean; + + /** EnumValueOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + + /** ServiceOptions .google.api.apiVersion */ + ".google.api.apiVersion"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|Buffer|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|Buffer|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a FeatureSet. */ + interface IFeatureSet { + + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + + /** FeatureSet enforceNamingStyle */ + enforceNamingStyle?: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle|null); + + /** FeatureSet defaultSymbolVisibility */ + defaultSymbolVisibility?: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null); + } + + /** Represents a FeatureSet. */ + class FeatureSet implements IFeatureSet { + + /** + * Constructs a new FeatureSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSet); + + /** FeatureSet fieldPresence. */ + public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + + /** FeatureSet enumType. */ + public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + + /** FeatureSet repeatedFieldEncoding. */ + public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + + /** FeatureSet utf8Validation. */ + public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); + + /** FeatureSet messageEncoding. */ + public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + + /** FeatureSet jsonFormat. */ + public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + + /** FeatureSet enforceNamingStyle. */ + public enforceNamingStyle: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle); + + /** FeatureSet defaultSymbolVisibility. */ + public defaultSymbolVisibility: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility); + + /** + * Creates a new FeatureSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSet instance + */ + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; + + /** + * Verifies a FeatureSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @param message FeatureSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSet { + + /** FieldPresence enum. */ + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3 + } + + /** EnumType enum. */ + enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2 + } + + /** RepeatedFieldEncoding enum. */ + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + PACKED = 1, + EXPANDED = 2 + } + + /** Utf8Validation enum. */ + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0, + VERIFY = 2, + NONE = 3 + } + + /** MessageEncoding enum. */ + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0, + LENGTH_PREFIXED = 1, + DELIMITED = 2 + } + + /** JsonFormat enum. */ + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0, + ALLOW = 1, + LEGACY_BEST_EFFORT = 2 + } + + /** EnforceNamingStyle enum. */ + enum EnforceNamingStyle { + ENFORCE_NAMING_STYLE_UNKNOWN = 0, + STYLE2024 = 1, + STYLE_LEGACY = 2 + } + + /** Properties of a VisibilityFeature. */ + interface IVisibilityFeature { + } + + /** Represents a VisibilityFeature. */ + class VisibilityFeature implements IVisibilityFeature { + + /** + * Constructs a new VisibilityFeature. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSet.IVisibilityFeature); + + /** + * Creates a new VisibilityFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns VisibilityFeature instance + */ + public static create(properties?: google.protobuf.FeatureSet.IVisibilityFeature): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Verifies a VisibilityFeature message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VisibilityFeature + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @param message VisibilityFeature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet.VisibilityFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VisibilityFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VisibilityFeature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VisibilityFeature { + + /** DefaultSymbolVisibility enum. */ + enum DefaultSymbolVisibility { + DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0, + EXPORT_ALL = 1, + EXPORT_TOP_LEVEL = 2, + LOCAL_ALL = 3, + STRICT = 4 + } + } + } + + /** Properties of a FeatureSetDefaults. */ + interface IFeatureSetDefaults { + + /** FeatureSetDefaults defaults */ + defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + + /** FeatureSetDefaults minimumEdition */ + minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetDefaults maximumEdition */ + maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSetDefaults. */ + class FeatureSetDefaults implements IFeatureSetDefaults { + + /** + * Constructs a new FeatureSetDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSetDefaults); + + /** FeatureSetDefaults defaults. */ + public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + + /** FeatureSetDefaults minimumEdition. */ + public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetDefaults maximumEdition. */ + public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetDefaults instance + */ + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; + + /** + * Verifies a FeatureSetDefaults message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetDefaults + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @param message FeatureSetDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSetDefaults { + + /** Properties of a FeatureSetEditionDefault. */ + interface IFeatureSetEditionDefault { + + /** FeatureSetEditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetEditionDefault overridableFeatures */ + overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures */ + fixedFeatures?: (google.protobuf.IFeatureSet|null); + } + + /** Represents a FeatureSetEditionDefault. */ + class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + + /** + * Constructs a new FeatureSetEditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + + /** FeatureSetEditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetEditionDefault overridableFeatures. */ + public overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures. */ + public fixedFeatures?: (google.protobuf.IFeatureSet|null); + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetEditionDefault instance + */ + public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Verifies a FeatureSetEditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetEditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @param message FeatureSetEditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** SymbolVisibility enum. */ + enum SymbolVisibility { + VISIBILITY_UNSET = 0, + VISIBILITY_LOCAL = 1, + VISIBILITY_EXPORT = 2 + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; + + /** + * Verifies a Timestamp message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Empty; + + /** + * Verifies an Empty message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|Buffer|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|Buffer|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Any; + + /** + * Verifies an Any message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of a Status. */ + interface IStatus { + + /** Status code */ + code?: (number|null); + + /** Status message */ + message?: (string|null); + + /** Status details */ + details?: (google.protobuf.IAny[]|null); + } + + /** Represents a Status. */ + class Status implements IStatus { + + /** + * Constructs a new Status. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IStatus); + + /** Status code. */ + public code: number; + + /** Status message. */ + public message: string; + + /** Status details. */ + public details: google.protobuf.IAny[]; + + /** + * Creates a new Status instance using the specified properties. + * @param [properties] Properties to set + * @returns Status instance + */ + public static create(properties?: google.rpc.IStatus): google.rpc.Status; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @param message Status message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Status message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.Status; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.Status; + + /** + * Verifies a Status message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Status + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Status; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @param message Status + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Status, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Status to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Status + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of a Date. */ + interface IDate { + + /** Date year */ + year?: (number|null); + + /** Date month */ + month?: (number|null); + + /** Date day */ + day?: (number|null); + } + + /** Represents a Date. */ + class Date implements IDate { + + /** + * Constructs a new Date. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IDate); + + /** Date year. */ + public year: number; + + /** Date month. */ + public month: number; + + /** Date day. */ + public day: number; + + /** + * Creates a new Date instance using the specified properties. + * @param [properties] Properties to set + * @returns Date instance + */ + public static create(properties?: google.type.IDate): google.type.Date; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Date message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Date; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Date; + + /** + * Verifies a Date message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Date message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Date + */ + public static fromObject(object: { [k: string]: any }): google.type.Date; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @param message Date + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Date to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Date + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** DayOfWeek enum. */ + enum DayOfWeek { + DAY_OF_WEEK_UNSPECIFIED = 0, + MONDAY = 1, + TUESDAY = 2, + WEDNESDAY = 3, + THURSDAY = 4, + FRIDAY = 5, + SATURDAY = 6, + SUNDAY = 7 + } + + /** Properties of a TimeOfDay. */ + interface ITimeOfDay { + + /** TimeOfDay hours */ + hours?: (number|null); + + /** TimeOfDay minutes */ + minutes?: (number|null); + + /** TimeOfDay seconds */ + seconds?: (number|null); + + /** TimeOfDay nanos */ + nanos?: (number|null); + } + + /** Represents a TimeOfDay. */ + class TimeOfDay implements ITimeOfDay { + + /** + * Constructs a new TimeOfDay. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.ITimeOfDay); + + /** TimeOfDay hours. */ + public hours: number; + + /** TimeOfDay minutes. */ + public minutes: number; + + /** TimeOfDay seconds. */ + public seconds: number; + + /** TimeOfDay nanos. */ + public nanos: number; + + /** + * Creates a new TimeOfDay instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeOfDay instance + */ + public static create(properties?: google.type.ITimeOfDay): google.type.TimeOfDay; + + /** + * Encodes the specified TimeOfDay message. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. + * @param message TimeOfDay message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.ITimeOfDay, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeOfDay message, length delimited. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. + * @param message TimeOfDay message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.ITimeOfDay, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeOfDay message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeOfDay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.TimeOfDay; + + /** + * Decodes a TimeOfDay message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeOfDay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.TimeOfDay; + + /** + * Verifies a TimeOfDay message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TimeOfDay message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeOfDay + */ + public static fromObject(object: { [k: string]: any }): google.type.TimeOfDay; + + /** + * Creates a plain object from a TimeOfDay message. Also converts values to other types if specified. + * @param message TimeOfDay + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.TimeOfDay, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeOfDay to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeOfDay + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/owl-bot-staging/dlp/v2/protos/protos.js b/owl-bot-staging/dlp/v2/protos/protos.js new file mode 100644 index 000000000..fe5fc7ecc --- /dev/null +++ b/owl-bot-staging/dlp/v2/protos/protos.js @@ -0,0 +1,138237 @@ +// Copyright 2026 Google LLC +// +// 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. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_dlp_protos || ($protobuf.roots._google_cloud_dlp_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.privacy = (function() { + + /** + * Namespace privacy. + * @memberof google + * @namespace + */ + var privacy = {}; + + privacy.dlp = (function() { + + /** + * Namespace dlp. + * @memberof google.privacy + * @namespace + */ + var dlp = {}; + + dlp.v2 = (function() { + + /** + * Namespace v2. + * @memberof google.privacy.dlp + * @namespace + */ + var v2 = {}; + + v2.DlpService = (function() { + + /** + * Constructs a new DlpService service. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DlpService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function DlpService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (DlpService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DlpService; + + /** + * Creates new DlpService service using the specified rpc implementation. + * @function create + * @memberof google.privacy.dlp.v2.DlpService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {DlpService} RPC service. Useful where requests and/or responses are streamed. + */ + DlpService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|inspectContent}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef InspectContentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.InspectContentResponse} [response] InspectContentResponse + */ + + /** + * Calls InspectContent. + * @function inspectContent + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IInspectContentRequest} request InspectContentRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.InspectContentCallback} callback Node-style callback called with the error, if any, and InspectContentResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.inspectContent = function inspectContent(request, callback) { + return this.rpcCall(inspectContent, $root.google.privacy.dlp.v2.InspectContentRequest, $root.google.privacy.dlp.v2.InspectContentResponse, request, callback); + }, "name", { value: "InspectContent" }); + + /** + * Calls InspectContent. + * @function inspectContent + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IInspectContentRequest} request InspectContentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|redactImage}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef RedactImageCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.RedactImageResponse} [response] RedactImageResponse + */ + + /** + * Calls RedactImage. + * @function redactImage + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IRedactImageRequest} request RedactImageRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.RedactImageCallback} callback Node-style callback called with the error, if any, and RedactImageResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.redactImage = function redactImage(request, callback) { + return this.rpcCall(redactImage, $root.google.privacy.dlp.v2.RedactImageRequest, $root.google.privacy.dlp.v2.RedactImageResponse, request, callback); + }, "name", { value: "RedactImage" }); + + /** + * Calls RedactImage. + * @function redactImage + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IRedactImageRequest} request RedactImageRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|deidentifyContent}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef DeidentifyContentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.DeidentifyContentResponse} [response] DeidentifyContentResponse + */ + + /** + * Calls DeidentifyContent. + * @function deidentifyContent + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IDeidentifyContentRequest} request DeidentifyContentRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.DeidentifyContentCallback} callback Node-style callback called with the error, if any, and DeidentifyContentResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.deidentifyContent = function deidentifyContent(request, callback) { + return this.rpcCall(deidentifyContent, $root.google.privacy.dlp.v2.DeidentifyContentRequest, $root.google.privacy.dlp.v2.DeidentifyContentResponse, request, callback); + }, "name", { value: "DeidentifyContent" }); + + /** + * Calls DeidentifyContent. + * @function deidentifyContent + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IDeidentifyContentRequest} request DeidentifyContentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|reidentifyContent}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef ReidentifyContentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.ReidentifyContentResponse} [response] ReidentifyContentResponse + */ + + /** + * Calls ReidentifyContent. + * @function reidentifyContent + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IReidentifyContentRequest} request ReidentifyContentRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.ReidentifyContentCallback} callback Node-style callback called with the error, if any, and ReidentifyContentResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.reidentifyContent = function reidentifyContent(request, callback) { + return this.rpcCall(reidentifyContent, $root.google.privacy.dlp.v2.ReidentifyContentRequest, $root.google.privacy.dlp.v2.ReidentifyContentResponse, request, callback); + }, "name", { value: "ReidentifyContent" }); + + /** + * Calls ReidentifyContent. + * @function reidentifyContent + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IReidentifyContentRequest} request ReidentifyContentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|listInfoTypes}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef ListInfoTypesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.ListInfoTypesResponse} [response] ListInfoTypesResponse + */ + + /** + * Calls ListInfoTypes. + * @function listInfoTypes + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IListInfoTypesRequest} request ListInfoTypesRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.ListInfoTypesCallback} callback Node-style callback called with the error, if any, and ListInfoTypesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.listInfoTypes = function listInfoTypes(request, callback) { + return this.rpcCall(listInfoTypes, $root.google.privacy.dlp.v2.ListInfoTypesRequest, $root.google.privacy.dlp.v2.ListInfoTypesResponse, request, callback); + }, "name", { value: "ListInfoTypes" }); + + /** + * Calls ListInfoTypes. + * @function listInfoTypes + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IListInfoTypesRequest} request ListInfoTypesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|createInspectTemplate}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef CreateInspectTemplateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.InspectTemplate} [response] InspectTemplate + */ + + /** + * Calls CreateInspectTemplate. + * @function createInspectTemplate + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.ICreateInspectTemplateRequest} request CreateInspectTemplateRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.CreateInspectTemplateCallback} callback Node-style callback called with the error, if any, and InspectTemplate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.createInspectTemplate = function createInspectTemplate(request, callback) { + return this.rpcCall(createInspectTemplate, $root.google.privacy.dlp.v2.CreateInspectTemplateRequest, $root.google.privacy.dlp.v2.InspectTemplate, request, callback); + }, "name", { value: "CreateInspectTemplate" }); + + /** + * Calls CreateInspectTemplate. + * @function createInspectTemplate + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.ICreateInspectTemplateRequest} request CreateInspectTemplateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|updateInspectTemplate}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef UpdateInspectTemplateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.InspectTemplate} [response] InspectTemplate + */ + + /** + * Calls UpdateInspectTemplate. + * @function updateInspectTemplate + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IUpdateInspectTemplateRequest} request UpdateInspectTemplateRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.UpdateInspectTemplateCallback} callback Node-style callback called with the error, if any, and InspectTemplate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.updateInspectTemplate = function updateInspectTemplate(request, callback) { + return this.rpcCall(updateInspectTemplate, $root.google.privacy.dlp.v2.UpdateInspectTemplateRequest, $root.google.privacy.dlp.v2.InspectTemplate, request, callback); + }, "name", { value: "UpdateInspectTemplate" }); + + /** + * Calls UpdateInspectTemplate. + * @function updateInspectTemplate + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IUpdateInspectTemplateRequest} request UpdateInspectTemplateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|getInspectTemplate}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef GetInspectTemplateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.InspectTemplate} [response] InspectTemplate + */ + + /** + * Calls GetInspectTemplate. + * @function getInspectTemplate + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IGetInspectTemplateRequest} request GetInspectTemplateRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.GetInspectTemplateCallback} callback Node-style callback called with the error, if any, and InspectTemplate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.getInspectTemplate = function getInspectTemplate(request, callback) { + return this.rpcCall(getInspectTemplate, $root.google.privacy.dlp.v2.GetInspectTemplateRequest, $root.google.privacy.dlp.v2.InspectTemplate, request, callback); + }, "name", { value: "GetInspectTemplate" }); + + /** + * Calls GetInspectTemplate. + * @function getInspectTemplate + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IGetInspectTemplateRequest} request GetInspectTemplateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|listInspectTemplates}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef ListInspectTemplatesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.ListInspectTemplatesResponse} [response] ListInspectTemplatesResponse + */ + + /** + * Calls ListInspectTemplates. + * @function listInspectTemplates + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IListInspectTemplatesRequest} request ListInspectTemplatesRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.ListInspectTemplatesCallback} callback Node-style callback called with the error, if any, and ListInspectTemplatesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.listInspectTemplates = function listInspectTemplates(request, callback) { + return this.rpcCall(listInspectTemplates, $root.google.privacy.dlp.v2.ListInspectTemplatesRequest, $root.google.privacy.dlp.v2.ListInspectTemplatesResponse, request, callback); + }, "name", { value: "ListInspectTemplates" }); + + /** + * Calls ListInspectTemplates. + * @function listInspectTemplates + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IListInspectTemplatesRequest} request ListInspectTemplatesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|deleteInspectTemplate}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef DeleteInspectTemplateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteInspectTemplate. + * @function deleteInspectTemplate + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IDeleteInspectTemplateRequest} request DeleteInspectTemplateRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.DeleteInspectTemplateCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.deleteInspectTemplate = function deleteInspectTemplate(request, callback) { + return this.rpcCall(deleteInspectTemplate, $root.google.privacy.dlp.v2.DeleteInspectTemplateRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteInspectTemplate" }); + + /** + * Calls DeleteInspectTemplate. + * @function deleteInspectTemplate + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IDeleteInspectTemplateRequest} request DeleteInspectTemplateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|createDeidentifyTemplate}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef CreateDeidentifyTemplateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.DeidentifyTemplate} [response] DeidentifyTemplate + */ + + /** + * Calls CreateDeidentifyTemplate. + * @function createDeidentifyTemplate + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest} request CreateDeidentifyTemplateRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.CreateDeidentifyTemplateCallback} callback Node-style callback called with the error, if any, and DeidentifyTemplate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.createDeidentifyTemplate = function createDeidentifyTemplate(request, callback) { + return this.rpcCall(createDeidentifyTemplate, $root.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest, $root.google.privacy.dlp.v2.DeidentifyTemplate, request, callback); + }, "name", { value: "CreateDeidentifyTemplate" }); + + /** + * Calls CreateDeidentifyTemplate. + * @function createDeidentifyTemplate + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest} request CreateDeidentifyTemplateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|updateDeidentifyTemplate}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef UpdateDeidentifyTemplateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.DeidentifyTemplate} [response] DeidentifyTemplate + */ + + /** + * Calls UpdateDeidentifyTemplate. + * @function updateDeidentifyTemplate + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest} request UpdateDeidentifyTemplateRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.UpdateDeidentifyTemplateCallback} callback Node-style callback called with the error, if any, and DeidentifyTemplate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.updateDeidentifyTemplate = function updateDeidentifyTemplate(request, callback) { + return this.rpcCall(updateDeidentifyTemplate, $root.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest, $root.google.privacy.dlp.v2.DeidentifyTemplate, request, callback); + }, "name", { value: "UpdateDeidentifyTemplate" }); + + /** + * Calls UpdateDeidentifyTemplate. + * @function updateDeidentifyTemplate + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest} request UpdateDeidentifyTemplateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|getDeidentifyTemplate}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef GetDeidentifyTemplateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.DeidentifyTemplate} [response] DeidentifyTemplate + */ + + /** + * Calls GetDeidentifyTemplate. + * @function getDeidentifyTemplate + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IGetDeidentifyTemplateRequest} request GetDeidentifyTemplateRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.GetDeidentifyTemplateCallback} callback Node-style callback called with the error, if any, and DeidentifyTemplate + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.getDeidentifyTemplate = function getDeidentifyTemplate(request, callback) { + return this.rpcCall(getDeidentifyTemplate, $root.google.privacy.dlp.v2.GetDeidentifyTemplateRequest, $root.google.privacy.dlp.v2.DeidentifyTemplate, request, callback); + }, "name", { value: "GetDeidentifyTemplate" }); + + /** + * Calls GetDeidentifyTemplate. + * @function getDeidentifyTemplate + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IGetDeidentifyTemplateRequest} request GetDeidentifyTemplateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|listDeidentifyTemplates}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef ListDeidentifyTemplatesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.ListDeidentifyTemplatesResponse} [response] ListDeidentifyTemplatesResponse + */ + + /** + * Calls ListDeidentifyTemplates. + * @function listDeidentifyTemplates + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesRequest} request ListDeidentifyTemplatesRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.ListDeidentifyTemplatesCallback} callback Node-style callback called with the error, if any, and ListDeidentifyTemplatesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.listDeidentifyTemplates = function listDeidentifyTemplates(request, callback) { + return this.rpcCall(listDeidentifyTemplates, $root.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest, $root.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse, request, callback); + }, "name", { value: "ListDeidentifyTemplates" }); + + /** + * Calls ListDeidentifyTemplates. + * @function listDeidentifyTemplates + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesRequest} request ListDeidentifyTemplatesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|deleteDeidentifyTemplate}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef DeleteDeidentifyTemplateCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteDeidentifyTemplate. + * @function deleteDeidentifyTemplate + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest} request DeleteDeidentifyTemplateRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.DeleteDeidentifyTemplateCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.deleteDeidentifyTemplate = function deleteDeidentifyTemplate(request, callback) { + return this.rpcCall(deleteDeidentifyTemplate, $root.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteDeidentifyTemplate" }); + + /** + * Calls DeleteDeidentifyTemplate. + * @function deleteDeidentifyTemplate + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest} request DeleteDeidentifyTemplateRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|createJobTrigger}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef CreateJobTriggerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.JobTrigger} [response] JobTrigger + */ + + /** + * Calls CreateJobTrigger. + * @function createJobTrigger + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.ICreateJobTriggerRequest} request CreateJobTriggerRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.CreateJobTriggerCallback} callback Node-style callback called with the error, if any, and JobTrigger + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.createJobTrigger = function createJobTrigger(request, callback) { + return this.rpcCall(createJobTrigger, $root.google.privacy.dlp.v2.CreateJobTriggerRequest, $root.google.privacy.dlp.v2.JobTrigger, request, callback); + }, "name", { value: "CreateJobTrigger" }); + + /** + * Calls CreateJobTrigger. + * @function createJobTrigger + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.ICreateJobTriggerRequest} request CreateJobTriggerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|updateJobTrigger}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef UpdateJobTriggerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.JobTrigger} [response] JobTrigger + */ + + /** + * Calls UpdateJobTrigger. + * @function updateJobTrigger + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IUpdateJobTriggerRequest} request UpdateJobTriggerRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.UpdateJobTriggerCallback} callback Node-style callback called with the error, if any, and JobTrigger + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.updateJobTrigger = function updateJobTrigger(request, callback) { + return this.rpcCall(updateJobTrigger, $root.google.privacy.dlp.v2.UpdateJobTriggerRequest, $root.google.privacy.dlp.v2.JobTrigger, request, callback); + }, "name", { value: "UpdateJobTrigger" }); + + /** + * Calls UpdateJobTrigger. + * @function updateJobTrigger + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IUpdateJobTriggerRequest} request UpdateJobTriggerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|hybridInspectJobTrigger}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef HybridInspectJobTriggerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.HybridInspectResponse} [response] HybridInspectResponse + */ + + /** + * Calls HybridInspectJobTrigger. + * @function hybridInspectJobTrigger + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IHybridInspectJobTriggerRequest} request HybridInspectJobTriggerRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.HybridInspectJobTriggerCallback} callback Node-style callback called with the error, if any, and HybridInspectResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.hybridInspectJobTrigger = function hybridInspectJobTrigger(request, callback) { + return this.rpcCall(hybridInspectJobTrigger, $root.google.privacy.dlp.v2.HybridInspectJobTriggerRequest, $root.google.privacy.dlp.v2.HybridInspectResponse, request, callback); + }, "name", { value: "HybridInspectJobTrigger" }); + + /** + * Calls HybridInspectJobTrigger. + * @function hybridInspectJobTrigger + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IHybridInspectJobTriggerRequest} request HybridInspectJobTriggerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|getJobTrigger}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef GetJobTriggerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.JobTrigger} [response] JobTrigger + */ + + /** + * Calls GetJobTrigger. + * @function getJobTrigger + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IGetJobTriggerRequest} request GetJobTriggerRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.GetJobTriggerCallback} callback Node-style callback called with the error, if any, and JobTrigger + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.getJobTrigger = function getJobTrigger(request, callback) { + return this.rpcCall(getJobTrigger, $root.google.privacy.dlp.v2.GetJobTriggerRequest, $root.google.privacy.dlp.v2.JobTrigger, request, callback); + }, "name", { value: "GetJobTrigger" }); + + /** + * Calls GetJobTrigger. + * @function getJobTrigger + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IGetJobTriggerRequest} request GetJobTriggerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|listJobTriggers}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef ListJobTriggersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.ListJobTriggersResponse} [response] ListJobTriggersResponse + */ + + /** + * Calls ListJobTriggers. + * @function listJobTriggers + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IListJobTriggersRequest} request ListJobTriggersRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.ListJobTriggersCallback} callback Node-style callback called with the error, if any, and ListJobTriggersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.listJobTriggers = function listJobTriggers(request, callback) { + return this.rpcCall(listJobTriggers, $root.google.privacy.dlp.v2.ListJobTriggersRequest, $root.google.privacy.dlp.v2.ListJobTriggersResponse, request, callback); + }, "name", { value: "ListJobTriggers" }); + + /** + * Calls ListJobTriggers. + * @function listJobTriggers + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IListJobTriggersRequest} request ListJobTriggersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|deleteJobTrigger}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef DeleteJobTriggerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteJobTrigger. + * @function deleteJobTrigger + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IDeleteJobTriggerRequest} request DeleteJobTriggerRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.DeleteJobTriggerCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.deleteJobTrigger = function deleteJobTrigger(request, callback) { + return this.rpcCall(deleteJobTrigger, $root.google.privacy.dlp.v2.DeleteJobTriggerRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteJobTrigger" }); + + /** + * Calls DeleteJobTrigger. + * @function deleteJobTrigger + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IDeleteJobTriggerRequest} request DeleteJobTriggerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|activateJobTrigger}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef ActivateJobTriggerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.DlpJob} [response] DlpJob + */ + + /** + * Calls ActivateJobTrigger. + * @function activateJobTrigger + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IActivateJobTriggerRequest} request ActivateJobTriggerRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.ActivateJobTriggerCallback} callback Node-style callback called with the error, if any, and DlpJob + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.activateJobTrigger = function activateJobTrigger(request, callback) { + return this.rpcCall(activateJobTrigger, $root.google.privacy.dlp.v2.ActivateJobTriggerRequest, $root.google.privacy.dlp.v2.DlpJob, request, callback); + }, "name", { value: "ActivateJobTrigger" }); + + /** + * Calls ActivateJobTrigger. + * @function activateJobTrigger + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IActivateJobTriggerRequest} request ActivateJobTriggerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|createDiscoveryConfig}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef CreateDiscoveryConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.DiscoveryConfig} [response] DiscoveryConfig + */ + + /** + * Calls CreateDiscoveryConfig. + * @function createDiscoveryConfig + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.ICreateDiscoveryConfigRequest} request CreateDiscoveryConfigRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.CreateDiscoveryConfigCallback} callback Node-style callback called with the error, if any, and DiscoveryConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.createDiscoveryConfig = function createDiscoveryConfig(request, callback) { + return this.rpcCall(createDiscoveryConfig, $root.google.privacy.dlp.v2.CreateDiscoveryConfigRequest, $root.google.privacy.dlp.v2.DiscoveryConfig, request, callback); + }, "name", { value: "CreateDiscoveryConfig" }); + + /** + * Calls CreateDiscoveryConfig. + * @function createDiscoveryConfig + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.ICreateDiscoveryConfigRequest} request CreateDiscoveryConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|updateDiscoveryConfig}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef UpdateDiscoveryConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.DiscoveryConfig} [response] DiscoveryConfig + */ + + /** + * Calls UpdateDiscoveryConfig. + * @function updateDiscoveryConfig + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IUpdateDiscoveryConfigRequest} request UpdateDiscoveryConfigRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.UpdateDiscoveryConfigCallback} callback Node-style callback called with the error, if any, and DiscoveryConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.updateDiscoveryConfig = function updateDiscoveryConfig(request, callback) { + return this.rpcCall(updateDiscoveryConfig, $root.google.privacy.dlp.v2.UpdateDiscoveryConfigRequest, $root.google.privacy.dlp.v2.DiscoveryConfig, request, callback); + }, "name", { value: "UpdateDiscoveryConfig" }); + + /** + * Calls UpdateDiscoveryConfig. + * @function updateDiscoveryConfig + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IUpdateDiscoveryConfigRequest} request UpdateDiscoveryConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|getDiscoveryConfig}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef GetDiscoveryConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.DiscoveryConfig} [response] DiscoveryConfig + */ + + /** + * Calls GetDiscoveryConfig. + * @function getDiscoveryConfig + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IGetDiscoveryConfigRequest} request GetDiscoveryConfigRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.GetDiscoveryConfigCallback} callback Node-style callback called with the error, if any, and DiscoveryConfig + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.getDiscoveryConfig = function getDiscoveryConfig(request, callback) { + return this.rpcCall(getDiscoveryConfig, $root.google.privacy.dlp.v2.GetDiscoveryConfigRequest, $root.google.privacy.dlp.v2.DiscoveryConfig, request, callback); + }, "name", { value: "GetDiscoveryConfig" }); + + /** + * Calls GetDiscoveryConfig. + * @function getDiscoveryConfig + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IGetDiscoveryConfigRequest} request GetDiscoveryConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|listDiscoveryConfigs}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef ListDiscoveryConfigsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.ListDiscoveryConfigsResponse} [response] ListDiscoveryConfigsResponse + */ + + /** + * Calls ListDiscoveryConfigs. + * @function listDiscoveryConfigs + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IListDiscoveryConfigsRequest} request ListDiscoveryConfigsRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.ListDiscoveryConfigsCallback} callback Node-style callback called with the error, if any, and ListDiscoveryConfigsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.listDiscoveryConfigs = function listDiscoveryConfigs(request, callback) { + return this.rpcCall(listDiscoveryConfigs, $root.google.privacy.dlp.v2.ListDiscoveryConfigsRequest, $root.google.privacy.dlp.v2.ListDiscoveryConfigsResponse, request, callback); + }, "name", { value: "ListDiscoveryConfigs" }); + + /** + * Calls ListDiscoveryConfigs. + * @function listDiscoveryConfigs + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IListDiscoveryConfigsRequest} request ListDiscoveryConfigsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|deleteDiscoveryConfig}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef DeleteDiscoveryConfigCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteDiscoveryConfig. + * @function deleteDiscoveryConfig + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IDeleteDiscoveryConfigRequest} request DeleteDiscoveryConfigRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.DeleteDiscoveryConfigCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.deleteDiscoveryConfig = function deleteDiscoveryConfig(request, callback) { + return this.rpcCall(deleteDiscoveryConfig, $root.google.privacy.dlp.v2.DeleteDiscoveryConfigRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteDiscoveryConfig" }); + + /** + * Calls DeleteDiscoveryConfig. + * @function deleteDiscoveryConfig + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IDeleteDiscoveryConfigRequest} request DeleteDiscoveryConfigRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|createDlpJob}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef CreateDlpJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.DlpJob} [response] DlpJob + */ + + /** + * Calls CreateDlpJob. + * @function createDlpJob + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.ICreateDlpJobRequest} request CreateDlpJobRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.CreateDlpJobCallback} callback Node-style callback called with the error, if any, and DlpJob + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.createDlpJob = function createDlpJob(request, callback) { + return this.rpcCall(createDlpJob, $root.google.privacy.dlp.v2.CreateDlpJobRequest, $root.google.privacy.dlp.v2.DlpJob, request, callback); + }, "name", { value: "CreateDlpJob" }); + + /** + * Calls CreateDlpJob. + * @function createDlpJob + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.ICreateDlpJobRequest} request CreateDlpJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|listDlpJobs}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef ListDlpJobsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.ListDlpJobsResponse} [response] ListDlpJobsResponse + */ + + /** + * Calls ListDlpJobs. + * @function listDlpJobs + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IListDlpJobsRequest} request ListDlpJobsRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.ListDlpJobsCallback} callback Node-style callback called with the error, if any, and ListDlpJobsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.listDlpJobs = function listDlpJobs(request, callback) { + return this.rpcCall(listDlpJobs, $root.google.privacy.dlp.v2.ListDlpJobsRequest, $root.google.privacy.dlp.v2.ListDlpJobsResponse, request, callback); + }, "name", { value: "ListDlpJobs" }); + + /** + * Calls ListDlpJobs. + * @function listDlpJobs + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IListDlpJobsRequest} request ListDlpJobsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|getDlpJob}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef GetDlpJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.DlpJob} [response] DlpJob + */ + + /** + * Calls GetDlpJob. + * @function getDlpJob + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IGetDlpJobRequest} request GetDlpJobRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.GetDlpJobCallback} callback Node-style callback called with the error, if any, and DlpJob + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.getDlpJob = function getDlpJob(request, callback) { + return this.rpcCall(getDlpJob, $root.google.privacy.dlp.v2.GetDlpJobRequest, $root.google.privacy.dlp.v2.DlpJob, request, callback); + }, "name", { value: "GetDlpJob" }); + + /** + * Calls GetDlpJob. + * @function getDlpJob + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IGetDlpJobRequest} request GetDlpJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|deleteDlpJob}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef DeleteDlpJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteDlpJob. + * @function deleteDlpJob + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IDeleteDlpJobRequest} request DeleteDlpJobRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.DeleteDlpJobCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.deleteDlpJob = function deleteDlpJob(request, callback) { + return this.rpcCall(deleteDlpJob, $root.google.privacy.dlp.v2.DeleteDlpJobRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteDlpJob" }); + + /** + * Calls DeleteDlpJob. + * @function deleteDlpJob + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IDeleteDlpJobRequest} request DeleteDlpJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|cancelDlpJob}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef CancelDlpJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls CancelDlpJob. + * @function cancelDlpJob + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.ICancelDlpJobRequest} request CancelDlpJobRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.CancelDlpJobCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.cancelDlpJob = function cancelDlpJob(request, callback) { + return this.rpcCall(cancelDlpJob, $root.google.privacy.dlp.v2.CancelDlpJobRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "CancelDlpJob" }); + + /** + * Calls CancelDlpJob. + * @function cancelDlpJob + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.ICancelDlpJobRequest} request CancelDlpJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|createStoredInfoType}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef CreateStoredInfoTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.StoredInfoType} [response] StoredInfoType + */ + + /** + * Calls CreateStoredInfoType. + * @function createStoredInfoType + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.ICreateStoredInfoTypeRequest} request CreateStoredInfoTypeRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.CreateStoredInfoTypeCallback} callback Node-style callback called with the error, if any, and StoredInfoType + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.createStoredInfoType = function createStoredInfoType(request, callback) { + return this.rpcCall(createStoredInfoType, $root.google.privacy.dlp.v2.CreateStoredInfoTypeRequest, $root.google.privacy.dlp.v2.StoredInfoType, request, callback); + }, "name", { value: "CreateStoredInfoType" }); + + /** + * Calls CreateStoredInfoType. + * @function createStoredInfoType + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.ICreateStoredInfoTypeRequest} request CreateStoredInfoTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|updateStoredInfoType}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef UpdateStoredInfoTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.StoredInfoType} [response] StoredInfoType + */ + + /** + * Calls UpdateStoredInfoType. + * @function updateStoredInfoType + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest} request UpdateStoredInfoTypeRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.UpdateStoredInfoTypeCallback} callback Node-style callback called with the error, if any, and StoredInfoType + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.updateStoredInfoType = function updateStoredInfoType(request, callback) { + return this.rpcCall(updateStoredInfoType, $root.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest, $root.google.privacy.dlp.v2.StoredInfoType, request, callback); + }, "name", { value: "UpdateStoredInfoType" }); + + /** + * Calls UpdateStoredInfoType. + * @function updateStoredInfoType + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest} request UpdateStoredInfoTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|getStoredInfoType}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef GetStoredInfoTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.StoredInfoType} [response] StoredInfoType + */ + + /** + * Calls GetStoredInfoType. + * @function getStoredInfoType + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IGetStoredInfoTypeRequest} request GetStoredInfoTypeRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.GetStoredInfoTypeCallback} callback Node-style callback called with the error, if any, and StoredInfoType + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.getStoredInfoType = function getStoredInfoType(request, callback) { + return this.rpcCall(getStoredInfoType, $root.google.privacy.dlp.v2.GetStoredInfoTypeRequest, $root.google.privacy.dlp.v2.StoredInfoType, request, callback); + }, "name", { value: "GetStoredInfoType" }); + + /** + * Calls GetStoredInfoType. + * @function getStoredInfoType + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IGetStoredInfoTypeRequest} request GetStoredInfoTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|listStoredInfoTypes}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef ListStoredInfoTypesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.ListStoredInfoTypesResponse} [response] ListStoredInfoTypesResponse + */ + + /** + * Calls ListStoredInfoTypes. + * @function listStoredInfoTypes + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IListStoredInfoTypesRequest} request ListStoredInfoTypesRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.ListStoredInfoTypesCallback} callback Node-style callback called with the error, if any, and ListStoredInfoTypesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.listStoredInfoTypes = function listStoredInfoTypes(request, callback) { + return this.rpcCall(listStoredInfoTypes, $root.google.privacy.dlp.v2.ListStoredInfoTypesRequest, $root.google.privacy.dlp.v2.ListStoredInfoTypesResponse, request, callback); + }, "name", { value: "ListStoredInfoTypes" }); + + /** + * Calls ListStoredInfoTypes. + * @function listStoredInfoTypes + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IListStoredInfoTypesRequest} request ListStoredInfoTypesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|deleteStoredInfoType}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef DeleteStoredInfoTypeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteStoredInfoType. + * @function deleteStoredInfoType + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest} request DeleteStoredInfoTypeRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.DeleteStoredInfoTypeCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.deleteStoredInfoType = function deleteStoredInfoType(request, callback) { + return this.rpcCall(deleteStoredInfoType, $root.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteStoredInfoType" }); + + /** + * Calls DeleteStoredInfoType. + * @function deleteStoredInfoType + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest} request DeleteStoredInfoTypeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|listProjectDataProfiles}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef ListProjectDataProfilesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.ListProjectDataProfilesResponse} [response] ListProjectDataProfilesResponse + */ + + /** + * Calls ListProjectDataProfiles. + * @function listProjectDataProfiles + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IListProjectDataProfilesRequest} request ListProjectDataProfilesRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.ListProjectDataProfilesCallback} callback Node-style callback called with the error, if any, and ListProjectDataProfilesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.listProjectDataProfiles = function listProjectDataProfiles(request, callback) { + return this.rpcCall(listProjectDataProfiles, $root.google.privacy.dlp.v2.ListProjectDataProfilesRequest, $root.google.privacy.dlp.v2.ListProjectDataProfilesResponse, request, callback); + }, "name", { value: "ListProjectDataProfiles" }); + + /** + * Calls ListProjectDataProfiles. + * @function listProjectDataProfiles + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IListProjectDataProfilesRequest} request ListProjectDataProfilesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|listTableDataProfiles}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef ListTableDataProfilesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.ListTableDataProfilesResponse} [response] ListTableDataProfilesResponse + */ + + /** + * Calls ListTableDataProfiles. + * @function listTableDataProfiles + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IListTableDataProfilesRequest} request ListTableDataProfilesRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.ListTableDataProfilesCallback} callback Node-style callback called with the error, if any, and ListTableDataProfilesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.listTableDataProfiles = function listTableDataProfiles(request, callback) { + return this.rpcCall(listTableDataProfiles, $root.google.privacy.dlp.v2.ListTableDataProfilesRequest, $root.google.privacy.dlp.v2.ListTableDataProfilesResponse, request, callback); + }, "name", { value: "ListTableDataProfiles" }); + + /** + * Calls ListTableDataProfiles. + * @function listTableDataProfiles + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IListTableDataProfilesRequest} request ListTableDataProfilesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|listColumnDataProfiles}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef ListColumnDataProfilesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.ListColumnDataProfilesResponse} [response] ListColumnDataProfilesResponse + */ + + /** + * Calls ListColumnDataProfiles. + * @function listColumnDataProfiles + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IListColumnDataProfilesRequest} request ListColumnDataProfilesRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.ListColumnDataProfilesCallback} callback Node-style callback called with the error, if any, and ListColumnDataProfilesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.listColumnDataProfiles = function listColumnDataProfiles(request, callback) { + return this.rpcCall(listColumnDataProfiles, $root.google.privacy.dlp.v2.ListColumnDataProfilesRequest, $root.google.privacy.dlp.v2.ListColumnDataProfilesResponse, request, callback); + }, "name", { value: "ListColumnDataProfiles" }); + + /** + * Calls ListColumnDataProfiles. + * @function listColumnDataProfiles + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IListColumnDataProfilesRequest} request ListColumnDataProfilesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|getProjectDataProfile}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef GetProjectDataProfileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.ProjectDataProfile} [response] ProjectDataProfile + */ + + /** + * Calls GetProjectDataProfile. + * @function getProjectDataProfile + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IGetProjectDataProfileRequest} request GetProjectDataProfileRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.GetProjectDataProfileCallback} callback Node-style callback called with the error, if any, and ProjectDataProfile + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.getProjectDataProfile = function getProjectDataProfile(request, callback) { + return this.rpcCall(getProjectDataProfile, $root.google.privacy.dlp.v2.GetProjectDataProfileRequest, $root.google.privacy.dlp.v2.ProjectDataProfile, request, callback); + }, "name", { value: "GetProjectDataProfile" }); + + /** + * Calls GetProjectDataProfile. + * @function getProjectDataProfile + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IGetProjectDataProfileRequest} request GetProjectDataProfileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|listFileStoreDataProfiles}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef ListFileStoreDataProfilesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.ListFileStoreDataProfilesResponse} [response] ListFileStoreDataProfilesResponse + */ + + /** + * Calls ListFileStoreDataProfiles. + * @function listFileStoreDataProfiles + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IListFileStoreDataProfilesRequest} request ListFileStoreDataProfilesRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.ListFileStoreDataProfilesCallback} callback Node-style callback called with the error, if any, and ListFileStoreDataProfilesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.listFileStoreDataProfiles = function listFileStoreDataProfiles(request, callback) { + return this.rpcCall(listFileStoreDataProfiles, $root.google.privacy.dlp.v2.ListFileStoreDataProfilesRequest, $root.google.privacy.dlp.v2.ListFileStoreDataProfilesResponse, request, callback); + }, "name", { value: "ListFileStoreDataProfiles" }); + + /** + * Calls ListFileStoreDataProfiles. + * @function listFileStoreDataProfiles + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IListFileStoreDataProfilesRequest} request ListFileStoreDataProfilesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|getFileStoreDataProfile}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef GetFileStoreDataProfileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.FileStoreDataProfile} [response] FileStoreDataProfile + */ + + /** + * Calls GetFileStoreDataProfile. + * @function getFileStoreDataProfile + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IGetFileStoreDataProfileRequest} request GetFileStoreDataProfileRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.GetFileStoreDataProfileCallback} callback Node-style callback called with the error, if any, and FileStoreDataProfile + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.getFileStoreDataProfile = function getFileStoreDataProfile(request, callback) { + return this.rpcCall(getFileStoreDataProfile, $root.google.privacy.dlp.v2.GetFileStoreDataProfileRequest, $root.google.privacy.dlp.v2.FileStoreDataProfile, request, callback); + }, "name", { value: "GetFileStoreDataProfile" }); + + /** + * Calls GetFileStoreDataProfile. + * @function getFileStoreDataProfile + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IGetFileStoreDataProfileRequest} request GetFileStoreDataProfileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|deleteFileStoreDataProfile}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef DeleteFileStoreDataProfileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteFileStoreDataProfile. + * @function deleteFileStoreDataProfile + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IDeleteFileStoreDataProfileRequest} request DeleteFileStoreDataProfileRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.DeleteFileStoreDataProfileCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.deleteFileStoreDataProfile = function deleteFileStoreDataProfile(request, callback) { + return this.rpcCall(deleteFileStoreDataProfile, $root.google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteFileStoreDataProfile" }); + + /** + * Calls DeleteFileStoreDataProfile. + * @function deleteFileStoreDataProfile + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IDeleteFileStoreDataProfileRequest} request DeleteFileStoreDataProfileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|getTableDataProfile}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef GetTableDataProfileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.TableDataProfile} [response] TableDataProfile + */ + + /** + * Calls GetTableDataProfile. + * @function getTableDataProfile + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IGetTableDataProfileRequest} request GetTableDataProfileRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.GetTableDataProfileCallback} callback Node-style callback called with the error, if any, and TableDataProfile + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.getTableDataProfile = function getTableDataProfile(request, callback) { + return this.rpcCall(getTableDataProfile, $root.google.privacy.dlp.v2.GetTableDataProfileRequest, $root.google.privacy.dlp.v2.TableDataProfile, request, callback); + }, "name", { value: "GetTableDataProfile" }); + + /** + * Calls GetTableDataProfile. + * @function getTableDataProfile + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IGetTableDataProfileRequest} request GetTableDataProfileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|getColumnDataProfile}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef GetColumnDataProfileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.ColumnDataProfile} [response] ColumnDataProfile + */ + + /** + * Calls GetColumnDataProfile. + * @function getColumnDataProfile + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IGetColumnDataProfileRequest} request GetColumnDataProfileRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.GetColumnDataProfileCallback} callback Node-style callback called with the error, if any, and ColumnDataProfile + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.getColumnDataProfile = function getColumnDataProfile(request, callback) { + return this.rpcCall(getColumnDataProfile, $root.google.privacy.dlp.v2.GetColumnDataProfileRequest, $root.google.privacy.dlp.v2.ColumnDataProfile, request, callback); + }, "name", { value: "GetColumnDataProfile" }); + + /** + * Calls GetColumnDataProfile. + * @function getColumnDataProfile + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IGetColumnDataProfileRequest} request GetColumnDataProfileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|deleteTableDataProfile}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef DeleteTableDataProfileCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteTableDataProfile. + * @function deleteTableDataProfile + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IDeleteTableDataProfileRequest} request DeleteTableDataProfileRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.DeleteTableDataProfileCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.deleteTableDataProfile = function deleteTableDataProfile(request, callback) { + return this.rpcCall(deleteTableDataProfile, $root.google.privacy.dlp.v2.DeleteTableDataProfileRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteTableDataProfile" }); + + /** + * Calls DeleteTableDataProfile. + * @function deleteTableDataProfile + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IDeleteTableDataProfileRequest} request DeleteTableDataProfileRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|hybridInspectDlpJob}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef HybridInspectDlpJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.HybridInspectResponse} [response] HybridInspectResponse + */ + + /** + * Calls HybridInspectDlpJob. + * @function hybridInspectDlpJob + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IHybridInspectDlpJobRequest} request HybridInspectDlpJobRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.HybridInspectDlpJobCallback} callback Node-style callback called with the error, if any, and HybridInspectResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.hybridInspectDlpJob = function hybridInspectDlpJob(request, callback) { + return this.rpcCall(hybridInspectDlpJob, $root.google.privacy.dlp.v2.HybridInspectDlpJobRequest, $root.google.privacy.dlp.v2.HybridInspectResponse, request, callback); + }, "name", { value: "HybridInspectDlpJob" }); + + /** + * Calls HybridInspectDlpJob. + * @function hybridInspectDlpJob + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IHybridInspectDlpJobRequest} request HybridInspectDlpJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|finishDlpJob}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef FinishDlpJobCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls FinishDlpJob. + * @function finishDlpJob + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IFinishDlpJobRequest} request FinishDlpJobRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.FinishDlpJobCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.finishDlpJob = function finishDlpJob(request, callback) { + return this.rpcCall(finishDlpJob, $root.google.privacy.dlp.v2.FinishDlpJobRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "FinishDlpJob" }); + + /** + * Calls FinishDlpJob. + * @function finishDlpJob + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IFinishDlpJobRequest} request FinishDlpJobRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|createConnection}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef CreateConnectionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.Connection} [response] Connection + */ + + /** + * Calls CreateConnection. + * @function createConnection + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.ICreateConnectionRequest} request CreateConnectionRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.CreateConnectionCallback} callback Node-style callback called with the error, if any, and Connection + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.createConnection = function createConnection(request, callback) { + return this.rpcCall(createConnection, $root.google.privacy.dlp.v2.CreateConnectionRequest, $root.google.privacy.dlp.v2.Connection, request, callback); + }, "name", { value: "CreateConnection" }); + + /** + * Calls CreateConnection. + * @function createConnection + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.ICreateConnectionRequest} request CreateConnectionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|getConnection}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef GetConnectionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.Connection} [response] Connection + */ + + /** + * Calls GetConnection. + * @function getConnection + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IGetConnectionRequest} request GetConnectionRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.GetConnectionCallback} callback Node-style callback called with the error, if any, and Connection + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.getConnection = function getConnection(request, callback) { + return this.rpcCall(getConnection, $root.google.privacy.dlp.v2.GetConnectionRequest, $root.google.privacy.dlp.v2.Connection, request, callback); + }, "name", { value: "GetConnection" }); + + /** + * Calls GetConnection. + * @function getConnection + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IGetConnectionRequest} request GetConnectionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|listConnections}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef ListConnectionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.ListConnectionsResponse} [response] ListConnectionsResponse + */ + + /** + * Calls ListConnections. + * @function listConnections + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IListConnectionsRequest} request ListConnectionsRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.ListConnectionsCallback} callback Node-style callback called with the error, if any, and ListConnectionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.listConnections = function listConnections(request, callback) { + return this.rpcCall(listConnections, $root.google.privacy.dlp.v2.ListConnectionsRequest, $root.google.privacy.dlp.v2.ListConnectionsResponse, request, callback); + }, "name", { value: "ListConnections" }); + + /** + * Calls ListConnections. + * @function listConnections + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IListConnectionsRequest} request ListConnectionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|searchConnections}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef SearchConnectionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.SearchConnectionsResponse} [response] SearchConnectionsResponse + */ + + /** + * Calls SearchConnections. + * @function searchConnections + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.ISearchConnectionsRequest} request SearchConnectionsRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.SearchConnectionsCallback} callback Node-style callback called with the error, if any, and SearchConnectionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.searchConnections = function searchConnections(request, callback) { + return this.rpcCall(searchConnections, $root.google.privacy.dlp.v2.SearchConnectionsRequest, $root.google.privacy.dlp.v2.SearchConnectionsResponse, request, callback); + }, "name", { value: "SearchConnections" }); + + /** + * Calls SearchConnections. + * @function searchConnections + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.ISearchConnectionsRequest} request SearchConnectionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|deleteConnection}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef DeleteConnectionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteConnection. + * @function deleteConnection + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IDeleteConnectionRequest} request DeleteConnectionRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.DeleteConnectionCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.deleteConnection = function deleteConnection(request, callback) { + return this.rpcCall(deleteConnection, $root.google.privacy.dlp.v2.DeleteConnectionRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteConnection" }); + + /** + * Calls DeleteConnection. + * @function deleteConnection + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IDeleteConnectionRequest} request DeleteConnectionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.privacy.dlp.v2.DlpService|updateConnection}. + * @memberof google.privacy.dlp.v2.DlpService + * @typedef UpdateConnectionCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.privacy.dlp.v2.Connection} [response] Connection + */ + + /** + * Calls UpdateConnection. + * @function updateConnection + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IUpdateConnectionRequest} request UpdateConnectionRequest message or plain object + * @param {google.privacy.dlp.v2.DlpService.UpdateConnectionCallback} callback Node-style callback called with the error, if any, and Connection + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(DlpService.prototype.updateConnection = function updateConnection(request, callback) { + return this.rpcCall(updateConnection, $root.google.privacy.dlp.v2.UpdateConnectionRequest, $root.google.privacy.dlp.v2.Connection, request, callback); + }, "name", { value: "UpdateConnection" }); + + /** + * Calls UpdateConnection. + * @function updateConnection + * @memberof google.privacy.dlp.v2.DlpService + * @instance + * @param {google.privacy.dlp.v2.IUpdateConnectionRequest} request UpdateConnectionRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return DlpService; + })(); + + v2.ExcludeInfoTypes = (function() { + + /** + * Properties of an ExcludeInfoTypes. + * @memberof google.privacy.dlp.v2 + * @interface IExcludeInfoTypes + * @property {Array.|null} [infoTypes] ExcludeInfoTypes infoTypes + */ + + /** + * Constructs a new ExcludeInfoTypes. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an ExcludeInfoTypes. + * @implements IExcludeInfoTypes + * @constructor + * @param {google.privacy.dlp.v2.IExcludeInfoTypes=} [properties] Properties to set + */ + function ExcludeInfoTypes(properties) { + this.infoTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExcludeInfoTypes infoTypes. + * @member {Array.} infoTypes + * @memberof google.privacy.dlp.v2.ExcludeInfoTypes + * @instance + */ + ExcludeInfoTypes.prototype.infoTypes = $util.emptyArray; + + /** + * Creates a new ExcludeInfoTypes instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ExcludeInfoTypes + * @static + * @param {google.privacy.dlp.v2.IExcludeInfoTypes=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ExcludeInfoTypes} ExcludeInfoTypes instance + */ + ExcludeInfoTypes.create = function create(properties) { + return new ExcludeInfoTypes(properties); + }; + + /** + * Encodes the specified ExcludeInfoTypes message. Does not implicitly {@link google.privacy.dlp.v2.ExcludeInfoTypes.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ExcludeInfoTypes + * @static + * @param {google.privacy.dlp.v2.IExcludeInfoTypes} message ExcludeInfoTypes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExcludeInfoTypes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.infoTypes != null && message.infoTypes.length) + for (var i = 0; i < message.infoTypes.length; ++i) + $root.google.privacy.dlp.v2.InfoType.encode(message.infoTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExcludeInfoTypes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ExcludeInfoTypes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ExcludeInfoTypes + * @static + * @param {google.privacy.dlp.v2.IExcludeInfoTypes} message ExcludeInfoTypes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExcludeInfoTypes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExcludeInfoTypes message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ExcludeInfoTypes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ExcludeInfoTypes} ExcludeInfoTypes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExcludeInfoTypes.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ExcludeInfoTypes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.infoTypes && message.infoTypes.length)) + message.infoTypes = []; + message.infoTypes.push($root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an ExcludeInfoTypes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ExcludeInfoTypes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ExcludeInfoTypes} ExcludeInfoTypes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExcludeInfoTypes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExcludeInfoTypes message. + * @function verify + * @memberof google.privacy.dlp.v2.ExcludeInfoTypes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExcludeInfoTypes.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.infoTypes != null && message.hasOwnProperty("infoTypes")) { + if (!Array.isArray(message.infoTypes)) + return "infoTypes: array expected"; + for (var i = 0; i < message.infoTypes.length; ++i) { + var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infoTypes[i], long + 1); + if (error) + return "infoTypes." + error; + } + } + return null; + }; + + /** + * Creates an ExcludeInfoTypes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ExcludeInfoTypes + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ExcludeInfoTypes} ExcludeInfoTypes + */ + ExcludeInfoTypes.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ExcludeInfoTypes) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ExcludeInfoTypes(); + if (object.infoTypes) { + if (!Array.isArray(object.infoTypes)) + throw TypeError(".google.privacy.dlp.v2.ExcludeInfoTypes.infoTypes: array expected"); + message.infoTypes = []; + for (var i = 0; i < object.infoTypes.length; ++i) { + if (typeof object.infoTypes[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.ExcludeInfoTypes.infoTypes: object expected"); + message.infoTypes[i] = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoTypes[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from an ExcludeInfoTypes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ExcludeInfoTypes + * @static + * @param {google.privacy.dlp.v2.ExcludeInfoTypes} message ExcludeInfoTypes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExcludeInfoTypes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.infoTypes = []; + if (message.infoTypes && message.infoTypes.length) { + object.infoTypes = []; + for (var j = 0; j < message.infoTypes.length; ++j) + object.infoTypes[j] = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoTypes[j], options); + } + return object; + }; + + /** + * Converts this ExcludeInfoTypes to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ExcludeInfoTypes + * @instance + * @returns {Object.} JSON object + */ + ExcludeInfoTypes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExcludeInfoTypes + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ExcludeInfoTypes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExcludeInfoTypes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ExcludeInfoTypes"; + }; + + return ExcludeInfoTypes; + })(); + + v2.ExcludeByHotword = (function() { + + /** + * Properties of an ExcludeByHotword. + * @memberof google.privacy.dlp.v2 + * @interface IExcludeByHotword + * @property {google.privacy.dlp.v2.CustomInfoType.IRegex|null} [hotwordRegex] ExcludeByHotword hotwordRegex + * @property {google.privacy.dlp.v2.CustomInfoType.DetectionRule.IProximity|null} [proximity] ExcludeByHotword proximity + */ + + /** + * Constructs a new ExcludeByHotword. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an ExcludeByHotword. + * @implements IExcludeByHotword + * @constructor + * @param {google.privacy.dlp.v2.IExcludeByHotword=} [properties] Properties to set + */ + function ExcludeByHotword(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExcludeByHotword hotwordRegex. + * @member {google.privacy.dlp.v2.CustomInfoType.IRegex|null|undefined} hotwordRegex + * @memberof google.privacy.dlp.v2.ExcludeByHotword + * @instance + */ + ExcludeByHotword.prototype.hotwordRegex = null; + + /** + * ExcludeByHotword proximity. + * @member {google.privacy.dlp.v2.CustomInfoType.DetectionRule.IProximity|null|undefined} proximity + * @memberof google.privacy.dlp.v2.ExcludeByHotword + * @instance + */ + ExcludeByHotword.prototype.proximity = null; + + /** + * Creates a new ExcludeByHotword instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ExcludeByHotword + * @static + * @param {google.privacy.dlp.v2.IExcludeByHotword=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ExcludeByHotword} ExcludeByHotword instance + */ + ExcludeByHotword.create = function create(properties) { + return new ExcludeByHotword(properties); + }; + + /** + * Encodes the specified ExcludeByHotword message. Does not implicitly {@link google.privacy.dlp.v2.ExcludeByHotword.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ExcludeByHotword + * @static + * @param {google.privacy.dlp.v2.IExcludeByHotword} message ExcludeByHotword message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExcludeByHotword.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hotwordRegex != null && Object.hasOwnProperty.call(message, "hotwordRegex")) + $root.google.privacy.dlp.v2.CustomInfoType.Regex.encode(message.hotwordRegex, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.proximity != null && Object.hasOwnProperty.call(message, "proximity")) + $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.encode(message.proximity, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExcludeByHotword message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ExcludeByHotword.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ExcludeByHotword + * @static + * @param {google.privacy.dlp.v2.IExcludeByHotword} message ExcludeByHotword message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExcludeByHotword.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExcludeByHotword message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ExcludeByHotword + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ExcludeByHotword} ExcludeByHotword + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExcludeByHotword.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ExcludeByHotword(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.hotwordRegex = $root.google.privacy.dlp.v2.CustomInfoType.Regex.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.proximity = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an ExcludeByHotword message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ExcludeByHotword + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ExcludeByHotword} ExcludeByHotword + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExcludeByHotword.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExcludeByHotword message. + * @function verify + * @memberof google.privacy.dlp.v2.ExcludeByHotword + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExcludeByHotword.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.hotwordRegex != null && message.hasOwnProperty("hotwordRegex")) { + var error = $root.google.privacy.dlp.v2.CustomInfoType.Regex.verify(message.hotwordRegex, long + 1); + if (error) + return "hotwordRegex." + error; + } + if (message.proximity != null && message.hasOwnProperty("proximity")) { + var error = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.verify(message.proximity, long + 1); + if (error) + return "proximity." + error; + } + return null; + }; + + /** + * Creates an ExcludeByHotword message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ExcludeByHotword + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ExcludeByHotword} ExcludeByHotword + */ + ExcludeByHotword.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ExcludeByHotword) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ExcludeByHotword(); + if (object.hotwordRegex != null) { + if (typeof object.hotwordRegex !== "object") + throw TypeError(".google.privacy.dlp.v2.ExcludeByHotword.hotwordRegex: object expected"); + message.hotwordRegex = $root.google.privacy.dlp.v2.CustomInfoType.Regex.fromObject(object.hotwordRegex, long + 1); + } + if (object.proximity != null) { + if (typeof object.proximity !== "object") + throw TypeError(".google.privacy.dlp.v2.ExcludeByHotword.proximity: object expected"); + message.proximity = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.fromObject(object.proximity, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an ExcludeByHotword message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ExcludeByHotword + * @static + * @param {google.privacy.dlp.v2.ExcludeByHotword} message ExcludeByHotword + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExcludeByHotword.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.hotwordRegex = null; + object.proximity = null; + } + if (message.hotwordRegex != null && message.hasOwnProperty("hotwordRegex")) + object.hotwordRegex = $root.google.privacy.dlp.v2.CustomInfoType.Regex.toObject(message.hotwordRegex, options); + if (message.proximity != null && message.hasOwnProperty("proximity")) + object.proximity = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.toObject(message.proximity, options); + return object; + }; + + /** + * Converts this ExcludeByHotword to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ExcludeByHotword + * @instance + * @returns {Object.} JSON object + */ + ExcludeByHotword.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExcludeByHotword + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ExcludeByHotword + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExcludeByHotword.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ExcludeByHotword"; + }; + + return ExcludeByHotword; + })(); + + v2.ExcludeByImageFindings = (function() { + + /** + * Properties of an ExcludeByImageFindings. + * @memberof google.privacy.dlp.v2 + * @interface IExcludeByImageFindings + * @property {Array.|null} [infoTypes] ExcludeByImageFindings infoTypes + * @property {google.privacy.dlp.v2.IImageContainmentType|null} [imageContainmentType] ExcludeByImageFindings imageContainmentType + */ + + /** + * Constructs a new ExcludeByImageFindings. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an ExcludeByImageFindings. + * @implements IExcludeByImageFindings + * @constructor + * @param {google.privacy.dlp.v2.IExcludeByImageFindings=} [properties] Properties to set + */ + function ExcludeByImageFindings(properties) { + this.infoTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExcludeByImageFindings infoTypes. + * @member {Array.} infoTypes + * @memberof google.privacy.dlp.v2.ExcludeByImageFindings + * @instance + */ + ExcludeByImageFindings.prototype.infoTypes = $util.emptyArray; + + /** + * ExcludeByImageFindings imageContainmentType. + * @member {google.privacy.dlp.v2.IImageContainmentType|null|undefined} imageContainmentType + * @memberof google.privacy.dlp.v2.ExcludeByImageFindings + * @instance + */ + ExcludeByImageFindings.prototype.imageContainmentType = null; + + /** + * Creates a new ExcludeByImageFindings instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ExcludeByImageFindings + * @static + * @param {google.privacy.dlp.v2.IExcludeByImageFindings=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ExcludeByImageFindings} ExcludeByImageFindings instance + */ + ExcludeByImageFindings.create = function create(properties) { + return new ExcludeByImageFindings(properties); + }; + + /** + * Encodes the specified ExcludeByImageFindings message. Does not implicitly {@link google.privacy.dlp.v2.ExcludeByImageFindings.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ExcludeByImageFindings + * @static + * @param {google.privacy.dlp.v2.IExcludeByImageFindings} message ExcludeByImageFindings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExcludeByImageFindings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.infoTypes != null && message.infoTypes.length) + for (var i = 0; i < message.infoTypes.length; ++i) + $root.google.privacy.dlp.v2.InfoType.encode(message.infoTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.imageContainmentType != null && Object.hasOwnProperty.call(message, "imageContainmentType")) + $root.google.privacy.dlp.v2.ImageContainmentType.encode(message.imageContainmentType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExcludeByImageFindings message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ExcludeByImageFindings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ExcludeByImageFindings + * @static + * @param {google.privacy.dlp.v2.IExcludeByImageFindings} message ExcludeByImageFindings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExcludeByImageFindings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExcludeByImageFindings message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ExcludeByImageFindings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ExcludeByImageFindings} ExcludeByImageFindings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExcludeByImageFindings.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ExcludeByImageFindings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.infoTypes && message.infoTypes.length)) + message.infoTypes = []; + message.infoTypes.push($root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.imageContainmentType = $root.google.privacy.dlp.v2.ImageContainmentType.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an ExcludeByImageFindings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ExcludeByImageFindings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ExcludeByImageFindings} ExcludeByImageFindings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExcludeByImageFindings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExcludeByImageFindings message. + * @function verify + * @memberof google.privacy.dlp.v2.ExcludeByImageFindings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExcludeByImageFindings.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.infoTypes != null && message.hasOwnProperty("infoTypes")) { + if (!Array.isArray(message.infoTypes)) + return "infoTypes: array expected"; + for (var i = 0; i < message.infoTypes.length; ++i) { + var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infoTypes[i], long + 1); + if (error) + return "infoTypes." + error; + } + } + if (message.imageContainmentType != null && message.hasOwnProperty("imageContainmentType")) { + var error = $root.google.privacy.dlp.v2.ImageContainmentType.verify(message.imageContainmentType, long + 1); + if (error) + return "imageContainmentType." + error; + } + return null; + }; + + /** + * Creates an ExcludeByImageFindings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ExcludeByImageFindings + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ExcludeByImageFindings} ExcludeByImageFindings + */ + ExcludeByImageFindings.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ExcludeByImageFindings) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ExcludeByImageFindings(); + if (object.infoTypes) { + if (!Array.isArray(object.infoTypes)) + throw TypeError(".google.privacy.dlp.v2.ExcludeByImageFindings.infoTypes: array expected"); + message.infoTypes = []; + for (var i = 0; i < object.infoTypes.length; ++i) { + if (typeof object.infoTypes[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.ExcludeByImageFindings.infoTypes: object expected"); + message.infoTypes[i] = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoTypes[i], long + 1); + } + } + if (object.imageContainmentType != null) { + if (typeof object.imageContainmentType !== "object") + throw TypeError(".google.privacy.dlp.v2.ExcludeByImageFindings.imageContainmentType: object expected"); + message.imageContainmentType = $root.google.privacy.dlp.v2.ImageContainmentType.fromObject(object.imageContainmentType, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an ExcludeByImageFindings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ExcludeByImageFindings + * @static + * @param {google.privacy.dlp.v2.ExcludeByImageFindings} message ExcludeByImageFindings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExcludeByImageFindings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.infoTypes = []; + if (options.defaults) + object.imageContainmentType = null; + if (message.infoTypes && message.infoTypes.length) { + object.infoTypes = []; + for (var j = 0; j < message.infoTypes.length; ++j) + object.infoTypes[j] = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoTypes[j], options); + } + if (message.imageContainmentType != null && message.hasOwnProperty("imageContainmentType")) + object.imageContainmentType = $root.google.privacy.dlp.v2.ImageContainmentType.toObject(message.imageContainmentType, options); + return object; + }; + + /** + * Converts this ExcludeByImageFindings to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ExcludeByImageFindings + * @instance + * @returns {Object.} JSON object + */ + ExcludeByImageFindings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExcludeByImageFindings + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ExcludeByImageFindings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExcludeByImageFindings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ExcludeByImageFindings"; + }; + + return ExcludeByImageFindings; + })(); + + v2.ExclusionRule = (function() { + + /** + * Properties of an ExclusionRule. + * @memberof google.privacy.dlp.v2 + * @interface IExclusionRule + * @property {google.privacy.dlp.v2.CustomInfoType.IDictionary|null} [dictionary] ExclusionRule dictionary + * @property {google.privacy.dlp.v2.CustomInfoType.IRegex|null} [regex] ExclusionRule regex + * @property {google.privacy.dlp.v2.IExcludeInfoTypes|null} [excludeInfoTypes] ExclusionRule excludeInfoTypes + * @property {google.privacy.dlp.v2.IExcludeByHotword|null} [excludeByHotword] ExclusionRule excludeByHotword + * @property {google.privacy.dlp.v2.IExcludeByImageFindings|null} [excludeByImageFindings] ExclusionRule excludeByImageFindings + * @property {google.privacy.dlp.v2.MatchingType|null} [matchingType] ExclusionRule matchingType + */ + + /** + * Constructs a new ExclusionRule. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an ExclusionRule. + * @implements IExclusionRule + * @constructor + * @param {google.privacy.dlp.v2.IExclusionRule=} [properties] Properties to set + */ + function ExclusionRule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExclusionRule dictionary. + * @member {google.privacy.dlp.v2.CustomInfoType.IDictionary|null|undefined} dictionary + * @memberof google.privacy.dlp.v2.ExclusionRule + * @instance + */ + ExclusionRule.prototype.dictionary = null; + + /** + * ExclusionRule regex. + * @member {google.privacy.dlp.v2.CustomInfoType.IRegex|null|undefined} regex + * @memberof google.privacy.dlp.v2.ExclusionRule + * @instance + */ + ExclusionRule.prototype.regex = null; + + /** + * ExclusionRule excludeInfoTypes. + * @member {google.privacy.dlp.v2.IExcludeInfoTypes|null|undefined} excludeInfoTypes + * @memberof google.privacy.dlp.v2.ExclusionRule + * @instance + */ + ExclusionRule.prototype.excludeInfoTypes = null; + + /** + * ExclusionRule excludeByHotword. + * @member {google.privacy.dlp.v2.IExcludeByHotword|null|undefined} excludeByHotword + * @memberof google.privacy.dlp.v2.ExclusionRule + * @instance + */ + ExclusionRule.prototype.excludeByHotword = null; + + /** + * ExclusionRule excludeByImageFindings. + * @member {google.privacy.dlp.v2.IExcludeByImageFindings|null|undefined} excludeByImageFindings + * @memberof google.privacy.dlp.v2.ExclusionRule + * @instance + */ + ExclusionRule.prototype.excludeByImageFindings = null; + + /** + * ExclusionRule matchingType. + * @member {google.privacy.dlp.v2.MatchingType} matchingType + * @memberof google.privacy.dlp.v2.ExclusionRule + * @instance + */ + ExclusionRule.prototype.matchingType = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ExclusionRule type. + * @member {"dictionary"|"regex"|"excludeInfoTypes"|"excludeByHotword"|"excludeByImageFindings"|undefined} type + * @memberof google.privacy.dlp.v2.ExclusionRule + * @instance + */ + Object.defineProperty(ExclusionRule.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["dictionary", "regex", "excludeInfoTypes", "excludeByHotword", "excludeByImageFindings"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExclusionRule instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ExclusionRule + * @static + * @param {google.privacy.dlp.v2.IExclusionRule=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ExclusionRule} ExclusionRule instance + */ + ExclusionRule.create = function create(properties) { + return new ExclusionRule(properties); + }; + + /** + * Encodes the specified ExclusionRule message. Does not implicitly {@link google.privacy.dlp.v2.ExclusionRule.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ExclusionRule + * @static + * @param {google.privacy.dlp.v2.IExclusionRule} message ExclusionRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExclusionRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dictionary != null && Object.hasOwnProperty.call(message, "dictionary")) + $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.encode(message.dictionary, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.regex != null && Object.hasOwnProperty.call(message, "regex")) + $root.google.privacy.dlp.v2.CustomInfoType.Regex.encode(message.regex, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.excludeInfoTypes != null && Object.hasOwnProperty.call(message, "excludeInfoTypes")) + $root.google.privacy.dlp.v2.ExcludeInfoTypes.encode(message.excludeInfoTypes, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.matchingType != null && Object.hasOwnProperty.call(message, "matchingType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.matchingType); + if (message.excludeByHotword != null && Object.hasOwnProperty.call(message, "excludeByHotword")) + $root.google.privacy.dlp.v2.ExcludeByHotword.encode(message.excludeByHotword, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.excludeByImageFindings != null && Object.hasOwnProperty.call(message, "excludeByImageFindings")) + $root.google.privacy.dlp.v2.ExcludeByImageFindings.encode(message.excludeByImageFindings, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExclusionRule message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ExclusionRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ExclusionRule + * @static + * @param {google.privacy.dlp.v2.IExclusionRule} message ExclusionRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExclusionRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExclusionRule message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ExclusionRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ExclusionRule} ExclusionRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExclusionRule.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ExclusionRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dictionary = $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.regex = $root.google.privacy.dlp.v2.CustomInfoType.Regex.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.excludeInfoTypes = $root.google.privacy.dlp.v2.ExcludeInfoTypes.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.excludeByHotword = $root.google.privacy.dlp.v2.ExcludeByHotword.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.excludeByImageFindings = $root.google.privacy.dlp.v2.ExcludeByImageFindings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.matchingType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an ExclusionRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ExclusionRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ExclusionRule} ExclusionRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExclusionRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExclusionRule message. + * @function verify + * @memberof google.privacy.dlp.v2.ExclusionRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExclusionRule.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.dictionary != null && message.hasOwnProperty("dictionary")) { + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.verify(message.dictionary, long + 1); + if (error) + return "dictionary." + error; + } + } + if (message.regex != null && message.hasOwnProperty("regex")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.CustomInfoType.Regex.verify(message.regex, long + 1); + if (error) + return "regex." + error; + } + } + if (message.excludeInfoTypes != null && message.hasOwnProperty("excludeInfoTypes")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.ExcludeInfoTypes.verify(message.excludeInfoTypes, long + 1); + if (error) + return "excludeInfoTypes." + error; + } + } + if (message.excludeByHotword != null && message.hasOwnProperty("excludeByHotword")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.ExcludeByHotword.verify(message.excludeByHotword, long + 1); + if (error) + return "excludeByHotword." + error; + } + } + if (message.excludeByImageFindings != null && message.hasOwnProperty("excludeByImageFindings")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.ExcludeByImageFindings.verify(message.excludeByImageFindings, long + 1); + if (error) + return "excludeByImageFindings." + error; + } + } + if (message.matchingType != null && message.hasOwnProperty("matchingType")) + switch (message.matchingType) { + default: + return "matchingType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates an ExclusionRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ExclusionRule + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ExclusionRule} ExclusionRule + */ + ExclusionRule.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ExclusionRule) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ExclusionRule(); + if (object.dictionary != null) { + if (typeof object.dictionary !== "object") + throw TypeError(".google.privacy.dlp.v2.ExclusionRule.dictionary: object expected"); + message.dictionary = $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.fromObject(object.dictionary, long + 1); + } + if (object.regex != null) { + if (typeof object.regex !== "object") + throw TypeError(".google.privacy.dlp.v2.ExclusionRule.regex: object expected"); + message.regex = $root.google.privacy.dlp.v2.CustomInfoType.Regex.fromObject(object.regex, long + 1); + } + if (object.excludeInfoTypes != null) { + if (typeof object.excludeInfoTypes !== "object") + throw TypeError(".google.privacy.dlp.v2.ExclusionRule.excludeInfoTypes: object expected"); + message.excludeInfoTypes = $root.google.privacy.dlp.v2.ExcludeInfoTypes.fromObject(object.excludeInfoTypes, long + 1); + } + if (object.excludeByHotword != null) { + if (typeof object.excludeByHotword !== "object") + throw TypeError(".google.privacy.dlp.v2.ExclusionRule.excludeByHotword: object expected"); + message.excludeByHotword = $root.google.privacy.dlp.v2.ExcludeByHotword.fromObject(object.excludeByHotword, long + 1); + } + if (object.excludeByImageFindings != null) { + if (typeof object.excludeByImageFindings !== "object") + throw TypeError(".google.privacy.dlp.v2.ExclusionRule.excludeByImageFindings: object expected"); + message.excludeByImageFindings = $root.google.privacy.dlp.v2.ExcludeByImageFindings.fromObject(object.excludeByImageFindings, long + 1); + } + switch (object.matchingType) { + default: + if (typeof object.matchingType === "number") { + message.matchingType = object.matchingType; + break; + } + break; + case "MATCHING_TYPE_UNSPECIFIED": + case 0: + message.matchingType = 0; + break; + case "MATCHING_TYPE_FULL_MATCH": + case 1: + message.matchingType = 1; + break; + case "MATCHING_TYPE_PARTIAL_MATCH": + case 2: + message.matchingType = 2; + break; + case "MATCHING_TYPE_INVERSE_MATCH": + case 3: + message.matchingType = 3; + break; + case "MATCHING_TYPE_RULE_SPECIFIC": + case 4: + message.matchingType = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExclusionRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ExclusionRule + * @static + * @param {google.privacy.dlp.v2.ExclusionRule} message ExclusionRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExclusionRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.matchingType = options.enums === String ? "MATCHING_TYPE_UNSPECIFIED" : 0; + if (message.dictionary != null && message.hasOwnProperty("dictionary")) { + object.dictionary = $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.toObject(message.dictionary, options); + if (options.oneofs) + object.type = "dictionary"; + } + if (message.regex != null && message.hasOwnProperty("regex")) { + object.regex = $root.google.privacy.dlp.v2.CustomInfoType.Regex.toObject(message.regex, options); + if (options.oneofs) + object.type = "regex"; + } + if (message.excludeInfoTypes != null && message.hasOwnProperty("excludeInfoTypes")) { + object.excludeInfoTypes = $root.google.privacy.dlp.v2.ExcludeInfoTypes.toObject(message.excludeInfoTypes, options); + if (options.oneofs) + object.type = "excludeInfoTypes"; + } + if (message.matchingType != null && message.hasOwnProperty("matchingType")) + object.matchingType = options.enums === String ? $root.google.privacy.dlp.v2.MatchingType[message.matchingType] === undefined ? message.matchingType : $root.google.privacy.dlp.v2.MatchingType[message.matchingType] : message.matchingType; + if (message.excludeByHotword != null && message.hasOwnProperty("excludeByHotword")) { + object.excludeByHotword = $root.google.privacy.dlp.v2.ExcludeByHotword.toObject(message.excludeByHotword, options); + if (options.oneofs) + object.type = "excludeByHotword"; + } + if (message.excludeByImageFindings != null && message.hasOwnProperty("excludeByImageFindings")) { + object.excludeByImageFindings = $root.google.privacy.dlp.v2.ExcludeByImageFindings.toObject(message.excludeByImageFindings, options); + if (options.oneofs) + object.type = "excludeByImageFindings"; + } + return object; + }; + + /** + * Converts this ExclusionRule to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ExclusionRule + * @instance + * @returns {Object.} JSON object + */ + ExclusionRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExclusionRule + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ExclusionRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExclusionRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ExclusionRule"; + }; + + return ExclusionRule; + })(); + + v2.AdjustByMatchingInfoTypes = (function() { + + /** + * Properties of an AdjustByMatchingInfoTypes. + * @memberof google.privacy.dlp.v2 + * @interface IAdjustByMatchingInfoTypes + * @property {Array.|null} [infoTypes] AdjustByMatchingInfoTypes infoTypes + * @property {google.privacy.dlp.v2.Likelihood|null} [minLikelihood] AdjustByMatchingInfoTypes minLikelihood + * @property {google.privacy.dlp.v2.MatchingType|null} [matchingType] AdjustByMatchingInfoTypes matchingType + */ + + /** + * Constructs a new AdjustByMatchingInfoTypes. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an AdjustByMatchingInfoTypes. + * @implements IAdjustByMatchingInfoTypes + * @constructor + * @param {google.privacy.dlp.v2.IAdjustByMatchingInfoTypes=} [properties] Properties to set + */ + function AdjustByMatchingInfoTypes(properties) { + this.infoTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * AdjustByMatchingInfoTypes infoTypes. + * @member {Array.} infoTypes + * @memberof google.privacy.dlp.v2.AdjustByMatchingInfoTypes + * @instance + */ + AdjustByMatchingInfoTypes.prototype.infoTypes = $util.emptyArray; + + /** + * AdjustByMatchingInfoTypes minLikelihood. + * @member {google.privacy.dlp.v2.Likelihood} minLikelihood + * @memberof google.privacy.dlp.v2.AdjustByMatchingInfoTypes + * @instance + */ + AdjustByMatchingInfoTypes.prototype.minLikelihood = 0; + + /** + * AdjustByMatchingInfoTypes matchingType. + * @member {google.privacy.dlp.v2.MatchingType} matchingType + * @memberof google.privacy.dlp.v2.AdjustByMatchingInfoTypes + * @instance + */ + AdjustByMatchingInfoTypes.prototype.matchingType = 0; + + /** + * Creates a new AdjustByMatchingInfoTypes instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AdjustByMatchingInfoTypes + * @static + * @param {google.privacy.dlp.v2.IAdjustByMatchingInfoTypes=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AdjustByMatchingInfoTypes} AdjustByMatchingInfoTypes instance + */ + AdjustByMatchingInfoTypes.create = function create(properties) { + return new AdjustByMatchingInfoTypes(properties); + }; + + /** + * Encodes the specified AdjustByMatchingInfoTypes message. Does not implicitly {@link google.privacy.dlp.v2.AdjustByMatchingInfoTypes.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AdjustByMatchingInfoTypes + * @static + * @param {google.privacy.dlp.v2.IAdjustByMatchingInfoTypes} message AdjustByMatchingInfoTypes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdjustByMatchingInfoTypes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.infoTypes != null && message.infoTypes.length) + for (var i = 0; i < message.infoTypes.length; ++i) + $root.google.privacy.dlp.v2.InfoType.encode(message.infoTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minLikelihood != null && Object.hasOwnProperty.call(message, "minLikelihood")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minLikelihood); + if (message.matchingType != null && Object.hasOwnProperty.call(message, "matchingType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.matchingType); + return writer; + }; + + /** + * Encodes the specified AdjustByMatchingInfoTypes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AdjustByMatchingInfoTypes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AdjustByMatchingInfoTypes + * @static + * @param {google.privacy.dlp.v2.IAdjustByMatchingInfoTypes} message AdjustByMatchingInfoTypes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdjustByMatchingInfoTypes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdjustByMatchingInfoTypes message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AdjustByMatchingInfoTypes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AdjustByMatchingInfoTypes} AdjustByMatchingInfoTypes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdjustByMatchingInfoTypes.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AdjustByMatchingInfoTypes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.infoTypes && message.infoTypes.length)) + message.infoTypes = []; + message.infoTypes.push($root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.minLikelihood = reader.int32(); + break; + } + case 3: { + message.matchingType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AdjustByMatchingInfoTypes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AdjustByMatchingInfoTypes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AdjustByMatchingInfoTypes} AdjustByMatchingInfoTypes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdjustByMatchingInfoTypes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdjustByMatchingInfoTypes message. + * @function verify + * @memberof google.privacy.dlp.v2.AdjustByMatchingInfoTypes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdjustByMatchingInfoTypes.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.infoTypes != null && message.hasOwnProperty("infoTypes")) { + if (!Array.isArray(message.infoTypes)) + return "infoTypes: array expected"; + for (var i = 0; i < message.infoTypes.length; ++i) { + var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infoTypes[i], long + 1); + if (error) + return "infoTypes." + error; + } + } + if (message.minLikelihood != null && message.hasOwnProperty("minLikelihood")) + switch (message.minLikelihood) { + default: + return "minLikelihood: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.matchingType != null && message.hasOwnProperty("matchingType")) + switch (message.matchingType) { + default: + return "matchingType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates an AdjustByMatchingInfoTypes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AdjustByMatchingInfoTypes + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AdjustByMatchingInfoTypes} AdjustByMatchingInfoTypes + */ + AdjustByMatchingInfoTypes.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AdjustByMatchingInfoTypes) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.AdjustByMatchingInfoTypes(); + if (object.infoTypes) { + if (!Array.isArray(object.infoTypes)) + throw TypeError(".google.privacy.dlp.v2.AdjustByMatchingInfoTypes.infoTypes: array expected"); + message.infoTypes = []; + for (var i = 0; i < object.infoTypes.length; ++i) { + if (typeof object.infoTypes[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.AdjustByMatchingInfoTypes.infoTypes: object expected"); + message.infoTypes[i] = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoTypes[i], long + 1); + } + } + switch (object.minLikelihood) { + default: + if (typeof object.minLikelihood === "number") { + message.minLikelihood = object.minLikelihood; + break; + } + break; + case "LIKELIHOOD_UNSPECIFIED": + case 0: + message.minLikelihood = 0; + break; + case "VERY_UNLIKELY": + case 1: + message.minLikelihood = 1; + break; + case "UNLIKELY": + case 2: + message.minLikelihood = 2; + break; + case "POSSIBLE": + case 3: + message.minLikelihood = 3; + break; + case "LIKELY": + case 4: + message.minLikelihood = 4; + break; + case "VERY_LIKELY": + case 5: + message.minLikelihood = 5; + break; + } + switch (object.matchingType) { + default: + if (typeof object.matchingType === "number") { + message.matchingType = object.matchingType; + break; + } + break; + case "MATCHING_TYPE_UNSPECIFIED": + case 0: + message.matchingType = 0; + break; + case "MATCHING_TYPE_FULL_MATCH": + case 1: + message.matchingType = 1; + break; + case "MATCHING_TYPE_PARTIAL_MATCH": + case 2: + message.matchingType = 2; + break; + case "MATCHING_TYPE_INVERSE_MATCH": + case 3: + message.matchingType = 3; + break; + case "MATCHING_TYPE_RULE_SPECIFIC": + case 4: + message.matchingType = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from an AdjustByMatchingInfoTypes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AdjustByMatchingInfoTypes + * @static + * @param {google.privacy.dlp.v2.AdjustByMatchingInfoTypes} message AdjustByMatchingInfoTypes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdjustByMatchingInfoTypes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.infoTypes = []; + if (options.defaults) { + object.minLikelihood = options.enums === String ? "LIKELIHOOD_UNSPECIFIED" : 0; + object.matchingType = options.enums === String ? "MATCHING_TYPE_UNSPECIFIED" : 0; + } + if (message.infoTypes && message.infoTypes.length) { + object.infoTypes = []; + for (var j = 0; j < message.infoTypes.length; ++j) + object.infoTypes[j] = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoTypes[j], options); + } + if (message.minLikelihood != null && message.hasOwnProperty("minLikelihood")) + object.minLikelihood = options.enums === String ? $root.google.privacy.dlp.v2.Likelihood[message.minLikelihood] === undefined ? message.minLikelihood : $root.google.privacy.dlp.v2.Likelihood[message.minLikelihood] : message.minLikelihood; + if (message.matchingType != null && message.hasOwnProperty("matchingType")) + object.matchingType = options.enums === String ? $root.google.privacy.dlp.v2.MatchingType[message.matchingType] === undefined ? message.matchingType : $root.google.privacy.dlp.v2.MatchingType[message.matchingType] : message.matchingType; + return object; + }; + + /** + * Converts this AdjustByMatchingInfoTypes to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AdjustByMatchingInfoTypes + * @instance + * @returns {Object.} JSON object + */ + AdjustByMatchingInfoTypes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AdjustByMatchingInfoTypes + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AdjustByMatchingInfoTypes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdjustByMatchingInfoTypes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AdjustByMatchingInfoTypes"; + }; + + return AdjustByMatchingInfoTypes; + })(); + + v2.AdjustByImageFindings = (function() { + + /** + * Properties of an AdjustByImageFindings. + * @memberof google.privacy.dlp.v2 + * @interface IAdjustByImageFindings + * @property {Array.|null} [infoTypes] AdjustByImageFindings infoTypes + * @property {google.privacy.dlp.v2.Likelihood|null} [minLikelihood] AdjustByImageFindings minLikelihood + * @property {google.privacy.dlp.v2.IImageContainmentType|null} [imageContainmentType] AdjustByImageFindings imageContainmentType + */ + + /** + * Constructs a new AdjustByImageFindings. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an AdjustByImageFindings. + * @implements IAdjustByImageFindings + * @constructor + * @param {google.privacy.dlp.v2.IAdjustByImageFindings=} [properties] Properties to set + */ + function AdjustByImageFindings(properties) { + this.infoTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * AdjustByImageFindings infoTypes. + * @member {Array.} infoTypes + * @memberof google.privacy.dlp.v2.AdjustByImageFindings + * @instance + */ + AdjustByImageFindings.prototype.infoTypes = $util.emptyArray; + + /** + * AdjustByImageFindings minLikelihood. + * @member {google.privacy.dlp.v2.Likelihood} minLikelihood + * @memberof google.privacy.dlp.v2.AdjustByImageFindings + * @instance + */ + AdjustByImageFindings.prototype.minLikelihood = 0; + + /** + * AdjustByImageFindings imageContainmentType. + * @member {google.privacy.dlp.v2.IImageContainmentType|null|undefined} imageContainmentType + * @memberof google.privacy.dlp.v2.AdjustByImageFindings + * @instance + */ + AdjustByImageFindings.prototype.imageContainmentType = null; + + /** + * Creates a new AdjustByImageFindings instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AdjustByImageFindings + * @static + * @param {google.privacy.dlp.v2.IAdjustByImageFindings=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AdjustByImageFindings} AdjustByImageFindings instance + */ + AdjustByImageFindings.create = function create(properties) { + return new AdjustByImageFindings(properties); + }; + + /** + * Encodes the specified AdjustByImageFindings message. Does not implicitly {@link google.privacy.dlp.v2.AdjustByImageFindings.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AdjustByImageFindings + * @static + * @param {google.privacy.dlp.v2.IAdjustByImageFindings} message AdjustByImageFindings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdjustByImageFindings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.infoTypes != null && message.infoTypes.length) + for (var i = 0; i < message.infoTypes.length; ++i) + $root.google.privacy.dlp.v2.InfoType.encode(message.infoTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minLikelihood != null && Object.hasOwnProperty.call(message, "minLikelihood")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minLikelihood); + if (message.imageContainmentType != null && Object.hasOwnProperty.call(message, "imageContainmentType")) + $root.google.privacy.dlp.v2.ImageContainmentType.encode(message.imageContainmentType, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AdjustByImageFindings message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AdjustByImageFindings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AdjustByImageFindings + * @static + * @param {google.privacy.dlp.v2.IAdjustByImageFindings} message AdjustByImageFindings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdjustByImageFindings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdjustByImageFindings message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AdjustByImageFindings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AdjustByImageFindings} AdjustByImageFindings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdjustByImageFindings.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AdjustByImageFindings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.infoTypes && message.infoTypes.length)) + message.infoTypes = []; + message.infoTypes.push($root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.minLikelihood = reader.int32(); + break; + } + case 3: { + message.imageContainmentType = $root.google.privacy.dlp.v2.ImageContainmentType.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AdjustByImageFindings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AdjustByImageFindings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AdjustByImageFindings} AdjustByImageFindings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdjustByImageFindings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdjustByImageFindings message. + * @function verify + * @memberof google.privacy.dlp.v2.AdjustByImageFindings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdjustByImageFindings.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.infoTypes != null && message.hasOwnProperty("infoTypes")) { + if (!Array.isArray(message.infoTypes)) + return "infoTypes: array expected"; + for (var i = 0; i < message.infoTypes.length; ++i) { + var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infoTypes[i], long + 1); + if (error) + return "infoTypes." + error; + } + } + if (message.minLikelihood != null && message.hasOwnProperty("minLikelihood")) + switch (message.minLikelihood) { + default: + return "minLikelihood: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.imageContainmentType != null && message.hasOwnProperty("imageContainmentType")) { + var error = $root.google.privacy.dlp.v2.ImageContainmentType.verify(message.imageContainmentType, long + 1); + if (error) + return "imageContainmentType." + error; + } + return null; + }; + + /** + * Creates an AdjustByImageFindings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AdjustByImageFindings + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AdjustByImageFindings} AdjustByImageFindings + */ + AdjustByImageFindings.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AdjustByImageFindings) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.AdjustByImageFindings(); + if (object.infoTypes) { + if (!Array.isArray(object.infoTypes)) + throw TypeError(".google.privacy.dlp.v2.AdjustByImageFindings.infoTypes: array expected"); + message.infoTypes = []; + for (var i = 0; i < object.infoTypes.length; ++i) { + if (typeof object.infoTypes[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.AdjustByImageFindings.infoTypes: object expected"); + message.infoTypes[i] = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoTypes[i], long + 1); + } + } + switch (object.minLikelihood) { + default: + if (typeof object.minLikelihood === "number") { + message.minLikelihood = object.minLikelihood; + break; + } + break; + case "LIKELIHOOD_UNSPECIFIED": + case 0: + message.minLikelihood = 0; + break; + case "VERY_UNLIKELY": + case 1: + message.minLikelihood = 1; + break; + case "UNLIKELY": + case 2: + message.minLikelihood = 2; + break; + case "POSSIBLE": + case 3: + message.minLikelihood = 3; + break; + case "LIKELY": + case 4: + message.minLikelihood = 4; + break; + case "VERY_LIKELY": + case 5: + message.minLikelihood = 5; + break; + } + if (object.imageContainmentType != null) { + if (typeof object.imageContainmentType !== "object") + throw TypeError(".google.privacy.dlp.v2.AdjustByImageFindings.imageContainmentType: object expected"); + message.imageContainmentType = $root.google.privacy.dlp.v2.ImageContainmentType.fromObject(object.imageContainmentType, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an AdjustByImageFindings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AdjustByImageFindings + * @static + * @param {google.privacy.dlp.v2.AdjustByImageFindings} message AdjustByImageFindings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdjustByImageFindings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.infoTypes = []; + if (options.defaults) { + object.minLikelihood = options.enums === String ? "LIKELIHOOD_UNSPECIFIED" : 0; + object.imageContainmentType = null; + } + if (message.infoTypes && message.infoTypes.length) { + object.infoTypes = []; + for (var j = 0; j < message.infoTypes.length; ++j) + object.infoTypes[j] = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoTypes[j], options); + } + if (message.minLikelihood != null && message.hasOwnProperty("minLikelihood")) + object.minLikelihood = options.enums === String ? $root.google.privacy.dlp.v2.Likelihood[message.minLikelihood] === undefined ? message.minLikelihood : $root.google.privacy.dlp.v2.Likelihood[message.minLikelihood] : message.minLikelihood; + if (message.imageContainmentType != null && message.hasOwnProperty("imageContainmentType")) + object.imageContainmentType = $root.google.privacy.dlp.v2.ImageContainmentType.toObject(message.imageContainmentType, options); + return object; + }; + + /** + * Converts this AdjustByImageFindings to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AdjustByImageFindings + * @instance + * @returns {Object.} JSON object + */ + AdjustByImageFindings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AdjustByImageFindings + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AdjustByImageFindings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdjustByImageFindings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AdjustByImageFindings"; + }; + + return AdjustByImageFindings; + })(); + + v2.AdjustmentRule = (function() { + + /** + * Properties of an AdjustmentRule. + * @memberof google.privacy.dlp.v2 + * @interface IAdjustmentRule + * @property {google.privacy.dlp.v2.IAdjustByMatchingInfoTypes|null} [adjustByMatchingInfoTypes] AdjustmentRule adjustByMatchingInfoTypes + * @property {google.privacy.dlp.v2.IAdjustByImageFindings|null} [adjustByImageFindings] AdjustmentRule adjustByImageFindings + * @property {google.privacy.dlp.v2.CustomInfoType.DetectionRule.ILikelihoodAdjustment|null} [likelihoodAdjustment] AdjustmentRule likelihoodAdjustment + */ + + /** + * Constructs a new AdjustmentRule. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an AdjustmentRule. + * @implements IAdjustmentRule + * @constructor + * @param {google.privacy.dlp.v2.IAdjustmentRule=} [properties] Properties to set + */ + function AdjustmentRule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * AdjustmentRule adjustByMatchingInfoTypes. + * @member {google.privacy.dlp.v2.IAdjustByMatchingInfoTypes|null|undefined} adjustByMatchingInfoTypes + * @memberof google.privacy.dlp.v2.AdjustmentRule + * @instance + */ + AdjustmentRule.prototype.adjustByMatchingInfoTypes = null; + + /** + * AdjustmentRule adjustByImageFindings. + * @member {google.privacy.dlp.v2.IAdjustByImageFindings|null|undefined} adjustByImageFindings + * @memberof google.privacy.dlp.v2.AdjustmentRule + * @instance + */ + AdjustmentRule.prototype.adjustByImageFindings = null; + + /** + * AdjustmentRule likelihoodAdjustment. + * @member {google.privacy.dlp.v2.CustomInfoType.DetectionRule.ILikelihoodAdjustment|null|undefined} likelihoodAdjustment + * @memberof google.privacy.dlp.v2.AdjustmentRule + * @instance + */ + AdjustmentRule.prototype.likelihoodAdjustment = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AdjustmentRule conditions. + * @member {"adjustByMatchingInfoTypes"|"adjustByImageFindings"|undefined} conditions + * @memberof google.privacy.dlp.v2.AdjustmentRule + * @instance + */ + Object.defineProperty(AdjustmentRule.prototype, "conditions", { + get: $util.oneOfGetter($oneOfFields = ["adjustByMatchingInfoTypes", "adjustByImageFindings"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AdjustmentRule instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AdjustmentRule + * @static + * @param {google.privacy.dlp.v2.IAdjustmentRule=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AdjustmentRule} AdjustmentRule instance + */ + AdjustmentRule.create = function create(properties) { + return new AdjustmentRule(properties); + }; + + /** + * Encodes the specified AdjustmentRule message. Does not implicitly {@link google.privacy.dlp.v2.AdjustmentRule.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AdjustmentRule + * @static + * @param {google.privacy.dlp.v2.IAdjustmentRule} message AdjustmentRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdjustmentRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.adjustByMatchingInfoTypes != null && Object.hasOwnProperty.call(message, "adjustByMatchingInfoTypes")) + $root.google.privacy.dlp.v2.AdjustByMatchingInfoTypes.encode(message.adjustByMatchingInfoTypes, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.likelihoodAdjustment != null && Object.hasOwnProperty.call(message, "likelihoodAdjustment")) + $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.encode(message.likelihoodAdjustment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.adjustByImageFindings != null && Object.hasOwnProperty.call(message, "adjustByImageFindings")) + $root.google.privacy.dlp.v2.AdjustByImageFindings.encode(message.adjustByImageFindings, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AdjustmentRule message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AdjustmentRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AdjustmentRule + * @static + * @param {google.privacy.dlp.v2.IAdjustmentRule} message AdjustmentRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AdjustmentRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AdjustmentRule message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AdjustmentRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AdjustmentRule} AdjustmentRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdjustmentRule.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AdjustmentRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.adjustByMatchingInfoTypes = $root.google.privacy.dlp.v2.AdjustByMatchingInfoTypes.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.adjustByImageFindings = $root.google.privacy.dlp.v2.AdjustByImageFindings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.likelihoodAdjustment = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AdjustmentRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AdjustmentRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AdjustmentRule} AdjustmentRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AdjustmentRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AdjustmentRule message. + * @function verify + * @memberof google.privacy.dlp.v2.AdjustmentRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AdjustmentRule.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.adjustByMatchingInfoTypes != null && message.hasOwnProperty("adjustByMatchingInfoTypes")) { + properties.conditions = 1; + { + var error = $root.google.privacy.dlp.v2.AdjustByMatchingInfoTypes.verify(message.adjustByMatchingInfoTypes, long + 1); + if (error) + return "adjustByMatchingInfoTypes." + error; + } + } + if (message.adjustByImageFindings != null && message.hasOwnProperty("adjustByImageFindings")) { + if (properties.conditions === 1) + return "conditions: multiple values"; + properties.conditions = 1; + { + var error = $root.google.privacy.dlp.v2.AdjustByImageFindings.verify(message.adjustByImageFindings, long + 1); + if (error) + return "adjustByImageFindings." + error; + } + } + if (message.likelihoodAdjustment != null && message.hasOwnProperty("likelihoodAdjustment")) { + var error = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.verify(message.likelihoodAdjustment, long + 1); + if (error) + return "likelihoodAdjustment." + error; + } + return null; + }; + + /** + * Creates an AdjustmentRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AdjustmentRule + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AdjustmentRule} AdjustmentRule + */ + AdjustmentRule.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AdjustmentRule) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.AdjustmentRule(); + if (object.adjustByMatchingInfoTypes != null) { + if (typeof object.adjustByMatchingInfoTypes !== "object") + throw TypeError(".google.privacy.dlp.v2.AdjustmentRule.adjustByMatchingInfoTypes: object expected"); + message.adjustByMatchingInfoTypes = $root.google.privacy.dlp.v2.AdjustByMatchingInfoTypes.fromObject(object.adjustByMatchingInfoTypes, long + 1); + } + if (object.adjustByImageFindings != null) { + if (typeof object.adjustByImageFindings !== "object") + throw TypeError(".google.privacy.dlp.v2.AdjustmentRule.adjustByImageFindings: object expected"); + message.adjustByImageFindings = $root.google.privacy.dlp.v2.AdjustByImageFindings.fromObject(object.adjustByImageFindings, long + 1); + } + if (object.likelihoodAdjustment != null) { + if (typeof object.likelihoodAdjustment !== "object") + throw TypeError(".google.privacy.dlp.v2.AdjustmentRule.likelihoodAdjustment: object expected"); + message.likelihoodAdjustment = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.fromObject(object.likelihoodAdjustment, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an AdjustmentRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AdjustmentRule + * @static + * @param {google.privacy.dlp.v2.AdjustmentRule} message AdjustmentRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AdjustmentRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.likelihoodAdjustment = null; + if (message.adjustByMatchingInfoTypes != null && message.hasOwnProperty("adjustByMatchingInfoTypes")) { + object.adjustByMatchingInfoTypes = $root.google.privacy.dlp.v2.AdjustByMatchingInfoTypes.toObject(message.adjustByMatchingInfoTypes, options); + if (options.oneofs) + object.conditions = "adjustByMatchingInfoTypes"; + } + if (message.likelihoodAdjustment != null && message.hasOwnProperty("likelihoodAdjustment")) + object.likelihoodAdjustment = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.toObject(message.likelihoodAdjustment, options); + if (message.adjustByImageFindings != null && message.hasOwnProperty("adjustByImageFindings")) { + object.adjustByImageFindings = $root.google.privacy.dlp.v2.AdjustByImageFindings.toObject(message.adjustByImageFindings, options); + if (options.oneofs) + object.conditions = "adjustByImageFindings"; + } + return object; + }; + + /** + * Converts this AdjustmentRule to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AdjustmentRule + * @instance + * @returns {Object.} JSON object + */ + AdjustmentRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AdjustmentRule + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AdjustmentRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AdjustmentRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AdjustmentRule"; + }; + + return AdjustmentRule; + })(); + + v2.InspectionRule = (function() { + + /** + * Properties of an InspectionRule. + * @memberof google.privacy.dlp.v2 + * @interface IInspectionRule + * @property {google.privacy.dlp.v2.CustomInfoType.DetectionRule.IHotwordRule|null} [hotwordRule] InspectionRule hotwordRule + * @property {google.privacy.dlp.v2.IExclusionRule|null} [exclusionRule] InspectionRule exclusionRule + * @property {google.privacy.dlp.v2.IAdjustmentRule|null} [adjustmentRule] InspectionRule adjustmentRule + */ + + /** + * Constructs a new InspectionRule. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an InspectionRule. + * @implements IInspectionRule + * @constructor + * @param {google.privacy.dlp.v2.IInspectionRule=} [properties] Properties to set + */ + function InspectionRule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * InspectionRule hotwordRule. + * @member {google.privacy.dlp.v2.CustomInfoType.DetectionRule.IHotwordRule|null|undefined} hotwordRule + * @memberof google.privacy.dlp.v2.InspectionRule + * @instance + */ + InspectionRule.prototype.hotwordRule = null; + + /** + * InspectionRule exclusionRule. + * @member {google.privacy.dlp.v2.IExclusionRule|null|undefined} exclusionRule + * @memberof google.privacy.dlp.v2.InspectionRule + * @instance + */ + InspectionRule.prototype.exclusionRule = null; + + /** + * InspectionRule adjustmentRule. + * @member {google.privacy.dlp.v2.IAdjustmentRule|null|undefined} adjustmentRule + * @memberof google.privacy.dlp.v2.InspectionRule + * @instance + */ + InspectionRule.prototype.adjustmentRule = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * InspectionRule type. + * @member {"hotwordRule"|"exclusionRule"|"adjustmentRule"|undefined} type + * @memberof google.privacy.dlp.v2.InspectionRule + * @instance + */ + Object.defineProperty(InspectionRule.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["hotwordRule", "exclusionRule", "adjustmentRule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new InspectionRule instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.InspectionRule + * @static + * @param {google.privacy.dlp.v2.IInspectionRule=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.InspectionRule} InspectionRule instance + */ + InspectionRule.create = function create(properties) { + return new InspectionRule(properties); + }; + + /** + * Encodes the specified InspectionRule message. Does not implicitly {@link google.privacy.dlp.v2.InspectionRule.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.InspectionRule + * @static + * @param {google.privacy.dlp.v2.IInspectionRule} message InspectionRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InspectionRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hotwordRule != null && Object.hasOwnProperty.call(message, "hotwordRule")) + $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.encode(message.hotwordRule, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.exclusionRule != null && Object.hasOwnProperty.call(message, "exclusionRule")) + $root.google.privacy.dlp.v2.ExclusionRule.encode(message.exclusionRule, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.adjustmentRule != null && Object.hasOwnProperty.call(message, "adjustmentRule")) + $root.google.privacy.dlp.v2.AdjustmentRule.encode(message.adjustmentRule, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified InspectionRule message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectionRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.InspectionRule + * @static + * @param {google.privacy.dlp.v2.IInspectionRule} message InspectionRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InspectionRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InspectionRule message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.InspectionRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.InspectionRule} InspectionRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InspectionRule.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.InspectionRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.hotwordRule = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.exclusionRule = $root.google.privacy.dlp.v2.ExclusionRule.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.adjustmentRule = $root.google.privacy.dlp.v2.AdjustmentRule.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an InspectionRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.InspectionRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.InspectionRule} InspectionRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InspectionRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InspectionRule message. + * @function verify + * @memberof google.privacy.dlp.v2.InspectionRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InspectionRule.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.hotwordRule != null && message.hasOwnProperty("hotwordRule")) { + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.verify(message.hotwordRule, long + 1); + if (error) + return "hotwordRule." + error; + } + } + if (message.exclusionRule != null && message.hasOwnProperty("exclusionRule")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.ExclusionRule.verify(message.exclusionRule, long + 1); + if (error) + return "exclusionRule." + error; + } + } + if (message.adjustmentRule != null && message.hasOwnProperty("adjustmentRule")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.AdjustmentRule.verify(message.adjustmentRule, long + 1); + if (error) + return "adjustmentRule." + error; + } + } + return null; + }; + + /** + * Creates an InspectionRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.InspectionRule + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.InspectionRule} InspectionRule + */ + InspectionRule.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.InspectionRule) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.InspectionRule(); + if (object.hotwordRule != null) { + if (typeof object.hotwordRule !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectionRule.hotwordRule: object expected"); + message.hotwordRule = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.fromObject(object.hotwordRule, long + 1); + } + if (object.exclusionRule != null) { + if (typeof object.exclusionRule !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectionRule.exclusionRule: object expected"); + message.exclusionRule = $root.google.privacy.dlp.v2.ExclusionRule.fromObject(object.exclusionRule, long + 1); + } + if (object.adjustmentRule != null) { + if (typeof object.adjustmentRule !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectionRule.adjustmentRule: object expected"); + message.adjustmentRule = $root.google.privacy.dlp.v2.AdjustmentRule.fromObject(object.adjustmentRule, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an InspectionRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.InspectionRule + * @static + * @param {google.privacy.dlp.v2.InspectionRule} message InspectionRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InspectionRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.hotwordRule != null && message.hasOwnProperty("hotwordRule")) { + object.hotwordRule = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.toObject(message.hotwordRule, options); + if (options.oneofs) + object.type = "hotwordRule"; + } + if (message.exclusionRule != null && message.hasOwnProperty("exclusionRule")) { + object.exclusionRule = $root.google.privacy.dlp.v2.ExclusionRule.toObject(message.exclusionRule, options); + if (options.oneofs) + object.type = "exclusionRule"; + } + if (message.adjustmentRule != null && message.hasOwnProperty("adjustmentRule")) { + object.adjustmentRule = $root.google.privacy.dlp.v2.AdjustmentRule.toObject(message.adjustmentRule, options); + if (options.oneofs) + object.type = "adjustmentRule"; + } + return object; + }; + + /** + * Converts this InspectionRule to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.InspectionRule + * @instance + * @returns {Object.} JSON object + */ + InspectionRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InspectionRule + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.InspectionRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InspectionRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.InspectionRule"; + }; + + return InspectionRule; + })(); + + v2.InspectionRuleSet = (function() { + + /** + * Properties of an InspectionRuleSet. + * @memberof google.privacy.dlp.v2 + * @interface IInspectionRuleSet + * @property {Array.|null} [infoTypes] InspectionRuleSet infoTypes + * @property {Array.|null} [rules] InspectionRuleSet rules + */ + + /** + * Constructs a new InspectionRuleSet. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an InspectionRuleSet. + * @implements IInspectionRuleSet + * @constructor + * @param {google.privacy.dlp.v2.IInspectionRuleSet=} [properties] Properties to set + */ + function InspectionRuleSet(properties) { + this.infoTypes = []; + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * InspectionRuleSet infoTypes. + * @member {Array.} infoTypes + * @memberof google.privacy.dlp.v2.InspectionRuleSet + * @instance + */ + InspectionRuleSet.prototype.infoTypes = $util.emptyArray; + + /** + * InspectionRuleSet rules. + * @member {Array.} rules + * @memberof google.privacy.dlp.v2.InspectionRuleSet + * @instance + */ + InspectionRuleSet.prototype.rules = $util.emptyArray; + + /** + * Creates a new InspectionRuleSet instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.InspectionRuleSet + * @static + * @param {google.privacy.dlp.v2.IInspectionRuleSet=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.InspectionRuleSet} InspectionRuleSet instance + */ + InspectionRuleSet.create = function create(properties) { + return new InspectionRuleSet(properties); + }; + + /** + * Encodes the specified InspectionRuleSet message. Does not implicitly {@link google.privacy.dlp.v2.InspectionRuleSet.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.InspectionRuleSet + * @static + * @param {google.privacy.dlp.v2.IInspectionRuleSet} message InspectionRuleSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InspectionRuleSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.infoTypes != null && message.infoTypes.length) + for (var i = 0; i < message.infoTypes.length; ++i) + $root.google.privacy.dlp.v2.InfoType.encode(message.infoTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.privacy.dlp.v2.InspectionRule.encode(message.rules[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified InspectionRuleSet message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectionRuleSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.InspectionRuleSet + * @static + * @param {google.privacy.dlp.v2.IInspectionRuleSet} message InspectionRuleSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InspectionRuleSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InspectionRuleSet message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.InspectionRuleSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.InspectionRuleSet} InspectionRuleSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InspectionRuleSet.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.InspectionRuleSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.infoTypes && message.infoTypes.length)) + message.infoTypes = []; + message.infoTypes.push($root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.privacy.dlp.v2.InspectionRule.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an InspectionRuleSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.InspectionRuleSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.InspectionRuleSet} InspectionRuleSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InspectionRuleSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InspectionRuleSet message. + * @function verify + * @memberof google.privacy.dlp.v2.InspectionRuleSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InspectionRuleSet.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.infoTypes != null && message.hasOwnProperty("infoTypes")) { + if (!Array.isArray(message.infoTypes)) + return "infoTypes: array expected"; + for (var i = 0; i < message.infoTypes.length; ++i) { + var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infoTypes[i], long + 1); + if (error) + return "infoTypes." + error; + } + } + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.privacy.dlp.v2.InspectionRule.verify(message.rules[i], long + 1); + if (error) + return "rules." + error; + } + } + return null; + }; + + /** + * Creates an InspectionRuleSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.InspectionRuleSet + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.InspectionRuleSet} InspectionRuleSet + */ + InspectionRuleSet.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.InspectionRuleSet) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.InspectionRuleSet(); + if (object.infoTypes) { + if (!Array.isArray(object.infoTypes)) + throw TypeError(".google.privacy.dlp.v2.InspectionRuleSet.infoTypes: array expected"); + message.infoTypes = []; + for (var i = 0; i < object.infoTypes.length; ++i) { + if (typeof object.infoTypes[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectionRuleSet.infoTypes: object expected"); + message.infoTypes[i] = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoTypes[i], long + 1); + } + } + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.privacy.dlp.v2.InspectionRuleSet.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectionRuleSet.rules: object expected"); + message.rules[i] = $root.google.privacy.dlp.v2.InspectionRule.fromObject(object.rules[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from an InspectionRuleSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.InspectionRuleSet + * @static + * @param {google.privacy.dlp.v2.InspectionRuleSet} message InspectionRuleSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InspectionRuleSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.infoTypes = []; + object.rules = []; + } + if (message.infoTypes && message.infoTypes.length) { + object.infoTypes = []; + for (var j = 0; j < message.infoTypes.length; ++j) + object.infoTypes[j] = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoTypes[j], options); + } + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.privacy.dlp.v2.InspectionRule.toObject(message.rules[j], options); + } + return object; + }; + + /** + * Converts this InspectionRuleSet to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.InspectionRuleSet + * @instance + * @returns {Object.} JSON object + */ + InspectionRuleSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InspectionRuleSet + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.InspectionRuleSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InspectionRuleSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.InspectionRuleSet"; + }; + + return InspectionRuleSet; + })(); + + v2.InspectConfig = (function() { + + /** + * Properties of an InspectConfig. + * @memberof google.privacy.dlp.v2 + * @interface IInspectConfig + * @property {Array.|null} [infoTypes] InspectConfig infoTypes + * @property {google.privacy.dlp.v2.Likelihood|null} [minLikelihood] InspectConfig minLikelihood + * @property {Array.|null} [minLikelihoodPerInfoType] InspectConfig minLikelihoodPerInfoType + * @property {google.privacy.dlp.v2.InspectConfig.IFindingLimits|null} [limits] InspectConfig limits + * @property {boolean|null} [includeQuote] InspectConfig includeQuote + * @property {boolean|null} [excludeInfoTypes] InspectConfig excludeInfoTypes + * @property {Array.|null} [customInfoTypes] InspectConfig customInfoTypes + * @property {Array.|null} [contentOptions] InspectConfig contentOptions + * @property {Array.|null} [ruleSet] InspectConfig ruleSet + */ + + /** + * Constructs a new InspectConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an InspectConfig. + * @implements IInspectConfig + * @constructor + * @param {google.privacy.dlp.v2.IInspectConfig=} [properties] Properties to set + */ + function InspectConfig(properties) { + this.infoTypes = []; + this.minLikelihoodPerInfoType = []; + this.customInfoTypes = []; + this.contentOptions = []; + this.ruleSet = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * InspectConfig infoTypes. + * @member {Array.} infoTypes + * @memberof google.privacy.dlp.v2.InspectConfig + * @instance + */ + InspectConfig.prototype.infoTypes = $util.emptyArray; + + /** + * InspectConfig minLikelihood. + * @member {google.privacy.dlp.v2.Likelihood} minLikelihood + * @memberof google.privacy.dlp.v2.InspectConfig + * @instance + */ + InspectConfig.prototype.minLikelihood = 0; + + /** + * InspectConfig minLikelihoodPerInfoType. + * @member {Array.} minLikelihoodPerInfoType + * @memberof google.privacy.dlp.v2.InspectConfig + * @instance + */ + InspectConfig.prototype.minLikelihoodPerInfoType = $util.emptyArray; + + /** + * InspectConfig limits. + * @member {google.privacy.dlp.v2.InspectConfig.IFindingLimits|null|undefined} limits + * @memberof google.privacy.dlp.v2.InspectConfig + * @instance + */ + InspectConfig.prototype.limits = null; + + /** + * InspectConfig includeQuote. + * @member {boolean} includeQuote + * @memberof google.privacy.dlp.v2.InspectConfig + * @instance + */ + InspectConfig.prototype.includeQuote = false; + + /** + * InspectConfig excludeInfoTypes. + * @member {boolean} excludeInfoTypes + * @memberof google.privacy.dlp.v2.InspectConfig + * @instance + */ + InspectConfig.prototype.excludeInfoTypes = false; + + /** + * InspectConfig customInfoTypes. + * @member {Array.} customInfoTypes + * @memberof google.privacy.dlp.v2.InspectConfig + * @instance + */ + InspectConfig.prototype.customInfoTypes = $util.emptyArray; + + /** + * InspectConfig contentOptions. + * @member {Array.} contentOptions + * @memberof google.privacy.dlp.v2.InspectConfig + * @instance + */ + InspectConfig.prototype.contentOptions = $util.emptyArray; + + /** + * InspectConfig ruleSet. + * @member {Array.} ruleSet + * @memberof google.privacy.dlp.v2.InspectConfig + * @instance + */ + InspectConfig.prototype.ruleSet = $util.emptyArray; + + /** + * Creates a new InspectConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.InspectConfig + * @static + * @param {google.privacy.dlp.v2.IInspectConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.InspectConfig} InspectConfig instance + */ + InspectConfig.create = function create(properties) { + return new InspectConfig(properties); + }; + + /** + * Encodes the specified InspectConfig message. Does not implicitly {@link google.privacy.dlp.v2.InspectConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.InspectConfig + * @static + * @param {google.privacy.dlp.v2.IInspectConfig} message InspectConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InspectConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.infoTypes != null && message.infoTypes.length) + for (var i = 0; i < message.infoTypes.length; ++i) + $root.google.privacy.dlp.v2.InfoType.encode(message.infoTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minLikelihood != null && Object.hasOwnProperty.call(message, "minLikelihood")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minLikelihood); + if (message.limits != null && Object.hasOwnProperty.call(message, "limits")) + $root.google.privacy.dlp.v2.InspectConfig.FindingLimits.encode(message.limits, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.includeQuote != null && Object.hasOwnProperty.call(message, "includeQuote")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.includeQuote); + if (message.excludeInfoTypes != null && Object.hasOwnProperty.call(message, "excludeInfoTypes")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.excludeInfoTypes); + if (message.customInfoTypes != null && message.customInfoTypes.length) + for (var i = 0; i < message.customInfoTypes.length; ++i) + $root.google.privacy.dlp.v2.CustomInfoType.encode(message.customInfoTypes[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.contentOptions != null && message.contentOptions.length) { + writer.uint32(/* id 8, wireType 2 =*/66).fork(); + for (var i = 0; i < message.contentOptions.length; ++i) + writer.int32(message.contentOptions[i]); + writer.ldelim(); + } + if (message.ruleSet != null && message.ruleSet.length) + for (var i = 0; i < message.ruleSet.length; ++i) + $root.google.privacy.dlp.v2.InspectionRuleSet.encode(message.ruleSet[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.minLikelihoodPerInfoType != null && message.minLikelihoodPerInfoType.length) + for (var i = 0; i < message.minLikelihoodPerInfoType.length; ++i) + $root.google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood.encode(message.minLikelihoodPerInfoType[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified InspectConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.InspectConfig + * @static + * @param {google.privacy.dlp.v2.IInspectConfig} message InspectConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InspectConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InspectConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.InspectConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.InspectConfig} InspectConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InspectConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.InspectConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.infoTypes && message.infoTypes.length)) + message.infoTypes = []; + message.infoTypes.push($root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.minLikelihood = reader.int32(); + break; + } + case 11: { + if (!(message.minLikelihoodPerInfoType && message.minLikelihoodPerInfoType.length)) + message.minLikelihoodPerInfoType = []; + message.minLikelihoodPerInfoType.push($root.google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 3: { + message.limits = $root.google.privacy.dlp.v2.InspectConfig.FindingLimits.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.includeQuote = reader.bool(); + break; + } + case 5: { + message.excludeInfoTypes = reader.bool(); + break; + } + case 6: { + if (!(message.customInfoTypes && message.customInfoTypes.length)) + message.customInfoTypes = []; + message.customInfoTypes.push($root.google.privacy.dlp.v2.CustomInfoType.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 8: { + if (!(message.contentOptions && message.contentOptions.length)) + message.contentOptions = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.contentOptions.push(reader.int32()); + } else + message.contentOptions.push(reader.int32()); + break; + } + case 10: { + if (!(message.ruleSet && message.ruleSet.length)) + message.ruleSet = []; + message.ruleSet.push($root.google.privacy.dlp.v2.InspectionRuleSet.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an InspectConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.InspectConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.InspectConfig} InspectConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InspectConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InspectConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.InspectConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InspectConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.infoTypes != null && message.hasOwnProperty("infoTypes")) { + if (!Array.isArray(message.infoTypes)) + return "infoTypes: array expected"; + for (var i = 0; i < message.infoTypes.length; ++i) { + var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infoTypes[i], long + 1); + if (error) + return "infoTypes." + error; + } + } + if (message.minLikelihood != null && message.hasOwnProperty("minLikelihood")) + switch (message.minLikelihood) { + default: + return "minLikelihood: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.minLikelihoodPerInfoType != null && message.hasOwnProperty("minLikelihoodPerInfoType")) { + if (!Array.isArray(message.minLikelihoodPerInfoType)) + return "minLikelihoodPerInfoType: array expected"; + for (var i = 0; i < message.minLikelihoodPerInfoType.length; ++i) { + var error = $root.google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood.verify(message.minLikelihoodPerInfoType[i], long + 1); + if (error) + return "minLikelihoodPerInfoType." + error; + } + } + if (message.limits != null && message.hasOwnProperty("limits")) { + var error = $root.google.privacy.dlp.v2.InspectConfig.FindingLimits.verify(message.limits, long + 1); + if (error) + return "limits." + error; + } + if (message.includeQuote != null && message.hasOwnProperty("includeQuote")) + if (typeof message.includeQuote !== "boolean") + return "includeQuote: boolean expected"; + if (message.excludeInfoTypes != null && message.hasOwnProperty("excludeInfoTypes")) + if (typeof message.excludeInfoTypes !== "boolean") + return "excludeInfoTypes: boolean expected"; + if (message.customInfoTypes != null && message.hasOwnProperty("customInfoTypes")) { + if (!Array.isArray(message.customInfoTypes)) + return "customInfoTypes: array expected"; + for (var i = 0; i < message.customInfoTypes.length; ++i) { + var error = $root.google.privacy.dlp.v2.CustomInfoType.verify(message.customInfoTypes[i], long + 1); + if (error) + return "customInfoTypes." + error; + } + } + if (message.contentOptions != null && message.hasOwnProperty("contentOptions")) { + if (!Array.isArray(message.contentOptions)) + return "contentOptions: array expected"; + for (var i = 0; i < message.contentOptions.length; ++i) + switch (message.contentOptions[i]) { + default: + return "contentOptions: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.ruleSet != null && message.hasOwnProperty("ruleSet")) { + if (!Array.isArray(message.ruleSet)) + return "ruleSet: array expected"; + for (var i = 0; i < message.ruleSet.length; ++i) { + var error = $root.google.privacy.dlp.v2.InspectionRuleSet.verify(message.ruleSet[i], long + 1); + if (error) + return "ruleSet." + error; + } + } + return null; + }; + + /** + * Creates an InspectConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.InspectConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.InspectConfig} InspectConfig + */ + InspectConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.InspectConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.InspectConfig(); + if (object.infoTypes) { + if (!Array.isArray(object.infoTypes)) + throw TypeError(".google.privacy.dlp.v2.InspectConfig.infoTypes: array expected"); + message.infoTypes = []; + for (var i = 0; i < object.infoTypes.length; ++i) { + if (typeof object.infoTypes[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectConfig.infoTypes: object expected"); + message.infoTypes[i] = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoTypes[i], long + 1); + } + } + switch (object.minLikelihood) { + default: + if (typeof object.minLikelihood === "number") { + message.minLikelihood = object.minLikelihood; + break; + } + break; + case "LIKELIHOOD_UNSPECIFIED": + case 0: + message.minLikelihood = 0; + break; + case "VERY_UNLIKELY": + case 1: + message.minLikelihood = 1; + break; + case "UNLIKELY": + case 2: + message.minLikelihood = 2; + break; + case "POSSIBLE": + case 3: + message.minLikelihood = 3; + break; + case "LIKELY": + case 4: + message.minLikelihood = 4; + break; + case "VERY_LIKELY": + case 5: + message.minLikelihood = 5; + break; + } + if (object.minLikelihoodPerInfoType) { + if (!Array.isArray(object.minLikelihoodPerInfoType)) + throw TypeError(".google.privacy.dlp.v2.InspectConfig.minLikelihoodPerInfoType: array expected"); + message.minLikelihoodPerInfoType = []; + for (var i = 0; i < object.minLikelihoodPerInfoType.length; ++i) { + if (typeof object.minLikelihoodPerInfoType[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectConfig.minLikelihoodPerInfoType: object expected"); + message.minLikelihoodPerInfoType[i] = $root.google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood.fromObject(object.minLikelihoodPerInfoType[i], long + 1); + } + } + if (object.limits != null) { + if (typeof object.limits !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectConfig.limits: object expected"); + message.limits = $root.google.privacy.dlp.v2.InspectConfig.FindingLimits.fromObject(object.limits, long + 1); + } + if (object.includeQuote != null) + message.includeQuote = Boolean(object.includeQuote); + if (object.excludeInfoTypes != null) + message.excludeInfoTypes = Boolean(object.excludeInfoTypes); + if (object.customInfoTypes) { + if (!Array.isArray(object.customInfoTypes)) + throw TypeError(".google.privacy.dlp.v2.InspectConfig.customInfoTypes: array expected"); + message.customInfoTypes = []; + for (var i = 0; i < object.customInfoTypes.length; ++i) { + if (typeof object.customInfoTypes[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectConfig.customInfoTypes: object expected"); + message.customInfoTypes[i] = $root.google.privacy.dlp.v2.CustomInfoType.fromObject(object.customInfoTypes[i], long + 1); + } + } + if (object.contentOptions) { + if (!Array.isArray(object.contentOptions)) + throw TypeError(".google.privacy.dlp.v2.InspectConfig.contentOptions: array expected"); + message.contentOptions = []; + for (var i = 0; i < object.contentOptions.length; ++i) + switch (object.contentOptions[i]) { + default: + if (typeof object.contentOptions[i] === "number") { + message.contentOptions[i] = object.contentOptions[i]; + break; + } + case "CONTENT_UNSPECIFIED": + case 0: + message.contentOptions[i] = 0; + break; + case "CONTENT_TEXT": + case 1: + message.contentOptions[i] = 1; + break; + case "CONTENT_IMAGE": + case 2: + message.contentOptions[i] = 2; + break; + } + } + if (object.ruleSet) { + if (!Array.isArray(object.ruleSet)) + throw TypeError(".google.privacy.dlp.v2.InspectConfig.ruleSet: array expected"); + message.ruleSet = []; + for (var i = 0; i < object.ruleSet.length; ++i) { + if (typeof object.ruleSet[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectConfig.ruleSet: object expected"); + message.ruleSet[i] = $root.google.privacy.dlp.v2.InspectionRuleSet.fromObject(object.ruleSet[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from an InspectConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.InspectConfig + * @static + * @param {google.privacy.dlp.v2.InspectConfig} message InspectConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InspectConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.infoTypes = []; + object.customInfoTypes = []; + object.contentOptions = []; + object.ruleSet = []; + object.minLikelihoodPerInfoType = []; + } + if (options.defaults) { + object.minLikelihood = options.enums === String ? "LIKELIHOOD_UNSPECIFIED" : 0; + object.limits = null; + object.includeQuote = false; + object.excludeInfoTypes = false; + } + if (message.infoTypes && message.infoTypes.length) { + object.infoTypes = []; + for (var j = 0; j < message.infoTypes.length; ++j) + object.infoTypes[j] = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoTypes[j], options); + } + if (message.minLikelihood != null && message.hasOwnProperty("minLikelihood")) + object.minLikelihood = options.enums === String ? $root.google.privacy.dlp.v2.Likelihood[message.minLikelihood] === undefined ? message.minLikelihood : $root.google.privacy.dlp.v2.Likelihood[message.minLikelihood] : message.minLikelihood; + if (message.limits != null && message.hasOwnProperty("limits")) + object.limits = $root.google.privacy.dlp.v2.InspectConfig.FindingLimits.toObject(message.limits, options); + if (message.includeQuote != null && message.hasOwnProperty("includeQuote")) + object.includeQuote = message.includeQuote; + if (message.excludeInfoTypes != null && message.hasOwnProperty("excludeInfoTypes")) + object.excludeInfoTypes = message.excludeInfoTypes; + if (message.customInfoTypes && message.customInfoTypes.length) { + object.customInfoTypes = []; + for (var j = 0; j < message.customInfoTypes.length; ++j) + object.customInfoTypes[j] = $root.google.privacy.dlp.v2.CustomInfoType.toObject(message.customInfoTypes[j], options); + } + if (message.contentOptions && message.contentOptions.length) { + object.contentOptions = []; + for (var j = 0; j < message.contentOptions.length; ++j) + object.contentOptions[j] = options.enums === String ? $root.google.privacy.dlp.v2.ContentOption[message.contentOptions[j]] === undefined ? message.contentOptions[j] : $root.google.privacy.dlp.v2.ContentOption[message.contentOptions[j]] : message.contentOptions[j]; + } + if (message.ruleSet && message.ruleSet.length) { + object.ruleSet = []; + for (var j = 0; j < message.ruleSet.length; ++j) + object.ruleSet[j] = $root.google.privacy.dlp.v2.InspectionRuleSet.toObject(message.ruleSet[j], options); + } + if (message.minLikelihoodPerInfoType && message.minLikelihoodPerInfoType.length) { + object.minLikelihoodPerInfoType = []; + for (var j = 0; j < message.minLikelihoodPerInfoType.length; ++j) + object.minLikelihoodPerInfoType[j] = $root.google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood.toObject(message.minLikelihoodPerInfoType[j], options); + } + return object; + }; + + /** + * Converts this InspectConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.InspectConfig + * @instance + * @returns {Object.} JSON object + */ + InspectConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InspectConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.InspectConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InspectConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.InspectConfig"; + }; + + InspectConfig.InfoTypeLikelihood = (function() { + + /** + * Properties of an InfoTypeLikelihood. + * @memberof google.privacy.dlp.v2.InspectConfig + * @interface IInfoTypeLikelihood + * @property {google.privacy.dlp.v2.IInfoType|null} [infoType] InfoTypeLikelihood infoType + * @property {google.privacy.dlp.v2.Likelihood|null} [minLikelihood] InfoTypeLikelihood minLikelihood + */ + + /** + * Constructs a new InfoTypeLikelihood. + * @memberof google.privacy.dlp.v2.InspectConfig + * @classdesc Represents an InfoTypeLikelihood. + * @implements IInfoTypeLikelihood + * @constructor + * @param {google.privacy.dlp.v2.InspectConfig.IInfoTypeLikelihood=} [properties] Properties to set + */ + function InfoTypeLikelihood(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * InfoTypeLikelihood infoType. + * @member {google.privacy.dlp.v2.IInfoType|null|undefined} infoType + * @memberof google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood + * @instance + */ + InfoTypeLikelihood.prototype.infoType = null; + + /** + * InfoTypeLikelihood minLikelihood. + * @member {google.privacy.dlp.v2.Likelihood} minLikelihood + * @memberof google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood + * @instance + */ + InfoTypeLikelihood.prototype.minLikelihood = 0; + + /** + * Creates a new InfoTypeLikelihood instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood + * @static + * @param {google.privacy.dlp.v2.InspectConfig.IInfoTypeLikelihood=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood} InfoTypeLikelihood instance + */ + InfoTypeLikelihood.create = function create(properties) { + return new InfoTypeLikelihood(properties); + }; + + /** + * Encodes the specified InfoTypeLikelihood message. Does not implicitly {@link google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood + * @static + * @param {google.privacy.dlp.v2.InspectConfig.IInfoTypeLikelihood} message InfoTypeLikelihood message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfoTypeLikelihood.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.infoType != null && Object.hasOwnProperty.call(message, "infoType")) + $root.google.privacy.dlp.v2.InfoType.encode(message.infoType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minLikelihood != null && Object.hasOwnProperty.call(message, "minLikelihood")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minLikelihood); + return writer; + }; + + /** + * Encodes the specified InfoTypeLikelihood message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood + * @static + * @param {google.privacy.dlp.v2.InspectConfig.IInfoTypeLikelihood} message InfoTypeLikelihood message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfoTypeLikelihood.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InfoTypeLikelihood message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood} InfoTypeLikelihood + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfoTypeLikelihood.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.infoType = $root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.minLikelihood = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an InfoTypeLikelihood message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood} InfoTypeLikelihood + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfoTypeLikelihood.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InfoTypeLikelihood message. + * @function verify + * @memberof google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InfoTypeLikelihood.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.infoType != null && message.hasOwnProperty("infoType")) { + var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infoType, long + 1); + if (error) + return "infoType." + error; + } + if (message.minLikelihood != null && message.hasOwnProperty("minLikelihood")) + switch (message.minLikelihood) { + default: + return "minLikelihood: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + return null; + }; + + /** + * Creates an InfoTypeLikelihood message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood} InfoTypeLikelihood + */ + InfoTypeLikelihood.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood(); + if (object.infoType != null) { + if (typeof object.infoType !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood.infoType: object expected"); + message.infoType = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoType, long + 1); + } + switch (object.minLikelihood) { + default: + if (typeof object.minLikelihood === "number") { + message.minLikelihood = object.minLikelihood; + break; + } + break; + case "LIKELIHOOD_UNSPECIFIED": + case 0: + message.minLikelihood = 0; + break; + case "VERY_UNLIKELY": + case 1: + message.minLikelihood = 1; + break; + case "UNLIKELY": + case 2: + message.minLikelihood = 2; + break; + case "POSSIBLE": + case 3: + message.minLikelihood = 3; + break; + case "LIKELY": + case 4: + message.minLikelihood = 4; + break; + case "VERY_LIKELY": + case 5: + message.minLikelihood = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from an InfoTypeLikelihood message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood + * @static + * @param {google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood} message InfoTypeLikelihood + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InfoTypeLikelihood.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.infoType = null; + object.minLikelihood = options.enums === String ? "LIKELIHOOD_UNSPECIFIED" : 0; + } + if (message.infoType != null && message.hasOwnProperty("infoType")) + object.infoType = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoType, options); + if (message.minLikelihood != null && message.hasOwnProperty("minLikelihood")) + object.minLikelihood = options.enums === String ? $root.google.privacy.dlp.v2.Likelihood[message.minLikelihood] === undefined ? message.minLikelihood : $root.google.privacy.dlp.v2.Likelihood[message.minLikelihood] : message.minLikelihood; + return object; + }; + + /** + * Converts this InfoTypeLikelihood to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood + * @instance + * @returns {Object.} JSON object + */ + InfoTypeLikelihood.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InfoTypeLikelihood + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InfoTypeLikelihood.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.InspectConfig.InfoTypeLikelihood"; + }; + + return InfoTypeLikelihood; + })(); + + InspectConfig.FindingLimits = (function() { + + /** + * Properties of a FindingLimits. + * @memberof google.privacy.dlp.v2.InspectConfig + * @interface IFindingLimits + * @property {number|null} [maxFindingsPerItem] FindingLimits maxFindingsPerItem + * @property {number|null} [maxFindingsPerRequest] FindingLimits maxFindingsPerRequest + * @property {Array.|null} [maxFindingsPerInfoType] FindingLimits maxFindingsPerInfoType + */ + + /** + * Constructs a new FindingLimits. + * @memberof google.privacy.dlp.v2.InspectConfig + * @classdesc Represents a FindingLimits. + * @implements IFindingLimits + * @constructor + * @param {google.privacy.dlp.v2.InspectConfig.IFindingLimits=} [properties] Properties to set + */ + function FindingLimits(properties) { + this.maxFindingsPerInfoType = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FindingLimits maxFindingsPerItem. + * @member {number} maxFindingsPerItem + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits + * @instance + */ + FindingLimits.prototype.maxFindingsPerItem = 0; + + /** + * FindingLimits maxFindingsPerRequest. + * @member {number} maxFindingsPerRequest + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits + * @instance + */ + FindingLimits.prototype.maxFindingsPerRequest = 0; + + /** + * FindingLimits maxFindingsPerInfoType. + * @member {Array.} maxFindingsPerInfoType + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits + * @instance + */ + FindingLimits.prototype.maxFindingsPerInfoType = $util.emptyArray; + + /** + * Creates a new FindingLimits instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits + * @static + * @param {google.privacy.dlp.v2.InspectConfig.IFindingLimits=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.InspectConfig.FindingLimits} FindingLimits instance + */ + FindingLimits.create = function create(properties) { + return new FindingLimits(properties); + }; + + /** + * Encodes the specified FindingLimits message. Does not implicitly {@link google.privacy.dlp.v2.InspectConfig.FindingLimits.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits + * @static + * @param {google.privacy.dlp.v2.InspectConfig.IFindingLimits} message FindingLimits message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FindingLimits.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maxFindingsPerItem != null && Object.hasOwnProperty.call(message, "maxFindingsPerItem")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.maxFindingsPerItem); + if (message.maxFindingsPerRequest != null && Object.hasOwnProperty.call(message, "maxFindingsPerRequest")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxFindingsPerRequest); + if (message.maxFindingsPerInfoType != null && message.maxFindingsPerInfoType.length) + for (var i = 0; i < message.maxFindingsPerInfoType.length; ++i) + $root.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.encode(message.maxFindingsPerInfoType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FindingLimits message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectConfig.FindingLimits.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits + * @static + * @param {google.privacy.dlp.v2.InspectConfig.IFindingLimits} message FindingLimits message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FindingLimits.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FindingLimits message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.InspectConfig.FindingLimits} FindingLimits + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FindingLimits.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.InspectConfig.FindingLimits(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.maxFindingsPerItem = reader.int32(); + break; + } + case 2: { + message.maxFindingsPerRequest = reader.int32(); + break; + } + case 3: { + if (!(message.maxFindingsPerInfoType && message.maxFindingsPerInfoType.length)) + message.maxFindingsPerInfoType = []; + message.maxFindingsPerInfoType.push($root.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FindingLimits message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.InspectConfig.FindingLimits} FindingLimits + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FindingLimits.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FindingLimits message. + * @function verify + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FindingLimits.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.maxFindingsPerItem != null && message.hasOwnProperty("maxFindingsPerItem")) + if (!$util.isInteger(message.maxFindingsPerItem)) + return "maxFindingsPerItem: integer expected"; + if (message.maxFindingsPerRequest != null && message.hasOwnProperty("maxFindingsPerRequest")) + if (!$util.isInteger(message.maxFindingsPerRequest)) + return "maxFindingsPerRequest: integer expected"; + if (message.maxFindingsPerInfoType != null && message.hasOwnProperty("maxFindingsPerInfoType")) { + if (!Array.isArray(message.maxFindingsPerInfoType)) + return "maxFindingsPerInfoType: array expected"; + for (var i = 0; i < message.maxFindingsPerInfoType.length; ++i) { + var error = $root.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.verify(message.maxFindingsPerInfoType[i], long + 1); + if (error) + return "maxFindingsPerInfoType." + error; + } + } + return null; + }; + + /** + * Creates a FindingLimits message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.InspectConfig.FindingLimits} FindingLimits + */ + FindingLimits.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.InspectConfig.FindingLimits) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.InspectConfig.FindingLimits(); + if (object.maxFindingsPerItem != null) + message.maxFindingsPerItem = object.maxFindingsPerItem | 0; + if (object.maxFindingsPerRequest != null) + message.maxFindingsPerRequest = object.maxFindingsPerRequest | 0; + if (object.maxFindingsPerInfoType) { + if (!Array.isArray(object.maxFindingsPerInfoType)) + throw TypeError(".google.privacy.dlp.v2.InspectConfig.FindingLimits.maxFindingsPerInfoType: array expected"); + message.maxFindingsPerInfoType = []; + for (var i = 0; i < object.maxFindingsPerInfoType.length; ++i) { + if (typeof object.maxFindingsPerInfoType[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectConfig.FindingLimits.maxFindingsPerInfoType: object expected"); + message.maxFindingsPerInfoType[i] = $root.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.fromObject(object.maxFindingsPerInfoType[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a FindingLimits message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits + * @static + * @param {google.privacy.dlp.v2.InspectConfig.FindingLimits} message FindingLimits + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FindingLimits.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.maxFindingsPerInfoType = []; + if (options.defaults) { + object.maxFindingsPerItem = 0; + object.maxFindingsPerRequest = 0; + } + if (message.maxFindingsPerItem != null && message.hasOwnProperty("maxFindingsPerItem")) + object.maxFindingsPerItem = message.maxFindingsPerItem; + if (message.maxFindingsPerRequest != null && message.hasOwnProperty("maxFindingsPerRequest")) + object.maxFindingsPerRequest = message.maxFindingsPerRequest; + if (message.maxFindingsPerInfoType && message.maxFindingsPerInfoType.length) { + object.maxFindingsPerInfoType = []; + for (var j = 0; j < message.maxFindingsPerInfoType.length; ++j) + object.maxFindingsPerInfoType[j] = $root.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.toObject(message.maxFindingsPerInfoType[j], options); + } + return object; + }; + + /** + * Converts this FindingLimits to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits + * @instance + * @returns {Object.} JSON object + */ + FindingLimits.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FindingLimits + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FindingLimits.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.InspectConfig.FindingLimits"; + }; + + FindingLimits.InfoTypeLimit = (function() { + + /** + * Properties of an InfoTypeLimit. + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits + * @interface IInfoTypeLimit + * @property {google.privacy.dlp.v2.IInfoType|null} [infoType] InfoTypeLimit infoType + * @property {number|null} [maxFindings] InfoTypeLimit maxFindings + */ + + /** + * Constructs a new InfoTypeLimit. + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits + * @classdesc Represents an InfoTypeLimit. + * @implements IInfoTypeLimit + * @constructor + * @param {google.privacy.dlp.v2.InspectConfig.FindingLimits.IInfoTypeLimit=} [properties] Properties to set + */ + function InfoTypeLimit(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * InfoTypeLimit infoType. + * @member {google.privacy.dlp.v2.IInfoType|null|undefined} infoType + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit + * @instance + */ + InfoTypeLimit.prototype.infoType = null; + + /** + * InfoTypeLimit maxFindings. + * @member {number} maxFindings + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit + * @instance + */ + InfoTypeLimit.prototype.maxFindings = 0; + + /** + * Creates a new InfoTypeLimit instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit + * @static + * @param {google.privacy.dlp.v2.InspectConfig.FindingLimits.IInfoTypeLimit=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit} InfoTypeLimit instance + */ + InfoTypeLimit.create = function create(properties) { + return new InfoTypeLimit(properties); + }; + + /** + * Encodes the specified InfoTypeLimit message. Does not implicitly {@link google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit + * @static + * @param {google.privacy.dlp.v2.InspectConfig.FindingLimits.IInfoTypeLimit} message InfoTypeLimit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfoTypeLimit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.infoType != null && Object.hasOwnProperty.call(message, "infoType")) + $root.google.privacy.dlp.v2.InfoType.encode(message.infoType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.maxFindings != null && Object.hasOwnProperty.call(message, "maxFindings")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxFindings); + return writer; + }; + + /** + * Encodes the specified InfoTypeLimit message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit + * @static + * @param {google.privacy.dlp.v2.InspectConfig.FindingLimits.IInfoTypeLimit} message InfoTypeLimit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfoTypeLimit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InfoTypeLimit message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit} InfoTypeLimit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfoTypeLimit.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.infoType = $root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.maxFindings = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an InfoTypeLimit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit} InfoTypeLimit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfoTypeLimit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InfoTypeLimit message. + * @function verify + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InfoTypeLimit.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.infoType != null && message.hasOwnProperty("infoType")) { + var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infoType, long + 1); + if (error) + return "infoType." + error; + } + if (message.maxFindings != null && message.hasOwnProperty("maxFindings")) + if (!$util.isInteger(message.maxFindings)) + return "maxFindings: integer expected"; + return null; + }; + + /** + * Creates an InfoTypeLimit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit} InfoTypeLimit + */ + InfoTypeLimit.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit(); + if (object.infoType != null) { + if (typeof object.infoType !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit.infoType: object expected"); + message.infoType = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoType, long + 1); + } + if (object.maxFindings != null) + message.maxFindings = object.maxFindings | 0; + return message; + }; + + /** + * Creates a plain object from an InfoTypeLimit message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit + * @static + * @param {google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit} message InfoTypeLimit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InfoTypeLimit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.infoType = null; + object.maxFindings = 0; + } + if (message.infoType != null && message.hasOwnProperty("infoType")) + object.infoType = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoType, options); + if (message.maxFindings != null && message.hasOwnProperty("maxFindings")) + object.maxFindings = message.maxFindings; + return object; + }; + + /** + * Converts this InfoTypeLimit to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit + * @instance + * @returns {Object.} JSON object + */ + InfoTypeLimit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InfoTypeLimit + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InfoTypeLimit.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.InspectConfig.FindingLimits.InfoTypeLimit"; + }; + + return InfoTypeLimit; + })(); + + return FindingLimits; + })(); + + return InspectConfig; + })(); + + v2.ByteContentItem = (function() { + + /** + * Properties of a ByteContentItem. + * @memberof google.privacy.dlp.v2 + * @interface IByteContentItem + * @property {google.privacy.dlp.v2.ByteContentItem.BytesType|null} [type] ByteContentItem type + * @property {Uint8Array|null} [data] ByteContentItem data + */ + + /** + * Constructs a new ByteContentItem. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ByteContentItem. + * @implements IByteContentItem + * @constructor + * @param {google.privacy.dlp.v2.IByteContentItem=} [properties] Properties to set + */ + function ByteContentItem(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ByteContentItem type. + * @member {google.privacy.dlp.v2.ByteContentItem.BytesType} type + * @memberof google.privacy.dlp.v2.ByteContentItem + * @instance + */ + ByteContentItem.prototype.type = 0; + + /** + * ByteContentItem data. + * @member {Uint8Array} data + * @memberof google.privacy.dlp.v2.ByteContentItem + * @instance + */ + ByteContentItem.prototype.data = $util.newBuffer([]); + + /** + * Creates a new ByteContentItem instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ByteContentItem + * @static + * @param {google.privacy.dlp.v2.IByteContentItem=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ByteContentItem} ByteContentItem instance + */ + ByteContentItem.create = function create(properties) { + return new ByteContentItem(properties); + }; + + /** + * Encodes the specified ByteContentItem message. Does not implicitly {@link google.privacy.dlp.v2.ByteContentItem.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ByteContentItem + * @static + * @param {google.privacy.dlp.v2.IByteContentItem} message ByteContentItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ByteContentItem.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.data != null && Object.hasOwnProperty.call(message, "data")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.data); + return writer; + }; + + /** + * Encodes the specified ByteContentItem message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ByteContentItem.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ByteContentItem + * @static + * @param {google.privacy.dlp.v2.IByteContentItem} message ByteContentItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ByteContentItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ByteContentItem message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ByteContentItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ByteContentItem} ByteContentItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ByteContentItem.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ByteContentItem(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.data = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ByteContentItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ByteContentItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ByteContentItem} ByteContentItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ByteContentItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ByteContentItem message. + * @function verify + * @memberof google.privacy.dlp.v2.ByteContentItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ByteContentItem.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 6: + case 1: + case 2: + case 3: + case 4: + case 5: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.data != null && message.hasOwnProperty("data")) + if (!(message.data && typeof message.data.length === "number" || $util.isString(message.data))) + return "data: buffer expected"; + return null; + }; + + /** + * Creates a ByteContentItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ByteContentItem + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ByteContentItem} ByteContentItem + */ + ByteContentItem.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ByteContentItem) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ByteContentItem(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "BYTES_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "IMAGE": + case 6: + message.type = 6; + break; + case "IMAGE_JPEG": + case 1: + message.type = 1; + break; + case "IMAGE_BMP": + case 2: + message.type = 2; + break; + case "IMAGE_PNG": + case 3: + message.type = 3; + break; + case "IMAGE_SVG": + case 4: + message.type = 4; + break; + case "TEXT_UTF8": + case 5: + message.type = 5; + break; + case "WORD_DOCUMENT": + case 7: + message.type = 7; + break; + case "PDF": + case 8: + message.type = 8; + break; + case "POWERPOINT_DOCUMENT": + case 9: + message.type = 9; + break; + case "EXCEL_DOCUMENT": + case 10: + message.type = 10; + break; + case "AVRO": + case 11: + message.type = 11; + break; + case "CSV": + case 12: + message.type = 12; + break; + case "TSV": + case 13: + message.type = 13; + break; + case "AUDIO": + case 15: + message.type = 15; + break; + case "VIDEO": + case 16: + message.type = 16; + break; + case "EXECUTABLE": + case 17: + message.type = 17; + break; + case "AI_MODEL": + case 18: + message.type = 18; + break; + } + if (object.data != null) + if (typeof object.data === "string") + $util.base64.decode(object.data, message.data = $util.newBuffer($util.base64.length(object.data)), 0); + else if (object.data.length >= 0) + message.data = object.data; + return message; + }; + + /** + * Creates a plain object from a ByteContentItem message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ByteContentItem + * @static + * @param {google.privacy.dlp.v2.ByteContentItem} message ByteContentItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ByteContentItem.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "BYTES_TYPE_UNSPECIFIED" : 0; + if (options.bytes === String) + object.data = ""; + else { + object.data = []; + if (options.bytes !== Array) + object.data = $util.newBuffer(object.data); + } + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.privacy.dlp.v2.ByteContentItem.BytesType[message.type] === undefined ? message.type : $root.google.privacy.dlp.v2.ByteContentItem.BytesType[message.type] : message.type; + if (message.data != null && message.hasOwnProperty("data")) + object.data = options.bytes === String ? $util.base64.encode(message.data, 0, message.data.length) : options.bytes === Array ? Array.prototype.slice.call(message.data) : message.data; + return object; + }; + + /** + * Converts this ByteContentItem to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ByteContentItem + * @instance + * @returns {Object.} JSON object + */ + ByteContentItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ByteContentItem + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ByteContentItem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ByteContentItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ByteContentItem"; + }; + + /** + * BytesType enum. + * @name google.privacy.dlp.v2.ByteContentItem.BytesType + * @enum {number} + * @property {number} BYTES_TYPE_UNSPECIFIED=0 BYTES_TYPE_UNSPECIFIED value + * @property {number} IMAGE=6 IMAGE value + * @property {number} IMAGE_JPEG=1 IMAGE_JPEG value + * @property {number} IMAGE_BMP=2 IMAGE_BMP value + * @property {number} IMAGE_PNG=3 IMAGE_PNG value + * @property {number} IMAGE_SVG=4 IMAGE_SVG value + * @property {number} TEXT_UTF8=5 TEXT_UTF8 value + * @property {number} WORD_DOCUMENT=7 WORD_DOCUMENT value + * @property {number} PDF=8 PDF value + * @property {number} POWERPOINT_DOCUMENT=9 POWERPOINT_DOCUMENT value + * @property {number} EXCEL_DOCUMENT=10 EXCEL_DOCUMENT value + * @property {number} AVRO=11 AVRO value + * @property {number} CSV=12 CSV value + * @property {number} TSV=13 TSV value + * @property {number} AUDIO=15 AUDIO value + * @property {number} VIDEO=16 VIDEO value + * @property {number} EXECUTABLE=17 EXECUTABLE value + * @property {number} AI_MODEL=18 AI_MODEL value + */ + ByteContentItem.BytesType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BYTES_TYPE_UNSPECIFIED"] = 0; + values[valuesById[6] = "IMAGE"] = 6; + values[valuesById[1] = "IMAGE_JPEG"] = 1; + values[valuesById[2] = "IMAGE_BMP"] = 2; + values[valuesById[3] = "IMAGE_PNG"] = 3; + values[valuesById[4] = "IMAGE_SVG"] = 4; + values[valuesById[5] = "TEXT_UTF8"] = 5; + values[valuesById[7] = "WORD_DOCUMENT"] = 7; + values[valuesById[8] = "PDF"] = 8; + values[valuesById[9] = "POWERPOINT_DOCUMENT"] = 9; + values[valuesById[10] = "EXCEL_DOCUMENT"] = 10; + values[valuesById[11] = "AVRO"] = 11; + values[valuesById[12] = "CSV"] = 12; + values[valuesById[13] = "TSV"] = 13; + values[valuesById[15] = "AUDIO"] = 15; + values[valuesById[16] = "VIDEO"] = 16; + values[valuesById[17] = "EXECUTABLE"] = 17; + values[valuesById[18] = "AI_MODEL"] = 18; + return values; + })(); + + return ByteContentItem; + })(); + + v2.ContentItem = (function() { + + /** + * Properties of a ContentItem. + * @memberof google.privacy.dlp.v2 + * @interface IContentItem + * @property {string|null} [value] ContentItem value + * @property {google.privacy.dlp.v2.ITable|null} [table] ContentItem table + * @property {google.privacy.dlp.v2.IByteContentItem|null} [byteItem] ContentItem byteItem + * @property {google.privacy.dlp.v2.IConversation|null} [conversation] ContentItem conversation + * @property {google.privacy.dlp.v2.IBatchContentItem|null} [batchContentItem] ContentItem batchContentItem + * @property {google.privacy.dlp.v2.IContentMetadata|null} [contentMetadata] ContentItem contentMetadata + */ + + /** + * Constructs a new ContentItem. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ContentItem. + * @implements IContentItem + * @constructor + * @param {google.privacy.dlp.v2.IContentItem=} [properties] Properties to set + */ + function ContentItem(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ContentItem value. + * @member {string|null|undefined} value + * @memberof google.privacy.dlp.v2.ContentItem + * @instance + */ + ContentItem.prototype.value = null; + + /** + * ContentItem table. + * @member {google.privacy.dlp.v2.ITable|null|undefined} table + * @memberof google.privacy.dlp.v2.ContentItem + * @instance + */ + ContentItem.prototype.table = null; + + /** + * ContentItem byteItem. + * @member {google.privacy.dlp.v2.IByteContentItem|null|undefined} byteItem + * @memberof google.privacy.dlp.v2.ContentItem + * @instance + */ + ContentItem.prototype.byteItem = null; + + /** + * ContentItem conversation. + * @member {google.privacy.dlp.v2.IConversation|null|undefined} conversation + * @memberof google.privacy.dlp.v2.ContentItem + * @instance + */ + ContentItem.prototype.conversation = null; + + /** + * ContentItem batchContentItem. + * @member {google.privacy.dlp.v2.IBatchContentItem|null|undefined} batchContentItem + * @memberof google.privacy.dlp.v2.ContentItem + * @instance + */ + ContentItem.prototype.batchContentItem = null; + + /** + * ContentItem contentMetadata. + * @member {google.privacy.dlp.v2.IContentMetadata|null|undefined} contentMetadata + * @memberof google.privacy.dlp.v2.ContentItem + * @instance + */ + ContentItem.prototype.contentMetadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ContentItem dataItem. + * @member {"value"|"table"|"byteItem"|"conversation"|"batchContentItem"|undefined} dataItem + * @memberof google.privacy.dlp.v2.ContentItem + * @instance + */ + Object.defineProperty(ContentItem.prototype, "dataItem", { + get: $util.oneOfGetter($oneOfFields = ["value", "table", "byteItem", "conversation", "batchContentItem"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ContentItem instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ContentItem + * @static + * @param {google.privacy.dlp.v2.IContentItem=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ContentItem} ContentItem instance + */ + ContentItem.create = function create(properties) { + return new ContentItem(properties); + }; + + /** + * Encodes the specified ContentItem message. Does not implicitly {@link google.privacy.dlp.v2.ContentItem.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ContentItem + * @static + * @param {google.privacy.dlp.v2.IContentItem} message ContentItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContentItem.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.value); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + $root.google.privacy.dlp.v2.Table.encode(message.table, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.byteItem != null && Object.hasOwnProperty.call(message, "byteItem")) + $root.google.privacy.dlp.v2.ByteContentItem.encode(message.byteItem, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.contentMetadata != null && Object.hasOwnProperty.call(message, "contentMetadata")) + $root.google.privacy.dlp.v2.ContentMetadata.encode(message.contentMetadata, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.conversation != null && Object.hasOwnProperty.call(message, "conversation")) + $root.google.privacy.dlp.v2.Conversation.encode(message.conversation, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.batchContentItem != null && Object.hasOwnProperty.call(message, "batchContentItem")) + $root.google.privacy.dlp.v2.BatchContentItem.encode(message.batchContentItem, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ContentItem message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ContentItem.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ContentItem + * @static + * @param {google.privacy.dlp.v2.IContentItem} message ContentItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContentItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContentItem message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ContentItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ContentItem} ContentItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContentItem.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ContentItem(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.value = reader.string(); + break; + } + case 4: { + message.table = $root.google.privacy.dlp.v2.Table.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.byteItem = $root.google.privacy.dlp.v2.ByteContentItem.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 7: { + message.conversation = $root.google.privacy.dlp.v2.Conversation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 8: { + message.batchContentItem = $root.google.privacy.dlp.v2.BatchContentItem.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.contentMetadata = $root.google.privacy.dlp.v2.ContentMetadata.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ContentItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ContentItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ContentItem} ContentItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContentItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContentItem message. + * @function verify + * @memberof google.privacy.dlp.v2.ContentItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContentItem.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.value != null && message.hasOwnProperty("value")) { + properties.dataItem = 1; + if (!$util.isString(message.value)) + return "value: string expected"; + } + if (message.table != null && message.hasOwnProperty("table")) { + if (properties.dataItem === 1) + return "dataItem: multiple values"; + properties.dataItem = 1; + { + var error = $root.google.privacy.dlp.v2.Table.verify(message.table, long + 1); + if (error) + return "table." + error; + } + } + if (message.byteItem != null && message.hasOwnProperty("byteItem")) { + if (properties.dataItem === 1) + return "dataItem: multiple values"; + properties.dataItem = 1; + { + var error = $root.google.privacy.dlp.v2.ByteContentItem.verify(message.byteItem, long + 1); + if (error) + return "byteItem." + error; + } + } + if (message.conversation != null && message.hasOwnProperty("conversation")) { + if (properties.dataItem === 1) + return "dataItem: multiple values"; + properties.dataItem = 1; + { + var error = $root.google.privacy.dlp.v2.Conversation.verify(message.conversation, long + 1); + if (error) + return "conversation." + error; + } + } + if (message.batchContentItem != null && message.hasOwnProperty("batchContentItem")) { + if (properties.dataItem === 1) + return "dataItem: multiple values"; + properties.dataItem = 1; + { + var error = $root.google.privacy.dlp.v2.BatchContentItem.verify(message.batchContentItem, long + 1); + if (error) + return "batchContentItem." + error; + } + } + if (message.contentMetadata != null && message.hasOwnProperty("contentMetadata")) { + var error = $root.google.privacy.dlp.v2.ContentMetadata.verify(message.contentMetadata, long + 1); + if (error) + return "contentMetadata." + error; + } + return null; + }; + + /** + * Creates a ContentItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ContentItem + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ContentItem} ContentItem + */ + ContentItem.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ContentItem) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ContentItem(); + if (object.value != null) + message.value = String(object.value); + if (object.table != null) { + if (typeof object.table !== "object") + throw TypeError(".google.privacy.dlp.v2.ContentItem.table: object expected"); + message.table = $root.google.privacy.dlp.v2.Table.fromObject(object.table, long + 1); + } + if (object.byteItem != null) { + if (typeof object.byteItem !== "object") + throw TypeError(".google.privacy.dlp.v2.ContentItem.byteItem: object expected"); + message.byteItem = $root.google.privacy.dlp.v2.ByteContentItem.fromObject(object.byteItem, long + 1); + } + if (object.conversation != null) { + if (typeof object.conversation !== "object") + throw TypeError(".google.privacy.dlp.v2.ContentItem.conversation: object expected"); + message.conversation = $root.google.privacy.dlp.v2.Conversation.fromObject(object.conversation, long + 1); + } + if (object.batchContentItem != null) { + if (typeof object.batchContentItem !== "object") + throw TypeError(".google.privacy.dlp.v2.ContentItem.batchContentItem: object expected"); + message.batchContentItem = $root.google.privacy.dlp.v2.BatchContentItem.fromObject(object.batchContentItem, long + 1); + } + if (object.contentMetadata != null) { + if (typeof object.contentMetadata !== "object") + throw TypeError(".google.privacy.dlp.v2.ContentItem.contentMetadata: object expected"); + message.contentMetadata = $root.google.privacy.dlp.v2.ContentMetadata.fromObject(object.contentMetadata, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a ContentItem message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ContentItem + * @static + * @param {google.privacy.dlp.v2.ContentItem} message ContentItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContentItem.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.contentMetadata = null; + if (message.value != null && message.hasOwnProperty("value")) { + object.value = message.value; + if (options.oneofs) + object.dataItem = "value"; + } + if (message.table != null && message.hasOwnProperty("table")) { + object.table = $root.google.privacy.dlp.v2.Table.toObject(message.table, options); + if (options.oneofs) + object.dataItem = "table"; + } + if (message.byteItem != null && message.hasOwnProperty("byteItem")) { + object.byteItem = $root.google.privacy.dlp.v2.ByteContentItem.toObject(message.byteItem, options); + if (options.oneofs) + object.dataItem = "byteItem"; + } + if (message.contentMetadata != null && message.hasOwnProperty("contentMetadata")) + object.contentMetadata = $root.google.privacy.dlp.v2.ContentMetadata.toObject(message.contentMetadata, options); + if (message.conversation != null && message.hasOwnProperty("conversation")) { + object.conversation = $root.google.privacy.dlp.v2.Conversation.toObject(message.conversation, options); + if (options.oneofs) + object.dataItem = "conversation"; + } + if (message.batchContentItem != null && message.hasOwnProperty("batchContentItem")) { + object.batchContentItem = $root.google.privacy.dlp.v2.BatchContentItem.toObject(message.batchContentItem, options); + if (options.oneofs) + object.dataItem = "batchContentItem"; + } + return object; + }; + + /** + * Converts this ContentItem to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ContentItem + * @instance + * @returns {Object.} JSON object + */ + ContentItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ContentItem + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ContentItem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContentItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ContentItem"; + }; + + return ContentItem; + })(); + + v2.ContentMetadata = (function() { + + /** + * Properties of a ContentMetadata. + * @memberof google.privacy.dlp.v2 + * @interface IContentMetadata + * @property {Array.|null} [properties] ContentMetadata properties + */ + + /** + * Constructs a new ContentMetadata. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ContentMetadata. + * @implements IContentMetadata + * @constructor + * @param {google.privacy.dlp.v2.IContentMetadata=} [properties] Properties to set + */ + function ContentMetadata(properties) { + this.properties = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ContentMetadata properties. + * @member {Array.} properties + * @memberof google.privacy.dlp.v2.ContentMetadata + * @instance + */ + ContentMetadata.prototype.properties = $util.emptyArray; + + /** + * Creates a new ContentMetadata instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ContentMetadata + * @static + * @param {google.privacy.dlp.v2.IContentMetadata=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ContentMetadata} ContentMetadata instance + */ + ContentMetadata.create = function create(properties) { + return new ContentMetadata(properties); + }; + + /** + * Encodes the specified ContentMetadata message. Does not implicitly {@link google.privacy.dlp.v2.ContentMetadata.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ContentMetadata + * @static + * @param {google.privacy.dlp.v2.IContentMetadata} message ContentMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContentMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.properties != null && message.properties.length) + for (var i = 0; i < message.properties.length; ++i) + $root.google.privacy.dlp.v2.KeyValueMetadataProperty.encode(message.properties[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ContentMetadata message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ContentMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ContentMetadata + * @static + * @param {google.privacy.dlp.v2.IContentMetadata} message ContentMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContentMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContentMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ContentMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ContentMetadata} ContentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContentMetadata.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ContentMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.properties && message.properties.length)) + message.properties = []; + message.properties.push($root.google.privacy.dlp.v2.KeyValueMetadataProperty.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ContentMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ContentMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ContentMetadata} ContentMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContentMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContentMetadata message. + * @function verify + * @memberof google.privacy.dlp.v2.ContentMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContentMetadata.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.properties != null && message.hasOwnProperty("properties")) { + if (!Array.isArray(message.properties)) + return "properties: array expected"; + for (var i = 0; i < message.properties.length; ++i) { + var error = $root.google.privacy.dlp.v2.KeyValueMetadataProperty.verify(message.properties[i], long + 1); + if (error) + return "properties." + error; + } + } + return null; + }; + + /** + * Creates a ContentMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ContentMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ContentMetadata} ContentMetadata + */ + ContentMetadata.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ContentMetadata) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ContentMetadata(); + if (object.properties) { + if (!Array.isArray(object.properties)) + throw TypeError(".google.privacy.dlp.v2.ContentMetadata.properties: array expected"); + message.properties = []; + for (var i = 0; i < object.properties.length; ++i) { + if (typeof object.properties[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.ContentMetadata.properties: object expected"); + message.properties[i] = $root.google.privacy.dlp.v2.KeyValueMetadataProperty.fromObject(object.properties[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a ContentMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ContentMetadata + * @static + * @param {google.privacy.dlp.v2.ContentMetadata} message ContentMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContentMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.properties = []; + if (message.properties && message.properties.length) { + object.properties = []; + for (var j = 0; j < message.properties.length; ++j) + object.properties[j] = $root.google.privacy.dlp.v2.KeyValueMetadataProperty.toObject(message.properties[j], options); + } + return object; + }; + + /** + * Converts this ContentMetadata to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ContentMetadata + * @instance + * @returns {Object.} JSON object + */ + ContentMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ContentMetadata + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ContentMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContentMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ContentMetadata"; + }; + + return ContentMetadata; + })(); + + v2.Conversation = (function() { + + /** + * Properties of a Conversation. + * @memberof google.privacy.dlp.v2 + * @interface IConversation + * @property {Array.|null} [messages] Conversation messages + */ + + /** + * Constructs a new Conversation. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a Conversation. + * @implements IConversation + * @constructor + * @param {google.privacy.dlp.v2.IConversation=} [properties] Properties to set + */ + function Conversation(properties) { + this.messages = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Conversation messages. + * @member {Array.} messages + * @memberof google.privacy.dlp.v2.Conversation + * @instance + */ + Conversation.prototype.messages = $util.emptyArray; + + /** + * Creates a new Conversation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Conversation + * @static + * @param {google.privacy.dlp.v2.IConversation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Conversation} Conversation instance + */ + Conversation.create = function create(properties) { + return new Conversation(properties); + }; + + /** + * Encodes the specified Conversation message. Does not implicitly {@link google.privacy.dlp.v2.Conversation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Conversation + * @static + * @param {google.privacy.dlp.v2.IConversation} message Conversation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Conversation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messages != null && message.messages.length) + for (var i = 0; i < message.messages.length; ++i) + $root.google.privacy.dlp.v2.ConversationMessage.encode(message.messages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Conversation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Conversation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Conversation + * @static + * @param {google.privacy.dlp.v2.IConversation} message Conversation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Conversation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Conversation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Conversation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Conversation} Conversation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Conversation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Conversation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.messages && message.messages.length)) + message.messages = []; + message.messages.push($root.google.privacy.dlp.v2.ConversationMessage.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Conversation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Conversation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Conversation} Conversation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Conversation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Conversation message. + * @function verify + * @memberof google.privacy.dlp.v2.Conversation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Conversation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.messages != null && message.hasOwnProperty("messages")) { + if (!Array.isArray(message.messages)) + return "messages: array expected"; + for (var i = 0; i < message.messages.length; ++i) { + var error = $root.google.privacy.dlp.v2.ConversationMessage.verify(message.messages[i], long + 1); + if (error) + return "messages." + error; + } + } + return null; + }; + + /** + * Creates a Conversation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Conversation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Conversation} Conversation + */ + Conversation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Conversation) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.Conversation(); + if (object.messages) { + if (!Array.isArray(object.messages)) + throw TypeError(".google.privacy.dlp.v2.Conversation.messages: array expected"); + message.messages = []; + for (var i = 0; i < object.messages.length; ++i) { + if (typeof object.messages[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.Conversation.messages: object expected"); + message.messages[i] = $root.google.privacy.dlp.v2.ConversationMessage.fromObject(object.messages[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a Conversation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Conversation + * @static + * @param {google.privacy.dlp.v2.Conversation} message Conversation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Conversation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.messages = []; + if (message.messages && message.messages.length) { + object.messages = []; + for (var j = 0; j < message.messages.length; ++j) + object.messages[j] = $root.google.privacy.dlp.v2.ConversationMessage.toObject(message.messages[j], options); + } + return object; + }; + + /** + * Converts this Conversation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Conversation + * @instance + * @returns {Object.} JSON object + */ + Conversation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Conversation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Conversation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Conversation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Conversation"; + }; + + return Conversation; + })(); + + v2.ConversationMessage = (function() { + + /** + * Properties of a ConversationMessage. + * @memberof google.privacy.dlp.v2 + * @interface IConversationMessage + * @property {string|null} [content] ConversationMessage content + * @property {google.privacy.dlp.v2.ConversationMessage.MessageType|null} [messageType] ConversationMessage messageType + * @property {string|null} [participantId] ConversationMessage participantId + */ + + /** + * Constructs a new ConversationMessage. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ConversationMessage. + * @implements IConversationMessage + * @constructor + * @param {google.privacy.dlp.v2.IConversationMessage=} [properties] Properties to set + */ + function ConversationMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConversationMessage content. + * @member {string} content + * @memberof google.privacy.dlp.v2.ConversationMessage + * @instance + */ + ConversationMessage.prototype.content = ""; + + /** + * ConversationMessage messageType. + * @member {google.privacy.dlp.v2.ConversationMessage.MessageType} messageType + * @memberof google.privacy.dlp.v2.ConversationMessage + * @instance + */ + ConversationMessage.prototype.messageType = 0; + + /** + * ConversationMessage participantId. + * @member {string} participantId + * @memberof google.privacy.dlp.v2.ConversationMessage + * @instance + */ + ConversationMessage.prototype.participantId = ""; + + /** + * Creates a new ConversationMessage instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ConversationMessage + * @static + * @param {google.privacy.dlp.v2.IConversationMessage=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ConversationMessage} ConversationMessage instance + */ + ConversationMessage.create = function create(properties) { + return new ConversationMessage(properties); + }; + + /** + * Encodes the specified ConversationMessage message. Does not implicitly {@link google.privacy.dlp.v2.ConversationMessage.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ConversationMessage + * @static + * @param {google.privacy.dlp.v2.IConversationMessage} message ConversationMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.content); + if (message.messageType != null && Object.hasOwnProperty.call(message, "messageType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.messageType); + if (message.participantId != null && Object.hasOwnProperty.call(message, "participantId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.participantId); + return writer; + }; + + /** + * Encodes the specified ConversationMessage message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ConversationMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ConversationMessage + * @static + * @param {google.privacy.dlp.v2.IConversationMessage} message ConversationMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversationMessage message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ConversationMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ConversationMessage} ConversationMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationMessage.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ConversationMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.content = reader.string(); + break; + } + case 2: { + message.messageType = reader.int32(); + break; + } + case 3: { + message.participantId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ConversationMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ConversationMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ConversationMessage} ConversationMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversationMessage message. + * @function verify + * @memberof google.privacy.dlp.v2.ConversationMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationMessage.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + if (message.messageType != null && message.hasOwnProperty("messageType")) + switch (message.messageType) { + default: + return "messageType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.participantId != null && message.hasOwnProperty("participantId")) + if (!$util.isString(message.participantId)) + return "participantId: string expected"; + return null; + }; + + /** + * Creates a ConversationMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ConversationMessage + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ConversationMessage} ConversationMessage + */ + ConversationMessage.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ConversationMessage) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ConversationMessage(); + if (object.content != null) + message.content = String(object.content); + switch (object.messageType) { + default: + if (typeof object.messageType === "number") { + message.messageType = object.messageType; + break; + } + break; + case "MESSAGE_TYPE_UNSPECIFIED": + case 0: + message.messageType = 0; + break; + case "CONTENT": + case 1: + message.messageType = 1; + break; + case "CONTEXT": + case 2: + message.messageType = 2; + break; + } + if (object.participantId != null) + message.participantId = String(object.participantId); + return message; + }; + + /** + * Creates a plain object from a ConversationMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ConversationMessage + * @static + * @param {google.privacy.dlp.v2.ConversationMessage} message ConversationMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.content = ""; + object.messageType = options.enums === String ? "MESSAGE_TYPE_UNSPECIFIED" : 0; + object.participantId = ""; + } + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + if (message.messageType != null && message.hasOwnProperty("messageType")) + object.messageType = options.enums === String ? $root.google.privacy.dlp.v2.ConversationMessage.MessageType[message.messageType] === undefined ? message.messageType : $root.google.privacy.dlp.v2.ConversationMessage.MessageType[message.messageType] : message.messageType; + if (message.participantId != null && message.hasOwnProperty("participantId")) + object.participantId = message.participantId; + return object; + }; + + /** + * Converts this ConversationMessage to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ConversationMessage + * @instance + * @returns {Object.} JSON object + */ + ConversationMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversationMessage + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ConversationMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversationMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ConversationMessage"; + }; + + /** + * MessageType enum. + * @name google.privacy.dlp.v2.ConversationMessage.MessageType + * @enum {number} + * @property {number} MESSAGE_TYPE_UNSPECIFIED=0 MESSAGE_TYPE_UNSPECIFIED value + * @property {number} CONTENT=1 CONTENT value + * @property {number} CONTEXT=2 CONTEXT value + */ + ConversationMessage.MessageType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONTENT"] = 1; + values[valuesById[2] = "CONTEXT"] = 2; + return values; + })(); + + return ConversationMessage; + })(); + + v2.BatchContentItem = (function() { + + /** + * Properties of a BatchContentItem. + * @memberof google.privacy.dlp.v2 + * @interface IBatchContentItem + * @property {google.privacy.dlp.v2.IStringValueBatch|null} [stringValueBatch] BatchContentItem stringValueBatch + */ + + /** + * Constructs a new BatchContentItem. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a BatchContentItem. + * @implements IBatchContentItem + * @constructor + * @param {google.privacy.dlp.v2.IBatchContentItem=} [properties] Properties to set + */ + function BatchContentItem(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchContentItem stringValueBatch. + * @member {google.privacy.dlp.v2.IStringValueBatch|null|undefined} stringValueBatch + * @memberof google.privacy.dlp.v2.BatchContentItem + * @instance + */ + BatchContentItem.prototype.stringValueBatch = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BatchContentItem batch. + * @member {"stringValueBatch"|undefined} batch + * @memberof google.privacy.dlp.v2.BatchContentItem + * @instance + */ + Object.defineProperty(BatchContentItem.prototype, "batch", { + get: $util.oneOfGetter($oneOfFields = ["stringValueBatch"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BatchContentItem instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.BatchContentItem + * @static + * @param {google.privacy.dlp.v2.IBatchContentItem=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.BatchContentItem} BatchContentItem instance + */ + BatchContentItem.create = function create(properties) { + return new BatchContentItem(properties); + }; + + /** + * Encodes the specified BatchContentItem message. Does not implicitly {@link google.privacy.dlp.v2.BatchContentItem.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.BatchContentItem + * @static + * @param {google.privacy.dlp.v2.IBatchContentItem} message BatchContentItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchContentItem.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.stringValueBatch != null && Object.hasOwnProperty.call(message, "stringValueBatch")) + $root.google.privacy.dlp.v2.StringValueBatch.encode(message.stringValueBatch, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BatchContentItem message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BatchContentItem.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.BatchContentItem + * @static + * @param {google.privacy.dlp.v2.IBatchContentItem} message BatchContentItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchContentItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchContentItem message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.BatchContentItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.BatchContentItem} BatchContentItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchContentItem.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.BatchContentItem(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.stringValueBatch = $root.google.privacy.dlp.v2.StringValueBatch.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a BatchContentItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.BatchContentItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.BatchContentItem} BatchContentItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchContentItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchContentItem message. + * @function verify + * @memberof google.privacy.dlp.v2.BatchContentItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchContentItem.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.stringValueBatch != null && message.hasOwnProperty("stringValueBatch")) { + properties.batch = 1; + { + var error = $root.google.privacy.dlp.v2.StringValueBatch.verify(message.stringValueBatch, long + 1); + if (error) + return "stringValueBatch." + error; + } + } + return null; + }; + + /** + * Creates a BatchContentItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.BatchContentItem + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.BatchContentItem} BatchContentItem + */ + BatchContentItem.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.BatchContentItem) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.BatchContentItem(); + if (object.stringValueBatch != null) { + if (typeof object.stringValueBatch !== "object") + throw TypeError(".google.privacy.dlp.v2.BatchContentItem.stringValueBatch: object expected"); + message.stringValueBatch = $root.google.privacy.dlp.v2.StringValueBatch.fromObject(object.stringValueBatch, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a BatchContentItem message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.BatchContentItem + * @static + * @param {google.privacy.dlp.v2.BatchContentItem} message BatchContentItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchContentItem.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.stringValueBatch != null && message.hasOwnProperty("stringValueBatch")) { + object.stringValueBatch = $root.google.privacy.dlp.v2.StringValueBatch.toObject(message.stringValueBatch, options); + if (options.oneofs) + object.batch = "stringValueBatch"; + } + return object; + }; + + /** + * Converts this BatchContentItem to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.BatchContentItem + * @instance + * @returns {Object.} JSON object + */ + BatchContentItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchContentItem + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.BatchContentItem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchContentItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.BatchContentItem"; + }; + + return BatchContentItem; + })(); + + v2.StringValueBatch = (function() { + + /** + * Properties of a StringValueBatch. + * @memberof google.privacy.dlp.v2 + * @interface IStringValueBatch + * @property {Array.|null} [values] StringValueBatch values + */ + + /** + * Constructs a new StringValueBatch. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a StringValueBatch. + * @implements IStringValueBatch + * @constructor + * @param {google.privacy.dlp.v2.IStringValueBatch=} [properties] Properties to set + */ + function StringValueBatch(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * StringValueBatch values. + * @member {Array.} values + * @memberof google.privacy.dlp.v2.StringValueBatch + * @instance + */ + StringValueBatch.prototype.values = $util.emptyArray; + + /** + * Creates a new StringValueBatch instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.StringValueBatch + * @static + * @param {google.privacy.dlp.v2.IStringValueBatch=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.StringValueBatch} StringValueBatch instance + */ + StringValueBatch.create = function create(properties) { + return new StringValueBatch(properties); + }; + + /** + * Encodes the specified StringValueBatch message. Does not implicitly {@link google.privacy.dlp.v2.StringValueBatch.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.StringValueBatch + * @static + * @param {google.privacy.dlp.v2.IStringValueBatch} message StringValueBatch message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValueBatch.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.values[i]); + return writer; + }; + + /** + * Encodes the specified StringValueBatch message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StringValueBatch.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.StringValueBatch + * @static + * @param {google.privacy.dlp.v2.IStringValueBatch} message StringValueBatch message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StringValueBatch.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StringValueBatch message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.StringValueBatch + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.StringValueBatch} StringValueBatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValueBatch.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.StringValueBatch(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a StringValueBatch message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.StringValueBatch + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.StringValueBatch} StringValueBatch + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StringValueBatch.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StringValueBatch message. + * @function verify + * @memberof google.privacy.dlp.v2.StringValueBatch + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StringValueBatch.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) + if (!$util.isString(message.values[i])) + return "values: string[] expected"; + } + return null; + }; + + /** + * Creates a StringValueBatch message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.StringValueBatch + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.StringValueBatch} StringValueBatch + */ + StringValueBatch.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.StringValueBatch) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.StringValueBatch(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.privacy.dlp.v2.StringValueBatch.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) + message.values[i] = String(object.values[i]); + } + return message; + }; + + /** + * Creates a plain object from a StringValueBatch message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.StringValueBatch + * @static + * @param {google.privacy.dlp.v2.StringValueBatch} message StringValueBatch + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StringValueBatch.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = message.values[j]; + } + return object; + }; + + /** + * Converts this StringValueBatch to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.StringValueBatch + * @instance + * @returns {Object.} JSON object + */ + StringValueBatch.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StringValueBatch + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.StringValueBatch + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StringValueBatch.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.StringValueBatch"; + }; + + return StringValueBatch; + })(); + + v2.Table = (function() { + + /** + * Properties of a Table. + * @memberof google.privacy.dlp.v2 + * @interface ITable + * @property {Array.|null} [headers] Table headers + * @property {Array.|null} [rows] Table rows + */ + + /** + * Constructs a new Table. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a Table. + * @implements ITable + * @constructor + * @param {google.privacy.dlp.v2.ITable=} [properties] Properties to set + */ + function Table(properties) { + this.headers = []; + this.rows = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Table headers. + * @member {Array.} headers + * @memberof google.privacy.dlp.v2.Table + * @instance + */ + Table.prototype.headers = $util.emptyArray; + + /** + * Table rows. + * @member {Array.} rows + * @memberof google.privacy.dlp.v2.Table + * @instance + */ + Table.prototype.rows = $util.emptyArray; + + /** + * Creates a new Table instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Table + * @static + * @param {google.privacy.dlp.v2.ITable=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Table} Table instance + */ + Table.create = function create(properties) { + return new Table(properties); + }; + + /** + * Encodes the specified Table message. Does not implicitly {@link google.privacy.dlp.v2.Table.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Table + * @static + * @param {google.privacy.dlp.v2.ITable} message Table message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Table.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.headers != null && message.headers.length) + for (var i = 0; i < message.headers.length; ++i) + $root.google.privacy.dlp.v2.FieldId.encode(message.headers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.privacy.dlp.v2.Table.Row.encode(message.rows[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Table message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Table.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Table + * @static + * @param {google.privacy.dlp.v2.ITable} message Table message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Table.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Table message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Table + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Table} Table + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Table.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Table(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.headers && message.headers.length)) + message.headers = []; + message.headers.push($root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.privacy.dlp.v2.Table.Row.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Table message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Table + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Table} Table + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Table.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Table message. + * @function verify + * @memberof google.privacy.dlp.v2.Table + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Table.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.headers != null && message.hasOwnProperty("headers")) { + if (!Array.isArray(message.headers)) + return "headers: array expected"; + for (var i = 0; i < message.headers.length; ++i) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.headers[i], long + 1); + if (error) + return "headers." + error; + } + } + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.privacy.dlp.v2.Table.Row.verify(message.rows[i], long + 1); + if (error) + return "rows." + error; + } + } + return null; + }; + + /** + * Creates a Table message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Table + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Table} Table + */ + Table.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Table) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.Table(); + if (object.headers) { + if (!Array.isArray(object.headers)) + throw TypeError(".google.privacy.dlp.v2.Table.headers: array expected"); + message.headers = []; + for (var i = 0; i < object.headers.length; ++i) { + if (typeof object.headers[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.Table.headers: object expected"); + message.headers[i] = $root.google.privacy.dlp.v2.FieldId.fromObject(object.headers[i], long + 1); + } + } + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.privacy.dlp.v2.Table.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.Table.rows: object expected"); + message.rows[i] = $root.google.privacy.dlp.v2.Table.Row.fromObject(object.rows[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a Table message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Table + * @static + * @param {google.privacy.dlp.v2.Table} message Table + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Table.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.headers = []; + object.rows = []; + } + if (message.headers && message.headers.length) { + object.headers = []; + for (var j = 0; j < message.headers.length; ++j) + object.headers[j] = $root.google.privacy.dlp.v2.FieldId.toObject(message.headers[j], options); + } + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.privacy.dlp.v2.Table.Row.toObject(message.rows[j], options); + } + return object; + }; + + /** + * Converts this Table to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Table + * @instance + * @returns {Object.} JSON object + */ + Table.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Table + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Table + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Table.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Table"; + }; + + Table.Row = (function() { + + /** + * Properties of a Row. + * @memberof google.privacy.dlp.v2.Table + * @interface IRow + * @property {Array.|null} [values] Row values + */ + + /** + * Constructs a new Row. + * @memberof google.privacy.dlp.v2.Table + * @classdesc Represents a Row. + * @implements IRow + * @constructor + * @param {google.privacy.dlp.v2.Table.IRow=} [properties] Properties to set + */ + function Row(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Row values. + * @member {Array.} values + * @memberof google.privacy.dlp.v2.Table.Row + * @instance + */ + Row.prototype.values = $util.emptyArray; + + /** + * Creates a new Row instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Table.Row + * @static + * @param {google.privacy.dlp.v2.Table.IRow=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Table.Row} Row instance + */ + Row.create = function create(properties) { + return new Row(properties); + }; + + /** + * Encodes the specified Row message. Does not implicitly {@link google.privacy.dlp.v2.Table.Row.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Table.Row + * @static + * @param {google.privacy.dlp.v2.Table.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.privacy.dlp.v2.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Row message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Table.Row.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Table.Row + * @static + * @param {google.privacy.dlp.v2.Table.IRow} message Row message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Row.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Row message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Table.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Table.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Table.Row(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.privacy.dlp.v2.Value.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Row message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Table.Row + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Table.Row} Row + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Row.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Row message. + * @function verify + * @memberof google.privacy.dlp.v2.Table.Row + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Row.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.privacy.dlp.v2.Value.verify(message.values[i], long + 1); + if (error) + return "values." + error; + } + } + return null; + }; + + /** + * Creates a Row message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Table.Row + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Table.Row} Row + */ + Row.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Table.Row) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.Table.Row(); + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.privacy.dlp.v2.Table.Row.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.Table.Row.values: object expected"); + message.values[i] = $root.google.privacy.dlp.v2.Value.fromObject(object.values[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a Row message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Table.Row + * @static + * @param {google.privacy.dlp.v2.Table.Row} message Row + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Row.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.privacy.dlp.v2.Value.toObject(message.values[j], options); + } + return object; + }; + + /** + * Converts this Row to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Table.Row + * @instance + * @returns {Object.} JSON object + */ + Row.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Row + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Table.Row + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Row.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Table.Row"; + }; + + return Row; + })(); + + return Table; + })(); + + v2.KeyValueMetadataProperty = (function() { + + /** + * Properties of a KeyValueMetadataProperty. + * @memberof google.privacy.dlp.v2 + * @interface IKeyValueMetadataProperty + * @property {string|null} [key] KeyValueMetadataProperty key + * @property {string|null} [value] KeyValueMetadataProperty value + */ + + /** + * Constructs a new KeyValueMetadataProperty. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a KeyValueMetadataProperty. + * @implements IKeyValueMetadataProperty + * @constructor + * @param {google.privacy.dlp.v2.IKeyValueMetadataProperty=} [properties] Properties to set + */ + function KeyValueMetadataProperty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * KeyValueMetadataProperty key. + * @member {string} key + * @memberof google.privacy.dlp.v2.KeyValueMetadataProperty + * @instance + */ + KeyValueMetadataProperty.prototype.key = ""; + + /** + * KeyValueMetadataProperty value. + * @member {string} value + * @memberof google.privacy.dlp.v2.KeyValueMetadataProperty + * @instance + */ + KeyValueMetadataProperty.prototype.value = ""; + + /** + * Creates a new KeyValueMetadataProperty instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.KeyValueMetadataProperty + * @static + * @param {google.privacy.dlp.v2.IKeyValueMetadataProperty=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.KeyValueMetadataProperty} KeyValueMetadataProperty instance + */ + KeyValueMetadataProperty.create = function create(properties) { + return new KeyValueMetadataProperty(properties); + }; + + /** + * Encodes the specified KeyValueMetadataProperty message. Does not implicitly {@link google.privacy.dlp.v2.KeyValueMetadataProperty.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.KeyValueMetadataProperty + * @static + * @param {google.privacy.dlp.v2.IKeyValueMetadataProperty} message KeyValueMetadataProperty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyValueMetadataProperty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + return writer; + }; + + /** + * Encodes the specified KeyValueMetadataProperty message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.KeyValueMetadataProperty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.KeyValueMetadataProperty + * @static + * @param {google.privacy.dlp.v2.IKeyValueMetadataProperty} message KeyValueMetadataProperty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyValueMetadataProperty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KeyValueMetadataProperty message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.KeyValueMetadataProperty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.KeyValueMetadataProperty} KeyValueMetadataProperty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyValueMetadataProperty.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.KeyValueMetadataProperty(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a KeyValueMetadataProperty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.KeyValueMetadataProperty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.KeyValueMetadataProperty} KeyValueMetadataProperty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyValueMetadataProperty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KeyValueMetadataProperty message. + * @function verify + * @memberof google.privacy.dlp.v2.KeyValueMetadataProperty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KeyValueMetadataProperty.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a KeyValueMetadataProperty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.KeyValueMetadataProperty + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.KeyValueMetadataProperty} KeyValueMetadataProperty + */ + KeyValueMetadataProperty.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.KeyValueMetadataProperty) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.KeyValueMetadataProperty(); + if (object.key != null) + message.key = String(object.key); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a KeyValueMetadataProperty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.KeyValueMetadataProperty + * @static + * @param {google.privacy.dlp.v2.KeyValueMetadataProperty} message KeyValueMetadataProperty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KeyValueMetadataProperty.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = ""; + object.value = ""; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this KeyValueMetadataProperty to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.KeyValueMetadataProperty + * @instance + * @returns {Object.} JSON object + */ + KeyValueMetadataProperty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for KeyValueMetadataProperty + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.KeyValueMetadataProperty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KeyValueMetadataProperty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.KeyValueMetadataProperty"; + }; + + return KeyValueMetadataProperty; + })(); + + v2.InspectResult = (function() { + + /** + * Properties of an InspectResult. + * @memberof google.privacy.dlp.v2 + * @interface IInspectResult + * @property {Array.|null} [findings] InspectResult findings + * @property {boolean|null} [findingsTruncated] InspectResult findingsTruncated + */ + + /** + * Constructs a new InspectResult. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an InspectResult. + * @implements IInspectResult + * @constructor + * @param {google.privacy.dlp.v2.IInspectResult=} [properties] Properties to set + */ + function InspectResult(properties) { + this.findings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * InspectResult findings. + * @member {Array.} findings + * @memberof google.privacy.dlp.v2.InspectResult + * @instance + */ + InspectResult.prototype.findings = $util.emptyArray; + + /** + * InspectResult findingsTruncated. + * @member {boolean} findingsTruncated + * @memberof google.privacy.dlp.v2.InspectResult + * @instance + */ + InspectResult.prototype.findingsTruncated = false; + + /** + * Creates a new InspectResult instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.InspectResult + * @static + * @param {google.privacy.dlp.v2.IInspectResult=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.InspectResult} InspectResult instance + */ + InspectResult.create = function create(properties) { + return new InspectResult(properties); + }; + + /** + * Encodes the specified InspectResult message. Does not implicitly {@link google.privacy.dlp.v2.InspectResult.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.InspectResult + * @static + * @param {google.privacy.dlp.v2.IInspectResult} message InspectResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InspectResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.findings != null && message.findings.length) + for (var i = 0; i < message.findings.length; ++i) + $root.google.privacy.dlp.v2.Finding.encode(message.findings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.findingsTruncated != null && Object.hasOwnProperty.call(message, "findingsTruncated")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.findingsTruncated); + return writer; + }; + + /** + * Encodes the specified InspectResult message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.InspectResult + * @static + * @param {google.privacy.dlp.v2.IInspectResult} message InspectResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InspectResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InspectResult message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.InspectResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.InspectResult} InspectResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InspectResult.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.InspectResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.findings && message.findings.length)) + message.findings = []; + message.findings.push($root.google.privacy.dlp.v2.Finding.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.findingsTruncated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an InspectResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.InspectResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.InspectResult} InspectResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InspectResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InspectResult message. + * @function verify + * @memberof google.privacy.dlp.v2.InspectResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InspectResult.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.findings != null && message.hasOwnProperty("findings")) { + if (!Array.isArray(message.findings)) + return "findings: array expected"; + for (var i = 0; i < message.findings.length; ++i) { + var error = $root.google.privacy.dlp.v2.Finding.verify(message.findings[i], long + 1); + if (error) + return "findings." + error; + } + } + if (message.findingsTruncated != null && message.hasOwnProperty("findingsTruncated")) + if (typeof message.findingsTruncated !== "boolean") + return "findingsTruncated: boolean expected"; + return null; + }; + + /** + * Creates an InspectResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.InspectResult + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.InspectResult} InspectResult + */ + InspectResult.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.InspectResult) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.InspectResult(); + if (object.findings) { + if (!Array.isArray(object.findings)) + throw TypeError(".google.privacy.dlp.v2.InspectResult.findings: array expected"); + message.findings = []; + for (var i = 0; i < object.findings.length; ++i) { + if (typeof object.findings[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectResult.findings: object expected"); + message.findings[i] = $root.google.privacy.dlp.v2.Finding.fromObject(object.findings[i], long + 1); + } + } + if (object.findingsTruncated != null) + message.findingsTruncated = Boolean(object.findingsTruncated); + return message; + }; + + /** + * Creates a plain object from an InspectResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.InspectResult + * @static + * @param {google.privacy.dlp.v2.InspectResult} message InspectResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InspectResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.findings = []; + if (options.defaults) + object.findingsTruncated = false; + if (message.findings && message.findings.length) { + object.findings = []; + for (var j = 0; j < message.findings.length; ++j) + object.findings[j] = $root.google.privacy.dlp.v2.Finding.toObject(message.findings[j], options); + } + if (message.findingsTruncated != null && message.hasOwnProperty("findingsTruncated")) + object.findingsTruncated = message.findingsTruncated; + return object; + }; + + /** + * Converts this InspectResult to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.InspectResult + * @instance + * @returns {Object.} JSON object + */ + InspectResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InspectResult + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.InspectResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InspectResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.InspectResult"; + }; + + return InspectResult; + })(); + + v2.Finding = (function() { + + /** + * Properties of a Finding. + * @memberof google.privacy.dlp.v2 + * @interface IFinding + * @property {string|null} [name] Finding name + * @property {string|null} [quote] Finding quote + * @property {google.privacy.dlp.v2.IInfoType|null} [infoType] Finding infoType + * @property {google.privacy.dlp.v2.Likelihood|null} [likelihood] Finding likelihood + * @property {google.privacy.dlp.v2.ILocation|null} [location] Finding location + * @property {google.protobuf.ITimestamp|null} [createTime] Finding createTime + * @property {google.privacy.dlp.v2.IQuoteInfo|null} [quoteInfo] Finding quoteInfo + * @property {string|null} [resourceName] Finding resourceName + * @property {string|null} [triggerName] Finding triggerName + * @property {Object.|null} [labels] Finding labels + * @property {google.protobuf.ITimestamp|null} [jobCreateTime] Finding jobCreateTime + * @property {string|null} [jobName] Finding jobName + * @property {string|null} [findingId] Finding findingId + */ + + /** + * Constructs a new Finding. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a Finding. + * @implements IFinding + * @constructor + * @param {google.privacy.dlp.v2.IFinding=} [properties] Properties to set + */ + function Finding(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Finding name. + * @member {string} name + * @memberof google.privacy.dlp.v2.Finding + * @instance + */ + Finding.prototype.name = ""; + + /** + * Finding quote. + * @member {string} quote + * @memberof google.privacy.dlp.v2.Finding + * @instance + */ + Finding.prototype.quote = ""; + + /** + * Finding infoType. + * @member {google.privacy.dlp.v2.IInfoType|null|undefined} infoType + * @memberof google.privacy.dlp.v2.Finding + * @instance + */ + Finding.prototype.infoType = null; + + /** + * Finding likelihood. + * @member {google.privacy.dlp.v2.Likelihood} likelihood + * @memberof google.privacy.dlp.v2.Finding + * @instance + */ + Finding.prototype.likelihood = 0; + + /** + * Finding location. + * @member {google.privacy.dlp.v2.ILocation|null|undefined} location + * @memberof google.privacy.dlp.v2.Finding + * @instance + */ + Finding.prototype.location = null; + + /** + * Finding createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.privacy.dlp.v2.Finding + * @instance + */ + Finding.prototype.createTime = null; + + /** + * Finding quoteInfo. + * @member {google.privacy.dlp.v2.IQuoteInfo|null|undefined} quoteInfo + * @memberof google.privacy.dlp.v2.Finding + * @instance + */ + Finding.prototype.quoteInfo = null; + + /** + * Finding resourceName. + * @member {string} resourceName + * @memberof google.privacy.dlp.v2.Finding + * @instance + */ + Finding.prototype.resourceName = ""; + + /** + * Finding triggerName. + * @member {string} triggerName + * @memberof google.privacy.dlp.v2.Finding + * @instance + */ + Finding.prototype.triggerName = ""; + + /** + * Finding labels. + * @member {Object.} labels + * @memberof google.privacy.dlp.v2.Finding + * @instance + */ + Finding.prototype.labels = $util.emptyObject; + + /** + * Finding jobCreateTime. + * @member {google.protobuf.ITimestamp|null|undefined} jobCreateTime + * @memberof google.privacy.dlp.v2.Finding + * @instance + */ + Finding.prototype.jobCreateTime = null; + + /** + * Finding jobName. + * @member {string} jobName + * @memberof google.privacy.dlp.v2.Finding + * @instance + */ + Finding.prototype.jobName = ""; + + /** + * Finding findingId. + * @member {string} findingId + * @memberof google.privacy.dlp.v2.Finding + * @instance + */ + Finding.prototype.findingId = ""; + + /** + * Creates a new Finding instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Finding + * @static + * @param {google.privacy.dlp.v2.IFinding=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Finding} Finding instance + */ + Finding.create = function create(properties) { + return new Finding(properties); + }; + + /** + * Encodes the specified Finding message. Does not implicitly {@link google.privacy.dlp.v2.Finding.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Finding + * @static + * @param {google.privacy.dlp.v2.IFinding} message Finding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Finding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.quote != null && Object.hasOwnProperty.call(message, "quote")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.quote); + if (message.infoType != null && Object.hasOwnProperty.call(message, "infoType")) + $root.google.privacy.dlp.v2.InfoType.encode(message.infoType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.likelihood != null && Object.hasOwnProperty.call(message, "likelihood")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.likelihood); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + $root.google.privacy.dlp.v2.Location.encode(message.location, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.quoteInfo != null && Object.hasOwnProperty.call(message, "quoteInfo")) + $root.google.privacy.dlp.v2.QuoteInfo.encode(message.quoteInfo, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.resourceName); + if (message.triggerName != null && Object.hasOwnProperty.call(message, "triggerName")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.triggerName); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.jobCreateTime != null && Object.hasOwnProperty.call(message, "jobCreateTime")) + $root.google.protobuf.Timestamp.encode(message.jobCreateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.jobName != null && Object.hasOwnProperty.call(message, "jobName")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.jobName); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.name); + if (message.findingId != null && Object.hasOwnProperty.call(message, "findingId")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.findingId); + return writer; + }; + + /** + * Encodes the specified Finding message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Finding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Finding + * @static + * @param {google.privacy.dlp.v2.IFinding} message Finding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Finding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Finding message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Finding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Finding} Finding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Finding.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Finding(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 14: { + message.name = reader.string(); + break; + } + case 1: { + message.quote = reader.string(); + break; + } + case 2: { + message.infoType = $root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.likelihood = reader.int32(); + break; + } + case 4: { + message.location = $root.google.privacy.dlp.v2.Location.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 7: { + message.quoteInfo = $root.google.privacy.dlp.v2.QuoteInfo.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 8: { + message.resourceName = reader.string(); + break; + } + case 9: { + message.triggerName = reader.string(); + break; + } + case 10: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.labels, key); + message.labels[key] = value; + break; + } + case 11: { + message.jobCreateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 13: { + message.jobName = reader.string(); + break; + } + case 15: { + message.findingId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Finding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Finding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Finding} Finding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Finding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Finding message. + * @function verify + * @memberof google.privacy.dlp.v2.Finding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Finding.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.quote != null && message.hasOwnProperty("quote")) + if (!$util.isString(message.quote)) + return "quote: string expected"; + if (message.infoType != null && message.hasOwnProperty("infoType")) { + var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infoType, long + 1); + if (error) + return "infoType." + error; + } + if (message.likelihood != null && message.hasOwnProperty("likelihood")) + switch (message.likelihood) { + default: + return "likelihood: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.google.privacy.dlp.v2.Location.verify(message.location, long + 1); + if (error) + return "location." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime, long + 1); + if (error) + return "createTime." + error; + } + if (message.quoteInfo != null && message.hasOwnProperty("quoteInfo")) { + var error = $root.google.privacy.dlp.v2.QuoteInfo.verify(message.quoteInfo, long + 1); + if (error) + return "quoteInfo." + error; + } + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + if (!$util.isString(message.resourceName)) + return "resourceName: string expected"; + if (message.triggerName != null && message.hasOwnProperty("triggerName")) + if (!$util.isString(message.triggerName)) + return "triggerName: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.jobCreateTime != null && message.hasOwnProperty("jobCreateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.jobCreateTime, long + 1); + if (error) + return "jobCreateTime." + error; + } + if (message.jobName != null && message.hasOwnProperty("jobName")) + if (!$util.isString(message.jobName)) + return "jobName: string expected"; + if (message.findingId != null && message.hasOwnProperty("findingId")) + if (!$util.isString(message.findingId)) + return "findingId: string expected"; + return null; + }; + + /** + * Creates a Finding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Finding + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Finding} Finding + */ + Finding.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Finding) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.Finding(); + if (object.name != null) + message.name = String(object.name); + if (object.quote != null) + message.quote = String(object.quote); + if (object.infoType != null) { + if (typeof object.infoType !== "object") + throw TypeError(".google.privacy.dlp.v2.Finding.infoType: object expected"); + message.infoType = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoType, long + 1); + } + switch (object.likelihood) { + default: + if (typeof object.likelihood === "number") { + message.likelihood = object.likelihood; + break; + } + break; + case "LIKELIHOOD_UNSPECIFIED": + case 0: + message.likelihood = 0; + break; + case "VERY_UNLIKELY": + case 1: + message.likelihood = 1; + break; + case "UNLIKELY": + case 2: + message.likelihood = 2; + break; + case "POSSIBLE": + case 3: + message.likelihood = 3; + break; + case "LIKELY": + case 4: + message.likelihood = 4; + break; + case "VERY_LIKELY": + case 5: + message.likelihood = 5; + break; + } + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".google.privacy.dlp.v2.Finding.location: object expected"); + message.location = $root.google.privacy.dlp.v2.Location.fromObject(object.location, long + 1); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.privacy.dlp.v2.Finding.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime, long + 1); + } + if (object.quoteInfo != null) { + if (typeof object.quoteInfo !== "object") + throw TypeError(".google.privacy.dlp.v2.Finding.quoteInfo: object expected"); + message.quoteInfo = $root.google.privacy.dlp.v2.QuoteInfo.fromObject(object.quoteInfo, long + 1); + } + if (object.resourceName != null) + message.resourceName = String(object.resourceName); + if (object.triggerName != null) + message.triggerName = String(object.triggerName); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.privacy.dlp.v2.Finding.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.labels, keys[i]); + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + } + if (object.jobCreateTime != null) { + if (typeof object.jobCreateTime !== "object") + throw TypeError(".google.privacy.dlp.v2.Finding.jobCreateTime: object expected"); + message.jobCreateTime = $root.google.protobuf.Timestamp.fromObject(object.jobCreateTime, long + 1); + } + if (object.jobName != null) + message.jobName = String(object.jobName); + if (object.findingId != null) + message.findingId = String(object.findingId); + return message; + }; + + /** + * Creates a plain object from a Finding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Finding + * @static + * @param {google.privacy.dlp.v2.Finding} message Finding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Finding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.quote = ""; + object.infoType = null; + object.likelihood = options.enums === String ? "LIKELIHOOD_UNSPECIFIED" : 0; + object.location = null; + object.createTime = null; + object.quoteInfo = null; + object.resourceName = ""; + object.triggerName = ""; + object.jobCreateTime = null; + object.jobName = ""; + object.name = ""; + object.findingId = ""; + } + if (message.quote != null && message.hasOwnProperty("quote")) + object.quote = message.quote; + if (message.infoType != null && message.hasOwnProperty("infoType")) + object.infoType = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoType, options); + if (message.likelihood != null && message.hasOwnProperty("likelihood")) + object.likelihood = options.enums === String ? $root.google.privacy.dlp.v2.Likelihood[message.likelihood] === undefined ? message.likelihood : $root.google.privacy.dlp.v2.Likelihood[message.likelihood] : message.likelihood; + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.google.privacy.dlp.v2.Location.toObject(message.location, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.quoteInfo != null && message.hasOwnProperty("quoteInfo")) + object.quoteInfo = $root.google.privacy.dlp.v2.QuoteInfo.toObject(message.quoteInfo, options); + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + object.resourceName = message.resourceName; + if (message.triggerName != null && message.hasOwnProperty("triggerName")) + object.triggerName = message.triggerName; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.labels, keys2[j]); + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + } + if (message.jobCreateTime != null && message.hasOwnProperty("jobCreateTime")) + object.jobCreateTime = $root.google.protobuf.Timestamp.toObject(message.jobCreateTime, options); + if (message.jobName != null && message.hasOwnProperty("jobName")) + object.jobName = message.jobName; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.findingId != null && message.hasOwnProperty("findingId")) + object.findingId = message.findingId; + return object; + }; + + /** + * Converts this Finding to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Finding + * @instance + * @returns {Object.} JSON object + */ + Finding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Finding + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Finding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Finding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Finding"; + }; + + return Finding; + })(); + + v2.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.privacy.dlp.v2 + * @interface ILocation + * @property {google.privacy.dlp.v2.IRange|null} [byteRange] Location byteRange + * @property {google.privacy.dlp.v2.IRange|null} [codepointRange] Location codepointRange + * @property {Array.|null} [contentLocations] Location contentLocations + * @property {google.privacy.dlp.v2.IContainer|null} [container] Location container + */ + + /** + * Constructs a new Location. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.privacy.dlp.v2.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.contentLocations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location byteRange. + * @member {google.privacy.dlp.v2.IRange|null|undefined} byteRange + * @memberof google.privacy.dlp.v2.Location + * @instance + */ + Location.prototype.byteRange = null; + + /** + * Location codepointRange. + * @member {google.privacy.dlp.v2.IRange|null|undefined} codepointRange + * @memberof google.privacy.dlp.v2.Location + * @instance + */ + Location.prototype.codepointRange = null; + + /** + * Location contentLocations. + * @member {Array.} contentLocations + * @memberof google.privacy.dlp.v2.Location + * @instance + */ + Location.prototype.contentLocations = $util.emptyArray; + + /** + * Location container. + * @member {google.privacy.dlp.v2.IContainer|null|undefined} container + * @memberof google.privacy.dlp.v2.Location + * @instance + */ + Location.prototype.container = null; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Location + * @static + * @param {google.privacy.dlp.v2.ILocation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.privacy.dlp.v2.Location.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Location + * @static + * @param {google.privacy.dlp.v2.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.byteRange != null && Object.hasOwnProperty.call(message, "byteRange")) + $root.google.privacy.dlp.v2.Range.encode(message.byteRange, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.codepointRange != null && Object.hasOwnProperty.call(message, "codepointRange")) + $root.google.privacy.dlp.v2.Range.encode(message.codepointRange, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.contentLocations != null && message.contentLocations.length) + for (var i = 0; i < message.contentLocations.length; ++i) + $root.google.privacy.dlp.v2.ContentLocation.encode(message.contentLocations[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.container != null && Object.hasOwnProperty.call(message, "container")) + $root.google.privacy.dlp.v2.Container.encode(message.container, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Location + * @static + * @param {google.privacy.dlp.v2.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.byteRange = $root.google.privacy.dlp.v2.Range.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.codepointRange = $root.google.privacy.dlp.v2.Range.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 7: { + if (!(message.contentLocations && message.contentLocations.length)) + message.contentLocations = []; + message.contentLocations.push($root.google.privacy.dlp.v2.ContentLocation.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 8: { + message.container = $root.google.privacy.dlp.v2.Container.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.privacy.dlp.v2.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.byteRange != null && message.hasOwnProperty("byteRange")) { + var error = $root.google.privacy.dlp.v2.Range.verify(message.byteRange, long + 1); + if (error) + return "byteRange." + error; + } + if (message.codepointRange != null && message.hasOwnProperty("codepointRange")) { + var error = $root.google.privacy.dlp.v2.Range.verify(message.codepointRange, long + 1); + if (error) + return "codepointRange." + error; + } + if (message.contentLocations != null && message.hasOwnProperty("contentLocations")) { + if (!Array.isArray(message.contentLocations)) + return "contentLocations: array expected"; + for (var i = 0; i < message.contentLocations.length; ++i) { + var error = $root.google.privacy.dlp.v2.ContentLocation.verify(message.contentLocations[i], long + 1); + if (error) + return "contentLocations." + error; + } + } + if (message.container != null && message.hasOwnProperty("container")) { + var error = $root.google.privacy.dlp.v2.Container.verify(message.container, long + 1); + if (error) + return "container." + error; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Location + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Location} Location + */ + Location.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Location) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.Location(); + if (object.byteRange != null) { + if (typeof object.byteRange !== "object") + throw TypeError(".google.privacy.dlp.v2.Location.byteRange: object expected"); + message.byteRange = $root.google.privacy.dlp.v2.Range.fromObject(object.byteRange, long + 1); + } + if (object.codepointRange != null) { + if (typeof object.codepointRange !== "object") + throw TypeError(".google.privacy.dlp.v2.Location.codepointRange: object expected"); + message.codepointRange = $root.google.privacy.dlp.v2.Range.fromObject(object.codepointRange, long + 1); + } + if (object.contentLocations) { + if (!Array.isArray(object.contentLocations)) + throw TypeError(".google.privacy.dlp.v2.Location.contentLocations: array expected"); + message.contentLocations = []; + for (var i = 0; i < object.contentLocations.length; ++i) { + if (typeof object.contentLocations[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.Location.contentLocations: object expected"); + message.contentLocations[i] = $root.google.privacy.dlp.v2.ContentLocation.fromObject(object.contentLocations[i], long + 1); + } + } + if (object.container != null) { + if (typeof object.container !== "object") + throw TypeError(".google.privacy.dlp.v2.Location.container: object expected"); + message.container = $root.google.privacy.dlp.v2.Container.fromObject(object.container, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Location + * @static + * @param {google.privacy.dlp.v2.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.contentLocations = []; + if (options.defaults) { + object.byteRange = null; + object.codepointRange = null; + object.container = null; + } + if (message.byteRange != null && message.hasOwnProperty("byteRange")) + object.byteRange = $root.google.privacy.dlp.v2.Range.toObject(message.byteRange, options); + if (message.codepointRange != null && message.hasOwnProperty("codepointRange")) + object.codepointRange = $root.google.privacy.dlp.v2.Range.toObject(message.codepointRange, options); + if (message.contentLocations && message.contentLocations.length) { + object.contentLocations = []; + for (var j = 0; j < message.contentLocations.length; ++j) + object.contentLocations[j] = $root.google.privacy.dlp.v2.ContentLocation.toObject(message.contentLocations[j], options); + } + if (message.container != null && message.hasOwnProperty("container")) + object.container = $root.google.privacy.dlp.v2.Container.toObject(message.container, options); + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Location"; + }; + + return Location; + })(); + + v2.ContentLocation = (function() { + + /** + * Properties of a ContentLocation. + * @memberof google.privacy.dlp.v2 + * @interface IContentLocation + * @property {string|null} [containerName] ContentLocation containerName + * @property {google.privacy.dlp.v2.IRecordLocation|null} [recordLocation] ContentLocation recordLocation + * @property {google.privacy.dlp.v2.IImageLocation|null} [imageLocation] ContentLocation imageLocation + * @property {google.privacy.dlp.v2.IDocumentLocation|null} [documentLocation] ContentLocation documentLocation + * @property {google.privacy.dlp.v2.IMetadataLocation|null} [metadataLocation] ContentLocation metadataLocation + * @property {google.privacy.dlp.v2.IConversationLocation|null} [conversationLocation] ContentLocation conversationLocation + * @property {google.privacy.dlp.v2.IBatchContentLocation|null} [batchContentLocation] ContentLocation batchContentLocation + * @property {google.protobuf.ITimestamp|null} [containerTimestamp] ContentLocation containerTimestamp + * @property {string|null} [containerVersion] ContentLocation containerVersion + */ + + /** + * Constructs a new ContentLocation. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ContentLocation. + * @implements IContentLocation + * @constructor + * @param {google.privacy.dlp.v2.IContentLocation=} [properties] Properties to set + */ + function ContentLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ContentLocation containerName. + * @member {string} containerName + * @memberof google.privacy.dlp.v2.ContentLocation + * @instance + */ + ContentLocation.prototype.containerName = ""; + + /** + * ContentLocation recordLocation. + * @member {google.privacy.dlp.v2.IRecordLocation|null|undefined} recordLocation + * @memberof google.privacy.dlp.v2.ContentLocation + * @instance + */ + ContentLocation.prototype.recordLocation = null; + + /** + * ContentLocation imageLocation. + * @member {google.privacy.dlp.v2.IImageLocation|null|undefined} imageLocation + * @memberof google.privacy.dlp.v2.ContentLocation + * @instance + */ + ContentLocation.prototype.imageLocation = null; + + /** + * ContentLocation documentLocation. + * @member {google.privacy.dlp.v2.IDocumentLocation|null|undefined} documentLocation + * @memberof google.privacy.dlp.v2.ContentLocation + * @instance + */ + ContentLocation.prototype.documentLocation = null; + + /** + * ContentLocation metadataLocation. + * @member {google.privacy.dlp.v2.IMetadataLocation|null|undefined} metadataLocation + * @memberof google.privacy.dlp.v2.ContentLocation + * @instance + */ + ContentLocation.prototype.metadataLocation = null; + + /** + * ContentLocation conversationLocation. + * @member {google.privacy.dlp.v2.IConversationLocation|null|undefined} conversationLocation + * @memberof google.privacy.dlp.v2.ContentLocation + * @instance + */ + ContentLocation.prototype.conversationLocation = null; + + /** + * ContentLocation batchContentLocation. + * @member {google.privacy.dlp.v2.IBatchContentLocation|null|undefined} batchContentLocation + * @memberof google.privacy.dlp.v2.ContentLocation + * @instance + */ + ContentLocation.prototype.batchContentLocation = null; + + /** + * ContentLocation containerTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} containerTimestamp + * @memberof google.privacy.dlp.v2.ContentLocation + * @instance + */ + ContentLocation.prototype.containerTimestamp = null; + + /** + * ContentLocation containerVersion. + * @member {string} containerVersion + * @memberof google.privacy.dlp.v2.ContentLocation + * @instance + */ + ContentLocation.prototype.containerVersion = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ContentLocation location. + * @member {"recordLocation"|"imageLocation"|"documentLocation"|"metadataLocation"|"conversationLocation"|"batchContentLocation"|undefined} location + * @memberof google.privacy.dlp.v2.ContentLocation + * @instance + */ + Object.defineProperty(ContentLocation.prototype, "location", { + get: $util.oneOfGetter($oneOfFields = ["recordLocation", "imageLocation", "documentLocation", "metadataLocation", "conversationLocation", "batchContentLocation"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ContentLocation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ContentLocation + * @static + * @param {google.privacy.dlp.v2.IContentLocation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ContentLocation} ContentLocation instance + */ + ContentLocation.create = function create(properties) { + return new ContentLocation(properties); + }; + + /** + * Encodes the specified ContentLocation message. Does not implicitly {@link google.privacy.dlp.v2.ContentLocation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ContentLocation + * @static + * @param {google.privacy.dlp.v2.IContentLocation} message ContentLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContentLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.containerName != null && Object.hasOwnProperty.call(message, "containerName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.containerName); + if (message.recordLocation != null && Object.hasOwnProperty.call(message, "recordLocation")) + $root.google.privacy.dlp.v2.RecordLocation.encode(message.recordLocation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.imageLocation != null && Object.hasOwnProperty.call(message, "imageLocation")) + $root.google.privacy.dlp.v2.ImageLocation.encode(message.imageLocation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.documentLocation != null && Object.hasOwnProperty.call(message, "documentLocation")) + $root.google.privacy.dlp.v2.DocumentLocation.encode(message.documentLocation, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.containerTimestamp != null && Object.hasOwnProperty.call(message, "containerTimestamp")) + $root.google.protobuf.Timestamp.encode(message.containerTimestamp, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.containerVersion != null && Object.hasOwnProperty.call(message, "containerVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.containerVersion); + if (message.metadataLocation != null && Object.hasOwnProperty.call(message, "metadataLocation")) + $root.google.privacy.dlp.v2.MetadataLocation.encode(message.metadataLocation, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.conversationLocation != null && Object.hasOwnProperty.call(message, "conversationLocation")) + $root.google.privacy.dlp.v2.ConversationLocation.encode(message.conversationLocation, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.batchContentLocation != null && Object.hasOwnProperty.call(message, "batchContentLocation")) + $root.google.privacy.dlp.v2.BatchContentLocation.encode(message.batchContentLocation, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ContentLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ContentLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ContentLocation + * @static + * @param {google.privacy.dlp.v2.IContentLocation} message ContentLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ContentLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ContentLocation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ContentLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ContentLocation} ContentLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContentLocation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ContentLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.containerName = reader.string(); + break; + } + case 2: { + message.recordLocation = $root.google.privacy.dlp.v2.RecordLocation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.imageLocation = $root.google.privacy.dlp.v2.ImageLocation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.documentLocation = $root.google.privacy.dlp.v2.DocumentLocation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 8: { + message.metadataLocation = $root.google.privacy.dlp.v2.MetadataLocation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 10: { + message.conversationLocation = $root.google.privacy.dlp.v2.ConversationLocation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 11: { + message.batchContentLocation = $root.google.privacy.dlp.v2.BatchContentLocation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.containerTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 7: { + message.containerVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ContentLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ContentLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ContentLocation} ContentLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ContentLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ContentLocation message. + * @function verify + * @memberof google.privacy.dlp.v2.ContentLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ContentLocation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.containerName != null && message.hasOwnProperty("containerName")) + if (!$util.isString(message.containerName)) + return "containerName: string expected"; + if (message.recordLocation != null && message.hasOwnProperty("recordLocation")) { + properties.location = 1; + { + var error = $root.google.privacy.dlp.v2.RecordLocation.verify(message.recordLocation, long + 1); + if (error) + return "recordLocation." + error; + } + } + if (message.imageLocation != null && message.hasOwnProperty("imageLocation")) { + if (properties.location === 1) + return "location: multiple values"; + properties.location = 1; + { + var error = $root.google.privacy.dlp.v2.ImageLocation.verify(message.imageLocation, long + 1); + if (error) + return "imageLocation." + error; + } + } + if (message.documentLocation != null && message.hasOwnProperty("documentLocation")) { + if (properties.location === 1) + return "location: multiple values"; + properties.location = 1; + { + var error = $root.google.privacy.dlp.v2.DocumentLocation.verify(message.documentLocation, long + 1); + if (error) + return "documentLocation." + error; + } + } + if (message.metadataLocation != null && message.hasOwnProperty("metadataLocation")) { + if (properties.location === 1) + return "location: multiple values"; + properties.location = 1; + { + var error = $root.google.privacy.dlp.v2.MetadataLocation.verify(message.metadataLocation, long + 1); + if (error) + return "metadataLocation." + error; + } + } + if (message.conversationLocation != null && message.hasOwnProperty("conversationLocation")) { + if (properties.location === 1) + return "location: multiple values"; + properties.location = 1; + { + var error = $root.google.privacy.dlp.v2.ConversationLocation.verify(message.conversationLocation, long + 1); + if (error) + return "conversationLocation." + error; + } + } + if (message.batchContentLocation != null && message.hasOwnProperty("batchContentLocation")) { + if (properties.location === 1) + return "location: multiple values"; + properties.location = 1; + { + var error = $root.google.privacy.dlp.v2.BatchContentLocation.verify(message.batchContentLocation, long + 1); + if (error) + return "batchContentLocation." + error; + } + } + if (message.containerTimestamp != null && message.hasOwnProperty("containerTimestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.containerTimestamp, long + 1); + if (error) + return "containerTimestamp." + error; + } + if (message.containerVersion != null && message.hasOwnProperty("containerVersion")) + if (!$util.isString(message.containerVersion)) + return "containerVersion: string expected"; + return null; + }; + + /** + * Creates a ContentLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ContentLocation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ContentLocation} ContentLocation + */ + ContentLocation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ContentLocation) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ContentLocation(); + if (object.containerName != null) + message.containerName = String(object.containerName); + if (object.recordLocation != null) { + if (typeof object.recordLocation !== "object") + throw TypeError(".google.privacy.dlp.v2.ContentLocation.recordLocation: object expected"); + message.recordLocation = $root.google.privacy.dlp.v2.RecordLocation.fromObject(object.recordLocation, long + 1); + } + if (object.imageLocation != null) { + if (typeof object.imageLocation !== "object") + throw TypeError(".google.privacy.dlp.v2.ContentLocation.imageLocation: object expected"); + message.imageLocation = $root.google.privacy.dlp.v2.ImageLocation.fromObject(object.imageLocation, long + 1); + } + if (object.documentLocation != null) { + if (typeof object.documentLocation !== "object") + throw TypeError(".google.privacy.dlp.v2.ContentLocation.documentLocation: object expected"); + message.documentLocation = $root.google.privacy.dlp.v2.DocumentLocation.fromObject(object.documentLocation, long + 1); + } + if (object.metadataLocation != null) { + if (typeof object.metadataLocation !== "object") + throw TypeError(".google.privacy.dlp.v2.ContentLocation.metadataLocation: object expected"); + message.metadataLocation = $root.google.privacy.dlp.v2.MetadataLocation.fromObject(object.metadataLocation, long + 1); + } + if (object.conversationLocation != null) { + if (typeof object.conversationLocation !== "object") + throw TypeError(".google.privacy.dlp.v2.ContentLocation.conversationLocation: object expected"); + message.conversationLocation = $root.google.privacy.dlp.v2.ConversationLocation.fromObject(object.conversationLocation, long + 1); + } + if (object.batchContentLocation != null) { + if (typeof object.batchContentLocation !== "object") + throw TypeError(".google.privacy.dlp.v2.ContentLocation.batchContentLocation: object expected"); + message.batchContentLocation = $root.google.privacy.dlp.v2.BatchContentLocation.fromObject(object.batchContentLocation, long + 1); + } + if (object.containerTimestamp != null) { + if (typeof object.containerTimestamp !== "object") + throw TypeError(".google.privacy.dlp.v2.ContentLocation.containerTimestamp: object expected"); + message.containerTimestamp = $root.google.protobuf.Timestamp.fromObject(object.containerTimestamp, long + 1); + } + if (object.containerVersion != null) + message.containerVersion = String(object.containerVersion); + return message; + }; + + /** + * Creates a plain object from a ContentLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ContentLocation + * @static + * @param {google.privacy.dlp.v2.ContentLocation} message ContentLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ContentLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.containerName = ""; + object.containerTimestamp = null; + object.containerVersion = ""; + } + if (message.containerName != null && message.hasOwnProperty("containerName")) + object.containerName = message.containerName; + if (message.recordLocation != null && message.hasOwnProperty("recordLocation")) { + object.recordLocation = $root.google.privacy.dlp.v2.RecordLocation.toObject(message.recordLocation, options); + if (options.oneofs) + object.location = "recordLocation"; + } + if (message.imageLocation != null && message.hasOwnProperty("imageLocation")) { + object.imageLocation = $root.google.privacy.dlp.v2.ImageLocation.toObject(message.imageLocation, options); + if (options.oneofs) + object.location = "imageLocation"; + } + if (message.documentLocation != null && message.hasOwnProperty("documentLocation")) { + object.documentLocation = $root.google.privacy.dlp.v2.DocumentLocation.toObject(message.documentLocation, options); + if (options.oneofs) + object.location = "documentLocation"; + } + if (message.containerTimestamp != null && message.hasOwnProperty("containerTimestamp")) + object.containerTimestamp = $root.google.protobuf.Timestamp.toObject(message.containerTimestamp, options); + if (message.containerVersion != null && message.hasOwnProperty("containerVersion")) + object.containerVersion = message.containerVersion; + if (message.metadataLocation != null && message.hasOwnProperty("metadataLocation")) { + object.metadataLocation = $root.google.privacy.dlp.v2.MetadataLocation.toObject(message.metadataLocation, options); + if (options.oneofs) + object.location = "metadataLocation"; + } + if (message.conversationLocation != null && message.hasOwnProperty("conversationLocation")) { + object.conversationLocation = $root.google.privacy.dlp.v2.ConversationLocation.toObject(message.conversationLocation, options); + if (options.oneofs) + object.location = "conversationLocation"; + } + if (message.batchContentLocation != null && message.hasOwnProperty("batchContentLocation")) { + object.batchContentLocation = $root.google.privacy.dlp.v2.BatchContentLocation.toObject(message.batchContentLocation, options); + if (options.oneofs) + object.location = "batchContentLocation"; + } + return object; + }; + + /** + * Converts this ContentLocation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ContentLocation + * @instance + * @returns {Object.} JSON object + */ + ContentLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ContentLocation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ContentLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ContentLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ContentLocation"; + }; + + return ContentLocation; + })(); + + v2.ConversationLocation = (function() { + + /** + * Properties of a ConversationLocation. + * @memberof google.privacy.dlp.v2 + * @interface IConversationLocation + * @property {number|null} [messageIndex] ConversationLocation messageIndex + * @property {google.privacy.dlp.v2.ConversationLocation.IAllMessages|null} [allMessages] ConversationLocation allMessages + */ + + /** + * Constructs a new ConversationLocation. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ConversationLocation. + * @implements IConversationLocation + * @constructor + * @param {google.privacy.dlp.v2.IConversationLocation=} [properties] Properties to set + */ + function ConversationLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConversationLocation messageIndex. + * @member {number|null|undefined} messageIndex + * @memberof google.privacy.dlp.v2.ConversationLocation + * @instance + */ + ConversationLocation.prototype.messageIndex = null; + + /** + * ConversationLocation allMessages. + * @member {google.privacy.dlp.v2.ConversationLocation.IAllMessages|null|undefined} allMessages + * @memberof google.privacy.dlp.v2.ConversationLocation + * @instance + */ + ConversationLocation.prototype.allMessages = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ConversationLocation location. + * @member {"messageIndex"|"allMessages"|undefined} location + * @memberof google.privacy.dlp.v2.ConversationLocation + * @instance + */ + Object.defineProperty(ConversationLocation.prototype, "location", { + get: $util.oneOfGetter($oneOfFields = ["messageIndex", "allMessages"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ConversationLocation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ConversationLocation + * @static + * @param {google.privacy.dlp.v2.IConversationLocation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ConversationLocation} ConversationLocation instance + */ + ConversationLocation.create = function create(properties) { + return new ConversationLocation(properties); + }; + + /** + * Encodes the specified ConversationLocation message. Does not implicitly {@link google.privacy.dlp.v2.ConversationLocation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ConversationLocation + * @static + * @param {google.privacy.dlp.v2.IConversationLocation} message ConversationLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageIndex != null && Object.hasOwnProperty.call(message, "messageIndex")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.messageIndex); + if (message.allMessages != null && Object.hasOwnProperty.call(message, "allMessages")) + $root.google.privacy.dlp.v2.ConversationLocation.AllMessages.encode(message.allMessages, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ConversationLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ConversationLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ConversationLocation + * @static + * @param {google.privacy.dlp.v2.IConversationLocation} message ConversationLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversationLocation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ConversationLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ConversationLocation} ConversationLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationLocation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ConversationLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.messageIndex = reader.int32(); + break; + } + case 2: { + message.allMessages = $root.google.privacy.dlp.v2.ConversationLocation.AllMessages.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ConversationLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ConversationLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ConversationLocation} ConversationLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversationLocation message. + * @function verify + * @memberof google.privacy.dlp.v2.ConversationLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationLocation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.messageIndex != null && message.hasOwnProperty("messageIndex")) { + properties.location = 1; + if (!$util.isInteger(message.messageIndex)) + return "messageIndex: integer expected"; + } + if (message.allMessages != null && message.hasOwnProperty("allMessages")) { + if (properties.location === 1) + return "location: multiple values"; + properties.location = 1; + { + var error = $root.google.privacy.dlp.v2.ConversationLocation.AllMessages.verify(message.allMessages, long + 1); + if (error) + return "allMessages." + error; + } + } + return null; + }; + + /** + * Creates a ConversationLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ConversationLocation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ConversationLocation} ConversationLocation + */ + ConversationLocation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ConversationLocation) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ConversationLocation(); + if (object.messageIndex != null) + message.messageIndex = object.messageIndex | 0; + if (object.allMessages != null) { + if (typeof object.allMessages !== "object") + throw TypeError(".google.privacy.dlp.v2.ConversationLocation.allMessages: object expected"); + message.allMessages = $root.google.privacy.dlp.v2.ConversationLocation.AllMessages.fromObject(object.allMessages, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a ConversationLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ConversationLocation + * @static + * @param {google.privacy.dlp.v2.ConversationLocation} message ConversationLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.messageIndex != null && message.hasOwnProperty("messageIndex")) { + object.messageIndex = message.messageIndex; + if (options.oneofs) + object.location = "messageIndex"; + } + if (message.allMessages != null && message.hasOwnProperty("allMessages")) { + object.allMessages = $root.google.privacy.dlp.v2.ConversationLocation.AllMessages.toObject(message.allMessages, options); + if (options.oneofs) + object.location = "allMessages"; + } + return object; + }; + + /** + * Converts this ConversationLocation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ConversationLocation + * @instance + * @returns {Object.} JSON object + */ + ConversationLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversationLocation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ConversationLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversationLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ConversationLocation"; + }; + + ConversationLocation.AllMessages = (function() { + + /** + * Properties of an AllMessages. + * @memberof google.privacy.dlp.v2.ConversationLocation + * @interface IAllMessages + */ + + /** + * Constructs a new AllMessages. + * @memberof google.privacy.dlp.v2.ConversationLocation + * @classdesc Represents an AllMessages. + * @implements IAllMessages + * @constructor + * @param {google.privacy.dlp.v2.ConversationLocation.IAllMessages=} [properties] Properties to set + */ + function AllMessages(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new AllMessages instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ConversationLocation.AllMessages + * @static + * @param {google.privacy.dlp.v2.ConversationLocation.IAllMessages=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ConversationLocation.AllMessages} AllMessages instance + */ + AllMessages.create = function create(properties) { + return new AllMessages(properties); + }; + + /** + * Encodes the specified AllMessages message. Does not implicitly {@link google.privacy.dlp.v2.ConversationLocation.AllMessages.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ConversationLocation.AllMessages + * @static + * @param {google.privacy.dlp.v2.ConversationLocation.IAllMessages} message AllMessages message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllMessages.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AllMessages message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ConversationLocation.AllMessages.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ConversationLocation.AllMessages + * @static + * @param {google.privacy.dlp.v2.ConversationLocation.IAllMessages} message AllMessages message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllMessages.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AllMessages message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ConversationLocation.AllMessages + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ConversationLocation.AllMessages} AllMessages + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllMessages.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ConversationLocation.AllMessages(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AllMessages message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ConversationLocation.AllMessages + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ConversationLocation.AllMessages} AllMessages + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllMessages.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AllMessages message. + * @function verify + * @memberof google.privacy.dlp.v2.ConversationLocation.AllMessages + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AllMessages.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates an AllMessages message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ConversationLocation.AllMessages + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ConversationLocation.AllMessages} AllMessages + */ + AllMessages.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ConversationLocation.AllMessages) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.ConversationLocation.AllMessages(); + }; + + /** + * Creates a plain object from an AllMessages message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ConversationLocation.AllMessages + * @static + * @param {google.privacy.dlp.v2.ConversationLocation.AllMessages} message AllMessages + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AllMessages.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AllMessages to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ConversationLocation.AllMessages + * @instance + * @returns {Object.} JSON object + */ + AllMessages.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AllMessages + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ConversationLocation.AllMessages + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AllMessages.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ConversationLocation.AllMessages"; + }; + + return AllMessages; + })(); + + return ConversationLocation; + })(); + + v2.BatchContentLocation = (function() { + + /** + * Properties of a BatchContentLocation. + * @memberof google.privacy.dlp.v2 + * @interface IBatchContentLocation + * @property {number|null} [itemIndex] BatchContentLocation itemIndex + */ + + /** + * Constructs a new BatchContentLocation. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a BatchContentLocation. + * @implements IBatchContentLocation + * @constructor + * @param {google.privacy.dlp.v2.IBatchContentLocation=} [properties] Properties to set + */ + function BatchContentLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * BatchContentLocation itemIndex. + * @member {number} itemIndex + * @memberof google.privacy.dlp.v2.BatchContentLocation + * @instance + */ + BatchContentLocation.prototype.itemIndex = 0; + + /** + * Creates a new BatchContentLocation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.BatchContentLocation + * @static + * @param {google.privacy.dlp.v2.IBatchContentLocation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.BatchContentLocation} BatchContentLocation instance + */ + BatchContentLocation.create = function create(properties) { + return new BatchContentLocation(properties); + }; + + /** + * Encodes the specified BatchContentLocation message. Does not implicitly {@link google.privacy.dlp.v2.BatchContentLocation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.BatchContentLocation + * @static + * @param {google.privacy.dlp.v2.IBatchContentLocation} message BatchContentLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchContentLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.itemIndex != null && Object.hasOwnProperty.call(message, "itemIndex")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.itemIndex); + return writer; + }; + + /** + * Encodes the specified BatchContentLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BatchContentLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.BatchContentLocation + * @static + * @param {google.privacy.dlp.v2.IBatchContentLocation} message BatchContentLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BatchContentLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BatchContentLocation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.BatchContentLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.BatchContentLocation} BatchContentLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchContentLocation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.BatchContentLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.itemIndex = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a BatchContentLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.BatchContentLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.BatchContentLocation} BatchContentLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BatchContentLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BatchContentLocation message. + * @function verify + * @memberof google.privacy.dlp.v2.BatchContentLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BatchContentLocation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.itemIndex != null && message.hasOwnProperty("itemIndex")) + if (!$util.isInteger(message.itemIndex)) + return "itemIndex: integer expected"; + return null; + }; + + /** + * Creates a BatchContentLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.BatchContentLocation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.BatchContentLocation} BatchContentLocation + */ + BatchContentLocation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.BatchContentLocation) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.BatchContentLocation(); + if (object.itemIndex != null) + message.itemIndex = object.itemIndex | 0; + return message; + }; + + /** + * Creates a plain object from a BatchContentLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.BatchContentLocation + * @static + * @param {google.privacy.dlp.v2.BatchContentLocation} message BatchContentLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BatchContentLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.itemIndex = 0; + if (message.itemIndex != null && message.hasOwnProperty("itemIndex")) + object.itemIndex = message.itemIndex; + return object; + }; + + /** + * Converts this BatchContentLocation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.BatchContentLocation + * @instance + * @returns {Object.} JSON object + */ + BatchContentLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BatchContentLocation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.BatchContentLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BatchContentLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.BatchContentLocation"; + }; + + return BatchContentLocation; + })(); + + v2.MetadataLocation = (function() { + + /** + * Properties of a MetadataLocation. + * @memberof google.privacy.dlp.v2 + * @interface IMetadataLocation + * @property {google.privacy.dlp.v2.MetadataType|null} [type] MetadataLocation type + * @property {google.privacy.dlp.v2.IStorageMetadataLabel|null} [storageLabel] MetadataLocation storageLabel + * @property {google.privacy.dlp.v2.IKeyValueMetadataLabel|null} [keyValueMetadataLabel] MetadataLocation keyValueMetadataLabel + */ + + /** + * Constructs a new MetadataLocation. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a MetadataLocation. + * @implements IMetadataLocation + * @constructor + * @param {google.privacy.dlp.v2.IMetadataLocation=} [properties] Properties to set + */ + function MetadataLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetadataLocation type. + * @member {google.privacy.dlp.v2.MetadataType} type + * @memberof google.privacy.dlp.v2.MetadataLocation + * @instance + */ + MetadataLocation.prototype.type = 0; + + /** + * MetadataLocation storageLabel. + * @member {google.privacy.dlp.v2.IStorageMetadataLabel|null|undefined} storageLabel + * @memberof google.privacy.dlp.v2.MetadataLocation + * @instance + */ + MetadataLocation.prototype.storageLabel = null; + + /** + * MetadataLocation keyValueMetadataLabel. + * @member {google.privacy.dlp.v2.IKeyValueMetadataLabel|null|undefined} keyValueMetadataLabel + * @memberof google.privacy.dlp.v2.MetadataLocation + * @instance + */ + MetadataLocation.prototype.keyValueMetadataLabel = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MetadataLocation label. + * @member {"storageLabel"|"keyValueMetadataLabel"|undefined} label + * @memberof google.privacy.dlp.v2.MetadataLocation + * @instance + */ + Object.defineProperty(MetadataLocation.prototype, "label", { + get: $util.oneOfGetter($oneOfFields = ["storageLabel", "keyValueMetadataLabel"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MetadataLocation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.MetadataLocation + * @static + * @param {google.privacy.dlp.v2.IMetadataLocation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.MetadataLocation} MetadataLocation instance + */ + MetadataLocation.create = function create(properties) { + return new MetadataLocation(properties); + }; + + /** + * Encodes the specified MetadataLocation message. Does not implicitly {@link google.privacy.dlp.v2.MetadataLocation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.MetadataLocation + * @static + * @param {google.privacy.dlp.v2.IMetadataLocation} message MetadataLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetadataLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.storageLabel != null && Object.hasOwnProperty.call(message, "storageLabel")) + $root.google.privacy.dlp.v2.StorageMetadataLabel.encode(message.storageLabel, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.keyValueMetadataLabel != null && Object.hasOwnProperty.call(message, "keyValueMetadataLabel")) + $root.google.privacy.dlp.v2.KeyValueMetadataLabel.encode(message.keyValueMetadataLabel, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MetadataLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.MetadataLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.MetadataLocation + * @static + * @param {google.privacy.dlp.v2.IMetadataLocation} message MetadataLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetadataLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetadataLocation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.MetadataLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.MetadataLocation} MetadataLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetadataLocation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.MetadataLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 3: { + message.storageLabel = $root.google.privacy.dlp.v2.StorageMetadataLabel.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.keyValueMetadataLabel = $root.google.privacy.dlp.v2.KeyValueMetadataLabel.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a MetadataLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.MetadataLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.MetadataLocation} MetadataLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetadataLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetadataLocation message. + * @function verify + * @memberof google.privacy.dlp.v2.MetadataLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetadataLocation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 2: + case 3: + case 4: + break; + } + if (message.storageLabel != null && message.hasOwnProperty("storageLabel")) { + properties.label = 1; + { + var error = $root.google.privacy.dlp.v2.StorageMetadataLabel.verify(message.storageLabel, long + 1); + if (error) + return "storageLabel." + error; + } + } + if (message.keyValueMetadataLabel != null && message.hasOwnProperty("keyValueMetadataLabel")) { + if (properties.label === 1) + return "label: multiple values"; + properties.label = 1; + { + var error = $root.google.privacy.dlp.v2.KeyValueMetadataLabel.verify(message.keyValueMetadataLabel, long + 1); + if (error) + return "keyValueMetadataLabel." + error; + } + } + return null; + }; + + /** + * Creates a MetadataLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.MetadataLocation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.MetadataLocation} MetadataLocation + */ + MetadataLocation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.MetadataLocation) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.MetadataLocation(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "METADATATYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "STORAGE_METADATA": + case 2: + message.type = 2; + break; + case "CONTENT_METADATA": + case 3: + message.type = 3; + break; + case "CLIENT_PROVIDED_METADATA": + case 4: + message.type = 4; + break; + } + if (object.storageLabel != null) { + if (typeof object.storageLabel !== "object") + throw TypeError(".google.privacy.dlp.v2.MetadataLocation.storageLabel: object expected"); + message.storageLabel = $root.google.privacy.dlp.v2.StorageMetadataLabel.fromObject(object.storageLabel, long + 1); + } + if (object.keyValueMetadataLabel != null) { + if (typeof object.keyValueMetadataLabel !== "object") + throw TypeError(".google.privacy.dlp.v2.MetadataLocation.keyValueMetadataLabel: object expected"); + message.keyValueMetadataLabel = $root.google.privacy.dlp.v2.KeyValueMetadataLabel.fromObject(object.keyValueMetadataLabel, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a MetadataLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.MetadataLocation + * @static + * @param {google.privacy.dlp.v2.MetadataLocation} message MetadataLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetadataLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.type = options.enums === String ? "METADATATYPE_UNSPECIFIED" : 0; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.privacy.dlp.v2.MetadataType[message.type] === undefined ? message.type : $root.google.privacy.dlp.v2.MetadataType[message.type] : message.type; + if (message.storageLabel != null && message.hasOwnProperty("storageLabel")) { + object.storageLabel = $root.google.privacy.dlp.v2.StorageMetadataLabel.toObject(message.storageLabel, options); + if (options.oneofs) + object.label = "storageLabel"; + } + if (message.keyValueMetadataLabel != null && message.hasOwnProperty("keyValueMetadataLabel")) { + object.keyValueMetadataLabel = $root.google.privacy.dlp.v2.KeyValueMetadataLabel.toObject(message.keyValueMetadataLabel, options); + if (options.oneofs) + object.label = "keyValueMetadataLabel"; + } + return object; + }; + + /** + * Converts this MetadataLocation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.MetadataLocation + * @instance + * @returns {Object.} JSON object + */ + MetadataLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetadataLocation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.MetadataLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetadataLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.MetadataLocation"; + }; + + return MetadataLocation; + })(); + + v2.StorageMetadataLabel = (function() { + + /** + * Properties of a StorageMetadataLabel. + * @memberof google.privacy.dlp.v2 + * @interface IStorageMetadataLabel + * @property {string|null} [key] StorageMetadataLabel key + */ + + /** + * Constructs a new StorageMetadataLabel. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a StorageMetadataLabel. + * @implements IStorageMetadataLabel + * @constructor + * @param {google.privacy.dlp.v2.IStorageMetadataLabel=} [properties] Properties to set + */ + function StorageMetadataLabel(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * StorageMetadataLabel key. + * @member {string} key + * @memberof google.privacy.dlp.v2.StorageMetadataLabel + * @instance + */ + StorageMetadataLabel.prototype.key = ""; + + /** + * Creates a new StorageMetadataLabel instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.StorageMetadataLabel + * @static + * @param {google.privacy.dlp.v2.IStorageMetadataLabel=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.StorageMetadataLabel} StorageMetadataLabel instance + */ + StorageMetadataLabel.create = function create(properties) { + return new StorageMetadataLabel(properties); + }; + + /** + * Encodes the specified StorageMetadataLabel message. Does not implicitly {@link google.privacy.dlp.v2.StorageMetadataLabel.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.StorageMetadataLabel + * @static + * @param {google.privacy.dlp.v2.IStorageMetadataLabel} message StorageMetadataLabel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageMetadataLabel.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + return writer; + }; + + /** + * Encodes the specified StorageMetadataLabel message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StorageMetadataLabel.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.StorageMetadataLabel + * @static + * @param {google.privacy.dlp.v2.IStorageMetadataLabel} message StorageMetadataLabel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageMetadataLabel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StorageMetadataLabel message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.StorageMetadataLabel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.StorageMetadataLabel} StorageMetadataLabel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageMetadataLabel.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.StorageMetadataLabel(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a StorageMetadataLabel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.StorageMetadataLabel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.StorageMetadataLabel} StorageMetadataLabel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageMetadataLabel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StorageMetadataLabel message. + * @function verify + * @memberof google.privacy.dlp.v2.StorageMetadataLabel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StorageMetadataLabel.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + return null; + }; + + /** + * Creates a StorageMetadataLabel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.StorageMetadataLabel + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.StorageMetadataLabel} StorageMetadataLabel + */ + StorageMetadataLabel.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.StorageMetadataLabel) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.StorageMetadataLabel(); + if (object.key != null) + message.key = String(object.key); + return message; + }; + + /** + * Creates a plain object from a StorageMetadataLabel message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.StorageMetadataLabel + * @static + * @param {google.privacy.dlp.v2.StorageMetadataLabel} message StorageMetadataLabel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StorageMetadataLabel.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.key = ""; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + return object; + }; + + /** + * Converts this StorageMetadataLabel to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.StorageMetadataLabel + * @instance + * @returns {Object.} JSON object + */ + StorageMetadataLabel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StorageMetadataLabel + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.StorageMetadataLabel + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StorageMetadataLabel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.StorageMetadataLabel"; + }; + + return StorageMetadataLabel; + })(); + + v2.KeyValueMetadataLabel = (function() { + + /** + * Properties of a KeyValueMetadataLabel. + * @memberof google.privacy.dlp.v2 + * @interface IKeyValueMetadataLabel + * @property {string|null} [key] KeyValueMetadataLabel key + */ + + /** + * Constructs a new KeyValueMetadataLabel. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a KeyValueMetadataLabel. + * @implements IKeyValueMetadataLabel + * @constructor + * @param {google.privacy.dlp.v2.IKeyValueMetadataLabel=} [properties] Properties to set + */ + function KeyValueMetadataLabel(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * KeyValueMetadataLabel key. + * @member {string} key + * @memberof google.privacy.dlp.v2.KeyValueMetadataLabel + * @instance + */ + KeyValueMetadataLabel.prototype.key = ""; + + /** + * Creates a new KeyValueMetadataLabel instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.KeyValueMetadataLabel + * @static + * @param {google.privacy.dlp.v2.IKeyValueMetadataLabel=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.KeyValueMetadataLabel} KeyValueMetadataLabel instance + */ + KeyValueMetadataLabel.create = function create(properties) { + return new KeyValueMetadataLabel(properties); + }; + + /** + * Encodes the specified KeyValueMetadataLabel message. Does not implicitly {@link google.privacy.dlp.v2.KeyValueMetadataLabel.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.KeyValueMetadataLabel + * @static + * @param {google.privacy.dlp.v2.IKeyValueMetadataLabel} message KeyValueMetadataLabel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyValueMetadataLabel.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + return writer; + }; + + /** + * Encodes the specified KeyValueMetadataLabel message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.KeyValueMetadataLabel.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.KeyValueMetadataLabel + * @static + * @param {google.privacy.dlp.v2.IKeyValueMetadataLabel} message KeyValueMetadataLabel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KeyValueMetadataLabel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KeyValueMetadataLabel message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.KeyValueMetadataLabel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.KeyValueMetadataLabel} KeyValueMetadataLabel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyValueMetadataLabel.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.KeyValueMetadataLabel(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a KeyValueMetadataLabel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.KeyValueMetadataLabel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.KeyValueMetadataLabel} KeyValueMetadataLabel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KeyValueMetadataLabel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KeyValueMetadataLabel message. + * @function verify + * @memberof google.privacy.dlp.v2.KeyValueMetadataLabel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KeyValueMetadataLabel.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + return null; + }; + + /** + * Creates a KeyValueMetadataLabel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.KeyValueMetadataLabel + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.KeyValueMetadataLabel} KeyValueMetadataLabel + */ + KeyValueMetadataLabel.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.KeyValueMetadataLabel) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.KeyValueMetadataLabel(); + if (object.key != null) + message.key = String(object.key); + return message; + }; + + /** + * Creates a plain object from a KeyValueMetadataLabel message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.KeyValueMetadataLabel + * @static + * @param {google.privacy.dlp.v2.KeyValueMetadataLabel} message KeyValueMetadataLabel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KeyValueMetadataLabel.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.key = ""; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + return object; + }; + + /** + * Converts this KeyValueMetadataLabel to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.KeyValueMetadataLabel + * @instance + * @returns {Object.} JSON object + */ + KeyValueMetadataLabel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for KeyValueMetadataLabel + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.KeyValueMetadataLabel + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KeyValueMetadataLabel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.KeyValueMetadataLabel"; + }; + + return KeyValueMetadataLabel; + })(); + + v2.DocumentLocation = (function() { + + /** + * Properties of a DocumentLocation. + * @memberof google.privacy.dlp.v2 + * @interface IDocumentLocation + * @property {number|Long|null} [fileOffset] DocumentLocation fileOffset + */ + + /** + * Constructs a new DocumentLocation. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DocumentLocation. + * @implements IDocumentLocation + * @constructor + * @param {google.privacy.dlp.v2.IDocumentLocation=} [properties] Properties to set + */ + function DocumentLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DocumentLocation fileOffset. + * @member {number|Long} fileOffset + * @memberof google.privacy.dlp.v2.DocumentLocation + * @instance + */ + DocumentLocation.prototype.fileOffset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new DocumentLocation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DocumentLocation + * @static + * @param {google.privacy.dlp.v2.IDocumentLocation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DocumentLocation} DocumentLocation instance + */ + DocumentLocation.create = function create(properties) { + return new DocumentLocation(properties); + }; + + /** + * Encodes the specified DocumentLocation message. Does not implicitly {@link google.privacy.dlp.v2.DocumentLocation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DocumentLocation + * @static + * @param {google.privacy.dlp.v2.IDocumentLocation} message DocumentLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fileOffset != null && Object.hasOwnProperty.call(message, "fileOffset")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.fileOffset); + return writer; + }; + + /** + * Encodes the specified DocumentLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DocumentLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DocumentLocation + * @static + * @param {google.privacy.dlp.v2.IDocumentLocation} message DocumentLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DocumentLocation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DocumentLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DocumentLocation} DocumentLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentLocation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DocumentLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fileOffset = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DocumentLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DocumentLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DocumentLocation} DocumentLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DocumentLocation message. + * @function verify + * @memberof google.privacy.dlp.v2.DocumentLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DocumentLocation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.fileOffset != null && message.hasOwnProperty("fileOffset")) + if (!$util.isInteger(message.fileOffset) && !(message.fileOffset && $util.isInteger(message.fileOffset.low) && $util.isInteger(message.fileOffset.high))) + return "fileOffset: integer|Long expected"; + return null; + }; + + /** + * Creates a DocumentLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DocumentLocation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DocumentLocation} DocumentLocation + */ + DocumentLocation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DocumentLocation) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DocumentLocation(); + if (object.fileOffset != null) + if ($util.Long) + (message.fileOffset = $util.Long.fromValue(object.fileOffset)).unsigned = false; + else if (typeof object.fileOffset === "string") + message.fileOffset = parseInt(object.fileOffset, 10); + else if (typeof object.fileOffset === "number") + message.fileOffset = object.fileOffset; + else if (typeof object.fileOffset === "object") + message.fileOffset = new $util.LongBits(object.fileOffset.low >>> 0, object.fileOffset.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a DocumentLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DocumentLocation + * @static + * @param {google.privacy.dlp.v2.DocumentLocation} message DocumentLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DocumentLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.fileOffset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.fileOffset = options.longs === String ? "0" : 0; + if (message.fileOffset != null && message.hasOwnProperty("fileOffset")) + if (typeof message.fileOffset === "number") + object.fileOffset = options.longs === String ? String(message.fileOffset) : message.fileOffset; + else + object.fileOffset = options.longs === String ? $util.Long.prototype.toString.call(message.fileOffset) : options.longs === Number ? new $util.LongBits(message.fileOffset.low >>> 0, message.fileOffset.high >>> 0).toNumber() : message.fileOffset; + return object; + }; + + /** + * Converts this DocumentLocation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DocumentLocation + * @instance + * @returns {Object.} JSON object + */ + DocumentLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DocumentLocation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DocumentLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DocumentLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DocumentLocation"; + }; + + return DocumentLocation; + })(); + + v2.RecordLocation = (function() { + + /** + * Properties of a RecordLocation. + * @memberof google.privacy.dlp.v2 + * @interface IRecordLocation + * @property {google.privacy.dlp.v2.IRecordKey|null} [recordKey] RecordLocation recordKey + * @property {google.privacy.dlp.v2.IFieldId|null} [fieldId] RecordLocation fieldId + * @property {google.privacy.dlp.v2.ITableLocation|null} [tableLocation] RecordLocation tableLocation + */ + + /** + * Constructs a new RecordLocation. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a RecordLocation. + * @implements IRecordLocation + * @constructor + * @param {google.privacy.dlp.v2.IRecordLocation=} [properties] Properties to set + */ + function RecordLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RecordLocation recordKey. + * @member {google.privacy.dlp.v2.IRecordKey|null|undefined} recordKey + * @memberof google.privacy.dlp.v2.RecordLocation + * @instance + */ + RecordLocation.prototype.recordKey = null; + + /** + * RecordLocation fieldId. + * @member {google.privacy.dlp.v2.IFieldId|null|undefined} fieldId + * @memberof google.privacy.dlp.v2.RecordLocation + * @instance + */ + RecordLocation.prototype.fieldId = null; + + /** + * RecordLocation tableLocation. + * @member {google.privacy.dlp.v2.ITableLocation|null|undefined} tableLocation + * @memberof google.privacy.dlp.v2.RecordLocation + * @instance + */ + RecordLocation.prototype.tableLocation = null; + + /** + * Creates a new RecordLocation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.RecordLocation + * @static + * @param {google.privacy.dlp.v2.IRecordLocation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.RecordLocation} RecordLocation instance + */ + RecordLocation.create = function create(properties) { + return new RecordLocation(properties); + }; + + /** + * Encodes the specified RecordLocation message. Does not implicitly {@link google.privacy.dlp.v2.RecordLocation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.RecordLocation + * @static + * @param {google.privacy.dlp.v2.IRecordLocation} message RecordLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recordKey != null && Object.hasOwnProperty.call(message, "recordKey")) + $root.google.privacy.dlp.v2.RecordKey.encode(message.recordKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fieldId != null && Object.hasOwnProperty.call(message, "fieldId")) + $root.google.privacy.dlp.v2.FieldId.encode(message.fieldId, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.tableLocation != null && Object.hasOwnProperty.call(message, "tableLocation")) + $root.google.privacy.dlp.v2.TableLocation.encode(message.tableLocation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RecordLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.RecordLocation + * @static + * @param {google.privacy.dlp.v2.IRecordLocation} message RecordLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecordLocation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.RecordLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.RecordLocation} RecordLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordLocation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.RecordLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.recordKey = $root.google.privacy.dlp.v2.RecordKey.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.fieldId = $root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.tableLocation = $root.google.privacy.dlp.v2.TableLocation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RecordLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.RecordLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.RecordLocation} RecordLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecordLocation message. + * @function verify + * @memberof google.privacy.dlp.v2.RecordLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecordLocation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.recordKey != null && message.hasOwnProperty("recordKey")) { + var error = $root.google.privacy.dlp.v2.RecordKey.verify(message.recordKey, long + 1); + if (error) + return "recordKey." + error; + } + if (message.fieldId != null && message.hasOwnProperty("fieldId")) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.fieldId, long + 1); + if (error) + return "fieldId." + error; + } + if (message.tableLocation != null && message.hasOwnProperty("tableLocation")) { + var error = $root.google.privacy.dlp.v2.TableLocation.verify(message.tableLocation, long + 1); + if (error) + return "tableLocation." + error; + } + return null; + }; + + /** + * Creates a RecordLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.RecordLocation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.RecordLocation} RecordLocation + */ + RecordLocation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.RecordLocation) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.RecordLocation(); + if (object.recordKey != null) { + if (typeof object.recordKey !== "object") + throw TypeError(".google.privacy.dlp.v2.RecordLocation.recordKey: object expected"); + message.recordKey = $root.google.privacy.dlp.v2.RecordKey.fromObject(object.recordKey, long + 1); + } + if (object.fieldId != null) { + if (typeof object.fieldId !== "object") + throw TypeError(".google.privacy.dlp.v2.RecordLocation.fieldId: object expected"); + message.fieldId = $root.google.privacy.dlp.v2.FieldId.fromObject(object.fieldId, long + 1); + } + if (object.tableLocation != null) { + if (typeof object.tableLocation !== "object") + throw TypeError(".google.privacy.dlp.v2.RecordLocation.tableLocation: object expected"); + message.tableLocation = $root.google.privacy.dlp.v2.TableLocation.fromObject(object.tableLocation, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a RecordLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.RecordLocation + * @static + * @param {google.privacy.dlp.v2.RecordLocation} message RecordLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecordLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.recordKey = null; + object.fieldId = null; + object.tableLocation = null; + } + if (message.recordKey != null && message.hasOwnProperty("recordKey")) + object.recordKey = $root.google.privacy.dlp.v2.RecordKey.toObject(message.recordKey, options); + if (message.fieldId != null && message.hasOwnProperty("fieldId")) + object.fieldId = $root.google.privacy.dlp.v2.FieldId.toObject(message.fieldId, options); + if (message.tableLocation != null && message.hasOwnProperty("tableLocation")) + object.tableLocation = $root.google.privacy.dlp.v2.TableLocation.toObject(message.tableLocation, options); + return object; + }; + + /** + * Converts this RecordLocation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.RecordLocation + * @instance + * @returns {Object.} JSON object + */ + RecordLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RecordLocation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.RecordLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecordLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.RecordLocation"; + }; + + return RecordLocation; + })(); + + v2.TableLocation = (function() { + + /** + * Properties of a TableLocation. + * @memberof google.privacy.dlp.v2 + * @interface ITableLocation + * @property {number|Long|null} [rowIndex] TableLocation rowIndex + */ + + /** + * Constructs a new TableLocation. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a TableLocation. + * @implements ITableLocation + * @constructor + * @param {google.privacy.dlp.v2.ITableLocation=} [properties] Properties to set + */ + function TableLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TableLocation rowIndex. + * @member {number|Long} rowIndex + * @memberof google.privacy.dlp.v2.TableLocation + * @instance + */ + TableLocation.prototype.rowIndex = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new TableLocation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.TableLocation + * @static + * @param {google.privacy.dlp.v2.ITableLocation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.TableLocation} TableLocation instance + */ + TableLocation.create = function create(properties) { + return new TableLocation(properties); + }; + + /** + * Encodes the specified TableLocation message. Does not implicitly {@link google.privacy.dlp.v2.TableLocation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.TableLocation + * @static + * @param {google.privacy.dlp.v2.ITableLocation} message TableLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rowIndex != null && Object.hasOwnProperty.call(message, "rowIndex")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.rowIndex); + return writer; + }; + + /** + * Encodes the specified TableLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TableLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.TableLocation + * @static + * @param {google.privacy.dlp.v2.ITableLocation} message TableLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TableLocation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.TableLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.TableLocation} TableLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableLocation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TableLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.rowIndex = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TableLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.TableLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.TableLocation} TableLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TableLocation message. + * @function verify + * @memberof google.privacy.dlp.v2.TableLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TableLocation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.rowIndex != null && message.hasOwnProperty("rowIndex")) + if (!$util.isInteger(message.rowIndex) && !(message.rowIndex && $util.isInteger(message.rowIndex.low) && $util.isInteger(message.rowIndex.high))) + return "rowIndex: integer|Long expected"; + return null; + }; + + /** + * Creates a TableLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.TableLocation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.TableLocation} TableLocation + */ + TableLocation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.TableLocation) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.TableLocation(); + if (object.rowIndex != null) + if ($util.Long) + (message.rowIndex = $util.Long.fromValue(object.rowIndex)).unsigned = false; + else if (typeof object.rowIndex === "string") + message.rowIndex = parseInt(object.rowIndex, 10); + else if (typeof object.rowIndex === "number") + message.rowIndex = object.rowIndex; + else if (typeof object.rowIndex === "object") + message.rowIndex = new $util.LongBits(object.rowIndex.low >>> 0, object.rowIndex.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a TableLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.TableLocation + * @static + * @param {google.privacy.dlp.v2.TableLocation} message TableLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TableLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rowIndex = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.rowIndex = options.longs === String ? "0" : 0; + if (message.rowIndex != null && message.hasOwnProperty("rowIndex")) + if (typeof message.rowIndex === "number") + object.rowIndex = options.longs === String ? String(message.rowIndex) : message.rowIndex; + else + object.rowIndex = options.longs === String ? $util.Long.prototype.toString.call(message.rowIndex) : options.longs === Number ? new $util.LongBits(message.rowIndex.low >>> 0, message.rowIndex.high >>> 0).toNumber() : message.rowIndex; + return object; + }; + + /** + * Converts this TableLocation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.TableLocation + * @instance + * @returns {Object.} JSON object + */ + TableLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TableLocation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.TableLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TableLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.TableLocation"; + }; + + return TableLocation; + })(); + + v2.Container = (function() { + + /** + * Properties of a Container. + * @memberof google.privacy.dlp.v2 + * @interface IContainer + * @property {string|null} [type] Container type + * @property {string|null} [projectId] Container projectId + * @property {string|null} [fullPath] Container fullPath + * @property {string|null} [rootPath] Container rootPath + * @property {string|null} [relativePath] Container relativePath + * @property {google.protobuf.ITimestamp|null} [updateTime] Container updateTime + * @property {string|null} [version] Container version + */ + + /** + * Constructs a new Container. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a Container. + * @implements IContainer + * @constructor + * @param {google.privacy.dlp.v2.IContainer=} [properties] Properties to set + */ + function Container(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Container type. + * @member {string} type + * @memberof google.privacy.dlp.v2.Container + * @instance + */ + Container.prototype.type = ""; + + /** + * Container projectId. + * @member {string} projectId + * @memberof google.privacy.dlp.v2.Container + * @instance + */ + Container.prototype.projectId = ""; + + /** + * Container fullPath. + * @member {string} fullPath + * @memberof google.privacy.dlp.v2.Container + * @instance + */ + Container.prototype.fullPath = ""; + + /** + * Container rootPath. + * @member {string} rootPath + * @memberof google.privacy.dlp.v2.Container + * @instance + */ + Container.prototype.rootPath = ""; + + /** + * Container relativePath. + * @member {string} relativePath + * @memberof google.privacy.dlp.v2.Container + * @instance + */ + Container.prototype.relativePath = ""; + + /** + * Container updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.privacy.dlp.v2.Container + * @instance + */ + Container.prototype.updateTime = null; + + /** + * Container version. + * @member {string} version + * @memberof google.privacy.dlp.v2.Container + * @instance + */ + Container.prototype.version = ""; + + /** + * Creates a new Container instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Container + * @static + * @param {google.privacy.dlp.v2.IContainer=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Container} Container instance + */ + Container.create = function create(properties) { + return new Container(properties); + }; + + /** + * Encodes the specified Container message. Does not implicitly {@link google.privacy.dlp.v2.Container.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Container + * @static + * @param {google.privacy.dlp.v2.IContainer} message Container message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Container.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectId); + if (message.fullPath != null && Object.hasOwnProperty.call(message, "fullPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.fullPath); + if (message.rootPath != null && Object.hasOwnProperty.call(message, "rootPath")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.rootPath); + if (message.relativePath != null && Object.hasOwnProperty.call(message, "relativePath")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.relativePath); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.version); + return writer; + }; + + /** + * Encodes the specified Container message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Container.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Container + * @static + * @param {google.privacy.dlp.v2.IContainer} message Container message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Container.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Container message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Container + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Container} Container + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Container.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Container(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.projectId = reader.string(); + break; + } + case 3: { + message.fullPath = reader.string(); + break; + } + case 4: { + message.rootPath = reader.string(); + break; + } + case 5: { + message.relativePath = reader.string(); + break; + } + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 7: { + message.version = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Container message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Container + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Container} Container + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Container.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Container message. + * @function verify + * @memberof google.privacy.dlp.v2.Container + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Container.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.fullPath != null && message.hasOwnProperty("fullPath")) + if (!$util.isString(message.fullPath)) + return "fullPath: string expected"; + if (message.rootPath != null && message.hasOwnProperty("rootPath")) + if (!$util.isString(message.rootPath)) + return "rootPath: string expected"; + if (message.relativePath != null && message.hasOwnProperty("relativePath")) + if (!$util.isString(message.relativePath)) + return "relativePath: string expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime, long + 1); + if (error) + return "updateTime." + error; + } + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + return null; + }; + + /** + * Creates a Container message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Container + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Container} Container + */ + Container.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Container) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.Container(); + if (object.type != null) + message.type = String(object.type); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.fullPath != null) + message.fullPath = String(object.fullPath); + if (object.rootPath != null) + message.rootPath = String(object.rootPath); + if (object.relativePath != null) + message.relativePath = String(object.relativePath); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.privacy.dlp.v2.Container.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime, long + 1); + } + if (object.version != null) + message.version = String(object.version); + return message; + }; + + /** + * Creates a plain object from a Container message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Container + * @static + * @param {google.privacy.dlp.v2.Container} message Container + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Container.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.projectId = ""; + object.fullPath = ""; + object.rootPath = ""; + object.relativePath = ""; + object.updateTime = null; + object.version = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.fullPath != null && message.hasOwnProperty("fullPath")) + object.fullPath = message.fullPath; + if (message.rootPath != null && message.hasOwnProperty("rootPath")) + object.rootPath = message.rootPath; + if (message.relativePath != null && message.hasOwnProperty("relativePath")) + object.relativePath = message.relativePath; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + return object; + }; + + /** + * Converts this Container to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Container + * @instance + * @returns {Object.} JSON object + */ + Container.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Container + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Container + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Container.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Container"; + }; + + return Container; + })(); + + v2.Range = (function() { + + /** + * Properties of a Range. + * @memberof google.privacy.dlp.v2 + * @interface IRange + * @property {number|Long|null} [start] Range start + * @property {number|Long|null} [end] Range end + */ + + /** + * Constructs a new Range. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a Range. + * @implements IRange + * @constructor + * @param {google.privacy.dlp.v2.IRange=} [properties] Properties to set + */ + function Range(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Range start. + * @member {number|Long} start + * @memberof google.privacy.dlp.v2.Range + * @instance + */ + Range.prototype.start = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Range end. + * @member {number|Long} end + * @memberof google.privacy.dlp.v2.Range + * @instance + */ + Range.prototype.end = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new Range instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Range + * @static + * @param {google.privacy.dlp.v2.IRange=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Range} Range instance + */ + Range.create = function create(properties) { + return new Range(properties); + }; + + /** + * Encodes the specified Range message. Does not implicitly {@link google.privacy.dlp.v2.Range.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Range + * @static + * @param {google.privacy.dlp.v2.IRange} message Range message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Range.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.end); + return writer; + }; + + /** + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Range.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Range + * @static + * @param {google.privacy.dlp.v2.IRange} message Range message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Range.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Range message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Range + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Range} Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Range.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Range(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int64(); + break; + } + case 2: { + message.end = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Range message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Range + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Range} Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Range.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Range message. + * @function verify + * @memberof google.privacy.dlp.v2.Range + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Range.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start) && !(message.start && $util.isInteger(message.start.low) && $util.isInteger(message.start.high))) + return "start: integer|Long expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end) && !(message.end && $util.isInteger(message.end.low) && $util.isInteger(message.end.high))) + return "end: integer|Long expected"; + return null; + }; + + /** + * Creates a Range message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Range + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Range} Range + */ + Range.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Range) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.Range(); + if (object.start != null) + if ($util.Long) + (message.start = $util.Long.fromValue(object.start)).unsigned = false; + else if (typeof object.start === "string") + message.start = parseInt(object.start, 10); + else if (typeof object.start === "number") + message.start = object.start; + else if (typeof object.start === "object") + message.start = new $util.LongBits(object.start.low >>> 0, object.start.high >>> 0).toNumber(); + if (object.end != null) + if ($util.Long) + (message.end = $util.Long.fromValue(object.end)).unsigned = false; + else if (typeof object.end === "string") + message.end = parseInt(object.end, 10); + else if (typeof object.end === "number") + message.end = object.end; + else if (typeof object.end === "object") + message.end = new $util.LongBits(object.end.low >>> 0, object.end.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Range message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Range + * @static + * @param {google.privacy.dlp.v2.Range} message Range + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Range.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.start = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.start = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.end = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.end = options.longs === String ? "0" : 0; + } + if (message.start != null && message.hasOwnProperty("start")) + if (typeof message.start === "number") + object.start = options.longs === String ? String(message.start) : message.start; + else + object.start = options.longs === String ? $util.Long.prototype.toString.call(message.start) : options.longs === Number ? new $util.LongBits(message.start.low >>> 0, message.start.high >>> 0).toNumber() : message.start; + if (message.end != null && message.hasOwnProperty("end")) + if (typeof message.end === "number") + object.end = options.longs === String ? String(message.end) : message.end; + else + object.end = options.longs === String ? $util.Long.prototype.toString.call(message.end) : options.longs === Number ? new $util.LongBits(message.end.low >>> 0, message.end.high >>> 0).toNumber() : message.end; + return object; + }; + + /** + * Converts this Range to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Range + * @instance + * @returns {Object.} JSON object + */ + Range.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Range + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Range + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Range.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Range"; + }; + + return Range; + })(); + + v2.ImageLocation = (function() { + + /** + * Properties of an ImageLocation. + * @memberof google.privacy.dlp.v2 + * @interface IImageLocation + * @property {Array.|null} [boundingBoxes] ImageLocation boundingBoxes + */ + + /** + * Constructs a new ImageLocation. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an ImageLocation. + * @implements IImageLocation + * @constructor + * @param {google.privacy.dlp.v2.IImageLocation=} [properties] Properties to set + */ + function ImageLocation(properties) { + this.boundingBoxes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImageLocation boundingBoxes. + * @member {Array.} boundingBoxes + * @memberof google.privacy.dlp.v2.ImageLocation + * @instance + */ + ImageLocation.prototype.boundingBoxes = $util.emptyArray; + + /** + * Creates a new ImageLocation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ImageLocation + * @static + * @param {google.privacy.dlp.v2.IImageLocation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ImageLocation} ImageLocation instance + */ + ImageLocation.create = function create(properties) { + return new ImageLocation(properties); + }; + + /** + * Encodes the specified ImageLocation message. Does not implicitly {@link google.privacy.dlp.v2.ImageLocation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ImageLocation + * @static + * @param {google.privacy.dlp.v2.IImageLocation} message ImageLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.boundingBoxes != null && message.boundingBoxes.length) + for (var i = 0; i < message.boundingBoxes.length; ++i) + $root.google.privacy.dlp.v2.BoundingBox.encode(message.boundingBoxes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ImageLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ImageLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ImageLocation + * @static + * @param {google.privacy.dlp.v2.IImageLocation} message ImageLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImageLocation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ImageLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ImageLocation} ImageLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageLocation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ImageLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.boundingBoxes && message.boundingBoxes.length)) + message.boundingBoxes = []; + message.boundingBoxes.push($root.google.privacy.dlp.v2.BoundingBox.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an ImageLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ImageLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ImageLocation} ImageLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImageLocation message. + * @function verify + * @memberof google.privacy.dlp.v2.ImageLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImageLocation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.boundingBoxes != null && message.hasOwnProperty("boundingBoxes")) { + if (!Array.isArray(message.boundingBoxes)) + return "boundingBoxes: array expected"; + for (var i = 0; i < message.boundingBoxes.length; ++i) { + var error = $root.google.privacy.dlp.v2.BoundingBox.verify(message.boundingBoxes[i], long + 1); + if (error) + return "boundingBoxes." + error; + } + } + return null; + }; + + /** + * Creates an ImageLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ImageLocation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ImageLocation} ImageLocation + */ + ImageLocation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ImageLocation) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ImageLocation(); + if (object.boundingBoxes) { + if (!Array.isArray(object.boundingBoxes)) + throw TypeError(".google.privacy.dlp.v2.ImageLocation.boundingBoxes: array expected"); + message.boundingBoxes = []; + for (var i = 0; i < object.boundingBoxes.length; ++i) { + if (typeof object.boundingBoxes[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.ImageLocation.boundingBoxes: object expected"); + message.boundingBoxes[i] = $root.google.privacy.dlp.v2.BoundingBox.fromObject(object.boundingBoxes[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from an ImageLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ImageLocation + * @static + * @param {google.privacy.dlp.v2.ImageLocation} message ImageLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImageLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.boundingBoxes = []; + if (message.boundingBoxes && message.boundingBoxes.length) { + object.boundingBoxes = []; + for (var j = 0; j < message.boundingBoxes.length; ++j) + object.boundingBoxes[j] = $root.google.privacy.dlp.v2.BoundingBox.toObject(message.boundingBoxes[j], options); + } + return object; + }; + + /** + * Converts this ImageLocation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ImageLocation + * @instance + * @returns {Object.} JSON object + */ + ImageLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImageLocation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ImageLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImageLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ImageLocation"; + }; + + return ImageLocation; + })(); + + v2.BoundingBox = (function() { + + /** + * Properties of a BoundingBox. + * @memberof google.privacy.dlp.v2 + * @interface IBoundingBox + * @property {number|null} [top] BoundingBox top + * @property {number|null} [left] BoundingBox left + * @property {number|null} [width] BoundingBox width + * @property {number|null} [height] BoundingBox height + */ + + /** + * Constructs a new BoundingBox. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a BoundingBox. + * @implements IBoundingBox + * @constructor + * @param {google.privacy.dlp.v2.IBoundingBox=} [properties] Properties to set + */ + function BoundingBox(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * BoundingBox top. + * @member {number} top + * @memberof google.privacy.dlp.v2.BoundingBox + * @instance + */ + BoundingBox.prototype.top = 0; + + /** + * BoundingBox left. + * @member {number} left + * @memberof google.privacy.dlp.v2.BoundingBox + * @instance + */ + BoundingBox.prototype.left = 0; + + /** + * BoundingBox width. + * @member {number} width + * @memberof google.privacy.dlp.v2.BoundingBox + * @instance + */ + BoundingBox.prototype.width = 0; + + /** + * BoundingBox height. + * @member {number} height + * @memberof google.privacy.dlp.v2.BoundingBox + * @instance + */ + BoundingBox.prototype.height = 0; + + /** + * Creates a new BoundingBox instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.BoundingBox + * @static + * @param {google.privacy.dlp.v2.IBoundingBox=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.BoundingBox} BoundingBox instance + */ + BoundingBox.create = function create(properties) { + return new BoundingBox(properties); + }; + + /** + * Encodes the specified BoundingBox message. Does not implicitly {@link google.privacy.dlp.v2.BoundingBox.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.BoundingBox + * @static + * @param {google.privacy.dlp.v2.IBoundingBox} message BoundingBox message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoundingBox.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.top != null && Object.hasOwnProperty.call(message, "top")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.top); + if (message.left != null && Object.hasOwnProperty.call(message, "left")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.left); + if (message.width != null && Object.hasOwnProperty.call(message, "width")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.width); + if (message.height != null && Object.hasOwnProperty.call(message, "height")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.height); + return writer; + }; + + /** + * Encodes the specified BoundingBox message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BoundingBox.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.BoundingBox + * @static + * @param {google.privacy.dlp.v2.IBoundingBox} message BoundingBox message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BoundingBox.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BoundingBox message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.BoundingBox + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.BoundingBox} BoundingBox + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoundingBox.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.BoundingBox(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.top = reader.int32(); + break; + } + case 2: { + message.left = reader.int32(); + break; + } + case 3: { + message.width = reader.int32(); + break; + } + case 4: { + message.height = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a BoundingBox message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.BoundingBox + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.BoundingBox} BoundingBox + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BoundingBox.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BoundingBox message. + * @function verify + * @memberof google.privacy.dlp.v2.BoundingBox + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BoundingBox.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.top != null && message.hasOwnProperty("top")) + if (!$util.isInteger(message.top)) + return "top: integer expected"; + if (message.left != null && message.hasOwnProperty("left")) + if (!$util.isInteger(message.left)) + return "left: integer expected"; + if (message.width != null && message.hasOwnProperty("width")) + if (!$util.isInteger(message.width)) + return "width: integer expected"; + if (message.height != null && message.hasOwnProperty("height")) + if (!$util.isInteger(message.height)) + return "height: integer expected"; + return null; + }; + + /** + * Creates a BoundingBox message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.BoundingBox + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.BoundingBox} BoundingBox + */ + BoundingBox.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.BoundingBox) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.BoundingBox(); + if (object.top != null) + message.top = object.top | 0; + if (object.left != null) + message.left = object.left | 0; + if (object.width != null) + message.width = object.width | 0; + if (object.height != null) + message.height = object.height | 0; + return message; + }; + + /** + * Creates a plain object from a BoundingBox message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.BoundingBox + * @static + * @param {google.privacy.dlp.v2.BoundingBox} message BoundingBox + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BoundingBox.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.top = 0; + object.left = 0; + object.width = 0; + object.height = 0; + } + if (message.top != null && message.hasOwnProperty("top")) + object.top = message.top; + if (message.left != null && message.hasOwnProperty("left")) + object.left = message.left; + if (message.width != null && message.hasOwnProperty("width")) + object.width = message.width; + if (message.height != null && message.hasOwnProperty("height")) + object.height = message.height; + return object; + }; + + /** + * Converts this BoundingBox to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.BoundingBox + * @instance + * @returns {Object.} JSON object + */ + BoundingBox.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BoundingBox + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.BoundingBox + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BoundingBox.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.BoundingBox"; + }; + + return BoundingBox; + })(); + + v2.RedactImageRequest = (function() { + + /** + * Properties of a RedactImageRequest. + * @memberof google.privacy.dlp.v2 + * @interface IRedactImageRequest + * @property {string|null} [parent] RedactImageRequest parent + * @property {string|null} [locationId] RedactImageRequest locationId + * @property {google.privacy.dlp.v2.IInspectConfig|null} [inspectConfig] RedactImageRequest inspectConfig + * @property {Array.|null} [imageRedactionConfigs] RedactImageRequest imageRedactionConfigs + * @property {boolean|null} [includeFindings] RedactImageRequest includeFindings + * @property {google.privacy.dlp.v2.IByteContentItem|null} [byteItem] RedactImageRequest byteItem + * @property {string|null} [inspectTemplate] RedactImageRequest inspectTemplate + * @property {string|null} [deidentifyTemplate] RedactImageRequest deidentifyTemplate + */ + + /** + * Constructs a new RedactImageRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a RedactImageRequest. + * @implements IRedactImageRequest + * @constructor + * @param {google.privacy.dlp.v2.IRedactImageRequest=} [properties] Properties to set + */ + function RedactImageRequest(properties) { + this.imageRedactionConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RedactImageRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.RedactImageRequest + * @instance + */ + RedactImageRequest.prototype.parent = ""; + + /** + * RedactImageRequest locationId. + * @member {string} locationId + * @memberof google.privacy.dlp.v2.RedactImageRequest + * @instance + */ + RedactImageRequest.prototype.locationId = ""; + + /** + * RedactImageRequest inspectConfig. + * @member {google.privacy.dlp.v2.IInspectConfig|null|undefined} inspectConfig + * @memberof google.privacy.dlp.v2.RedactImageRequest + * @instance + */ + RedactImageRequest.prototype.inspectConfig = null; + + /** + * RedactImageRequest imageRedactionConfigs. + * @member {Array.} imageRedactionConfigs + * @memberof google.privacy.dlp.v2.RedactImageRequest + * @instance + */ + RedactImageRequest.prototype.imageRedactionConfigs = $util.emptyArray; + + /** + * RedactImageRequest includeFindings. + * @member {boolean} includeFindings + * @memberof google.privacy.dlp.v2.RedactImageRequest + * @instance + */ + RedactImageRequest.prototype.includeFindings = false; + + /** + * RedactImageRequest byteItem. + * @member {google.privacy.dlp.v2.IByteContentItem|null|undefined} byteItem + * @memberof google.privacy.dlp.v2.RedactImageRequest + * @instance + */ + RedactImageRequest.prototype.byteItem = null; + + /** + * RedactImageRequest inspectTemplate. + * @member {string} inspectTemplate + * @memberof google.privacy.dlp.v2.RedactImageRequest + * @instance + */ + RedactImageRequest.prototype.inspectTemplate = ""; + + /** + * RedactImageRequest deidentifyTemplate. + * @member {string} deidentifyTemplate + * @memberof google.privacy.dlp.v2.RedactImageRequest + * @instance + */ + RedactImageRequest.prototype.deidentifyTemplate = ""; + + /** + * Creates a new RedactImageRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.RedactImageRequest + * @static + * @param {google.privacy.dlp.v2.IRedactImageRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.RedactImageRequest} RedactImageRequest instance + */ + RedactImageRequest.create = function create(properties) { + return new RedactImageRequest(properties); + }; + + /** + * Encodes the specified RedactImageRequest message. Does not implicitly {@link google.privacy.dlp.v2.RedactImageRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.RedactImageRequest + * @static + * @param {google.privacy.dlp.v2.IRedactImageRequest} message RedactImageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedactImageRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.inspectConfig != null && Object.hasOwnProperty.call(message, "inspectConfig")) + $root.google.privacy.dlp.v2.InspectConfig.encode(message.inspectConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.imageRedactionConfigs != null && message.imageRedactionConfigs.length) + for (var i = 0; i < message.imageRedactionConfigs.length; ++i) + $root.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.encode(message.imageRedactionConfigs[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.includeFindings != null && Object.hasOwnProperty.call(message, "includeFindings")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.includeFindings); + if (message.byteItem != null && Object.hasOwnProperty.call(message, "byteItem")) + $root.google.privacy.dlp.v2.ByteContentItem.encode(message.byteItem, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.locationId != null && Object.hasOwnProperty.call(message, "locationId")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.locationId); + if (message.inspectTemplate != null && Object.hasOwnProperty.call(message, "inspectTemplate")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.inspectTemplate); + if (message.deidentifyTemplate != null && Object.hasOwnProperty.call(message, "deidentifyTemplate")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.deidentifyTemplate); + return writer; + }; + + /** + * Encodes the specified RedactImageRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RedactImageRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.RedactImageRequest + * @static + * @param {google.privacy.dlp.v2.IRedactImageRequest} message RedactImageRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedactImageRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RedactImageRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.RedactImageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.RedactImageRequest} RedactImageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedactImageRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.RedactImageRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 8: { + message.locationId = reader.string(); + break; + } + case 2: { + message.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + if (!(message.imageRedactionConfigs && message.imageRedactionConfigs.length)) + message.imageRedactionConfigs = []; + message.imageRedactionConfigs.push($root.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 6: { + message.includeFindings = reader.bool(); + break; + } + case 7: { + message.byteItem = $root.google.privacy.dlp.v2.ByteContentItem.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 9: { + message.inspectTemplate = reader.string(); + break; + } + case 10: { + message.deidentifyTemplate = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RedactImageRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.RedactImageRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.RedactImageRequest} RedactImageRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedactImageRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RedactImageRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.RedactImageRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RedactImageRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; + if (message.inspectConfig != null && message.hasOwnProperty("inspectConfig")) { + var error = $root.google.privacy.dlp.v2.InspectConfig.verify(message.inspectConfig, long + 1); + if (error) + return "inspectConfig." + error; + } + if (message.imageRedactionConfigs != null && message.hasOwnProperty("imageRedactionConfigs")) { + if (!Array.isArray(message.imageRedactionConfigs)) + return "imageRedactionConfigs: array expected"; + for (var i = 0; i < message.imageRedactionConfigs.length; ++i) { + var error = $root.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.verify(message.imageRedactionConfigs[i], long + 1); + if (error) + return "imageRedactionConfigs." + error; + } + } + if (message.includeFindings != null && message.hasOwnProperty("includeFindings")) + if (typeof message.includeFindings !== "boolean") + return "includeFindings: boolean expected"; + if (message.byteItem != null && message.hasOwnProperty("byteItem")) { + var error = $root.google.privacy.dlp.v2.ByteContentItem.verify(message.byteItem, long + 1); + if (error) + return "byteItem." + error; + } + if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) + if (!$util.isString(message.inspectTemplate)) + return "inspectTemplate: string expected"; + if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) + if (!$util.isString(message.deidentifyTemplate)) + return "deidentifyTemplate: string expected"; + return null; + }; + + /** + * Creates a RedactImageRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.RedactImageRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.RedactImageRequest} RedactImageRequest + */ + RedactImageRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.RedactImageRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.RedactImageRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.locationId != null) + message.locationId = String(object.locationId); + if (object.inspectConfig != null) { + if (typeof object.inspectConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.RedactImageRequest.inspectConfig: object expected"); + message.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.fromObject(object.inspectConfig, long + 1); + } + if (object.imageRedactionConfigs) { + if (!Array.isArray(object.imageRedactionConfigs)) + throw TypeError(".google.privacy.dlp.v2.RedactImageRequest.imageRedactionConfigs: array expected"); + message.imageRedactionConfigs = []; + for (var i = 0; i < object.imageRedactionConfigs.length; ++i) { + if (typeof object.imageRedactionConfigs[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.RedactImageRequest.imageRedactionConfigs: object expected"); + message.imageRedactionConfigs[i] = $root.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.fromObject(object.imageRedactionConfigs[i], long + 1); + } + } + if (object.includeFindings != null) + message.includeFindings = Boolean(object.includeFindings); + if (object.byteItem != null) { + if (typeof object.byteItem !== "object") + throw TypeError(".google.privacy.dlp.v2.RedactImageRequest.byteItem: object expected"); + message.byteItem = $root.google.privacy.dlp.v2.ByteContentItem.fromObject(object.byteItem, long + 1); + } + if (object.inspectTemplate != null) + message.inspectTemplate = String(object.inspectTemplate); + if (object.deidentifyTemplate != null) + message.deidentifyTemplate = String(object.deidentifyTemplate); + return message; + }; + + /** + * Creates a plain object from a RedactImageRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.RedactImageRequest + * @static + * @param {google.privacy.dlp.v2.RedactImageRequest} message RedactImageRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RedactImageRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.imageRedactionConfigs = []; + if (options.defaults) { + object.parent = ""; + object.inspectConfig = null; + object.includeFindings = false; + object.byteItem = null; + object.locationId = ""; + object.inspectTemplate = ""; + object.deidentifyTemplate = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.inspectConfig != null && message.hasOwnProperty("inspectConfig")) + object.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.toObject(message.inspectConfig, options); + if (message.imageRedactionConfigs && message.imageRedactionConfigs.length) { + object.imageRedactionConfigs = []; + for (var j = 0; j < message.imageRedactionConfigs.length; ++j) + object.imageRedactionConfigs[j] = $root.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.toObject(message.imageRedactionConfigs[j], options); + } + if (message.includeFindings != null && message.hasOwnProperty("includeFindings")) + object.includeFindings = message.includeFindings; + if (message.byteItem != null && message.hasOwnProperty("byteItem")) + object.byteItem = $root.google.privacy.dlp.v2.ByteContentItem.toObject(message.byteItem, options); + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; + if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) + object.inspectTemplate = message.inspectTemplate; + if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) + object.deidentifyTemplate = message.deidentifyTemplate; + return object; + }; + + /** + * Converts this RedactImageRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.RedactImageRequest + * @instance + * @returns {Object.} JSON object + */ + RedactImageRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RedactImageRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.RedactImageRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RedactImageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.RedactImageRequest"; + }; + + RedactImageRequest.ImageRedactionConfig = (function() { + + /** + * Properties of an ImageRedactionConfig. + * @memberof google.privacy.dlp.v2.RedactImageRequest + * @interface IImageRedactionConfig + * @property {google.privacy.dlp.v2.IInfoType|null} [infoType] ImageRedactionConfig infoType + * @property {boolean|null} [redactAllText] ImageRedactionConfig redactAllText + * @property {google.privacy.dlp.v2.IColor|null} [redactionColor] ImageRedactionConfig redactionColor + */ + + /** + * Constructs a new ImageRedactionConfig. + * @memberof google.privacy.dlp.v2.RedactImageRequest + * @classdesc Represents an ImageRedactionConfig. + * @implements IImageRedactionConfig + * @constructor + * @param {google.privacy.dlp.v2.RedactImageRequest.IImageRedactionConfig=} [properties] Properties to set + */ + function ImageRedactionConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImageRedactionConfig infoType. + * @member {google.privacy.dlp.v2.IInfoType|null|undefined} infoType + * @memberof google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig + * @instance + */ + ImageRedactionConfig.prototype.infoType = null; + + /** + * ImageRedactionConfig redactAllText. + * @member {boolean|null|undefined} redactAllText + * @memberof google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig + * @instance + */ + ImageRedactionConfig.prototype.redactAllText = null; + + /** + * ImageRedactionConfig redactionColor. + * @member {google.privacy.dlp.v2.IColor|null|undefined} redactionColor + * @memberof google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig + * @instance + */ + ImageRedactionConfig.prototype.redactionColor = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ImageRedactionConfig target. + * @member {"infoType"|"redactAllText"|undefined} target + * @memberof google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig + * @instance + */ + Object.defineProperty(ImageRedactionConfig.prototype, "target", { + get: $util.oneOfGetter($oneOfFields = ["infoType", "redactAllText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImageRedactionConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig + * @static + * @param {google.privacy.dlp.v2.RedactImageRequest.IImageRedactionConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig} ImageRedactionConfig instance + */ + ImageRedactionConfig.create = function create(properties) { + return new ImageRedactionConfig(properties); + }; + + /** + * Encodes the specified ImageRedactionConfig message. Does not implicitly {@link google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig + * @static + * @param {google.privacy.dlp.v2.RedactImageRequest.IImageRedactionConfig} message ImageRedactionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageRedactionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.infoType != null && Object.hasOwnProperty.call(message, "infoType")) + $root.google.privacy.dlp.v2.InfoType.encode(message.infoType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.redactAllText != null && Object.hasOwnProperty.call(message, "redactAllText")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.redactAllText); + if (message.redactionColor != null && Object.hasOwnProperty.call(message, "redactionColor")) + $root.google.privacy.dlp.v2.Color.encode(message.redactionColor, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ImageRedactionConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig + * @static + * @param {google.privacy.dlp.v2.RedactImageRequest.IImageRedactionConfig} message ImageRedactionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageRedactionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImageRedactionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig} ImageRedactionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageRedactionConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.infoType = $root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.redactAllText = reader.bool(); + break; + } + case 3: { + message.redactionColor = $root.google.privacy.dlp.v2.Color.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an ImageRedactionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig} ImageRedactionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageRedactionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImageRedactionConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImageRedactionConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.infoType != null && message.hasOwnProperty("infoType")) { + properties.target = 1; + { + var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infoType, long + 1); + if (error) + return "infoType." + error; + } + } + if (message.redactAllText != null && message.hasOwnProperty("redactAllText")) { + if (properties.target === 1) + return "target: multiple values"; + properties.target = 1; + if (typeof message.redactAllText !== "boolean") + return "redactAllText: boolean expected"; + } + if (message.redactionColor != null && message.hasOwnProperty("redactionColor")) { + var error = $root.google.privacy.dlp.v2.Color.verify(message.redactionColor, long + 1); + if (error) + return "redactionColor." + error; + } + return null; + }; + + /** + * Creates an ImageRedactionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig} ImageRedactionConfig + */ + ImageRedactionConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig(); + if (object.infoType != null) { + if (typeof object.infoType !== "object") + throw TypeError(".google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.infoType: object expected"); + message.infoType = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoType, long + 1); + } + if (object.redactAllText != null) + message.redactAllText = Boolean(object.redactAllText); + if (object.redactionColor != null) { + if (typeof object.redactionColor !== "object") + throw TypeError(".google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig.redactionColor: object expected"); + message.redactionColor = $root.google.privacy.dlp.v2.Color.fromObject(object.redactionColor, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an ImageRedactionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig + * @static + * @param {google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig} message ImageRedactionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImageRedactionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.redactionColor = null; + if (message.infoType != null && message.hasOwnProperty("infoType")) { + object.infoType = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoType, options); + if (options.oneofs) + object.target = "infoType"; + } + if (message.redactAllText != null && message.hasOwnProperty("redactAllText")) { + object.redactAllText = message.redactAllText; + if (options.oneofs) + object.target = "redactAllText"; + } + if (message.redactionColor != null && message.hasOwnProperty("redactionColor")) + object.redactionColor = $root.google.privacy.dlp.v2.Color.toObject(message.redactionColor, options); + return object; + }; + + /** + * Converts this ImageRedactionConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig + * @instance + * @returns {Object.} JSON object + */ + ImageRedactionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImageRedactionConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImageRedactionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.RedactImageRequest.ImageRedactionConfig"; + }; + + return ImageRedactionConfig; + })(); + + return RedactImageRequest; + })(); + + v2.Color = (function() { + + /** + * Properties of a Color. + * @memberof google.privacy.dlp.v2 + * @interface IColor + * @property {number|null} [red] Color red + * @property {number|null} [green] Color green + * @property {number|null} [blue] Color blue + */ + + /** + * Constructs a new Color. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a Color. + * @implements IColor + * @constructor + * @param {google.privacy.dlp.v2.IColor=} [properties] Properties to set + */ + function Color(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Color red. + * @member {number} red + * @memberof google.privacy.dlp.v2.Color + * @instance + */ + Color.prototype.red = 0; + + /** + * Color green. + * @member {number} green + * @memberof google.privacy.dlp.v2.Color + * @instance + */ + Color.prototype.green = 0; + + /** + * Color blue. + * @member {number} blue + * @memberof google.privacy.dlp.v2.Color + * @instance + */ + Color.prototype.blue = 0; + + /** + * Creates a new Color instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Color + * @static + * @param {google.privacy.dlp.v2.IColor=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Color} Color instance + */ + Color.create = function create(properties) { + return new Color(properties); + }; + + /** + * Encodes the specified Color message. Does not implicitly {@link google.privacy.dlp.v2.Color.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Color + * @static + * @param {google.privacy.dlp.v2.IColor} message Color message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Color.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.red != null && Object.hasOwnProperty.call(message, "red")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.red); + if (message.green != null && Object.hasOwnProperty.call(message, "green")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.green); + if (message.blue != null && Object.hasOwnProperty.call(message, "blue")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.blue); + return writer; + }; + + /** + * Encodes the specified Color message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Color.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Color + * @static + * @param {google.privacy.dlp.v2.IColor} message Color message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Color.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Color message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Color + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Color} Color + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Color.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Color(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.red = reader.float(); + break; + } + case 2: { + message.green = reader.float(); + break; + } + case 3: { + message.blue = reader.float(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Color message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Color + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Color} Color + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Color.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Color message. + * @function verify + * @memberof google.privacy.dlp.v2.Color + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Color.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.red != null && message.hasOwnProperty("red")) + if (typeof message.red !== "number") + return "red: number expected"; + if (message.green != null && message.hasOwnProperty("green")) + if (typeof message.green !== "number") + return "green: number expected"; + if (message.blue != null && message.hasOwnProperty("blue")) + if (typeof message.blue !== "number") + return "blue: number expected"; + return null; + }; + + /** + * Creates a Color message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Color + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Color} Color + */ + Color.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Color) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.Color(); + if (object.red != null) + message.red = Number(object.red); + if (object.green != null) + message.green = Number(object.green); + if (object.blue != null) + message.blue = Number(object.blue); + return message; + }; + + /** + * Creates a plain object from a Color message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Color + * @static + * @param {google.privacy.dlp.v2.Color} message Color + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Color.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.red = 0; + object.green = 0; + object.blue = 0; + } + if (message.red != null && message.hasOwnProperty("red")) + object.red = options.json && !isFinite(message.red) ? String(message.red) : message.red; + if (message.green != null && message.hasOwnProperty("green")) + object.green = options.json && !isFinite(message.green) ? String(message.green) : message.green; + if (message.blue != null && message.hasOwnProperty("blue")) + object.blue = options.json && !isFinite(message.blue) ? String(message.blue) : message.blue; + return object; + }; + + /** + * Converts this Color to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Color + * @instance + * @returns {Object.} JSON object + */ + Color.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Color + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Color + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Color.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Color"; + }; + + return Color; + })(); + + v2.RedactImageResponse = (function() { + + /** + * Properties of a RedactImageResponse. + * @memberof google.privacy.dlp.v2 + * @interface IRedactImageResponse + * @property {Uint8Array|null} [redactedImage] RedactImageResponse redactedImage + * @property {string|null} [extractedText] RedactImageResponse extractedText + * @property {google.privacy.dlp.v2.IInspectResult|null} [inspectResult] RedactImageResponse inspectResult + */ + + /** + * Constructs a new RedactImageResponse. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a RedactImageResponse. + * @implements IRedactImageResponse + * @constructor + * @param {google.privacy.dlp.v2.IRedactImageResponse=} [properties] Properties to set + */ + function RedactImageResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RedactImageResponse redactedImage. + * @member {Uint8Array} redactedImage + * @memberof google.privacy.dlp.v2.RedactImageResponse + * @instance + */ + RedactImageResponse.prototype.redactedImage = $util.newBuffer([]); + + /** + * RedactImageResponse extractedText. + * @member {string} extractedText + * @memberof google.privacy.dlp.v2.RedactImageResponse + * @instance + */ + RedactImageResponse.prototype.extractedText = ""; + + /** + * RedactImageResponse inspectResult. + * @member {google.privacy.dlp.v2.IInspectResult|null|undefined} inspectResult + * @memberof google.privacy.dlp.v2.RedactImageResponse + * @instance + */ + RedactImageResponse.prototype.inspectResult = null; + + /** + * Creates a new RedactImageResponse instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.RedactImageResponse + * @static + * @param {google.privacy.dlp.v2.IRedactImageResponse=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.RedactImageResponse} RedactImageResponse instance + */ + RedactImageResponse.create = function create(properties) { + return new RedactImageResponse(properties); + }; + + /** + * Encodes the specified RedactImageResponse message. Does not implicitly {@link google.privacy.dlp.v2.RedactImageResponse.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.RedactImageResponse + * @static + * @param {google.privacy.dlp.v2.IRedactImageResponse} message RedactImageResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedactImageResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.redactedImage != null && Object.hasOwnProperty.call(message, "redactedImage")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.redactedImage); + if (message.extractedText != null && Object.hasOwnProperty.call(message, "extractedText")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extractedText); + if (message.inspectResult != null && Object.hasOwnProperty.call(message, "inspectResult")) + $root.google.privacy.dlp.v2.InspectResult.encode(message.inspectResult, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RedactImageResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RedactImageResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.RedactImageResponse + * @static + * @param {google.privacy.dlp.v2.IRedactImageResponse} message RedactImageResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedactImageResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RedactImageResponse message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.RedactImageResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.RedactImageResponse} RedactImageResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedactImageResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.RedactImageResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.redactedImage = reader.bytes(); + break; + } + case 2: { + message.extractedText = reader.string(); + break; + } + case 3: { + message.inspectResult = $root.google.privacy.dlp.v2.InspectResult.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RedactImageResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.RedactImageResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.RedactImageResponse} RedactImageResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedactImageResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RedactImageResponse message. + * @function verify + * @memberof google.privacy.dlp.v2.RedactImageResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RedactImageResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.redactedImage != null && message.hasOwnProperty("redactedImage")) + if (!(message.redactedImage && typeof message.redactedImage.length === "number" || $util.isString(message.redactedImage))) + return "redactedImage: buffer expected"; + if (message.extractedText != null && message.hasOwnProperty("extractedText")) + if (!$util.isString(message.extractedText)) + return "extractedText: string expected"; + if (message.inspectResult != null && message.hasOwnProperty("inspectResult")) { + var error = $root.google.privacy.dlp.v2.InspectResult.verify(message.inspectResult, long + 1); + if (error) + return "inspectResult." + error; + } + return null; + }; + + /** + * Creates a RedactImageResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.RedactImageResponse + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.RedactImageResponse} RedactImageResponse + */ + RedactImageResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.RedactImageResponse) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.RedactImageResponse(); + if (object.redactedImage != null) + if (typeof object.redactedImage === "string") + $util.base64.decode(object.redactedImage, message.redactedImage = $util.newBuffer($util.base64.length(object.redactedImage)), 0); + else if (object.redactedImage.length >= 0) + message.redactedImage = object.redactedImage; + if (object.extractedText != null) + message.extractedText = String(object.extractedText); + if (object.inspectResult != null) { + if (typeof object.inspectResult !== "object") + throw TypeError(".google.privacy.dlp.v2.RedactImageResponse.inspectResult: object expected"); + message.inspectResult = $root.google.privacy.dlp.v2.InspectResult.fromObject(object.inspectResult, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a RedactImageResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.RedactImageResponse + * @static + * @param {google.privacy.dlp.v2.RedactImageResponse} message RedactImageResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RedactImageResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.redactedImage = ""; + else { + object.redactedImage = []; + if (options.bytes !== Array) + object.redactedImage = $util.newBuffer(object.redactedImage); + } + object.extractedText = ""; + object.inspectResult = null; + } + if (message.redactedImage != null && message.hasOwnProperty("redactedImage")) + object.redactedImage = options.bytes === String ? $util.base64.encode(message.redactedImage, 0, message.redactedImage.length) : options.bytes === Array ? Array.prototype.slice.call(message.redactedImage) : message.redactedImage; + if (message.extractedText != null && message.hasOwnProperty("extractedText")) + object.extractedText = message.extractedText; + if (message.inspectResult != null && message.hasOwnProperty("inspectResult")) + object.inspectResult = $root.google.privacy.dlp.v2.InspectResult.toObject(message.inspectResult, options); + return object; + }; + + /** + * Converts this RedactImageResponse to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.RedactImageResponse + * @instance + * @returns {Object.} JSON object + */ + RedactImageResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RedactImageResponse + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.RedactImageResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RedactImageResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.RedactImageResponse"; + }; + + return RedactImageResponse; + })(); + + v2.DeidentifyContentRequest = (function() { + + /** + * Properties of a DeidentifyContentRequest. + * @memberof google.privacy.dlp.v2 + * @interface IDeidentifyContentRequest + * @property {string|null} [parent] DeidentifyContentRequest parent + * @property {google.privacy.dlp.v2.IDeidentifyConfig|null} [deidentifyConfig] DeidentifyContentRequest deidentifyConfig + * @property {google.privacy.dlp.v2.IInspectConfig|null} [inspectConfig] DeidentifyContentRequest inspectConfig + * @property {google.privacy.dlp.v2.IContentItem|null} [item] DeidentifyContentRequest item + * @property {string|null} [inspectTemplateName] DeidentifyContentRequest inspectTemplateName + * @property {string|null} [deidentifyTemplateName] DeidentifyContentRequest deidentifyTemplateName + * @property {string|null} [locationId] DeidentifyContentRequest locationId + */ + + /** + * Constructs a new DeidentifyContentRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DeidentifyContentRequest. + * @implements IDeidentifyContentRequest + * @constructor + * @param {google.privacy.dlp.v2.IDeidentifyContentRequest=} [properties] Properties to set + */ + function DeidentifyContentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeidentifyContentRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.DeidentifyContentRequest + * @instance + */ + DeidentifyContentRequest.prototype.parent = ""; + + /** + * DeidentifyContentRequest deidentifyConfig. + * @member {google.privacy.dlp.v2.IDeidentifyConfig|null|undefined} deidentifyConfig + * @memberof google.privacy.dlp.v2.DeidentifyContentRequest + * @instance + */ + DeidentifyContentRequest.prototype.deidentifyConfig = null; + + /** + * DeidentifyContentRequest inspectConfig. + * @member {google.privacy.dlp.v2.IInspectConfig|null|undefined} inspectConfig + * @memberof google.privacy.dlp.v2.DeidentifyContentRequest + * @instance + */ + DeidentifyContentRequest.prototype.inspectConfig = null; + + /** + * DeidentifyContentRequest item. + * @member {google.privacy.dlp.v2.IContentItem|null|undefined} item + * @memberof google.privacy.dlp.v2.DeidentifyContentRequest + * @instance + */ + DeidentifyContentRequest.prototype.item = null; + + /** + * DeidentifyContentRequest inspectTemplateName. + * @member {string} inspectTemplateName + * @memberof google.privacy.dlp.v2.DeidentifyContentRequest + * @instance + */ + DeidentifyContentRequest.prototype.inspectTemplateName = ""; + + /** + * DeidentifyContentRequest deidentifyTemplateName. + * @member {string} deidentifyTemplateName + * @memberof google.privacy.dlp.v2.DeidentifyContentRequest + * @instance + */ + DeidentifyContentRequest.prototype.deidentifyTemplateName = ""; + + /** + * DeidentifyContentRequest locationId. + * @member {string} locationId + * @memberof google.privacy.dlp.v2.DeidentifyContentRequest + * @instance + */ + DeidentifyContentRequest.prototype.locationId = ""; + + /** + * Creates a new DeidentifyContentRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DeidentifyContentRequest + * @static + * @param {google.privacy.dlp.v2.IDeidentifyContentRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DeidentifyContentRequest} DeidentifyContentRequest instance + */ + DeidentifyContentRequest.create = function create(properties) { + return new DeidentifyContentRequest(properties); + }; + + /** + * Encodes the specified DeidentifyContentRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyContentRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DeidentifyContentRequest + * @static + * @param {google.privacy.dlp.v2.IDeidentifyContentRequest} message DeidentifyContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeidentifyContentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.deidentifyConfig != null && Object.hasOwnProperty.call(message, "deidentifyConfig")) + $root.google.privacy.dlp.v2.DeidentifyConfig.encode(message.deidentifyConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.inspectConfig != null && Object.hasOwnProperty.call(message, "inspectConfig")) + $root.google.privacy.dlp.v2.InspectConfig.encode(message.inspectConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.item != null && Object.hasOwnProperty.call(message, "item")) + $root.google.privacy.dlp.v2.ContentItem.encode(message.item, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.inspectTemplateName != null && Object.hasOwnProperty.call(message, "inspectTemplateName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.inspectTemplateName); + if (message.deidentifyTemplateName != null && Object.hasOwnProperty.call(message, "deidentifyTemplateName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.deidentifyTemplateName); + if (message.locationId != null && Object.hasOwnProperty.call(message, "locationId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.locationId); + return writer; + }; + + /** + * Encodes the specified DeidentifyContentRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyContentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DeidentifyContentRequest + * @static + * @param {google.privacy.dlp.v2.IDeidentifyContentRequest} message DeidentifyContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeidentifyContentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeidentifyContentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DeidentifyContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DeidentifyContentRequest} DeidentifyContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeidentifyContentRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DeidentifyContentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.deidentifyConfig = $root.google.privacy.dlp.v2.DeidentifyConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.item = $root.google.privacy.dlp.v2.ContentItem.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.inspectTemplateName = reader.string(); + break; + } + case 6: { + message.deidentifyTemplateName = reader.string(); + break; + } + case 7: { + message.locationId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeidentifyContentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DeidentifyContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DeidentifyContentRequest} DeidentifyContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeidentifyContentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeidentifyContentRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.DeidentifyContentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeidentifyContentRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.deidentifyConfig != null && message.hasOwnProperty("deidentifyConfig")) { + var error = $root.google.privacy.dlp.v2.DeidentifyConfig.verify(message.deidentifyConfig, long + 1); + if (error) + return "deidentifyConfig." + error; + } + if (message.inspectConfig != null && message.hasOwnProperty("inspectConfig")) { + var error = $root.google.privacy.dlp.v2.InspectConfig.verify(message.inspectConfig, long + 1); + if (error) + return "inspectConfig." + error; + } + if (message.item != null && message.hasOwnProperty("item")) { + var error = $root.google.privacy.dlp.v2.ContentItem.verify(message.item, long + 1); + if (error) + return "item." + error; + } + if (message.inspectTemplateName != null && message.hasOwnProperty("inspectTemplateName")) + if (!$util.isString(message.inspectTemplateName)) + return "inspectTemplateName: string expected"; + if (message.deidentifyTemplateName != null && message.hasOwnProperty("deidentifyTemplateName")) + if (!$util.isString(message.deidentifyTemplateName)) + return "deidentifyTemplateName: string expected"; + if (message.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; + return null; + }; + + /** + * Creates a DeidentifyContentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DeidentifyContentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DeidentifyContentRequest} DeidentifyContentRequest + */ + DeidentifyContentRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DeidentifyContentRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DeidentifyContentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.deidentifyConfig != null) { + if (typeof object.deidentifyConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.DeidentifyContentRequest.deidentifyConfig: object expected"); + message.deidentifyConfig = $root.google.privacy.dlp.v2.DeidentifyConfig.fromObject(object.deidentifyConfig, long + 1); + } + if (object.inspectConfig != null) { + if (typeof object.inspectConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.DeidentifyContentRequest.inspectConfig: object expected"); + message.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.fromObject(object.inspectConfig, long + 1); + } + if (object.item != null) { + if (typeof object.item !== "object") + throw TypeError(".google.privacy.dlp.v2.DeidentifyContentRequest.item: object expected"); + message.item = $root.google.privacy.dlp.v2.ContentItem.fromObject(object.item, long + 1); + } + if (object.inspectTemplateName != null) + message.inspectTemplateName = String(object.inspectTemplateName); + if (object.deidentifyTemplateName != null) + message.deidentifyTemplateName = String(object.deidentifyTemplateName); + if (object.locationId != null) + message.locationId = String(object.locationId); + return message; + }; + + /** + * Creates a plain object from a DeidentifyContentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DeidentifyContentRequest + * @static + * @param {google.privacy.dlp.v2.DeidentifyContentRequest} message DeidentifyContentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeidentifyContentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.deidentifyConfig = null; + object.inspectConfig = null; + object.item = null; + object.inspectTemplateName = ""; + object.deidentifyTemplateName = ""; + object.locationId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.deidentifyConfig != null && message.hasOwnProperty("deidentifyConfig")) + object.deidentifyConfig = $root.google.privacy.dlp.v2.DeidentifyConfig.toObject(message.deidentifyConfig, options); + if (message.inspectConfig != null && message.hasOwnProperty("inspectConfig")) + object.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.toObject(message.inspectConfig, options); + if (message.item != null && message.hasOwnProperty("item")) + object.item = $root.google.privacy.dlp.v2.ContentItem.toObject(message.item, options); + if (message.inspectTemplateName != null && message.hasOwnProperty("inspectTemplateName")) + object.inspectTemplateName = message.inspectTemplateName; + if (message.deidentifyTemplateName != null && message.hasOwnProperty("deidentifyTemplateName")) + object.deidentifyTemplateName = message.deidentifyTemplateName; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; + return object; + }; + + /** + * Converts this DeidentifyContentRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DeidentifyContentRequest + * @instance + * @returns {Object.} JSON object + */ + DeidentifyContentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeidentifyContentRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DeidentifyContentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeidentifyContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DeidentifyContentRequest"; + }; + + return DeidentifyContentRequest; + })(); + + v2.DeidentifyContentResponse = (function() { + + /** + * Properties of a DeidentifyContentResponse. + * @memberof google.privacy.dlp.v2 + * @interface IDeidentifyContentResponse + * @property {google.privacy.dlp.v2.IContentItem|null} [item] DeidentifyContentResponse item + * @property {google.privacy.dlp.v2.ITransformationOverview|null} [overview] DeidentifyContentResponse overview + */ + + /** + * Constructs a new DeidentifyContentResponse. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DeidentifyContentResponse. + * @implements IDeidentifyContentResponse + * @constructor + * @param {google.privacy.dlp.v2.IDeidentifyContentResponse=} [properties] Properties to set + */ + function DeidentifyContentResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeidentifyContentResponse item. + * @member {google.privacy.dlp.v2.IContentItem|null|undefined} item + * @memberof google.privacy.dlp.v2.DeidentifyContentResponse + * @instance + */ + DeidentifyContentResponse.prototype.item = null; + + /** + * DeidentifyContentResponse overview. + * @member {google.privacy.dlp.v2.ITransformationOverview|null|undefined} overview + * @memberof google.privacy.dlp.v2.DeidentifyContentResponse + * @instance + */ + DeidentifyContentResponse.prototype.overview = null; + + /** + * Creates a new DeidentifyContentResponse instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DeidentifyContentResponse + * @static + * @param {google.privacy.dlp.v2.IDeidentifyContentResponse=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DeidentifyContentResponse} DeidentifyContentResponse instance + */ + DeidentifyContentResponse.create = function create(properties) { + return new DeidentifyContentResponse(properties); + }; + + /** + * Encodes the specified DeidentifyContentResponse message. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyContentResponse.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DeidentifyContentResponse + * @static + * @param {google.privacy.dlp.v2.IDeidentifyContentResponse} message DeidentifyContentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeidentifyContentResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.item != null && Object.hasOwnProperty.call(message, "item")) + $root.google.privacy.dlp.v2.ContentItem.encode(message.item, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.overview != null && Object.hasOwnProperty.call(message, "overview")) + $root.google.privacy.dlp.v2.TransformationOverview.encode(message.overview, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeidentifyContentResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyContentResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DeidentifyContentResponse + * @static + * @param {google.privacy.dlp.v2.IDeidentifyContentResponse} message DeidentifyContentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeidentifyContentResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeidentifyContentResponse message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DeidentifyContentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DeidentifyContentResponse} DeidentifyContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeidentifyContentResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DeidentifyContentResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.item = $root.google.privacy.dlp.v2.ContentItem.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.overview = $root.google.privacy.dlp.v2.TransformationOverview.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeidentifyContentResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DeidentifyContentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DeidentifyContentResponse} DeidentifyContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeidentifyContentResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeidentifyContentResponse message. + * @function verify + * @memberof google.privacy.dlp.v2.DeidentifyContentResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeidentifyContentResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.item != null && message.hasOwnProperty("item")) { + var error = $root.google.privacy.dlp.v2.ContentItem.verify(message.item, long + 1); + if (error) + return "item." + error; + } + if (message.overview != null && message.hasOwnProperty("overview")) { + var error = $root.google.privacy.dlp.v2.TransformationOverview.verify(message.overview, long + 1); + if (error) + return "overview." + error; + } + return null; + }; + + /** + * Creates a DeidentifyContentResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DeidentifyContentResponse + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DeidentifyContentResponse} DeidentifyContentResponse + */ + DeidentifyContentResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DeidentifyContentResponse) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DeidentifyContentResponse(); + if (object.item != null) { + if (typeof object.item !== "object") + throw TypeError(".google.privacy.dlp.v2.DeidentifyContentResponse.item: object expected"); + message.item = $root.google.privacy.dlp.v2.ContentItem.fromObject(object.item, long + 1); + } + if (object.overview != null) { + if (typeof object.overview !== "object") + throw TypeError(".google.privacy.dlp.v2.DeidentifyContentResponse.overview: object expected"); + message.overview = $root.google.privacy.dlp.v2.TransformationOverview.fromObject(object.overview, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DeidentifyContentResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DeidentifyContentResponse + * @static + * @param {google.privacy.dlp.v2.DeidentifyContentResponse} message DeidentifyContentResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeidentifyContentResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.item = null; + object.overview = null; + } + if (message.item != null && message.hasOwnProperty("item")) + object.item = $root.google.privacy.dlp.v2.ContentItem.toObject(message.item, options); + if (message.overview != null && message.hasOwnProperty("overview")) + object.overview = $root.google.privacy.dlp.v2.TransformationOverview.toObject(message.overview, options); + return object; + }; + + /** + * Converts this DeidentifyContentResponse to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DeidentifyContentResponse + * @instance + * @returns {Object.} JSON object + */ + DeidentifyContentResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeidentifyContentResponse + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DeidentifyContentResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeidentifyContentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DeidentifyContentResponse"; + }; + + return DeidentifyContentResponse; + })(); + + v2.ReidentifyContentRequest = (function() { + + /** + * Properties of a ReidentifyContentRequest. + * @memberof google.privacy.dlp.v2 + * @interface IReidentifyContentRequest + * @property {string|null} [parent] ReidentifyContentRequest parent + * @property {google.privacy.dlp.v2.IDeidentifyConfig|null} [reidentifyConfig] ReidentifyContentRequest reidentifyConfig + * @property {google.privacy.dlp.v2.IInspectConfig|null} [inspectConfig] ReidentifyContentRequest inspectConfig + * @property {google.privacy.dlp.v2.IContentItem|null} [item] ReidentifyContentRequest item + * @property {string|null} [inspectTemplateName] ReidentifyContentRequest inspectTemplateName + * @property {string|null} [reidentifyTemplateName] ReidentifyContentRequest reidentifyTemplateName + * @property {string|null} [locationId] ReidentifyContentRequest locationId + */ + + /** + * Constructs a new ReidentifyContentRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ReidentifyContentRequest. + * @implements IReidentifyContentRequest + * @constructor + * @param {google.privacy.dlp.v2.IReidentifyContentRequest=} [properties] Properties to set + */ + function ReidentifyContentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReidentifyContentRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.ReidentifyContentRequest + * @instance + */ + ReidentifyContentRequest.prototype.parent = ""; + + /** + * ReidentifyContentRequest reidentifyConfig. + * @member {google.privacy.dlp.v2.IDeidentifyConfig|null|undefined} reidentifyConfig + * @memberof google.privacy.dlp.v2.ReidentifyContentRequest + * @instance + */ + ReidentifyContentRequest.prototype.reidentifyConfig = null; + + /** + * ReidentifyContentRequest inspectConfig. + * @member {google.privacy.dlp.v2.IInspectConfig|null|undefined} inspectConfig + * @memberof google.privacy.dlp.v2.ReidentifyContentRequest + * @instance + */ + ReidentifyContentRequest.prototype.inspectConfig = null; + + /** + * ReidentifyContentRequest item. + * @member {google.privacy.dlp.v2.IContentItem|null|undefined} item + * @memberof google.privacy.dlp.v2.ReidentifyContentRequest + * @instance + */ + ReidentifyContentRequest.prototype.item = null; + + /** + * ReidentifyContentRequest inspectTemplateName. + * @member {string} inspectTemplateName + * @memberof google.privacy.dlp.v2.ReidentifyContentRequest + * @instance + */ + ReidentifyContentRequest.prototype.inspectTemplateName = ""; + + /** + * ReidentifyContentRequest reidentifyTemplateName. + * @member {string} reidentifyTemplateName + * @memberof google.privacy.dlp.v2.ReidentifyContentRequest + * @instance + */ + ReidentifyContentRequest.prototype.reidentifyTemplateName = ""; + + /** + * ReidentifyContentRequest locationId. + * @member {string} locationId + * @memberof google.privacy.dlp.v2.ReidentifyContentRequest + * @instance + */ + ReidentifyContentRequest.prototype.locationId = ""; + + /** + * Creates a new ReidentifyContentRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ReidentifyContentRequest + * @static + * @param {google.privacy.dlp.v2.IReidentifyContentRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ReidentifyContentRequest} ReidentifyContentRequest instance + */ + ReidentifyContentRequest.create = function create(properties) { + return new ReidentifyContentRequest(properties); + }; + + /** + * Encodes the specified ReidentifyContentRequest message. Does not implicitly {@link google.privacy.dlp.v2.ReidentifyContentRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ReidentifyContentRequest + * @static + * @param {google.privacy.dlp.v2.IReidentifyContentRequest} message ReidentifyContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReidentifyContentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.reidentifyConfig != null && Object.hasOwnProperty.call(message, "reidentifyConfig")) + $root.google.privacy.dlp.v2.DeidentifyConfig.encode(message.reidentifyConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.inspectConfig != null && Object.hasOwnProperty.call(message, "inspectConfig")) + $root.google.privacy.dlp.v2.InspectConfig.encode(message.inspectConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.item != null && Object.hasOwnProperty.call(message, "item")) + $root.google.privacy.dlp.v2.ContentItem.encode(message.item, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.inspectTemplateName != null && Object.hasOwnProperty.call(message, "inspectTemplateName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.inspectTemplateName); + if (message.reidentifyTemplateName != null && Object.hasOwnProperty.call(message, "reidentifyTemplateName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.reidentifyTemplateName); + if (message.locationId != null && Object.hasOwnProperty.call(message, "locationId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.locationId); + return writer; + }; + + /** + * Encodes the specified ReidentifyContentRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ReidentifyContentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ReidentifyContentRequest + * @static + * @param {google.privacy.dlp.v2.IReidentifyContentRequest} message ReidentifyContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReidentifyContentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReidentifyContentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ReidentifyContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ReidentifyContentRequest} ReidentifyContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReidentifyContentRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ReidentifyContentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.reidentifyConfig = $root.google.privacy.dlp.v2.DeidentifyConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.item = $root.google.privacy.dlp.v2.ContentItem.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.inspectTemplateName = reader.string(); + break; + } + case 6: { + message.reidentifyTemplateName = reader.string(); + break; + } + case 7: { + message.locationId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ReidentifyContentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ReidentifyContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ReidentifyContentRequest} ReidentifyContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReidentifyContentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReidentifyContentRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.ReidentifyContentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReidentifyContentRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.reidentifyConfig != null && message.hasOwnProperty("reidentifyConfig")) { + var error = $root.google.privacy.dlp.v2.DeidentifyConfig.verify(message.reidentifyConfig, long + 1); + if (error) + return "reidentifyConfig." + error; + } + if (message.inspectConfig != null && message.hasOwnProperty("inspectConfig")) { + var error = $root.google.privacy.dlp.v2.InspectConfig.verify(message.inspectConfig, long + 1); + if (error) + return "inspectConfig." + error; + } + if (message.item != null && message.hasOwnProperty("item")) { + var error = $root.google.privacy.dlp.v2.ContentItem.verify(message.item, long + 1); + if (error) + return "item." + error; + } + if (message.inspectTemplateName != null && message.hasOwnProperty("inspectTemplateName")) + if (!$util.isString(message.inspectTemplateName)) + return "inspectTemplateName: string expected"; + if (message.reidentifyTemplateName != null && message.hasOwnProperty("reidentifyTemplateName")) + if (!$util.isString(message.reidentifyTemplateName)) + return "reidentifyTemplateName: string expected"; + if (message.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; + return null; + }; + + /** + * Creates a ReidentifyContentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ReidentifyContentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ReidentifyContentRequest} ReidentifyContentRequest + */ + ReidentifyContentRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ReidentifyContentRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ReidentifyContentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.reidentifyConfig != null) { + if (typeof object.reidentifyConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.ReidentifyContentRequest.reidentifyConfig: object expected"); + message.reidentifyConfig = $root.google.privacy.dlp.v2.DeidentifyConfig.fromObject(object.reidentifyConfig, long + 1); + } + if (object.inspectConfig != null) { + if (typeof object.inspectConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.ReidentifyContentRequest.inspectConfig: object expected"); + message.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.fromObject(object.inspectConfig, long + 1); + } + if (object.item != null) { + if (typeof object.item !== "object") + throw TypeError(".google.privacy.dlp.v2.ReidentifyContentRequest.item: object expected"); + message.item = $root.google.privacy.dlp.v2.ContentItem.fromObject(object.item, long + 1); + } + if (object.inspectTemplateName != null) + message.inspectTemplateName = String(object.inspectTemplateName); + if (object.reidentifyTemplateName != null) + message.reidentifyTemplateName = String(object.reidentifyTemplateName); + if (object.locationId != null) + message.locationId = String(object.locationId); + return message; + }; + + /** + * Creates a plain object from a ReidentifyContentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ReidentifyContentRequest + * @static + * @param {google.privacy.dlp.v2.ReidentifyContentRequest} message ReidentifyContentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReidentifyContentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.reidentifyConfig = null; + object.inspectConfig = null; + object.item = null; + object.inspectTemplateName = ""; + object.reidentifyTemplateName = ""; + object.locationId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.reidentifyConfig != null && message.hasOwnProperty("reidentifyConfig")) + object.reidentifyConfig = $root.google.privacy.dlp.v2.DeidentifyConfig.toObject(message.reidentifyConfig, options); + if (message.inspectConfig != null && message.hasOwnProperty("inspectConfig")) + object.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.toObject(message.inspectConfig, options); + if (message.item != null && message.hasOwnProperty("item")) + object.item = $root.google.privacy.dlp.v2.ContentItem.toObject(message.item, options); + if (message.inspectTemplateName != null && message.hasOwnProperty("inspectTemplateName")) + object.inspectTemplateName = message.inspectTemplateName; + if (message.reidentifyTemplateName != null && message.hasOwnProperty("reidentifyTemplateName")) + object.reidentifyTemplateName = message.reidentifyTemplateName; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; + return object; + }; + + /** + * Converts this ReidentifyContentRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ReidentifyContentRequest + * @instance + * @returns {Object.} JSON object + */ + ReidentifyContentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReidentifyContentRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ReidentifyContentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReidentifyContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ReidentifyContentRequest"; + }; + + return ReidentifyContentRequest; + })(); + + v2.ReidentifyContentResponse = (function() { + + /** + * Properties of a ReidentifyContentResponse. + * @memberof google.privacy.dlp.v2 + * @interface IReidentifyContentResponse + * @property {google.privacy.dlp.v2.IContentItem|null} [item] ReidentifyContentResponse item + * @property {google.privacy.dlp.v2.ITransformationOverview|null} [overview] ReidentifyContentResponse overview + */ + + /** + * Constructs a new ReidentifyContentResponse. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ReidentifyContentResponse. + * @implements IReidentifyContentResponse + * @constructor + * @param {google.privacy.dlp.v2.IReidentifyContentResponse=} [properties] Properties to set + */ + function ReidentifyContentResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReidentifyContentResponse item. + * @member {google.privacy.dlp.v2.IContentItem|null|undefined} item + * @memberof google.privacy.dlp.v2.ReidentifyContentResponse + * @instance + */ + ReidentifyContentResponse.prototype.item = null; + + /** + * ReidentifyContentResponse overview. + * @member {google.privacy.dlp.v2.ITransformationOverview|null|undefined} overview + * @memberof google.privacy.dlp.v2.ReidentifyContentResponse + * @instance + */ + ReidentifyContentResponse.prototype.overview = null; + + /** + * Creates a new ReidentifyContentResponse instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ReidentifyContentResponse + * @static + * @param {google.privacy.dlp.v2.IReidentifyContentResponse=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ReidentifyContentResponse} ReidentifyContentResponse instance + */ + ReidentifyContentResponse.create = function create(properties) { + return new ReidentifyContentResponse(properties); + }; + + /** + * Encodes the specified ReidentifyContentResponse message. Does not implicitly {@link google.privacy.dlp.v2.ReidentifyContentResponse.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ReidentifyContentResponse + * @static + * @param {google.privacy.dlp.v2.IReidentifyContentResponse} message ReidentifyContentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReidentifyContentResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.item != null && Object.hasOwnProperty.call(message, "item")) + $root.google.privacy.dlp.v2.ContentItem.encode(message.item, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.overview != null && Object.hasOwnProperty.call(message, "overview")) + $root.google.privacy.dlp.v2.TransformationOverview.encode(message.overview, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReidentifyContentResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ReidentifyContentResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ReidentifyContentResponse + * @static + * @param {google.privacy.dlp.v2.IReidentifyContentResponse} message ReidentifyContentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReidentifyContentResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReidentifyContentResponse message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ReidentifyContentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ReidentifyContentResponse} ReidentifyContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReidentifyContentResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ReidentifyContentResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.item = $root.google.privacy.dlp.v2.ContentItem.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.overview = $root.google.privacy.dlp.v2.TransformationOverview.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ReidentifyContentResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ReidentifyContentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ReidentifyContentResponse} ReidentifyContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReidentifyContentResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReidentifyContentResponse message. + * @function verify + * @memberof google.privacy.dlp.v2.ReidentifyContentResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReidentifyContentResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.item != null && message.hasOwnProperty("item")) { + var error = $root.google.privacy.dlp.v2.ContentItem.verify(message.item, long + 1); + if (error) + return "item." + error; + } + if (message.overview != null && message.hasOwnProperty("overview")) { + var error = $root.google.privacy.dlp.v2.TransformationOverview.verify(message.overview, long + 1); + if (error) + return "overview." + error; + } + return null; + }; + + /** + * Creates a ReidentifyContentResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ReidentifyContentResponse + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ReidentifyContentResponse} ReidentifyContentResponse + */ + ReidentifyContentResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ReidentifyContentResponse) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ReidentifyContentResponse(); + if (object.item != null) { + if (typeof object.item !== "object") + throw TypeError(".google.privacy.dlp.v2.ReidentifyContentResponse.item: object expected"); + message.item = $root.google.privacy.dlp.v2.ContentItem.fromObject(object.item, long + 1); + } + if (object.overview != null) { + if (typeof object.overview !== "object") + throw TypeError(".google.privacy.dlp.v2.ReidentifyContentResponse.overview: object expected"); + message.overview = $root.google.privacy.dlp.v2.TransformationOverview.fromObject(object.overview, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a ReidentifyContentResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ReidentifyContentResponse + * @static + * @param {google.privacy.dlp.v2.ReidentifyContentResponse} message ReidentifyContentResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReidentifyContentResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.item = null; + object.overview = null; + } + if (message.item != null && message.hasOwnProperty("item")) + object.item = $root.google.privacy.dlp.v2.ContentItem.toObject(message.item, options); + if (message.overview != null && message.hasOwnProperty("overview")) + object.overview = $root.google.privacy.dlp.v2.TransformationOverview.toObject(message.overview, options); + return object; + }; + + /** + * Converts this ReidentifyContentResponse to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ReidentifyContentResponse + * @instance + * @returns {Object.} JSON object + */ + ReidentifyContentResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReidentifyContentResponse + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ReidentifyContentResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReidentifyContentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ReidentifyContentResponse"; + }; + + return ReidentifyContentResponse; + })(); + + v2.InspectContentRequest = (function() { + + /** + * Properties of an InspectContentRequest. + * @memberof google.privacy.dlp.v2 + * @interface IInspectContentRequest + * @property {string|null} [parent] InspectContentRequest parent + * @property {google.privacy.dlp.v2.IInspectConfig|null} [inspectConfig] InspectContentRequest inspectConfig + * @property {google.privacy.dlp.v2.IContentItem|null} [item] InspectContentRequest item + * @property {string|null} [inspectTemplateName] InspectContentRequest inspectTemplateName + * @property {string|null} [locationId] InspectContentRequest locationId + */ + + /** + * Constructs a new InspectContentRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an InspectContentRequest. + * @implements IInspectContentRequest + * @constructor + * @param {google.privacy.dlp.v2.IInspectContentRequest=} [properties] Properties to set + */ + function InspectContentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * InspectContentRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.InspectContentRequest + * @instance + */ + InspectContentRequest.prototype.parent = ""; + + /** + * InspectContentRequest inspectConfig. + * @member {google.privacy.dlp.v2.IInspectConfig|null|undefined} inspectConfig + * @memberof google.privacy.dlp.v2.InspectContentRequest + * @instance + */ + InspectContentRequest.prototype.inspectConfig = null; + + /** + * InspectContentRequest item. + * @member {google.privacy.dlp.v2.IContentItem|null|undefined} item + * @memberof google.privacy.dlp.v2.InspectContentRequest + * @instance + */ + InspectContentRequest.prototype.item = null; + + /** + * InspectContentRequest inspectTemplateName. + * @member {string} inspectTemplateName + * @memberof google.privacy.dlp.v2.InspectContentRequest + * @instance + */ + InspectContentRequest.prototype.inspectTemplateName = ""; + + /** + * InspectContentRequest locationId. + * @member {string} locationId + * @memberof google.privacy.dlp.v2.InspectContentRequest + * @instance + */ + InspectContentRequest.prototype.locationId = ""; + + /** + * Creates a new InspectContentRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.InspectContentRequest + * @static + * @param {google.privacy.dlp.v2.IInspectContentRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.InspectContentRequest} InspectContentRequest instance + */ + InspectContentRequest.create = function create(properties) { + return new InspectContentRequest(properties); + }; + + /** + * Encodes the specified InspectContentRequest message. Does not implicitly {@link google.privacy.dlp.v2.InspectContentRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.InspectContentRequest + * @static + * @param {google.privacy.dlp.v2.IInspectContentRequest} message InspectContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InspectContentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.inspectConfig != null && Object.hasOwnProperty.call(message, "inspectConfig")) + $root.google.privacy.dlp.v2.InspectConfig.encode(message.inspectConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.item != null && Object.hasOwnProperty.call(message, "item")) + $root.google.privacy.dlp.v2.ContentItem.encode(message.item, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.inspectTemplateName != null && Object.hasOwnProperty.call(message, "inspectTemplateName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.inspectTemplateName); + if (message.locationId != null && Object.hasOwnProperty.call(message, "locationId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.locationId); + return writer; + }; + + /** + * Encodes the specified InspectContentRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectContentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.InspectContentRequest + * @static + * @param {google.privacy.dlp.v2.IInspectContentRequest} message InspectContentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InspectContentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InspectContentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.InspectContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.InspectContentRequest} InspectContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InspectContentRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.InspectContentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.item = $root.google.privacy.dlp.v2.ContentItem.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.inspectTemplateName = reader.string(); + break; + } + case 5: { + message.locationId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an InspectContentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.InspectContentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.InspectContentRequest} InspectContentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InspectContentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InspectContentRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.InspectContentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InspectContentRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.inspectConfig != null && message.hasOwnProperty("inspectConfig")) { + var error = $root.google.privacy.dlp.v2.InspectConfig.verify(message.inspectConfig, long + 1); + if (error) + return "inspectConfig." + error; + } + if (message.item != null && message.hasOwnProperty("item")) { + var error = $root.google.privacy.dlp.v2.ContentItem.verify(message.item, long + 1); + if (error) + return "item." + error; + } + if (message.inspectTemplateName != null && message.hasOwnProperty("inspectTemplateName")) + if (!$util.isString(message.inspectTemplateName)) + return "inspectTemplateName: string expected"; + if (message.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; + return null; + }; + + /** + * Creates an InspectContentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.InspectContentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.InspectContentRequest} InspectContentRequest + */ + InspectContentRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.InspectContentRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.InspectContentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.inspectConfig != null) { + if (typeof object.inspectConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectContentRequest.inspectConfig: object expected"); + message.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.fromObject(object.inspectConfig, long + 1); + } + if (object.item != null) { + if (typeof object.item !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectContentRequest.item: object expected"); + message.item = $root.google.privacy.dlp.v2.ContentItem.fromObject(object.item, long + 1); + } + if (object.inspectTemplateName != null) + message.inspectTemplateName = String(object.inspectTemplateName); + if (object.locationId != null) + message.locationId = String(object.locationId); + return message; + }; + + /** + * Creates a plain object from an InspectContentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.InspectContentRequest + * @static + * @param {google.privacy.dlp.v2.InspectContentRequest} message InspectContentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InspectContentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.inspectConfig = null; + object.item = null; + object.inspectTemplateName = ""; + object.locationId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.inspectConfig != null && message.hasOwnProperty("inspectConfig")) + object.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.toObject(message.inspectConfig, options); + if (message.item != null && message.hasOwnProperty("item")) + object.item = $root.google.privacy.dlp.v2.ContentItem.toObject(message.item, options); + if (message.inspectTemplateName != null && message.hasOwnProperty("inspectTemplateName")) + object.inspectTemplateName = message.inspectTemplateName; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; + return object; + }; + + /** + * Converts this InspectContentRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.InspectContentRequest + * @instance + * @returns {Object.} JSON object + */ + InspectContentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InspectContentRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.InspectContentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InspectContentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.InspectContentRequest"; + }; + + return InspectContentRequest; + })(); + + v2.InspectContentResponse = (function() { + + /** + * Properties of an InspectContentResponse. + * @memberof google.privacy.dlp.v2 + * @interface IInspectContentResponse + * @property {google.privacy.dlp.v2.IInspectResult|null} [result] InspectContentResponse result + */ + + /** + * Constructs a new InspectContentResponse. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an InspectContentResponse. + * @implements IInspectContentResponse + * @constructor + * @param {google.privacy.dlp.v2.IInspectContentResponse=} [properties] Properties to set + */ + function InspectContentResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * InspectContentResponse result. + * @member {google.privacy.dlp.v2.IInspectResult|null|undefined} result + * @memberof google.privacy.dlp.v2.InspectContentResponse + * @instance + */ + InspectContentResponse.prototype.result = null; + + /** + * Creates a new InspectContentResponse instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.InspectContentResponse + * @static + * @param {google.privacy.dlp.v2.IInspectContentResponse=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.InspectContentResponse} InspectContentResponse instance + */ + InspectContentResponse.create = function create(properties) { + return new InspectContentResponse(properties); + }; + + /** + * Encodes the specified InspectContentResponse message. Does not implicitly {@link google.privacy.dlp.v2.InspectContentResponse.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.InspectContentResponse + * @static + * @param {google.privacy.dlp.v2.IInspectContentResponse} message InspectContentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InspectContentResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.google.privacy.dlp.v2.InspectResult.encode(message.result, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified InspectContentResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectContentResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.InspectContentResponse + * @static + * @param {google.privacy.dlp.v2.IInspectContentResponse} message InspectContentResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InspectContentResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InspectContentResponse message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.InspectContentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.InspectContentResponse} InspectContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InspectContentResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.InspectContentResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.result = $root.google.privacy.dlp.v2.InspectResult.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an InspectContentResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.InspectContentResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.InspectContentResponse} InspectContentResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InspectContentResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InspectContentResponse message. + * @function verify + * @memberof google.privacy.dlp.v2.InspectContentResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InspectContentResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.google.privacy.dlp.v2.InspectResult.verify(message.result, long + 1); + if (error) + return "result." + error; + } + return null; + }; + + /** + * Creates an InspectContentResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.InspectContentResponse + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.InspectContentResponse} InspectContentResponse + */ + InspectContentResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.InspectContentResponse) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.InspectContentResponse(); + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectContentResponse.result: object expected"); + message.result = $root.google.privacy.dlp.v2.InspectResult.fromObject(object.result, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an InspectContentResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.InspectContentResponse + * @static + * @param {google.privacy.dlp.v2.InspectContentResponse} message InspectContentResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InspectContentResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.result = null; + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.google.privacy.dlp.v2.InspectResult.toObject(message.result, options); + return object; + }; + + /** + * Converts this InspectContentResponse to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.InspectContentResponse + * @instance + * @returns {Object.} JSON object + */ + InspectContentResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InspectContentResponse + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.InspectContentResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InspectContentResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.InspectContentResponse"; + }; + + return InspectContentResponse; + })(); + + v2.OutputStorageConfig = (function() { + + /** + * Properties of an OutputStorageConfig. + * @memberof google.privacy.dlp.v2 + * @interface IOutputStorageConfig + * @property {google.privacy.dlp.v2.IBigQueryTable|null} [table] OutputStorageConfig table + * @property {google.privacy.dlp.v2.ICloudStoragePath|null} [storagePath] OutputStorageConfig storagePath + * @property {google.privacy.dlp.v2.OutputStorageConfig.OutputSchema|null} [outputSchema] OutputStorageConfig outputSchema + */ + + /** + * Constructs a new OutputStorageConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an OutputStorageConfig. + * @implements IOutputStorageConfig + * @constructor + * @param {google.privacy.dlp.v2.IOutputStorageConfig=} [properties] Properties to set + */ + function OutputStorageConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * OutputStorageConfig table. + * @member {google.privacy.dlp.v2.IBigQueryTable|null|undefined} table + * @memberof google.privacy.dlp.v2.OutputStorageConfig + * @instance + */ + OutputStorageConfig.prototype.table = null; + + /** + * OutputStorageConfig storagePath. + * @member {google.privacy.dlp.v2.ICloudStoragePath|null|undefined} storagePath + * @memberof google.privacy.dlp.v2.OutputStorageConfig + * @instance + */ + OutputStorageConfig.prototype.storagePath = null; + + /** + * OutputStorageConfig outputSchema. + * @member {google.privacy.dlp.v2.OutputStorageConfig.OutputSchema} outputSchema + * @memberof google.privacy.dlp.v2.OutputStorageConfig + * @instance + */ + OutputStorageConfig.prototype.outputSchema = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OutputStorageConfig type. + * @member {"table"|"storagePath"|undefined} type + * @memberof google.privacy.dlp.v2.OutputStorageConfig + * @instance + */ + Object.defineProperty(OutputStorageConfig.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["table", "storagePath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OutputStorageConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.OutputStorageConfig + * @static + * @param {google.privacy.dlp.v2.IOutputStorageConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.OutputStorageConfig} OutputStorageConfig instance + */ + OutputStorageConfig.create = function create(properties) { + return new OutputStorageConfig(properties); + }; + + /** + * Encodes the specified OutputStorageConfig message. Does not implicitly {@link google.privacy.dlp.v2.OutputStorageConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.OutputStorageConfig + * @static + * @param {google.privacy.dlp.v2.IOutputStorageConfig} message OutputStorageConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OutputStorageConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + $root.google.privacy.dlp.v2.BigQueryTable.encode(message.table, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.outputSchema != null && Object.hasOwnProperty.call(message, "outputSchema")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.outputSchema); + if (message.storagePath != null && Object.hasOwnProperty.call(message, "storagePath")) + $root.google.privacy.dlp.v2.CloudStoragePath.encode(message.storagePath, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OutputStorageConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OutputStorageConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.OutputStorageConfig + * @static + * @param {google.privacy.dlp.v2.IOutputStorageConfig} message OutputStorageConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OutputStorageConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OutputStorageConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.OutputStorageConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.OutputStorageConfig} OutputStorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OutputStorageConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.OutputStorageConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.table = $root.google.privacy.dlp.v2.BigQueryTable.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.storagePath = $root.google.privacy.dlp.v2.CloudStoragePath.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.outputSchema = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OutputStorageConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.OutputStorageConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.OutputStorageConfig} OutputStorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OutputStorageConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OutputStorageConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.OutputStorageConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OutputStorageConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.table != null && message.hasOwnProperty("table")) { + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.BigQueryTable.verify(message.table, long + 1); + if (error) + return "table." + error; + } + } + if (message.storagePath != null && message.hasOwnProperty("storagePath")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.CloudStoragePath.verify(message.storagePath, long + 1); + if (error) + return "storagePath." + error; + } + } + if (message.outputSchema != null && message.hasOwnProperty("outputSchema")) + switch (message.outputSchema) { + default: + return "outputSchema: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + return null; + }; + + /** + * Creates an OutputStorageConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.OutputStorageConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.OutputStorageConfig} OutputStorageConfig + */ + OutputStorageConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.OutputStorageConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.OutputStorageConfig(); + if (object.table != null) { + if (typeof object.table !== "object") + throw TypeError(".google.privacy.dlp.v2.OutputStorageConfig.table: object expected"); + message.table = $root.google.privacy.dlp.v2.BigQueryTable.fromObject(object.table, long + 1); + } + if (object.storagePath != null) { + if (typeof object.storagePath !== "object") + throw TypeError(".google.privacy.dlp.v2.OutputStorageConfig.storagePath: object expected"); + message.storagePath = $root.google.privacy.dlp.v2.CloudStoragePath.fromObject(object.storagePath, long + 1); + } + switch (object.outputSchema) { + default: + if (typeof object.outputSchema === "number") { + message.outputSchema = object.outputSchema; + break; + } + break; + case "OUTPUT_SCHEMA_UNSPECIFIED": + case 0: + message.outputSchema = 0; + break; + case "BASIC_COLUMNS": + case 1: + message.outputSchema = 1; + break; + case "GCS_COLUMNS": + case 2: + message.outputSchema = 2; + break; + case "DATASTORE_COLUMNS": + case 3: + message.outputSchema = 3; + break; + case "BIG_QUERY_COLUMNS": + case 4: + message.outputSchema = 4; + break; + case "ALL_COLUMNS": + case 5: + message.outputSchema = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from an OutputStorageConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.OutputStorageConfig + * @static + * @param {google.privacy.dlp.v2.OutputStorageConfig} message OutputStorageConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OutputStorageConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.outputSchema = options.enums === String ? "OUTPUT_SCHEMA_UNSPECIFIED" : 0; + if (message.table != null && message.hasOwnProperty("table")) { + object.table = $root.google.privacy.dlp.v2.BigQueryTable.toObject(message.table, options); + if (options.oneofs) + object.type = "table"; + } + if (message.outputSchema != null && message.hasOwnProperty("outputSchema")) + object.outputSchema = options.enums === String ? $root.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema[message.outputSchema] === undefined ? message.outputSchema : $root.google.privacy.dlp.v2.OutputStorageConfig.OutputSchema[message.outputSchema] : message.outputSchema; + if (message.storagePath != null && message.hasOwnProperty("storagePath")) { + object.storagePath = $root.google.privacy.dlp.v2.CloudStoragePath.toObject(message.storagePath, options); + if (options.oneofs) + object.type = "storagePath"; + } + return object; + }; + + /** + * Converts this OutputStorageConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.OutputStorageConfig + * @instance + * @returns {Object.} JSON object + */ + OutputStorageConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OutputStorageConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.OutputStorageConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OutputStorageConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.OutputStorageConfig"; + }; + + /** + * OutputSchema enum. + * @name google.privacy.dlp.v2.OutputStorageConfig.OutputSchema + * @enum {number} + * @property {number} OUTPUT_SCHEMA_UNSPECIFIED=0 OUTPUT_SCHEMA_UNSPECIFIED value + * @property {number} BASIC_COLUMNS=1 BASIC_COLUMNS value + * @property {number} GCS_COLUMNS=2 GCS_COLUMNS value + * @property {number} DATASTORE_COLUMNS=3 DATASTORE_COLUMNS value + * @property {number} BIG_QUERY_COLUMNS=4 BIG_QUERY_COLUMNS value + * @property {number} ALL_COLUMNS=5 ALL_COLUMNS value + */ + OutputStorageConfig.OutputSchema = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "OUTPUT_SCHEMA_UNSPECIFIED"] = 0; + values[valuesById[1] = "BASIC_COLUMNS"] = 1; + values[valuesById[2] = "GCS_COLUMNS"] = 2; + values[valuesById[3] = "DATASTORE_COLUMNS"] = 3; + values[valuesById[4] = "BIG_QUERY_COLUMNS"] = 4; + values[valuesById[5] = "ALL_COLUMNS"] = 5; + return values; + })(); + + return OutputStorageConfig; + })(); + + v2.InfoTypeStats = (function() { + + /** + * Properties of an InfoTypeStats. + * @memberof google.privacy.dlp.v2 + * @interface IInfoTypeStats + * @property {google.privacy.dlp.v2.IInfoType|null} [infoType] InfoTypeStats infoType + * @property {number|Long|null} [count] InfoTypeStats count + */ + + /** + * Constructs a new InfoTypeStats. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an InfoTypeStats. + * @implements IInfoTypeStats + * @constructor + * @param {google.privacy.dlp.v2.IInfoTypeStats=} [properties] Properties to set + */ + function InfoTypeStats(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * InfoTypeStats infoType. + * @member {google.privacy.dlp.v2.IInfoType|null|undefined} infoType + * @memberof google.privacy.dlp.v2.InfoTypeStats + * @instance + */ + InfoTypeStats.prototype.infoType = null; + + /** + * InfoTypeStats count. + * @member {number|Long} count + * @memberof google.privacy.dlp.v2.InfoTypeStats + * @instance + */ + InfoTypeStats.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new InfoTypeStats instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.InfoTypeStats + * @static + * @param {google.privacy.dlp.v2.IInfoTypeStats=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.InfoTypeStats} InfoTypeStats instance + */ + InfoTypeStats.create = function create(properties) { + return new InfoTypeStats(properties); + }; + + /** + * Encodes the specified InfoTypeStats message. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeStats.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.InfoTypeStats + * @static + * @param {google.privacy.dlp.v2.IInfoTypeStats} message InfoTypeStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfoTypeStats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.infoType != null && Object.hasOwnProperty.call(message, "infoType")) + $root.google.privacy.dlp.v2.InfoType.encode(message.infoType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.count); + return writer; + }; + + /** + * Encodes the specified InfoTypeStats message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeStats.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.InfoTypeStats + * @static + * @param {google.privacy.dlp.v2.IInfoTypeStats} message InfoTypeStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfoTypeStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InfoTypeStats message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.InfoTypeStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.InfoTypeStats} InfoTypeStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfoTypeStats.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.InfoTypeStats(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.infoType = $root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.count = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an InfoTypeStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.InfoTypeStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.InfoTypeStats} InfoTypeStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfoTypeStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InfoTypeStats message. + * @function verify + * @memberof google.privacy.dlp.v2.InfoTypeStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InfoTypeStats.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.infoType != null && message.hasOwnProperty("infoType")) { + var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infoType, long + 1); + if (error) + return "infoType." + error; + } + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + return null; + }; + + /** + * Creates an InfoTypeStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.InfoTypeStats + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.InfoTypeStats} InfoTypeStats + */ + InfoTypeStats.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.InfoTypeStats) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.InfoTypeStats(); + if (object.infoType != null) { + if (typeof object.infoType !== "object") + throw TypeError(".google.privacy.dlp.v2.InfoTypeStats.infoType: object expected"); + message.infoType = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoType, long + 1); + } + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from an InfoTypeStats message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.InfoTypeStats + * @static + * @param {google.privacy.dlp.v2.InfoTypeStats} message InfoTypeStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InfoTypeStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.infoType = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + } + if (message.infoType != null && message.hasOwnProperty("infoType")) + object.infoType = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoType, options); + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + return object; + }; + + /** + * Converts this InfoTypeStats to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.InfoTypeStats + * @instance + * @returns {Object.} JSON object + */ + InfoTypeStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InfoTypeStats + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.InfoTypeStats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InfoTypeStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.InfoTypeStats"; + }; + + return InfoTypeStats; + })(); + + v2.InspectDataSourceDetails = (function() { + + /** + * Properties of an InspectDataSourceDetails. + * @memberof google.privacy.dlp.v2 + * @interface IInspectDataSourceDetails + * @property {google.privacy.dlp.v2.InspectDataSourceDetails.IRequestedOptions|null} [requestedOptions] InspectDataSourceDetails requestedOptions + * @property {google.privacy.dlp.v2.InspectDataSourceDetails.IResult|null} [result] InspectDataSourceDetails result + */ + + /** + * Constructs a new InspectDataSourceDetails. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an InspectDataSourceDetails. + * @implements IInspectDataSourceDetails + * @constructor + * @param {google.privacy.dlp.v2.IInspectDataSourceDetails=} [properties] Properties to set + */ + function InspectDataSourceDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * InspectDataSourceDetails requestedOptions. + * @member {google.privacy.dlp.v2.InspectDataSourceDetails.IRequestedOptions|null|undefined} requestedOptions + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails + * @instance + */ + InspectDataSourceDetails.prototype.requestedOptions = null; + + /** + * InspectDataSourceDetails result. + * @member {google.privacy.dlp.v2.InspectDataSourceDetails.IResult|null|undefined} result + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails + * @instance + */ + InspectDataSourceDetails.prototype.result = null; + + /** + * Creates a new InspectDataSourceDetails instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails + * @static + * @param {google.privacy.dlp.v2.IInspectDataSourceDetails=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.InspectDataSourceDetails} InspectDataSourceDetails instance + */ + InspectDataSourceDetails.create = function create(properties) { + return new InspectDataSourceDetails(properties); + }; + + /** + * Encodes the specified InspectDataSourceDetails message. Does not implicitly {@link google.privacy.dlp.v2.InspectDataSourceDetails.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails + * @static + * @param {google.privacy.dlp.v2.IInspectDataSourceDetails} message InspectDataSourceDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InspectDataSourceDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.requestedOptions != null && Object.hasOwnProperty.call(message, "requestedOptions")) + $root.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.encode(message.requestedOptions, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.result != null && Object.hasOwnProperty.call(message, "result")) + $root.google.privacy.dlp.v2.InspectDataSourceDetails.Result.encode(message.result, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified InspectDataSourceDetails message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectDataSourceDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails + * @static + * @param {google.privacy.dlp.v2.IInspectDataSourceDetails} message InspectDataSourceDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InspectDataSourceDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InspectDataSourceDetails message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.InspectDataSourceDetails} InspectDataSourceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InspectDataSourceDetails.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.InspectDataSourceDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.requestedOptions = $root.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.result = $root.google.privacy.dlp.v2.InspectDataSourceDetails.Result.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an InspectDataSourceDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.InspectDataSourceDetails} InspectDataSourceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InspectDataSourceDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InspectDataSourceDetails message. + * @function verify + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InspectDataSourceDetails.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.requestedOptions != null && message.hasOwnProperty("requestedOptions")) { + var error = $root.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.verify(message.requestedOptions, long + 1); + if (error) + return "requestedOptions." + error; + } + if (message.result != null && message.hasOwnProperty("result")) { + var error = $root.google.privacy.dlp.v2.InspectDataSourceDetails.Result.verify(message.result, long + 1); + if (error) + return "result." + error; + } + return null; + }; + + /** + * Creates an InspectDataSourceDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.InspectDataSourceDetails} InspectDataSourceDetails + */ + InspectDataSourceDetails.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.InspectDataSourceDetails) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.InspectDataSourceDetails(); + if (object.requestedOptions != null) { + if (typeof object.requestedOptions !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectDataSourceDetails.requestedOptions: object expected"); + message.requestedOptions = $root.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.fromObject(object.requestedOptions, long + 1); + } + if (object.result != null) { + if (typeof object.result !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectDataSourceDetails.result: object expected"); + message.result = $root.google.privacy.dlp.v2.InspectDataSourceDetails.Result.fromObject(object.result, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an InspectDataSourceDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails + * @static + * @param {google.privacy.dlp.v2.InspectDataSourceDetails} message InspectDataSourceDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InspectDataSourceDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.requestedOptions = null; + object.result = null; + } + if (message.requestedOptions != null && message.hasOwnProperty("requestedOptions")) + object.requestedOptions = $root.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.toObject(message.requestedOptions, options); + if (message.result != null && message.hasOwnProperty("result")) + object.result = $root.google.privacy.dlp.v2.InspectDataSourceDetails.Result.toObject(message.result, options); + return object; + }; + + /** + * Converts this InspectDataSourceDetails to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails + * @instance + * @returns {Object.} JSON object + */ + InspectDataSourceDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InspectDataSourceDetails + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InspectDataSourceDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.InspectDataSourceDetails"; + }; + + InspectDataSourceDetails.RequestedOptions = (function() { + + /** + * Properties of a RequestedOptions. + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails + * @interface IRequestedOptions + * @property {google.privacy.dlp.v2.IInspectTemplate|null} [snapshotInspectTemplate] RequestedOptions snapshotInspectTemplate + * @property {google.privacy.dlp.v2.IInspectJobConfig|null} [jobConfig] RequestedOptions jobConfig + */ + + /** + * Constructs a new RequestedOptions. + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails + * @classdesc Represents a RequestedOptions. + * @implements IRequestedOptions + * @constructor + * @param {google.privacy.dlp.v2.InspectDataSourceDetails.IRequestedOptions=} [properties] Properties to set + */ + function RequestedOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestedOptions snapshotInspectTemplate. + * @member {google.privacy.dlp.v2.IInspectTemplate|null|undefined} snapshotInspectTemplate + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions + * @instance + */ + RequestedOptions.prototype.snapshotInspectTemplate = null; + + /** + * RequestedOptions jobConfig. + * @member {google.privacy.dlp.v2.IInspectJobConfig|null|undefined} jobConfig + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions + * @instance + */ + RequestedOptions.prototype.jobConfig = null; + + /** + * Creates a new RequestedOptions instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions + * @static + * @param {google.privacy.dlp.v2.InspectDataSourceDetails.IRequestedOptions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions} RequestedOptions instance + */ + RequestedOptions.create = function create(properties) { + return new RequestedOptions(properties); + }; + + /** + * Encodes the specified RequestedOptions message. Does not implicitly {@link google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions + * @static + * @param {google.privacy.dlp.v2.InspectDataSourceDetails.IRequestedOptions} message RequestedOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestedOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.snapshotInspectTemplate != null && Object.hasOwnProperty.call(message, "snapshotInspectTemplate")) + $root.google.privacy.dlp.v2.InspectTemplate.encode(message.snapshotInspectTemplate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.jobConfig != null && Object.hasOwnProperty.call(message, "jobConfig")) + $root.google.privacy.dlp.v2.InspectJobConfig.encode(message.jobConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RequestedOptions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions + * @static + * @param {google.privacy.dlp.v2.InspectDataSourceDetails.IRequestedOptions} message RequestedOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestedOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestedOptions message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions} RequestedOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestedOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.snapshotInspectTemplate = $root.google.privacy.dlp.v2.InspectTemplate.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.jobConfig = $root.google.privacy.dlp.v2.InspectJobConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RequestedOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions} RequestedOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestedOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestedOptions message. + * @function verify + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestedOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.snapshotInspectTemplate != null && message.hasOwnProperty("snapshotInspectTemplate")) { + var error = $root.google.privacy.dlp.v2.InspectTemplate.verify(message.snapshotInspectTemplate, long + 1); + if (error) + return "snapshotInspectTemplate." + error; + } + if (message.jobConfig != null && message.hasOwnProperty("jobConfig")) { + var error = $root.google.privacy.dlp.v2.InspectJobConfig.verify(message.jobConfig, long + 1); + if (error) + return "jobConfig." + error; + } + return null; + }; + + /** + * Creates a RequestedOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions} RequestedOptions + */ + RequestedOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions(); + if (object.snapshotInspectTemplate != null) { + if (typeof object.snapshotInspectTemplate !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.snapshotInspectTemplate: object expected"); + message.snapshotInspectTemplate = $root.google.privacy.dlp.v2.InspectTemplate.fromObject(object.snapshotInspectTemplate, long + 1); + } + if (object.jobConfig != null) { + if (typeof object.jobConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions.jobConfig: object expected"); + message.jobConfig = $root.google.privacy.dlp.v2.InspectJobConfig.fromObject(object.jobConfig, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a RequestedOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions + * @static + * @param {google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions} message RequestedOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestedOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.snapshotInspectTemplate = null; + object.jobConfig = null; + } + if (message.snapshotInspectTemplate != null && message.hasOwnProperty("snapshotInspectTemplate")) + object.snapshotInspectTemplate = $root.google.privacy.dlp.v2.InspectTemplate.toObject(message.snapshotInspectTemplate, options); + if (message.jobConfig != null && message.hasOwnProperty("jobConfig")) + object.jobConfig = $root.google.privacy.dlp.v2.InspectJobConfig.toObject(message.jobConfig, options); + return object; + }; + + /** + * Converts this RequestedOptions to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions + * @instance + * @returns {Object.} JSON object + */ + RequestedOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RequestedOptions + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RequestedOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.InspectDataSourceDetails.RequestedOptions"; + }; + + return RequestedOptions; + })(); + + InspectDataSourceDetails.Result = (function() { + + /** + * Properties of a Result. + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails + * @interface IResult + * @property {number|Long|null} [processedBytes] Result processedBytes + * @property {number|Long|null} [totalEstimatedBytes] Result totalEstimatedBytes + * @property {Array.|null} [infoTypeStats] Result infoTypeStats + * @property {number|Long|null} [numRowsProcessed] Result numRowsProcessed + * @property {google.privacy.dlp.v2.IHybridInspectStatistics|null} [hybridStats] Result hybridStats + */ + + /** + * Constructs a new Result. + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails + * @classdesc Represents a Result. + * @implements IResult + * @constructor + * @param {google.privacy.dlp.v2.InspectDataSourceDetails.IResult=} [properties] Properties to set + */ + function Result(properties) { + this.infoTypeStats = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Result processedBytes. + * @member {number|Long} processedBytes + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.Result + * @instance + */ + Result.prototype.processedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Result totalEstimatedBytes. + * @member {number|Long} totalEstimatedBytes + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.Result + * @instance + */ + Result.prototype.totalEstimatedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Result infoTypeStats. + * @member {Array.} infoTypeStats + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.Result + * @instance + */ + Result.prototype.infoTypeStats = $util.emptyArray; + + /** + * Result numRowsProcessed. + * @member {number|Long} numRowsProcessed + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.Result + * @instance + */ + Result.prototype.numRowsProcessed = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Result hybridStats. + * @member {google.privacy.dlp.v2.IHybridInspectStatistics|null|undefined} hybridStats + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.Result + * @instance + */ + Result.prototype.hybridStats = null; + + /** + * Creates a new Result instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.Result + * @static + * @param {google.privacy.dlp.v2.InspectDataSourceDetails.IResult=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.InspectDataSourceDetails.Result} Result instance + */ + Result.create = function create(properties) { + return new Result(properties); + }; + + /** + * Encodes the specified Result message. Does not implicitly {@link google.privacy.dlp.v2.InspectDataSourceDetails.Result.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.Result + * @static + * @param {google.privacy.dlp.v2.InspectDataSourceDetails.IResult} message Result message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Result.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.processedBytes != null && Object.hasOwnProperty.call(message, "processedBytes")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.processedBytes); + if (message.totalEstimatedBytes != null && Object.hasOwnProperty.call(message, "totalEstimatedBytes")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.totalEstimatedBytes); + if (message.infoTypeStats != null && message.infoTypeStats.length) + for (var i = 0; i < message.infoTypeStats.length; ++i) + $root.google.privacy.dlp.v2.InfoTypeStats.encode(message.infoTypeStats[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.numRowsProcessed != null && Object.hasOwnProperty.call(message, "numRowsProcessed")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.numRowsProcessed); + if (message.hybridStats != null && Object.hasOwnProperty.call(message, "hybridStats")) + $root.google.privacy.dlp.v2.HybridInspectStatistics.encode(message.hybridStats, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Result message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectDataSourceDetails.Result.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.Result + * @static + * @param {google.privacy.dlp.v2.InspectDataSourceDetails.IResult} message Result message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Result.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Result message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.Result + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.InspectDataSourceDetails.Result} Result + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Result.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.InspectDataSourceDetails.Result(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.processedBytes = reader.int64(); + break; + } + case 2: { + message.totalEstimatedBytes = reader.int64(); + break; + } + case 3: { + if (!(message.infoTypeStats && message.infoTypeStats.length)) + message.infoTypeStats = []; + message.infoTypeStats.push($root.google.privacy.dlp.v2.InfoTypeStats.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 5: { + message.numRowsProcessed = reader.int64(); + break; + } + case 7: { + message.hybridStats = $root.google.privacy.dlp.v2.HybridInspectStatistics.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Result message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.Result + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.InspectDataSourceDetails.Result} Result + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Result.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Result message. + * @function verify + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.Result + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Result.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.processedBytes != null && message.hasOwnProperty("processedBytes")) + if (!$util.isInteger(message.processedBytes) && !(message.processedBytes && $util.isInteger(message.processedBytes.low) && $util.isInteger(message.processedBytes.high))) + return "processedBytes: integer|Long expected"; + if (message.totalEstimatedBytes != null && message.hasOwnProperty("totalEstimatedBytes")) + if (!$util.isInteger(message.totalEstimatedBytes) && !(message.totalEstimatedBytes && $util.isInteger(message.totalEstimatedBytes.low) && $util.isInteger(message.totalEstimatedBytes.high))) + return "totalEstimatedBytes: integer|Long expected"; + if (message.infoTypeStats != null && message.hasOwnProperty("infoTypeStats")) { + if (!Array.isArray(message.infoTypeStats)) + return "infoTypeStats: array expected"; + for (var i = 0; i < message.infoTypeStats.length; ++i) { + var error = $root.google.privacy.dlp.v2.InfoTypeStats.verify(message.infoTypeStats[i], long + 1); + if (error) + return "infoTypeStats." + error; + } + } + if (message.numRowsProcessed != null && message.hasOwnProperty("numRowsProcessed")) + if (!$util.isInteger(message.numRowsProcessed) && !(message.numRowsProcessed && $util.isInteger(message.numRowsProcessed.low) && $util.isInteger(message.numRowsProcessed.high))) + return "numRowsProcessed: integer|Long expected"; + if (message.hybridStats != null && message.hasOwnProperty("hybridStats")) { + var error = $root.google.privacy.dlp.v2.HybridInspectStatistics.verify(message.hybridStats, long + 1); + if (error) + return "hybridStats." + error; + } + return null; + }; + + /** + * Creates a Result message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.Result + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.InspectDataSourceDetails.Result} Result + */ + Result.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.InspectDataSourceDetails.Result) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.InspectDataSourceDetails.Result(); + if (object.processedBytes != null) + if ($util.Long) + (message.processedBytes = $util.Long.fromValue(object.processedBytes)).unsigned = false; + else if (typeof object.processedBytes === "string") + message.processedBytes = parseInt(object.processedBytes, 10); + else if (typeof object.processedBytes === "number") + message.processedBytes = object.processedBytes; + else if (typeof object.processedBytes === "object") + message.processedBytes = new $util.LongBits(object.processedBytes.low >>> 0, object.processedBytes.high >>> 0).toNumber(); + if (object.totalEstimatedBytes != null) + if ($util.Long) + (message.totalEstimatedBytes = $util.Long.fromValue(object.totalEstimatedBytes)).unsigned = false; + else if (typeof object.totalEstimatedBytes === "string") + message.totalEstimatedBytes = parseInt(object.totalEstimatedBytes, 10); + else if (typeof object.totalEstimatedBytes === "number") + message.totalEstimatedBytes = object.totalEstimatedBytes; + else if (typeof object.totalEstimatedBytes === "object") + message.totalEstimatedBytes = new $util.LongBits(object.totalEstimatedBytes.low >>> 0, object.totalEstimatedBytes.high >>> 0).toNumber(); + if (object.infoTypeStats) { + if (!Array.isArray(object.infoTypeStats)) + throw TypeError(".google.privacy.dlp.v2.InspectDataSourceDetails.Result.infoTypeStats: array expected"); + message.infoTypeStats = []; + for (var i = 0; i < object.infoTypeStats.length; ++i) { + if (typeof object.infoTypeStats[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectDataSourceDetails.Result.infoTypeStats: object expected"); + message.infoTypeStats[i] = $root.google.privacy.dlp.v2.InfoTypeStats.fromObject(object.infoTypeStats[i], long + 1); + } + } + if (object.numRowsProcessed != null) + if ($util.Long) + (message.numRowsProcessed = $util.Long.fromValue(object.numRowsProcessed)).unsigned = false; + else if (typeof object.numRowsProcessed === "string") + message.numRowsProcessed = parseInt(object.numRowsProcessed, 10); + else if (typeof object.numRowsProcessed === "number") + message.numRowsProcessed = object.numRowsProcessed; + else if (typeof object.numRowsProcessed === "object") + message.numRowsProcessed = new $util.LongBits(object.numRowsProcessed.low >>> 0, object.numRowsProcessed.high >>> 0).toNumber(); + if (object.hybridStats != null) { + if (typeof object.hybridStats !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectDataSourceDetails.Result.hybridStats: object expected"); + message.hybridStats = $root.google.privacy.dlp.v2.HybridInspectStatistics.fromObject(object.hybridStats, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Result message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.Result + * @static + * @param {google.privacy.dlp.v2.InspectDataSourceDetails.Result} message Result + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Result.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.infoTypeStats = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.processedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.processedBytes = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.totalEstimatedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.totalEstimatedBytes = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.numRowsProcessed = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.numRowsProcessed = options.longs === String ? "0" : 0; + object.hybridStats = null; + } + if (message.processedBytes != null && message.hasOwnProperty("processedBytes")) + if (typeof message.processedBytes === "number") + object.processedBytes = options.longs === String ? String(message.processedBytes) : message.processedBytes; + else + object.processedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.processedBytes) : options.longs === Number ? new $util.LongBits(message.processedBytes.low >>> 0, message.processedBytes.high >>> 0).toNumber() : message.processedBytes; + if (message.totalEstimatedBytes != null && message.hasOwnProperty("totalEstimatedBytes")) + if (typeof message.totalEstimatedBytes === "number") + object.totalEstimatedBytes = options.longs === String ? String(message.totalEstimatedBytes) : message.totalEstimatedBytes; + else + object.totalEstimatedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.totalEstimatedBytes) : options.longs === Number ? new $util.LongBits(message.totalEstimatedBytes.low >>> 0, message.totalEstimatedBytes.high >>> 0).toNumber() : message.totalEstimatedBytes; + if (message.infoTypeStats && message.infoTypeStats.length) { + object.infoTypeStats = []; + for (var j = 0; j < message.infoTypeStats.length; ++j) + object.infoTypeStats[j] = $root.google.privacy.dlp.v2.InfoTypeStats.toObject(message.infoTypeStats[j], options); + } + if (message.numRowsProcessed != null && message.hasOwnProperty("numRowsProcessed")) + if (typeof message.numRowsProcessed === "number") + object.numRowsProcessed = options.longs === String ? String(message.numRowsProcessed) : message.numRowsProcessed; + else + object.numRowsProcessed = options.longs === String ? $util.Long.prototype.toString.call(message.numRowsProcessed) : options.longs === Number ? new $util.LongBits(message.numRowsProcessed.low >>> 0, message.numRowsProcessed.high >>> 0).toNumber() : message.numRowsProcessed; + if (message.hybridStats != null && message.hasOwnProperty("hybridStats")) + object.hybridStats = $root.google.privacy.dlp.v2.HybridInspectStatistics.toObject(message.hybridStats, options); + return object; + }; + + /** + * Converts this Result to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.Result + * @instance + * @returns {Object.} JSON object + */ + Result.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Result + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.InspectDataSourceDetails.Result + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Result.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.InspectDataSourceDetails.Result"; + }; + + return Result; + })(); + + return InspectDataSourceDetails; + })(); + + v2.DataProfileBigQueryRowSchema = (function() { + + /** + * Properties of a DataProfileBigQueryRowSchema. + * @memberof google.privacy.dlp.v2 + * @interface IDataProfileBigQueryRowSchema + * @property {google.privacy.dlp.v2.ITableDataProfile|null} [tableProfile] DataProfileBigQueryRowSchema tableProfile + * @property {google.privacy.dlp.v2.IColumnDataProfile|null} [columnProfile] DataProfileBigQueryRowSchema columnProfile + * @property {google.privacy.dlp.v2.IFileStoreDataProfile|null} [fileStoreProfile] DataProfileBigQueryRowSchema fileStoreProfile + */ + + /** + * Constructs a new DataProfileBigQueryRowSchema. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DataProfileBigQueryRowSchema. + * @implements IDataProfileBigQueryRowSchema + * @constructor + * @param {google.privacy.dlp.v2.IDataProfileBigQueryRowSchema=} [properties] Properties to set + */ + function DataProfileBigQueryRowSchema(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataProfileBigQueryRowSchema tableProfile. + * @member {google.privacy.dlp.v2.ITableDataProfile|null|undefined} tableProfile + * @memberof google.privacy.dlp.v2.DataProfileBigQueryRowSchema + * @instance + */ + DataProfileBigQueryRowSchema.prototype.tableProfile = null; + + /** + * DataProfileBigQueryRowSchema columnProfile. + * @member {google.privacy.dlp.v2.IColumnDataProfile|null|undefined} columnProfile + * @memberof google.privacy.dlp.v2.DataProfileBigQueryRowSchema + * @instance + */ + DataProfileBigQueryRowSchema.prototype.columnProfile = null; + + /** + * DataProfileBigQueryRowSchema fileStoreProfile. + * @member {google.privacy.dlp.v2.IFileStoreDataProfile|null|undefined} fileStoreProfile + * @memberof google.privacy.dlp.v2.DataProfileBigQueryRowSchema + * @instance + */ + DataProfileBigQueryRowSchema.prototype.fileStoreProfile = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataProfileBigQueryRowSchema dataProfile. + * @member {"tableProfile"|"columnProfile"|"fileStoreProfile"|undefined} dataProfile + * @memberof google.privacy.dlp.v2.DataProfileBigQueryRowSchema + * @instance + */ + Object.defineProperty(DataProfileBigQueryRowSchema.prototype, "dataProfile", { + get: $util.oneOfGetter($oneOfFields = ["tableProfile", "columnProfile", "fileStoreProfile"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataProfileBigQueryRowSchema instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfileBigQueryRowSchema + * @static + * @param {google.privacy.dlp.v2.IDataProfileBigQueryRowSchema=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfileBigQueryRowSchema} DataProfileBigQueryRowSchema instance + */ + DataProfileBigQueryRowSchema.create = function create(properties) { + return new DataProfileBigQueryRowSchema(properties); + }; + + /** + * Encodes the specified DataProfileBigQueryRowSchema message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileBigQueryRowSchema.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfileBigQueryRowSchema + * @static + * @param {google.privacy.dlp.v2.IDataProfileBigQueryRowSchema} message DataProfileBigQueryRowSchema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileBigQueryRowSchema.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tableProfile != null && Object.hasOwnProperty.call(message, "tableProfile")) + $root.google.privacy.dlp.v2.TableDataProfile.encode(message.tableProfile, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.columnProfile != null && Object.hasOwnProperty.call(message, "columnProfile")) + $root.google.privacy.dlp.v2.ColumnDataProfile.encode(message.columnProfile, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.fileStoreProfile != null && Object.hasOwnProperty.call(message, "fileStoreProfile")) + $root.google.privacy.dlp.v2.FileStoreDataProfile.encode(message.fileStoreProfile, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataProfileBigQueryRowSchema message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileBigQueryRowSchema.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileBigQueryRowSchema + * @static + * @param {google.privacy.dlp.v2.IDataProfileBigQueryRowSchema} message DataProfileBigQueryRowSchema message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileBigQueryRowSchema.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataProfileBigQueryRowSchema message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfileBigQueryRowSchema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfileBigQueryRowSchema} DataProfileBigQueryRowSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileBigQueryRowSchema.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileBigQueryRowSchema(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tableProfile = $root.google.privacy.dlp.v2.TableDataProfile.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.columnProfile = $root.google.privacy.dlp.v2.ColumnDataProfile.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.fileStoreProfile = $root.google.privacy.dlp.v2.FileStoreDataProfile.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DataProfileBigQueryRowSchema message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileBigQueryRowSchema + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfileBigQueryRowSchema} DataProfileBigQueryRowSchema + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileBigQueryRowSchema.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataProfileBigQueryRowSchema message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfileBigQueryRowSchema + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataProfileBigQueryRowSchema.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.tableProfile != null && message.hasOwnProperty("tableProfile")) { + properties.dataProfile = 1; + { + var error = $root.google.privacy.dlp.v2.TableDataProfile.verify(message.tableProfile, long + 1); + if (error) + return "tableProfile." + error; + } + } + if (message.columnProfile != null && message.hasOwnProperty("columnProfile")) { + if (properties.dataProfile === 1) + return "dataProfile: multiple values"; + properties.dataProfile = 1; + { + var error = $root.google.privacy.dlp.v2.ColumnDataProfile.verify(message.columnProfile, long + 1); + if (error) + return "columnProfile." + error; + } + } + if (message.fileStoreProfile != null && message.hasOwnProperty("fileStoreProfile")) { + if (properties.dataProfile === 1) + return "dataProfile: multiple values"; + properties.dataProfile = 1; + { + var error = $root.google.privacy.dlp.v2.FileStoreDataProfile.verify(message.fileStoreProfile, long + 1); + if (error) + return "fileStoreProfile." + error; + } + } + return null; + }; + + /** + * Creates a DataProfileBigQueryRowSchema message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfileBigQueryRowSchema + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfileBigQueryRowSchema} DataProfileBigQueryRowSchema + */ + DataProfileBigQueryRowSchema.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfileBigQueryRowSchema) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DataProfileBigQueryRowSchema(); + if (object.tableProfile != null) { + if (typeof object.tableProfile !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileBigQueryRowSchema.tableProfile: object expected"); + message.tableProfile = $root.google.privacy.dlp.v2.TableDataProfile.fromObject(object.tableProfile, long + 1); + } + if (object.columnProfile != null) { + if (typeof object.columnProfile !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileBigQueryRowSchema.columnProfile: object expected"); + message.columnProfile = $root.google.privacy.dlp.v2.ColumnDataProfile.fromObject(object.columnProfile, long + 1); + } + if (object.fileStoreProfile != null) { + if (typeof object.fileStoreProfile !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileBigQueryRowSchema.fileStoreProfile: object expected"); + message.fileStoreProfile = $root.google.privacy.dlp.v2.FileStoreDataProfile.fromObject(object.fileStoreProfile, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DataProfileBigQueryRowSchema message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfileBigQueryRowSchema + * @static + * @param {google.privacy.dlp.v2.DataProfileBigQueryRowSchema} message DataProfileBigQueryRowSchema + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataProfileBigQueryRowSchema.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.tableProfile != null && message.hasOwnProperty("tableProfile")) { + object.tableProfile = $root.google.privacy.dlp.v2.TableDataProfile.toObject(message.tableProfile, options); + if (options.oneofs) + object.dataProfile = "tableProfile"; + } + if (message.columnProfile != null && message.hasOwnProperty("columnProfile")) { + object.columnProfile = $root.google.privacy.dlp.v2.ColumnDataProfile.toObject(message.columnProfile, options); + if (options.oneofs) + object.dataProfile = "columnProfile"; + } + if (message.fileStoreProfile != null && message.hasOwnProperty("fileStoreProfile")) { + object.fileStoreProfile = $root.google.privacy.dlp.v2.FileStoreDataProfile.toObject(message.fileStoreProfile, options); + if (options.oneofs) + object.dataProfile = "fileStoreProfile"; + } + return object; + }; + + /** + * Converts this DataProfileBigQueryRowSchema to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfileBigQueryRowSchema + * @instance + * @returns {Object.} JSON object + */ + DataProfileBigQueryRowSchema.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataProfileBigQueryRowSchema + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfileBigQueryRowSchema + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataProfileBigQueryRowSchema.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileBigQueryRowSchema"; + }; + + return DataProfileBigQueryRowSchema; + })(); + + v2.HybridInspectStatistics = (function() { + + /** + * Properties of a HybridInspectStatistics. + * @memberof google.privacy.dlp.v2 + * @interface IHybridInspectStatistics + * @property {number|Long|null} [processedCount] HybridInspectStatistics processedCount + * @property {number|Long|null} [abortedCount] HybridInspectStatistics abortedCount + * @property {number|Long|null} [pendingCount] HybridInspectStatistics pendingCount + */ + + /** + * Constructs a new HybridInspectStatistics. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a HybridInspectStatistics. + * @implements IHybridInspectStatistics + * @constructor + * @param {google.privacy.dlp.v2.IHybridInspectStatistics=} [properties] Properties to set + */ + function HybridInspectStatistics(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * HybridInspectStatistics processedCount. + * @member {number|Long} processedCount + * @memberof google.privacy.dlp.v2.HybridInspectStatistics + * @instance + */ + HybridInspectStatistics.prototype.processedCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * HybridInspectStatistics abortedCount. + * @member {number|Long} abortedCount + * @memberof google.privacy.dlp.v2.HybridInspectStatistics + * @instance + */ + HybridInspectStatistics.prototype.abortedCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * HybridInspectStatistics pendingCount. + * @member {number|Long} pendingCount + * @memberof google.privacy.dlp.v2.HybridInspectStatistics + * @instance + */ + HybridInspectStatistics.prototype.pendingCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new HybridInspectStatistics instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.HybridInspectStatistics + * @static + * @param {google.privacy.dlp.v2.IHybridInspectStatistics=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.HybridInspectStatistics} HybridInspectStatistics instance + */ + HybridInspectStatistics.create = function create(properties) { + return new HybridInspectStatistics(properties); + }; + + /** + * Encodes the specified HybridInspectStatistics message. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectStatistics.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.HybridInspectStatistics + * @static + * @param {google.privacy.dlp.v2.IHybridInspectStatistics} message HybridInspectStatistics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HybridInspectStatistics.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.processedCount != null && Object.hasOwnProperty.call(message, "processedCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.processedCount); + if (message.abortedCount != null && Object.hasOwnProperty.call(message, "abortedCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.abortedCount); + if (message.pendingCount != null && Object.hasOwnProperty.call(message, "pendingCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.pendingCount); + return writer; + }; + + /** + * Encodes the specified HybridInspectStatistics message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectStatistics.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.HybridInspectStatistics + * @static + * @param {google.privacy.dlp.v2.IHybridInspectStatistics} message HybridInspectStatistics message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HybridInspectStatistics.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HybridInspectStatistics message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.HybridInspectStatistics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.HybridInspectStatistics} HybridInspectStatistics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HybridInspectStatistics.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.HybridInspectStatistics(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.processedCount = reader.int64(); + break; + } + case 2: { + message.abortedCount = reader.int64(); + break; + } + case 3: { + message.pendingCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a HybridInspectStatistics message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.HybridInspectStatistics + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.HybridInspectStatistics} HybridInspectStatistics + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HybridInspectStatistics.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HybridInspectStatistics message. + * @function verify + * @memberof google.privacy.dlp.v2.HybridInspectStatistics + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HybridInspectStatistics.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.processedCount != null && message.hasOwnProperty("processedCount")) + if (!$util.isInteger(message.processedCount) && !(message.processedCount && $util.isInteger(message.processedCount.low) && $util.isInteger(message.processedCount.high))) + return "processedCount: integer|Long expected"; + if (message.abortedCount != null && message.hasOwnProperty("abortedCount")) + if (!$util.isInteger(message.abortedCount) && !(message.abortedCount && $util.isInteger(message.abortedCount.low) && $util.isInteger(message.abortedCount.high))) + return "abortedCount: integer|Long expected"; + if (message.pendingCount != null && message.hasOwnProperty("pendingCount")) + if (!$util.isInteger(message.pendingCount) && !(message.pendingCount && $util.isInteger(message.pendingCount.low) && $util.isInteger(message.pendingCount.high))) + return "pendingCount: integer|Long expected"; + return null; + }; + + /** + * Creates a HybridInspectStatistics message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.HybridInspectStatistics + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.HybridInspectStatistics} HybridInspectStatistics + */ + HybridInspectStatistics.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.HybridInspectStatistics) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.HybridInspectStatistics(); + if (object.processedCount != null) + if ($util.Long) + (message.processedCount = $util.Long.fromValue(object.processedCount)).unsigned = false; + else if (typeof object.processedCount === "string") + message.processedCount = parseInt(object.processedCount, 10); + else if (typeof object.processedCount === "number") + message.processedCount = object.processedCount; + else if (typeof object.processedCount === "object") + message.processedCount = new $util.LongBits(object.processedCount.low >>> 0, object.processedCount.high >>> 0).toNumber(); + if (object.abortedCount != null) + if ($util.Long) + (message.abortedCount = $util.Long.fromValue(object.abortedCount)).unsigned = false; + else if (typeof object.abortedCount === "string") + message.abortedCount = parseInt(object.abortedCount, 10); + else if (typeof object.abortedCount === "number") + message.abortedCount = object.abortedCount; + else if (typeof object.abortedCount === "object") + message.abortedCount = new $util.LongBits(object.abortedCount.low >>> 0, object.abortedCount.high >>> 0).toNumber(); + if (object.pendingCount != null) + if ($util.Long) + (message.pendingCount = $util.Long.fromValue(object.pendingCount)).unsigned = false; + else if (typeof object.pendingCount === "string") + message.pendingCount = parseInt(object.pendingCount, 10); + else if (typeof object.pendingCount === "number") + message.pendingCount = object.pendingCount; + else if (typeof object.pendingCount === "object") + message.pendingCount = new $util.LongBits(object.pendingCount.low >>> 0, object.pendingCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a HybridInspectStatistics message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.HybridInspectStatistics + * @static + * @param {google.privacy.dlp.v2.HybridInspectStatistics} message HybridInspectStatistics + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HybridInspectStatistics.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.processedCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.processedCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.abortedCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.abortedCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.pendingCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.pendingCount = options.longs === String ? "0" : 0; + } + if (message.processedCount != null && message.hasOwnProperty("processedCount")) + if (typeof message.processedCount === "number") + object.processedCount = options.longs === String ? String(message.processedCount) : message.processedCount; + else + object.processedCount = options.longs === String ? $util.Long.prototype.toString.call(message.processedCount) : options.longs === Number ? new $util.LongBits(message.processedCount.low >>> 0, message.processedCount.high >>> 0).toNumber() : message.processedCount; + if (message.abortedCount != null && message.hasOwnProperty("abortedCount")) + if (typeof message.abortedCount === "number") + object.abortedCount = options.longs === String ? String(message.abortedCount) : message.abortedCount; + else + object.abortedCount = options.longs === String ? $util.Long.prototype.toString.call(message.abortedCount) : options.longs === Number ? new $util.LongBits(message.abortedCount.low >>> 0, message.abortedCount.high >>> 0).toNumber() : message.abortedCount; + if (message.pendingCount != null && message.hasOwnProperty("pendingCount")) + if (typeof message.pendingCount === "number") + object.pendingCount = options.longs === String ? String(message.pendingCount) : message.pendingCount; + else + object.pendingCount = options.longs === String ? $util.Long.prototype.toString.call(message.pendingCount) : options.longs === Number ? new $util.LongBits(message.pendingCount.low >>> 0, message.pendingCount.high >>> 0).toNumber() : message.pendingCount; + return object; + }; + + /** + * Converts this HybridInspectStatistics to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.HybridInspectStatistics + * @instance + * @returns {Object.} JSON object + */ + HybridInspectStatistics.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HybridInspectStatistics + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.HybridInspectStatistics + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HybridInspectStatistics.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.HybridInspectStatistics"; + }; + + return HybridInspectStatistics; + })(); + + v2.ActionDetails = (function() { + + /** + * Properties of an ActionDetails. + * @memberof google.privacy.dlp.v2 + * @interface IActionDetails + * @property {google.privacy.dlp.v2.IDeidentifyDataSourceDetails|null} [deidentifyDetails] ActionDetails deidentifyDetails + */ + + /** + * Constructs a new ActionDetails. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an ActionDetails. + * @implements IActionDetails + * @constructor + * @param {google.privacy.dlp.v2.IActionDetails=} [properties] Properties to set + */ + function ActionDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ActionDetails deidentifyDetails. + * @member {google.privacy.dlp.v2.IDeidentifyDataSourceDetails|null|undefined} deidentifyDetails + * @memberof google.privacy.dlp.v2.ActionDetails + * @instance + */ + ActionDetails.prototype.deidentifyDetails = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ActionDetails details. + * @member {"deidentifyDetails"|undefined} details + * @memberof google.privacy.dlp.v2.ActionDetails + * @instance + */ + Object.defineProperty(ActionDetails.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["deidentifyDetails"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ActionDetails instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ActionDetails + * @static + * @param {google.privacy.dlp.v2.IActionDetails=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ActionDetails} ActionDetails instance + */ + ActionDetails.create = function create(properties) { + return new ActionDetails(properties); + }; + + /** + * Encodes the specified ActionDetails message. Does not implicitly {@link google.privacy.dlp.v2.ActionDetails.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ActionDetails + * @static + * @param {google.privacy.dlp.v2.IActionDetails} message ActionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActionDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deidentifyDetails != null && Object.hasOwnProperty.call(message, "deidentifyDetails")) + $root.google.privacy.dlp.v2.DeidentifyDataSourceDetails.encode(message.deidentifyDetails, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ActionDetails message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ActionDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ActionDetails + * @static + * @param {google.privacy.dlp.v2.IActionDetails} message ActionDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActionDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ActionDetails message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ActionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ActionDetails} ActionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActionDetails.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ActionDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.deidentifyDetails = $root.google.privacy.dlp.v2.DeidentifyDataSourceDetails.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an ActionDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ActionDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ActionDetails} ActionDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActionDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ActionDetails message. + * @function verify + * @memberof google.privacy.dlp.v2.ActionDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ActionDetails.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.deidentifyDetails != null && message.hasOwnProperty("deidentifyDetails")) { + properties.details = 1; + { + var error = $root.google.privacy.dlp.v2.DeidentifyDataSourceDetails.verify(message.deidentifyDetails, long + 1); + if (error) + return "deidentifyDetails." + error; + } + } + return null; + }; + + /** + * Creates an ActionDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ActionDetails + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ActionDetails} ActionDetails + */ + ActionDetails.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ActionDetails) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ActionDetails(); + if (object.deidentifyDetails != null) { + if (typeof object.deidentifyDetails !== "object") + throw TypeError(".google.privacy.dlp.v2.ActionDetails.deidentifyDetails: object expected"); + message.deidentifyDetails = $root.google.privacy.dlp.v2.DeidentifyDataSourceDetails.fromObject(object.deidentifyDetails, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an ActionDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ActionDetails + * @static + * @param {google.privacy.dlp.v2.ActionDetails} message ActionDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ActionDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.deidentifyDetails != null && message.hasOwnProperty("deidentifyDetails")) { + object.deidentifyDetails = $root.google.privacy.dlp.v2.DeidentifyDataSourceDetails.toObject(message.deidentifyDetails, options); + if (options.oneofs) + object.details = "deidentifyDetails"; + } + return object; + }; + + /** + * Converts this ActionDetails to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ActionDetails + * @instance + * @returns {Object.} JSON object + */ + ActionDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ActionDetails + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ActionDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ActionDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ActionDetails"; + }; + + return ActionDetails; + })(); + + v2.DeidentifyDataSourceStats = (function() { + + /** + * Properties of a DeidentifyDataSourceStats. + * @memberof google.privacy.dlp.v2 + * @interface IDeidentifyDataSourceStats + * @property {number|Long|null} [transformedBytes] DeidentifyDataSourceStats transformedBytes + * @property {number|Long|null} [transformationCount] DeidentifyDataSourceStats transformationCount + * @property {number|Long|null} [transformationErrorCount] DeidentifyDataSourceStats transformationErrorCount + */ + + /** + * Constructs a new DeidentifyDataSourceStats. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DeidentifyDataSourceStats. + * @implements IDeidentifyDataSourceStats + * @constructor + * @param {google.privacy.dlp.v2.IDeidentifyDataSourceStats=} [properties] Properties to set + */ + function DeidentifyDataSourceStats(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeidentifyDataSourceStats transformedBytes. + * @member {number|Long} transformedBytes + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceStats + * @instance + */ + DeidentifyDataSourceStats.prototype.transformedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DeidentifyDataSourceStats transformationCount. + * @member {number|Long} transformationCount + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceStats + * @instance + */ + DeidentifyDataSourceStats.prototype.transformationCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DeidentifyDataSourceStats transformationErrorCount. + * @member {number|Long} transformationErrorCount + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceStats + * @instance + */ + DeidentifyDataSourceStats.prototype.transformationErrorCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new DeidentifyDataSourceStats instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceStats + * @static + * @param {google.privacy.dlp.v2.IDeidentifyDataSourceStats=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DeidentifyDataSourceStats} DeidentifyDataSourceStats instance + */ + DeidentifyDataSourceStats.create = function create(properties) { + return new DeidentifyDataSourceStats(properties); + }; + + /** + * Encodes the specified DeidentifyDataSourceStats message. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyDataSourceStats.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceStats + * @static + * @param {google.privacy.dlp.v2.IDeidentifyDataSourceStats} message DeidentifyDataSourceStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeidentifyDataSourceStats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.transformedBytes != null && Object.hasOwnProperty.call(message, "transformedBytes")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.transformedBytes); + if (message.transformationCount != null && Object.hasOwnProperty.call(message, "transformationCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.transformationCount); + if (message.transformationErrorCount != null && Object.hasOwnProperty.call(message, "transformationErrorCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.transformationErrorCount); + return writer; + }; + + /** + * Encodes the specified DeidentifyDataSourceStats message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyDataSourceStats.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceStats + * @static + * @param {google.privacy.dlp.v2.IDeidentifyDataSourceStats} message DeidentifyDataSourceStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeidentifyDataSourceStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeidentifyDataSourceStats message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DeidentifyDataSourceStats} DeidentifyDataSourceStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeidentifyDataSourceStats.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DeidentifyDataSourceStats(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.transformedBytes = reader.int64(); + break; + } + case 2: { + message.transformationCount = reader.int64(); + break; + } + case 3: { + message.transformationErrorCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeidentifyDataSourceStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DeidentifyDataSourceStats} DeidentifyDataSourceStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeidentifyDataSourceStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeidentifyDataSourceStats message. + * @function verify + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeidentifyDataSourceStats.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.transformedBytes != null && message.hasOwnProperty("transformedBytes")) + if (!$util.isInteger(message.transformedBytes) && !(message.transformedBytes && $util.isInteger(message.transformedBytes.low) && $util.isInteger(message.transformedBytes.high))) + return "transformedBytes: integer|Long expected"; + if (message.transformationCount != null && message.hasOwnProperty("transformationCount")) + if (!$util.isInteger(message.transformationCount) && !(message.transformationCount && $util.isInteger(message.transformationCount.low) && $util.isInteger(message.transformationCount.high))) + return "transformationCount: integer|Long expected"; + if (message.transformationErrorCount != null && message.hasOwnProperty("transformationErrorCount")) + if (!$util.isInteger(message.transformationErrorCount) && !(message.transformationErrorCount && $util.isInteger(message.transformationErrorCount.low) && $util.isInteger(message.transformationErrorCount.high))) + return "transformationErrorCount: integer|Long expected"; + return null; + }; + + /** + * Creates a DeidentifyDataSourceStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceStats + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DeidentifyDataSourceStats} DeidentifyDataSourceStats + */ + DeidentifyDataSourceStats.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DeidentifyDataSourceStats) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DeidentifyDataSourceStats(); + if (object.transformedBytes != null) + if ($util.Long) + (message.transformedBytes = $util.Long.fromValue(object.transformedBytes)).unsigned = false; + else if (typeof object.transformedBytes === "string") + message.transformedBytes = parseInt(object.transformedBytes, 10); + else if (typeof object.transformedBytes === "number") + message.transformedBytes = object.transformedBytes; + else if (typeof object.transformedBytes === "object") + message.transformedBytes = new $util.LongBits(object.transformedBytes.low >>> 0, object.transformedBytes.high >>> 0).toNumber(); + if (object.transformationCount != null) + if ($util.Long) + (message.transformationCount = $util.Long.fromValue(object.transformationCount)).unsigned = false; + else if (typeof object.transformationCount === "string") + message.transformationCount = parseInt(object.transformationCount, 10); + else if (typeof object.transformationCount === "number") + message.transformationCount = object.transformationCount; + else if (typeof object.transformationCount === "object") + message.transformationCount = new $util.LongBits(object.transformationCount.low >>> 0, object.transformationCount.high >>> 0).toNumber(); + if (object.transformationErrorCount != null) + if ($util.Long) + (message.transformationErrorCount = $util.Long.fromValue(object.transformationErrorCount)).unsigned = false; + else if (typeof object.transformationErrorCount === "string") + message.transformationErrorCount = parseInt(object.transformationErrorCount, 10); + else if (typeof object.transformationErrorCount === "number") + message.transformationErrorCount = object.transformationErrorCount; + else if (typeof object.transformationErrorCount === "object") + message.transformationErrorCount = new $util.LongBits(object.transformationErrorCount.low >>> 0, object.transformationErrorCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a DeidentifyDataSourceStats message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceStats + * @static + * @param {google.privacy.dlp.v2.DeidentifyDataSourceStats} message DeidentifyDataSourceStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeidentifyDataSourceStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.transformedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.transformedBytes = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.transformationCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.transformationCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.transformationErrorCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.transformationErrorCount = options.longs === String ? "0" : 0; + } + if (message.transformedBytes != null && message.hasOwnProperty("transformedBytes")) + if (typeof message.transformedBytes === "number") + object.transformedBytes = options.longs === String ? String(message.transformedBytes) : message.transformedBytes; + else + object.transformedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.transformedBytes) : options.longs === Number ? new $util.LongBits(message.transformedBytes.low >>> 0, message.transformedBytes.high >>> 0).toNumber() : message.transformedBytes; + if (message.transformationCount != null && message.hasOwnProperty("transformationCount")) + if (typeof message.transformationCount === "number") + object.transformationCount = options.longs === String ? String(message.transformationCount) : message.transformationCount; + else + object.transformationCount = options.longs === String ? $util.Long.prototype.toString.call(message.transformationCount) : options.longs === Number ? new $util.LongBits(message.transformationCount.low >>> 0, message.transformationCount.high >>> 0).toNumber() : message.transformationCount; + if (message.transformationErrorCount != null && message.hasOwnProperty("transformationErrorCount")) + if (typeof message.transformationErrorCount === "number") + object.transformationErrorCount = options.longs === String ? String(message.transformationErrorCount) : message.transformationErrorCount; + else + object.transformationErrorCount = options.longs === String ? $util.Long.prototype.toString.call(message.transformationErrorCount) : options.longs === Number ? new $util.LongBits(message.transformationErrorCount.low >>> 0, message.transformationErrorCount.high >>> 0).toNumber() : message.transformationErrorCount; + return object; + }; + + /** + * Converts this DeidentifyDataSourceStats to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceStats + * @instance + * @returns {Object.} JSON object + */ + DeidentifyDataSourceStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeidentifyDataSourceStats + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceStats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeidentifyDataSourceStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DeidentifyDataSourceStats"; + }; + + return DeidentifyDataSourceStats; + })(); + + v2.DeidentifyDataSourceDetails = (function() { + + /** + * Properties of a DeidentifyDataSourceDetails. + * @memberof google.privacy.dlp.v2 + * @interface IDeidentifyDataSourceDetails + * @property {google.privacy.dlp.v2.DeidentifyDataSourceDetails.IRequestedDeidentifyOptions|null} [requestedOptions] DeidentifyDataSourceDetails requestedOptions + * @property {google.privacy.dlp.v2.IDeidentifyDataSourceStats|null} [deidentifyStats] DeidentifyDataSourceDetails deidentifyStats + */ + + /** + * Constructs a new DeidentifyDataSourceDetails. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DeidentifyDataSourceDetails. + * @implements IDeidentifyDataSourceDetails + * @constructor + * @param {google.privacy.dlp.v2.IDeidentifyDataSourceDetails=} [properties] Properties to set + */ + function DeidentifyDataSourceDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeidentifyDataSourceDetails requestedOptions. + * @member {google.privacy.dlp.v2.DeidentifyDataSourceDetails.IRequestedDeidentifyOptions|null|undefined} requestedOptions + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails + * @instance + */ + DeidentifyDataSourceDetails.prototype.requestedOptions = null; + + /** + * DeidentifyDataSourceDetails deidentifyStats. + * @member {google.privacy.dlp.v2.IDeidentifyDataSourceStats|null|undefined} deidentifyStats + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails + * @instance + */ + DeidentifyDataSourceDetails.prototype.deidentifyStats = null; + + /** + * Creates a new DeidentifyDataSourceDetails instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails + * @static + * @param {google.privacy.dlp.v2.IDeidentifyDataSourceDetails=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DeidentifyDataSourceDetails} DeidentifyDataSourceDetails instance + */ + DeidentifyDataSourceDetails.create = function create(properties) { + return new DeidentifyDataSourceDetails(properties); + }; + + /** + * Encodes the specified DeidentifyDataSourceDetails message. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyDataSourceDetails.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails + * @static + * @param {google.privacy.dlp.v2.IDeidentifyDataSourceDetails} message DeidentifyDataSourceDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeidentifyDataSourceDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.requestedOptions != null && Object.hasOwnProperty.call(message, "requestedOptions")) + $root.google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions.encode(message.requestedOptions, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.deidentifyStats != null && Object.hasOwnProperty.call(message, "deidentifyStats")) + $root.google.privacy.dlp.v2.DeidentifyDataSourceStats.encode(message.deidentifyStats, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeidentifyDataSourceDetails message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyDataSourceDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails + * @static + * @param {google.privacy.dlp.v2.IDeidentifyDataSourceDetails} message DeidentifyDataSourceDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeidentifyDataSourceDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeidentifyDataSourceDetails message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DeidentifyDataSourceDetails} DeidentifyDataSourceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeidentifyDataSourceDetails.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DeidentifyDataSourceDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.requestedOptions = $root.google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.deidentifyStats = $root.google.privacy.dlp.v2.DeidentifyDataSourceStats.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeidentifyDataSourceDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DeidentifyDataSourceDetails} DeidentifyDataSourceDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeidentifyDataSourceDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeidentifyDataSourceDetails message. + * @function verify + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeidentifyDataSourceDetails.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.requestedOptions != null && message.hasOwnProperty("requestedOptions")) { + var error = $root.google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions.verify(message.requestedOptions, long + 1); + if (error) + return "requestedOptions." + error; + } + if (message.deidentifyStats != null && message.hasOwnProperty("deidentifyStats")) { + var error = $root.google.privacy.dlp.v2.DeidentifyDataSourceStats.verify(message.deidentifyStats, long + 1); + if (error) + return "deidentifyStats." + error; + } + return null; + }; + + /** + * Creates a DeidentifyDataSourceDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DeidentifyDataSourceDetails} DeidentifyDataSourceDetails + */ + DeidentifyDataSourceDetails.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DeidentifyDataSourceDetails) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DeidentifyDataSourceDetails(); + if (object.requestedOptions != null) { + if (typeof object.requestedOptions !== "object") + throw TypeError(".google.privacy.dlp.v2.DeidentifyDataSourceDetails.requestedOptions: object expected"); + message.requestedOptions = $root.google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions.fromObject(object.requestedOptions, long + 1); + } + if (object.deidentifyStats != null) { + if (typeof object.deidentifyStats !== "object") + throw TypeError(".google.privacy.dlp.v2.DeidentifyDataSourceDetails.deidentifyStats: object expected"); + message.deidentifyStats = $root.google.privacy.dlp.v2.DeidentifyDataSourceStats.fromObject(object.deidentifyStats, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DeidentifyDataSourceDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails + * @static + * @param {google.privacy.dlp.v2.DeidentifyDataSourceDetails} message DeidentifyDataSourceDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeidentifyDataSourceDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.requestedOptions = null; + object.deidentifyStats = null; + } + if (message.requestedOptions != null && message.hasOwnProperty("requestedOptions")) + object.requestedOptions = $root.google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions.toObject(message.requestedOptions, options); + if (message.deidentifyStats != null && message.hasOwnProperty("deidentifyStats")) + object.deidentifyStats = $root.google.privacy.dlp.v2.DeidentifyDataSourceStats.toObject(message.deidentifyStats, options); + return object; + }; + + /** + * Converts this DeidentifyDataSourceDetails to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails + * @instance + * @returns {Object.} JSON object + */ + DeidentifyDataSourceDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeidentifyDataSourceDetails + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeidentifyDataSourceDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DeidentifyDataSourceDetails"; + }; + + DeidentifyDataSourceDetails.RequestedDeidentifyOptions = (function() { + + /** + * Properties of a RequestedDeidentifyOptions. + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails + * @interface IRequestedDeidentifyOptions + * @property {google.privacy.dlp.v2.IDeidentifyTemplate|null} [snapshotDeidentifyTemplate] RequestedDeidentifyOptions snapshotDeidentifyTemplate + * @property {google.privacy.dlp.v2.IDeidentifyTemplate|null} [snapshotStructuredDeidentifyTemplate] RequestedDeidentifyOptions snapshotStructuredDeidentifyTemplate + * @property {google.privacy.dlp.v2.IDeidentifyTemplate|null} [snapshotImageRedactTemplate] RequestedDeidentifyOptions snapshotImageRedactTemplate + */ + + /** + * Constructs a new RequestedDeidentifyOptions. + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails + * @classdesc Represents a RequestedDeidentifyOptions. + * @implements IRequestedDeidentifyOptions + * @constructor + * @param {google.privacy.dlp.v2.DeidentifyDataSourceDetails.IRequestedDeidentifyOptions=} [properties] Properties to set + */ + function RequestedDeidentifyOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestedDeidentifyOptions snapshotDeidentifyTemplate. + * @member {google.privacy.dlp.v2.IDeidentifyTemplate|null|undefined} snapshotDeidentifyTemplate + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions + * @instance + */ + RequestedDeidentifyOptions.prototype.snapshotDeidentifyTemplate = null; + + /** + * RequestedDeidentifyOptions snapshotStructuredDeidentifyTemplate. + * @member {google.privacy.dlp.v2.IDeidentifyTemplate|null|undefined} snapshotStructuredDeidentifyTemplate + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions + * @instance + */ + RequestedDeidentifyOptions.prototype.snapshotStructuredDeidentifyTemplate = null; + + /** + * RequestedDeidentifyOptions snapshotImageRedactTemplate. + * @member {google.privacy.dlp.v2.IDeidentifyTemplate|null|undefined} snapshotImageRedactTemplate + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions + * @instance + */ + RequestedDeidentifyOptions.prototype.snapshotImageRedactTemplate = null; + + /** + * Creates a new RequestedDeidentifyOptions instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions + * @static + * @param {google.privacy.dlp.v2.DeidentifyDataSourceDetails.IRequestedDeidentifyOptions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions} RequestedDeidentifyOptions instance + */ + RequestedDeidentifyOptions.create = function create(properties) { + return new RequestedDeidentifyOptions(properties); + }; + + /** + * Encodes the specified RequestedDeidentifyOptions message. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions + * @static + * @param {google.privacy.dlp.v2.DeidentifyDataSourceDetails.IRequestedDeidentifyOptions} message RequestedDeidentifyOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestedDeidentifyOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.snapshotDeidentifyTemplate != null && Object.hasOwnProperty.call(message, "snapshotDeidentifyTemplate")) + $root.google.privacy.dlp.v2.DeidentifyTemplate.encode(message.snapshotDeidentifyTemplate, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.snapshotStructuredDeidentifyTemplate != null && Object.hasOwnProperty.call(message, "snapshotStructuredDeidentifyTemplate")) + $root.google.privacy.dlp.v2.DeidentifyTemplate.encode(message.snapshotStructuredDeidentifyTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.snapshotImageRedactTemplate != null && Object.hasOwnProperty.call(message, "snapshotImageRedactTemplate")) + $root.google.privacy.dlp.v2.DeidentifyTemplate.encode(message.snapshotImageRedactTemplate, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RequestedDeidentifyOptions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions + * @static + * @param {google.privacy.dlp.v2.DeidentifyDataSourceDetails.IRequestedDeidentifyOptions} message RequestedDeidentifyOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestedDeidentifyOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestedDeidentifyOptions message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions} RequestedDeidentifyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestedDeidentifyOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.snapshotDeidentifyTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.snapshotStructuredDeidentifyTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.snapshotImageRedactTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RequestedDeidentifyOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions} RequestedDeidentifyOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestedDeidentifyOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestedDeidentifyOptions message. + * @function verify + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestedDeidentifyOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.snapshotDeidentifyTemplate != null && message.hasOwnProperty("snapshotDeidentifyTemplate")) { + var error = $root.google.privacy.dlp.v2.DeidentifyTemplate.verify(message.snapshotDeidentifyTemplate, long + 1); + if (error) + return "snapshotDeidentifyTemplate." + error; + } + if (message.snapshotStructuredDeidentifyTemplate != null && message.hasOwnProperty("snapshotStructuredDeidentifyTemplate")) { + var error = $root.google.privacy.dlp.v2.DeidentifyTemplate.verify(message.snapshotStructuredDeidentifyTemplate, long + 1); + if (error) + return "snapshotStructuredDeidentifyTemplate." + error; + } + if (message.snapshotImageRedactTemplate != null && message.hasOwnProperty("snapshotImageRedactTemplate")) { + var error = $root.google.privacy.dlp.v2.DeidentifyTemplate.verify(message.snapshotImageRedactTemplate, long + 1); + if (error) + return "snapshotImageRedactTemplate." + error; + } + return null; + }; + + /** + * Creates a RequestedDeidentifyOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions} RequestedDeidentifyOptions + */ + RequestedDeidentifyOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions(); + if (object.snapshotDeidentifyTemplate != null) { + if (typeof object.snapshotDeidentifyTemplate !== "object") + throw TypeError(".google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions.snapshotDeidentifyTemplate: object expected"); + message.snapshotDeidentifyTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.fromObject(object.snapshotDeidentifyTemplate, long + 1); + } + if (object.snapshotStructuredDeidentifyTemplate != null) { + if (typeof object.snapshotStructuredDeidentifyTemplate !== "object") + throw TypeError(".google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions.snapshotStructuredDeidentifyTemplate: object expected"); + message.snapshotStructuredDeidentifyTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.fromObject(object.snapshotStructuredDeidentifyTemplate, long + 1); + } + if (object.snapshotImageRedactTemplate != null) { + if (typeof object.snapshotImageRedactTemplate !== "object") + throw TypeError(".google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions.snapshotImageRedactTemplate: object expected"); + message.snapshotImageRedactTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.fromObject(object.snapshotImageRedactTemplate, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a RequestedDeidentifyOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions + * @static + * @param {google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions} message RequestedDeidentifyOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestedDeidentifyOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.snapshotDeidentifyTemplate = null; + object.snapshotStructuredDeidentifyTemplate = null; + object.snapshotImageRedactTemplate = null; + } + if (message.snapshotDeidentifyTemplate != null && message.hasOwnProperty("snapshotDeidentifyTemplate")) + object.snapshotDeidentifyTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.toObject(message.snapshotDeidentifyTemplate, options); + if (message.snapshotStructuredDeidentifyTemplate != null && message.hasOwnProperty("snapshotStructuredDeidentifyTemplate")) + object.snapshotStructuredDeidentifyTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.toObject(message.snapshotStructuredDeidentifyTemplate, options); + if (message.snapshotImageRedactTemplate != null && message.hasOwnProperty("snapshotImageRedactTemplate")) + object.snapshotImageRedactTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.toObject(message.snapshotImageRedactTemplate, options); + return object; + }; + + /** + * Converts this RequestedDeidentifyOptions to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions + * @instance + * @returns {Object.} JSON object + */ + RequestedDeidentifyOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RequestedDeidentifyOptions + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RequestedDeidentifyOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DeidentifyDataSourceDetails.RequestedDeidentifyOptions"; + }; + + return RequestedDeidentifyOptions; + })(); + + return DeidentifyDataSourceDetails; + })(); + + v2.LocationSupport = (function() { + + /** + * Properties of a LocationSupport. + * @memberof google.privacy.dlp.v2 + * @interface ILocationSupport + * @property {google.privacy.dlp.v2.LocationSupport.RegionalizationScope|null} [regionalizationScope] LocationSupport regionalizationScope + * @property {Array.|null} [locations] LocationSupport locations + */ + + /** + * Constructs a new LocationSupport. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a LocationSupport. + * @implements ILocationSupport + * @constructor + * @param {google.privacy.dlp.v2.ILocationSupport=} [properties] Properties to set + */ + function LocationSupport(properties) { + this.locations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * LocationSupport regionalizationScope. + * @member {google.privacy.dlp.v2.LocationSupport.RegionalizationScope} regionalizationScope + * @memberof google.privacy.dlp.v2.LocationSupport + * @instance + */ + LocationSupport.prototype.regionalizationScope = 0; + + /** + * LocationSupport locations. + * @member {Array.} locations + * @memberof google.privacy.dlp.v2.LocationSupport + * @instance + */ + LocationSupport.prototype.locations = $util.emptyArray; + + /** + * Creates a new LocationSupport instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.LocationSupport + * @static + * @param {google.privacy.dlp.v2.ILocationSupport=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.LocationSupport} LocationSupport instance + */ + LocationSupport.create = function create(properties) { + return new LocationSupport(properties); + }; + + /** + * Encodes the specified LocationSupport message. Does not implicitly {@link google.privacy.dlp.v2.LocationSupport.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.LocationSupport + * @static + * @param {google.privacy.dlp.v2.ILocationSupport} message LocationSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationSupport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.regionalizationScope != null && Object.hasOwnProperty.call(message, "regionalizationScope")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.regionalizationScope); + if (message.locations != null && message.locations.length) + for (var i = 0; i < message.locations.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.locations[i]); + return writer; + }; + + /** + * Encodes the specified LocationSupport message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.LocationSupport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.LocationSupport + * @static + * @param {google.privacy.dlp.v2.ILocationSupport} message LocationSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocationSupport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LocationSupport message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.LocationSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.LocationSupport} LocationSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationSupport.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.LocationSupport(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.regionalizationScope = reader.int32(); + break; + } + case 2: { + if (!(message.locations && message.locations.length)) + message.locations = []; + message.locations.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a LocationSupport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.LocationSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.LocationSupport} LocationSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocationSupport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LocationSupport message. + * @function verify + * @memberof google.privacy.dlp.v2.LocationSupport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LocationSupport.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.regionalizationScope != null && message.hasOwnProperty("regionalizationScope")) + switch (message.regionalizationScope) { + default: + return "regionalizationScope: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.locations != null && message.hasOwnProperty("locations")) { + if (!Array.isArray(message.locations)) + return "locations: array expected"; + for (var i = 0; i < message.locations.length; ++i) + if (!$util.isString(message.locations[i])) + return "locations: string[] expected"; + } + return null; + }; + + /** + * Creates a LocationSupport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.LocationSupport + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.LocationSupport} LocationSupport + */ + LocationSupport.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.LocationSupport) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.LocationSupport(); + switch (object.regionalizationScope) { + default: + if (typeof object.regionalizationScope === "number") { + message.regionalizationScope = object.regionalizationScope; + break; + } + break; + case "REGIONALIZATION_SCOPE_UNSPECIFIED": + case 0: + message.regionalizationScope = 0; + break; + case "REGIONAL": + case 1: + message.regionalizationScope = 1; + break; + case "ANY_LOCATION": + case 2: + message.regionalizationScope = 2; + break; + } + if (object.locations) { + if (!Array.isArray(object.locations)) + throw TypeError(".google.privacy.dlp.v2.LocationSupport.locations: array expected"); + message.locations = []; + for (var i = 0; i < object.locations.length; ++i) + message.locations[i] = String(object.locations[i]); + } + return message; + }; + + /** + * Creates a plain object from a LocationSupport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.LocationSupport + * @static + * @param {google.privacy.dlp.v2.LocationSupport} message LocationSupport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LocationSupport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.locations = []; + if (options.defaults) + object.regionalizationScope = options.enums === String ? "REGIONALIZATION_SCOPE_UNSPECIFIED" : 0; + if (message.regionalizationScope != null && message.hasOwnProperty("regionalizationScope")) + object.regionalizationScope = options.enums === String ? $root.google.privacy.dlp.v2.LocationSupport.RegionalizationScope[message.regionalizationScope] === undefined ? message.regionalizationScope : $root.google.privacy.dlp.v2.LocationSupport.RegionalizationScope[message.regionalizationScope] : message.regionalizationScope; + if (message.locations && message.locations.length) { + object.locations = []; + for (var j = 0; j < message.locations.length; ++j) + object.locations[j] = message.locations[j]; + } + return object; + }; + + /** + * Converts this LocationSupport to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.LocationSupport + * @instance + * @returns {Object.} JSON object + */ + LocationSupport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LocationSupport + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.LocationSupport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LocationSupport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.LocationSupport"; + }; + + /** + * RegionalizationScope enum. + * @name google.privacy.dlp.v2.LocationSupport.RegionalizationScope + * @enum {number} + * @property {number} REGIONALIZATION_SCOPE_UNSPECIFIED=0 REGIONALIZATION_SCOPE_UNSPECIFIED value + * @property {number} REGIONAL=1 REGIONAL value + * @property {number} ANY_LOCATION=2 ANY_LOCATION value + */ + LocationSupport.RegionalizationScope = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REGIONALIZATION_SCOPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "REGIONAL"] = 1; + values[valuesById[2] = "ANY_LOCATION"] = 2; + return values; + })(); + + return LocationSupport; + })(); + + v2.InfoTypeDescription = (function() { + + /** + * Properties of an InfoTypeDescription. + * @memberof google.privacy.dlp.v2 + * @interface IInfoTypeDescription + * @property {string|null} [name] InfoTypeDescription name + * @property {string|null} [displayName] InfoTypeDescription displayName + * @property {Array.|null} [supportedBy] InfoTypeDescription supportedBy + * @property {string|null} [description] InfoTypeDescription description + * @property {google.privacy.dlp.v2.ILocationSupport|null} [locationSupport] InfoTypeDescription locationSupport + * @property {string|null} [example] InfoTypeDescription example + * @property {Array.|null} [versions] InfoTypeDescription versions + * @property {Array.|null} [categories] InfoTypeDescription categories + * @property {google.privacy.dlp.v2.ISensitivityScore|null} [sensitivityScore] InfoTypeDescription sensitivityScore + * @property {Array.|null} [specificInfoTypes] InfoTypeDescription specificInfoTypes + * @property {google.privacy.dlp.v2.InfoTypeDescription.InfoTypeLaunchStatus|null} [launchStatus] InfoTypeDescription launchStatus + */ + + /** + * Constructs a new InfoTypeDescription. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an InfoTypeDescription. + * @implements IInfoTypeDescription + * @constructor + * @param {google.privacy.dlp.v2.IInfoTypeDescription=} [properties] Properties to set + */ + function InfoTypeDescription(properties) { + this.supportedBy = []; + this.versions = []; + this.categories = []; + this.specificInfoTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * InfoTypeDescription name. + * @member {string} name + * @memberof google.privacy.dlp.v2.InfoTypeDescription + * @instance + */ + InfoTypeDescription.prototype.name = ""; + + /** + * InfoTypeDescription displayName. + * @member {string} displayName + * @memberof google.privacy.dlp.v2.InfoTypeDescription + * @instance + */ + InfoTypeDescription.prototype.displayName = ""; + + /** + * InfoTypeDescription supportedBy. + * @member {Array.} supportedBy + * @memberof google.privacy.dlp.v2.InfoTypeDescription + * @instance + */ + InfoTypeDescription.prototype.supportedBy = $util.emptyArray; + + /** + * InfoTypeDescription description. + * @member {string} description + * @memberof google.privacy.dlp.v2.InfoTypeDescription + * @instance + */ + InfoTypeDescription.prototype.description = ""; + + /** + * InfoTypeDescription locationSupport. + * @member {google.privacy.dlp.v2.ILocationSupport|null|undefined} locationSupport + * @memberof google.privacy.dlp.v2.InfoTypeDescription + * @instance + */ + InfoTypeDescription.prototype.locationSupport = null; + + /** + * InfoTypeDescription example. + * @member {string} example + * @memberof google.privacy.dlp.v2.InfoTypeDescription + * @instance + */ + InfoTypeDescription.prototype.example = ""; + + /** + * InfoTypeDescription versions. + * @member {Array.} versions + * @memberof google.privacy.dlp.v2.InfoTypeDescription + * @instance + */ + InfoTypeDescription.prototype.versions = $util.emptyArray; + + /** + * InfoTypeDescription categories. + * @member {Array.} categories + * @memberof google.privacy.dlp.v2.InfoTypeDescription + * @instance + */ + InfoTypeDescription.prototype.categories = $util.emptyArray; + + /** + * InfoTypeDescription sensitivityScore. + * @member {google.privacy.dlp.v2.ISensitivityScore|null|undefined} sensitivityScore + * @memberof google.privacy.dlp.v2.InfoTypeDescription + * @instance + */ + InfoTypeDescription.prototype.sensitivityScore = null; + + /** + * InfoTypeDescription specificInfoTypes. + * @member {Array.} specificInfoTypes + * @memberof google.privacy.dlp.v2.InfoTypeDescription + * @instance + */ + InfoTypeDescription.prototype.specificInfoTypes = $util.emptyArray; + + /** + * InfoTypeDescription launchStatus. + * @member {google.privacy.dlp.v2.InfoTypeDescription.InfoTypeLaunchStatus} launchStatus + * @memberof google.privacy.dlp.v2.InfoTypeDescription + * @instance + */ + InfoTypeDescription.prototype.launchStatus = 0; + + /** + * Creates a new InfoTypeDescription instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.InfoTypeDescription + * @static + * @param {google.privacy.dlp.v2.IInfoTypeDescription=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.InfoTypeDescription} InfoTypeDescription instance + */ + InfoTypeDescription.create = function create(properties) { + return new InfoTypeDescription(properties); + }; + + /** + * Encodes the specified InfoTypeDescription message. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeDescription.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.InfoTypeDescription + * @static + * @param {google.privacy.dlp.v2.IInfoTypeDescription} message InfoTypeDescription message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfoTypeDescription.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.supportedBy != null && message.supportedBy.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (var i = 0; i < message.supportedBy.length; ++i) + writer.int32(message.supportedBy[i]); + writer.ldelim(); + } + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + if (message.locationSupport != null && Object.hasOwnProperty.call(message, "locationSupport")) + $root.google.privacy.dlp.v2.LocationSupport.encode(message.locationSupport, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.example != null && Object.hasOwnProperty.call(message, "example")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.example); + if (message.versions != null && message.versions.length) + for (var i = 0; i < message.versions.length; ++i) + $root.google.privacy.dlp.v2.VersionDescription.encode(message.versions[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.categories != null && message.categories.length) + for (var i = 0; i < message.categories.length; ++i) + $root.google.privacy.dlp.v2.InfoTypeCategory.encode(message.categories[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.sensitivityScore != null && Object.hasOwnProperty.call(message, "sensitivityScore")) + $root.google.privacy.dlp.v2.SensitivityScore.encode(message.sensitivityScore, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.specificInfoTypes != null && message.specificInfoTypes.length) + for (var i = 0; i < message.specificInfoTypes.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.specificInfoTypes[i]); + if (message.launchStatus != null && Object.hasOwnProperty.call(message, "launchStatus")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.launchStatus); + return writer; + }; + + /** + * Encodes the specified InfoTypeDescription message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeDescription.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.InfoTypeDescription + * @static + * @param {google.privacy.dlp.v2.IInfoTypeDescription} message InfoTypeDescription message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfoTypeDescription.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InfoTypeDescription message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.InfoTypeDescription + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.InfoTypeDescription} InfoTypeDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfoTypeDescription.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.InfoTypeDescription(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + if (!(message.supportedBy && message.supportedBy.length)) + message.supportedBy = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.supportedBy.push(reader.int32()); + } else + message.supportedBy.push(reader.int32()); + break; + } + case 4: { + message.description = reader.string(); + break; + } + case 6: { + message.locationSupport = $root.google.privacy.dlp.v2.LocationSupport.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 8: { + message.example = reader.string(); + break; + } + case 9: { + if (!(message.versions && message.versions.length)) + message.versions = []; + message.versions.push($root.google.privacy.dlp.v2.VersionDescription.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 10: { + if (!(message.categories && message.categories.length)) + message.categories = []; + message.categories.push($root.google.privacy.dlp.v2.InfoTypeCategory.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 11: { + message.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 12: { + if (!(message.specificInfoTypes && message.specificInfoTypes.length)) + message.specificInfoTypes = []; + message.specificInfoTypes.push(reader.string()); + break; + } + case 13: { + message.launchStatus = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an InfoTypeDescription message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.InfoTypeDescription + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.InfoTypeDescription} InfoTypeDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfoTypeDescription.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InfoTypeDescription message. + * @function verify + * @memberof google.privacy.dlp.v2.InfoTypeDescription + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InfoTypeDescription.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.supportedBy != null && message.hasOwnProperty("supportedBy")) { + if (!Array.isArray(message.supportedBy)) + return "supportedBy: array expected"; + for (var i = 0; i < message.supportedBy.length; ++i) + switch (message.supportedBy[i]) { + default: + return "supportedBy: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.locationSupport != null && message.hasOwnProperty("locationSupport")) { + var error = $root.google.privacy.dlp.v2.LocationSupport.verify(message.locationSupport, long + 1); + if (error) + return "locationSupport." + error; + } + if (message.example != null && message.hasOwnProperty("example")) + if (!$util.isString(message.example)) + return "example: string expected"; + if (message.versions != null && message.hasOwnProperty("versions")) { + if (!Array.isArray(message.versions)) + return "versions: array expected"; + for (var i = 0; i < message.versions.length; ++i) { + var error = $root.google.privacy.dlp.v2.VersionDescription.verify(message.versions[i], long + 1); + if (error) + return "versions." + error; + } + } + if (message.categories != null && message.hasOwnProperty("categories")) { + if (!Array.isArray(message.categories)) + return "categories: array expected"; + for (var i = 0; i < message.categories.length; ++i) { + var error = $root.google.privacy.dlp.v2.InfoTypeCategory.verify(message.categories[i], long + 1); + if (error) + return "categories." + error; + } + } + if (message.sensitivityScore != null && message.hasOwnProperty("sensitivityScore")) { + var error = $root.google.privacy.dlp.v2.SensitivityScore.verify(message.sensitivityScore, long + 1); + if (error) + return "sensitivityScore." + error; + } + if (message.specificInfoTypes != null && message.hasOwnProperty("specificInfoTypes")) { + if (!Array.isArray(message.specificInfoTypes)) + return "specificInfoTypes: array expected"; + for (var i = 0; i < message.specificInfoTypes.length; ++i) + if (!$util.isString(message.specificInfoTypes[i])) + return "specificInfoTypes: string[] expected"; + } + if (message.launchStatus != null && message.hasOwnProperty("launchStatus")) + switch (message.launchStatus) { + default: + return "launchStatus: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates an InfoTypeDescription message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.InfoTypeDescription + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.InfoTypeDescription} InfoTypeDescription + */ + InfoTypeDescription.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.InfoTypeDescription) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.InfoTypeDescription(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.supportedBy) { + if (!Array.isArray(object.supportedBy)) + throw TypeError(".google.privacy.dlp.v2.InfoTypeDescription.supportedBy: array expected"); + message.supportedBy = []; + for (var i = 0; i < object.supportedBy.length; ++i) + switch (object.supportedBy[i]) { + default: + if (typeof object.supportedBy[i] === "number") { + message.supportedBy[i] = object.supportedBy[i]; + break; + } + case "ENUM_TYPE_UNSPECIFIED": + case 0: + message.supportedBy[i] = 0; + break; + case "INSPECT": + case 1: + message.supportedBy[i] = 1; + break; + case "RISK_ANALYSIS": + case 2: + message.supportedBy[i] = 2; + break; + } + } + if (object.description != null) + message.description = String(object.description); + if (object.locationSupport != null) { + if (typeof object.locationSupport !== "object") + throw TypeError(".google.privacy.dlp.v2.InfoTypeDescription.locationSupport: object expected"); + message.locationSupport = $root.google.privacy.dlp.v2.LocationSupport.fromObject(object.locationSupport, long + 1); + } + if (object.example != null) + message.example = String(object.example); + if (object.versions) { + if (!Array.isArray(object.versions)) + throw TypeError(".google.privacy.dlp.v2.InfoTypeDescription.versions: array expected"); + message.versions = []; + for (var i = 0; i < object.versions.length; ++i) { + if (typeof object.versions[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.InfoTypeDescription.versions: object expected"); + message.versions[i] = $root.google.privacy.dlp.v2.VersionDescription.fromObject(object.versions[i], long + 1); + } + } + if (object.categories) { + if (!Array.isArray(object.categories)) + throw TypeError(".google.privacy.dlp.v2.InfoTypeDescription.categories: array expected"); + message.categories = []; + for (var i = 0; i < object.categories.length; ++i) { + if (typeof object.categories[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.InfoTypeDescription.categories: object expected"); + message.categories[i] = $root.google.privacy.dlp.v2.InfoTypeCategory.fromObject(object.categories[i], long + 1); + } + } + if (object.sensitivityScore != null) { + if (typeof object.sensitivityScore !== "object") + throw TypeError(".google.privacy.dlp.v2.InfoTypeDescription.sensitivityScore: object expected"); + message.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.fromObject(object.sensitivityScore, long + 1); + } + if (object.specificInfoTypes) { + if (!Array.isArray(object.specificInfoTypes)) + throw TypeError(".google.privacy.dlp.v2.InfoTypeDescription.specificInfoTypes: array expected"); + message.specificInfoTypes = []; + for (var i = 0; i < object.specificInfoTypes.length; ++i) + message.specificInfoTypes[i] = String(object.specificInfoTypes[i]); + } + switch (object.launchStatus) { + default: + if (typeof object.launchStatus === "number") { + message.launchStatus = object.launchStatus; + break; + } + break; + case "INFO_TYPE_LAUNCH_STATUS_UNSPECIFIED": + case 0: + message.launchStatus = 0; + break; + case "GENERAL_AVAILABILITY": + case 1: + message.launchStatus = 1; + break; + case "PUBLIC_PREVIEW": + case 2: + message.launchStatus = 2; + break; + case "PRIVATE_PREVIEW": + case 3: + message.launchStatus = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from an InfoTypeDescription message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.InfoTypeDescription + * @static + * @param {google.privacy.dlp.v2.InfoTypeDescription} message InfoTypeDescription + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InfoTypeDescription.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.supportedBy = []; + object.versions = []; + object.categories = []; + object.specificInfoTypes = []; + } + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.locationSupport = null; + object.example = ""; + object.sensitivityScore = null; + object.launchStatus = options.enums === String ? "INFO_TYPE_LAUNCH_STATUS_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.supportedBy && message.supportedBy.length) { + object.supportedBy = []; + for (var j = 0; j < message.supportedBy.length; ++j) + object.supportedBy[j] = options.enums === String ? $root.google.privacy.dlp.v2.InfoTypeSupportedBy[message.supportedBy[j]] === undefined ? message.supportedBy[j] : $root.google.privacy.dlp.v2.InfoTypeSupportedBy[message.supportedBy[j]] : message.supportedBy[j]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.locationSupport != null && message.hasOwnProperty("locationSupport")) + object.locationSupport = $root.google.privacy.dlp.v2.LocationSupport.toObject(message.locationSupport, options); + if (message.example != null && message.hasOwnProperty("example")) + object.example = message.example; + if (message.versions && message.versions.length) { + object.versions = []; + for (var j = 0; j < message.versions.length; ++j) + object.versions[j] = $root.google.privacy.dlp.v2.VersionDescription.toObject(message.versions[j], options); + } + if (message.categories && message.categories.length) { + object.categories = []; + for (var j = 0; j < message.categories.length; ++j) + object.categories[j] = $root.google.privacy.dlp.v2.InfoTypeCategory.toObject(message.categories[j], options); + } + if (message.sensitivityScore != null && message.hasOwnProperty("sensitivityScore")) + object.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.toObject(message.sensitivityScore, options); + if (message.specificInfoTypes && message.specificInfoTypes.length) { + object.specificInfoTypes = []; + for (var j = 0; j < message.specificInfoTypes.length; ++j) + object.specificInfoTypes[j] = message.specificInfoTypes[j]; + } + if (message.launchStatus != null && message.hasOwnProperty("launchStatus")) + object.launchStatus = options.enums === String ? $root.google.privacy.dlp.v2.InfoTypeDescription.InfoTypeLaunchStatus[message.launchStatus] === undefined ? message.launchStatus : $root.google.privacy.dlp.v2.InfoTypeDescription.InfoTypeLaunchStatus[message.launchStatus] : message.launchStatus; + return object; + }; + + /** + * Converts this InfoTypeDescription to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.InfoTypeDescription + * @instance + * @returns {Object.} JSON object + */ + InfoTypeDescription.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InfoTypeDescription + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.InfoTypeDescription + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InfoTypeDescription.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.InfoTypeDescription"; + }; + + /** + * InfoTypeLaunchStatus enum. + * @name google.privacy.dlp.v2.InfoTypeDescription.InfoTypeLaunchStatus + * @enum {number} + * @property {number} INFO_TYPE_LAUNCH_STATUS_UNSPECIFIED=0 INFO_TYPE_LAUNCH_STATUS_UNSPECIFIED value + * @property {number} GENERAL_AVAILABILITY=1 GENERAL_AVAILABILITY value + * @property {number} PUBLIC_PREVIEW=2 PUBLIC_PREVIEW value + * @property {number} PRIVATE_PREVIEW=3 PRIVATE_PREVIEW value + */ + InfoTypeDescription.InfoTypeLaunchStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INFO_TYPE_LAUNCH_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "GENERAL_AVAILABILITY"] = 1; + values[valuesById[2] = "PUBLIC_PREVIEW"] = 2; + values[valuesById[3] = "PRIVATE_PREVIEW"] = 3; + return values; + })(); + + return InfoTypeDescription; + })(); + + v2.InfoTypeCategory = (function() { + + /** + * Properties of an InfoTypeCategory. + * @memberof google.privacy.dlp.v2 + * @interface IInfoTypeCategory + * @property {google.privacy.dlp.v2.InfoTypeCategory.LocationCategory|null} [locationCategory] InfoTypeCategory locationCategory + * @property {google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory|null} [industryCategory] InfoTypeCategory industryCategory + * @property {google.privacy.dlp.v2.InfoTypeCategory.TypeCategory|null} [typeCategory] InfoTypeCategory typeCategory + */ + + /** + * Constructs a new InfoTypeCategory. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an InfoTypeCategory. + * @implements IInfoTypeCategory + * @constructor + * @param {google.privacy.dlp.v2.IInfoTypeCategory=} [properties] Properties to set + */ + function InfoTypeCategory(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * InfoTypeCategory locationCategory. + * @member {google.privacy.dlp.v2.InfoTypeCategory.LocationCategory|null|undefined} locationCategory + * @memberof google.privacy.dlp.v2.InfoTypeCategory + * @instance + */ + InfoTypeCategory.prototype.locationCategory = null; + + /** + * InfoTypeCategory industryCategory. + * @member {google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory|null|undefined} industryCategory + * @memberof google.privacy.dlp.v2.InfoTypeCategory + * @instance + */ + InfoTypeCategory.prototype.industryCategory = null; + + /** + * InfoTypeCategory typeCategory. + * @member {google.privacy.dlp.v2.InfoTypeCategory.TypeCategory|null|undefined} typeCategory + * @memberof google.privacy.dlp.v2.InfoTypeCategory + * @instance + */ + InfoTypeCategory.prototype.typeCategory = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * InfoTypeCategory category. + * @member {"locationCategory"|"industryCategory"|"typeCategory"|undefined} category + * @memberof google.privacy.dlp.v2.InfoTypeCategory + * @instance + */ + Object.defineProperty(InfoTypeCategory.prototype, "category", { + get: $util.oneOfGetter($oneOfFields = ["locationCategory", "industryCategory", "typeCategory"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new InfoTypeCategory instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.InfoTypeCategory + * @static + * @param {google.privacy.dlp.v2.IInfoTypeCategory=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.InfoTypeCategory} InfoTypeCategory instance + */ + InfoTypeCategory.create = function create(properties) { + return new InfoTypeCategory(properties); + }; + + /** + * Encodes the specified InfoTypeCategory message. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeCategory.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.InfoTypeCategory + * @static + * @param {google.privacy.dlp.v2.IInfoTypeCategory} message InfoTypeCategory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfoTypeCategory.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.locationCategory != null && Object.hasOwnProperty.call(message, "locationCategory")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.locationCategory); + if (message.industryCategory != null && Object.hasOwnProperty.call(message, "industryCategory")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.industryCategory); + if (message.typeCategory != null && Object.hasOwnProperty.call(message, "typeCategory")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.typeCategory); + return writer; + }; + + /** + * Encodes the specified InfoTypeCategory message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeCategory.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.InfoTypeCategory + * @static + * @param {google.privacy.dlp.v2.IInfoTypeCategory} message InfoTypeCategory message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfoTypeCategory.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InfoTypeCategory message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.InfoTypeCategory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.InfoTypeCategory} InfoTypeCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfoTypeCategory.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.InfoTypeCategory(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.locationCategory = reader.int32(); + break; + } + case 2: { + message.industryCategory = reader.int32(); + break; + } + case 3: { + message.typeCategory = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an InfoTypeCategory message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.InfoTypeCategory + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.InfoTypeCategory} InfoTypeCategory + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfoTypeCategory.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InfoTypeCategory message. + * @function verify + * @memberof google.privacy.dlp.v2.InfoTypeCategory + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InfoTypeCategory.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.locationCategory != null && message.hasOwnProperty("locationCategory")) { + properties.category = 1; + switch (message.locationCategory) { + default: + return "locationCategory: enum value expected"; + case 0: + case 1: + case 2: + case 51: + case 3: + case 53: + case 48: + case 50: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 42: + case 52: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 47: + case 21: + case 22: + case 23: + case 41: + case 24: + case 25: + case 26: + case 27: + case 28: + case 44: + case 29: + case 30: + case 31: + case 32: + case 43: + case 33: + case 34: + case 35: + case 45: + case 36: + case 37: + case 38: + case 46: + case 39: + case 40: + break; + } + } + if (message.industryCategory != null && message.hasOwnProperty("industryCategory")) { + if (properties.category === 1) + return "category: multiple values"; + properties.category = 1; + switch (message.industryCategory) { + default: + return "industryCategory: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.typeCategory != null && message.hasOwnProperty("typeCategory")) { + if (properties.category === 1) + return "category: multiple values"; + properties.category = 1; + switch (message.typeCategory) { + default: + return "typeCategory: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + return null; + }; + + /** + * Creates an InfoTypeCategory message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.InfoTypeCategory + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.InfoTypeCategory} InfoTypeCategory + */ + InfoTypeCategory.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.InfoTypeCategory) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.InfoTypeCategory(); + switch (object.locationCategory) { + default: + if (typeof object.locationCategory === "number") { + message.locationCategory = object.locationCategory; + break; + } + break; + case "LOCATION_UNSPECIFIED": + case 0: + message.locationCategory = 0; + break; + case "GLOBAL": + case 1: + message.locationCategory = 1; + break; + case "ARGENTINA": + case 2: + message.locationCategory = 2; + break; + case "ARMENIA": + case 51: + message.locationCategory = 51; + break; + case "AUSTRALIA": + case 3: + message.locationCategory = 3; + break; + case "AUSTRIA": + case 53: + message.locationCategory = 53; + break; + case "AZERBAIJAN": + case 48: + message.locationCategory = 48; + break; + case "BELARUS": + case 50: + message.locationCategory = 50; + break; + case "BELGIUM": + case 4: + message.locationCategory = 4; + break; + case "BRAZIL": + case 5: + message.locationCategory = 5; + break; + case "CANADA": + case 6: + message.locationCategory = 6; + break; + case "CHILE": + case 7: + message.locationCategory = 7; + break; + case "CHINA": + case 8: + message.locationCategory = 8; + break; + case "COLOMBIA": + case 9: + message.locationCategory = 9; + break; + case "CROATIA": + case 42: + message.locationCategory = 42; + break; + case "CZECHIA": + case 52: + message.locationCategory = 52; + break; + case "DENMARK": + case 10: + message.locationCategory = 10; + break; + case "FRANCE": + case 11: + message.locationCategory = 11; + break; + case "FINLAND": + case 12: + message.locationCategory = 12; + break; + case "GERMANY": + case 13: + message.locationCategory = 13; + break; + case "HONG_KONG": + case 14: + message.locationCategory = 14; + break; + case "INDIA": + case 15: + message.locationCategory = 15; + break; + case "INDONESIA": + case 16: + message.locationCategory = 16; + break; + case "IRELAND": + case 17: + message.locationCategory = 17; + break; + case "ISRAEL": + case 18: + message.locationCategory = 18; + break; + case "ITALY": + case 19: + message.locationCategory = 19; + break; + case "JAPAN": + case 20: + message.locationCategory = 20; + break; + case "KAZAKHSTAN": + case 47: + message.locationCategory = 47; + break; + case "KOREA": + case 21: + message.locationCategory = 21; + break; + case "MEXICO": + case 22: + message.locationCategory = 22; + break; + case "THE_NETHERLANDS": + case 23: + message.locationCategory = 23; + break; + case "NEW_ZEALAND": + case 41: + message.locationCategory = 41; + break; + case "NORWAY": + case 24: + message.locationCategory = 24; + break; + case "PARAGUAY": + case 25: + message.locationCategory = 25; + break; + case "PERU": + case 26: + message.locationCategory = 26; + break; + case "POLAND": + case 27: + message.locationCategory = 27; + break; + case "PORTUGAL": + case 28: + message.locationCategory = 28; + break; + case "RUSSIA": + case 44: + message.locationCategory = 44; + break; + case "SINGAPORE": + case 29: + message.locationCategory = 29; + break; + case "SOUTH_AFRICA": + case 30: + message.locationCategory = 30; + break; + case "SPAIN": + case 31: + message.locationCategory = 31; + break; + case "SWEDEN": + case 32: + message.locationCategory = 32; + break; + case "SWITZERLAND": + case 43: + message.locationCategory = 43; + break; + case "TAIWAN": + case 33: + message.locationCategory = 33; + break; + case "THAILAND": + case 34: + message.locationCategory = 34; + break; + case "TURKEY": + case 35: + message.locationCategory = 35; + break; + case "UKRAINE": + case 45: + message.locationCategory = 45; + break; + case "UNITED_KINGDOM": + case 36: + message.locationCategory = 36; + break; + case "UNITED_STATES": + case 37: + message.locationCategory = 37; + break; + case "URUGUAY": + case 38: + message.locationCategory = 38; + break; + case "UZBEKISTAN": + case 46: + message.locationCategory = 46; + break; + case "VENEZUELA": + case 39: + message.locationCategory = 39; + break; + case "INTERNAL": + case 40: + message.locationCategory = 40; + break; + } + switch (object.industryCategory) { + default: + if (typeof object.industryCategory === "number") { + message.industryCategory = object.industryCategory; + break; + } + break; + case "INDUSTRY_UNSPECIFIED": + case 0: + message.industryCategory = 0; + break; + case "FINANCE": + case 1: + message.industryCategory = 1; + break; + case "HEALTH": + case 2: + message.industryCategory = 2; + break; + case "TELECOMMUNICATIONS": + case 3: + message.industryCategory = 3; + break; + } + switch (object.typeCategory) { + default: + if (typeof object.typeCategory === "number") { + message.typeCategory = object.typeCategory; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.typeCategory = 0; + break; + case "PII": + case 1: + message.typeCategory = 1; + break; + case "SPII": + case 2: + message.typeCategory = 2; + break; + case "DEMOGRAPHIC": + case 3: + message.typeCategory = 3; + break; + case "CREDENTIAL": + case 4: + message.typeCategory = 4; + break; + case "GOVERNMENT_ID": + case 5: + message.typeCategory = 5; + break; + case "DOCUMENT": + case 6: + message.typeCategory = 6; + break; + case "CONTEXTUAL_INFORMATION": + case 7: + message.typeCategory = 7; + break; + case "CUSTOM": + case 8: + message.typeCategory = 8; + break; + } + return message; + }; + + /** + * Creates a plain object from an InfoTypeCategory message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.InfoTypeCategory + * @static + * @param {google.privacy.dlp.v2.InfoTypeCategory} message InfoTypeCategory + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InfoTypeCategory.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.locationCategory != null && message.hasOwnProperty("locationCategory")) { + object.locationCategory = options.enums === String ? $root.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory[message.locationCategory] === undefined ? message.locationCategory : $root.google.privacy.dlp.v2.InfoTypeCategory.LocationCategory[message.locationCategory] : message.locationCategory; + if (options.oneofs) + object.category = "locationCategory"; + } + if (message.industryCategory != null && message.hasOwnProperty("industryCategory")) { + object.industryCategory = options.enums === String ? $root.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory[message.industryCategory] === undefined ? message.industryCategory : $root.google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory[message.industryCategory] : message.industryCategory; + if (options.oneofs) + object.category = "industryCategory"; + } + if (message.typeCategory != null && message.hasOwnProperty("typeCategory")) { + object.typeCategory = options.enums === String ? $root.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory[message.typeCategory] === undefined ? message.typeCategory : $root.google.privacy.dlp.v2.InfoTypeCategory.TypeCategory[message.typeCategory] : message.typeCategory; + if (options.oneofs) + object.category = "typeCategory"; + } + return object; + }; + + /** + * Converts this InfoTypeCategory to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.InfoTypeCategory + * @instance + * @returns {Object.} JSON object + */ + InfoTypeCategory.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InfoTypeCategory + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.InfoTypeCategory + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InfoTypeCategory.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.InfoTypeCategory"; + }; + + /** + * LocationCategory enum. + * @name google.privacy.dlp.v2.InfoTypeCategory.LocationCategory + * @enum {number} + * @property {number} LOCATION_UNSPECIFIED=0 LOCATION_UNSPECIFIED value + * @property {number} GLOBAL=1 GLOBAL value + * @property {number} ARGENTINA=2 ARGENTINA value + * @property {number} ARMENIA=51 ARMENIA value + * @property {number} AUSTRALIA=3 AUSTRALIA value + * @property {number} AUSTRIA=53 AUSTRIA value + * @property {number} AZERBAIJAN=48 AZERBAIJAN value + * @property {number} BELARUS=50 BELARUS value + * @property {number} BELGIUM=4 BELGIUM value + * @property {number} BRAZIL=5 BRAZIL value + * @property {number} CANADA=6 CANADA value + * @property {number} CHILE=7 CHILE value + * @property {number} CHINA=8 CHINA value + * @property {number} COLOMBIA=9 COLOMBIA value + * @property {number} CROATIA=42 CROATIA value + * @property {number} CZECHIA=52 CZECHIA value + * @property {number} DENMARK=10 DENMARK value + * @property {number} FRANCE=11 FRANCE value + * @property {number} FINLAND=12 FINLAND value + * @property {number} GERMANY=13 GERMANY value + * @property {number} HONG_KONG=14 HONG_KONG value + * @property {number} INDIA=15 INDIA value + * @property {number} INDONESIA=16 INDONESIA value + * @property {number} IRELAND=17 IRELAND value + * @property {number} ISRAEL=18 ISRAEL value + * @property {number} ITALY=19 ITALY value + * @property {number} JAPAN=20 JAPAN value + * @property {number} KAZAKHSTAN=47 KAZAKHSTAN value + * @property {number} KOREA=21 KOREA value + * @property {number} MEXICO=22 MEXICO value + * @property {number} THE_NETHERLANDS=23 THE_NETHERLANDS value + * @property {number} NEW_ZEALAND=41 NEW_ZEALAND value + * @property {number} NORWAY=24 NORWAY value + * @property {number} PARAGUAY=25 PARAGUAY value + * @property {number} PERU=26 PERU value + * @property {number} POLAND=27 POLAND value + * @property {number} PORTUGAL=28 PORTUGAL value + * @property {number} RUSSIA=44 RUSSIA value + * @property {number} SINGAPORE=29 SINGAPORE value + * @property {number} SOUTH_AFRICA=30 SOUTH_AFRICA value + * @property {number} SPAIN=31 SPAIN value + * @property {number} SWEDEN=32 SWEDEN value + * @property {number} SWITZERLAND=43 SWITZERLAND value + * @property {number} TAIWAN=33 TAIWAN value + * @property {number} THAILAND=34 THAILAND value + * @property {number} TURKEY=35 TURKEY value + * @property {number} UKRAINE=45 UKRAINE value + * @property {number} UNITED_KINGDOM=36 UNITED_KINGDOM value + * @property {number} UNITED_STATES=37 UNITED_STATES value + * @property {number} URUGUAY=38 URUGUAY value + * @property {number} UZBEKISTAN=46 UZBEKISTAN value + * @property {number} VENEZUELA=39 VENEZUELA value + * @property {number} INTERNAL=40 INTERNAL value + */ + InfoTypeCategory.LocationCategory = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOCATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "GLOBAL"] = 1; + values[valuesById[2] = "ARGENTINA"] = 2; + values[valuesById[51] = "ARMENIA"] = 51; + values[valuesById[3] = "AUSTRALIA"] = 3; + values[valuesById[53] = "AUSTRIA"] = 53; + values[valuesById[48] = "AZERBAIJAN"] = 48; + values[valuesById[50] = "BELARUS"] = 50; + values[valuesById[4] = "BELGIUM"] = 4; + values[valuesById[5] = "BRAZIL"] = 5; + values[valuesById[6] = "CANADA"] = 6; + values[valuesById[7] = "CHILE"] = 7; + values[valuesById[8] = "CHINA"] = 8; + values[valuesById[9] = "COLOMBIA"] = 9; + values[valuesById[42] = "CROATIA"] = 42; + values[valuesById[52] = "CZECHIA"] = 52; + values[valuesById[10] = "DENMARK"] = 10; + values[valuesById[11] = "FRANCE"] = 11; + values[valuesById[12] = "FINLAND"] = 12; + values[valuesById[13] = "GERMANY"] = 13; + values[valuesById[14] = "HONG_KONG"] = 14; + values[valuesById[15] = "INDIA"] = 15; + values[valuesById[16] = "INDONESIA"] = 16; + values[valuesById[17] = "IRELAND"] = 17; + values[valuesById[18] = "ISRAEL"] = 18; + values[valuesById[19] = "ITALY"] = 19; + values[valuesById[20] = "JAPAN"] = 20; + values[valuesById[47] = "KAZAKHSTAN"] = 47; + values[valuesById[21] = "KOREA"] = 21; + values[valuesById[22] = "MEXICO"] = 22; + values[valuesById[23] = "THE_NETHERLANDS"] = 23; + values[valuesById[41] = "NEW_ZEALAND"] = 41; + values[valuesById[24] = "NORWAY"] = 24; + values[valuesById[25] = "PARAGUAY"] = 25; + values[valuesById[26] = "PERU"] = 26; + values[valuesById[27] = "POLAND"] = 27; + values[valuesById[28] = "PORTUGAL"] = 28; + values[valuesById[44] = "RUSSIA"] = 44; + values[valuesById[29] = "SINGAPORE"] = 29; + values[valuesById[30] = "SOUTH_AFRICA"] = 30; + values[valuesById[31] = "SPAIN"] = 31; + values[valuesById[32] = "SWEDEN"] = 32; + values[valuesById[43] = "SWITZERLAND"] = 43; + values[valuesById[33] = "TAIWAN"] = 33; + values[valuesById[34] = "THAILAND"] = 34; + values[valuesById[35] = "TURKEY"] = 35; + values[valuesById[45] = "UKRAINE"] = 45; + values[valuesById[36] = "UNITED_KINGDOM"] = 36; + values[valuesById[37] = "UNITED_STATES"] = 37; + values[valuesById[38] = "URUGUAY"] = 38; + values[valuesById[46] = "UZBEKISTAN"] = 46; + values[valuesById[39] = "VENEZUELA"] = 39; + values[valuesById[40] = "INTERNAL"] = 40; + return values; + })(); + + /** + * IndustryCategory enum. + * @name google.privacy.dlp.v2.InfoTypeCategory.IndustryCategory + * @enum {number} + * @property {number} INDUSTRY_UNSPECIFIED=0 INDUSTRY_UNSPECIFIED value + * @property {number} FINANCE=1 FINANCE value + * @property {number} HEALTH=2 HEALTH value + * @property {number} TELECOMMUNICATIONS=3 TELECOMMUNICATIONS value + */ + InfoTypeCategory.IndustryCategory = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INDUSTRY_UNSPECIFIED"] = 0; + values[valuesById[1] = "FINANCE"] = 1; + values[valuesById[2] = "HEALTH"] = 2; + values[valuesById[3] = "TELECOMMUNICATIONS"] = 3; + return values; + })(); + + /** + * TypeCategory enum. + * @name google.privacy.dlp.v2.InfoTypeCategory.TypeCategory + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} PII=1 PII value + * @property {number} SPII=2 SPII value + * @property {number} DEMOGRAPHIC=3 DEMOGRAPHIC value + * @property {number} CREDENTIAL=4 CREDENTIAL value + * @property {number} GOVERNMENT_ID=5 GOVERNMENT_ID value + * @property {number} DOCUMENT=6 DOCUMENT value + * @property {number} CONTEXTUAL_INFORMATION=7 CONTEXTUAL_INFORMATION value + * @property {number} CUSTOM=8 CUSTOM value + */ + InfoTypeCategory.TypeCategory = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PII"] = 1; + values[valuesById[2] = "SPII"] = 2; + values[valuesById[3] = "DEMOGRAPHIC"] = 3; + values[valuesById[4] = "CREDENTIAL"] = 4; + values[valuesById[5] = "GOVERNMENT_ID"] = 5; + values[valuesById[6] = "DOCUMENT"] = 6; + values[valuesById[7] = "CONTEXTUAL_INFORMATION"] = 7; + values[valuesById[8] = "CUSTOM"] = 8; + return values; + })(); + + return InfoTypeCategory; + })(); + + v2.VersionDescription = (function() { + + /** + * Properties of a VersionDescription. + * @memberof google.privacy.dlp.v2 + * @interface IVersionDescription + * @property {string|null} [version] VersionDescription version + * @property {string|null} [description] VersionDescription description + */ + + /** + * Constructs a new VersionDescription. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a VersionDescription. + * @implements IVersionDescription + * @constructor + * @param {google.privacy.dlp.v2.IVersionDescription=} [properties] Properties to set + */ + function VersionDescription(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * VersionDescription version. + * @member {string} version + * @memberof google.privacy.dlp.v2.VersionDescription + * @instance + */ + VersionDescription.prototype.version = ""; + + /** + * VersionDescription description. + * @member {string} description + * @memberof google.privacy.dlp.v2.VersionDescription + * @instance + */ + VersionDescription.prototype.description = ""; + + /** + * Creates a new VersionDescription instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.VersionDescription + * @static + * @param {google.privacy.dlp.v2.IVersionDescription=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.VersionDescription} VersionDescription instance + */ + VersionDescription.create = function create(properties) { + return new VersionDescription(properties); + }; + + /** + * Encodes the specified VersionDescription message. Does not implicitly {@link google.privacy.dlp.v2.VersionDescription.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.VersionDescription + * @static + * @param {google.privacy.dlp.v2.IVersionDescription} message VersionDescription message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionDescription.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + return writer; + }; + + /** + * Encodes the specified VersionDescription message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.VersionDescription.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.VersionDescription + * @static + * @param {google.privacy.dlp.v2.IVersionDescription} message VersionDescription message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VersionDescription.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VersionDescription message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.VersionDescription + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.VersionDescription} VersionDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionDescription.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.VersionDescription(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a VersionDescription message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.VersionDescription + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.VersionDescription} VersionDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VersionDescription.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VersionDescription message. + * @function verify + * @memberof google.privacy.dlp.v2.VersionDescription + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VersionDescription.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a VersionDescription message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.VersionDescription + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.VersionDescription} VersionDescription + */ + VersionDescription.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.VersionDescription) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.VersionDescription(); + if (object.version != null) + message.version = String(object.version); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a VersionDescription message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.VersionDescription + * @static + * @param {google.privacy.dlp.v2.VersionDescription} message VersionDescription + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VersionDescription.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.description = ""; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this VersionDescription to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.VersionDescription + * @instance + * @returns {Object.} JSON object + */ + VersionDescription.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VersionDescription + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.VersionDescription + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VersionDescription.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.VersionDescription"; + }; + + return VersionDescription; + })(); + + v2.ListInfoTypesRequest = (function() { + + /** + * Properties of a ListInfoTypesRequest. + * @memberof google.privacy.dlp.v2 + * @interface IListInfoTypesRequest + * @property {string|null} [parent] ListInfoTypesRequest parent + * @property {string|null} [languageCode] ListInfoTypesRequest languageCode + * @property {string|null} [filter] ListInfoTypesRequest filter + * @property {string|null} [locationId] ListInfoTypesRequest locationId + */ + + /** + * Constructs a new ListInfoTypesRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListInfoTypesRequest. + * @implements IListInfoTypesRequest + * @constructor + * @param {google.privacy.dlp.v2.IListInfoTypesRequest=} [properties] Properties to set + */ + function ListInfoTypesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListInfoTypesRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.ListInfoTypesRequest + * @instance + */ + ListInfoTypesRequest.prototype.parent = ""; + + /** + * ListInfoTypesRequest languageCode. + * @member {string} languageCode + * @memberof google.privacy.dlp.v2.ListInfoTypesRequest + * @instance + */ + ListInfoTypesRequest.prototype.languageCode = ""; + + /** + * ListInfoTypesRequest filter. + * @member {string} filter + * @memberof google.privacy.dlp.v2.ListInfoTypesRequest + * @instance + */ + ListInfoTypesRequest.prototype.filter = ""; + + /** + * ListInfoTypesRequest locationId. + * @member {string} locationId + * @memberof google.privacy.dlp.v2.ListInfoTypesRequest + * @instance + */ + ListInfoTypesRequest.prototype.locationId = ""; + + /** + * Creates a new ListInfoTypesRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListInfoTypesRequest + * @static + * @param {google.privacy.dlp.v2.IListInfoTypesRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListInfoTypesRequest} ListInfoTypesRequest instance + */ + ListInfoTypesRequest.create = function create(properties) { + return new ListInfoTypesRequest(properties); + }; + + /** + * Encodes the specified ListInfoTypesRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListInfoTypesRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListInfoTypesRequest + * @static + * @param {google.privacy.dlp.v2.IListInfoTypesRequest} message ListInfoTypesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInfoTypesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.languageCode); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.locationId != null && Object.hasOwnProperty.call(message, "locationId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.locationId); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent); + return writer; + }; + + /** + * Encodes the specified ListInfoTypesRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListInfoTypesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListInfoTypesRequest + * @static + * @param {google.privacy.dlp.v2.IListInfoTypesRequest} message ListInfoTypesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInfoTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListInfoTypesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListInfoTypesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ListInfoTypesRequest} ListInfoTypesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInfoTypesRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListInfoTypesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.parent = reader.string(); + break; + } + case 1: { + message.languageCode = reader.string(); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + case 3: { + message.locationId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListInfoTypesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListInfoTypesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListInfoTypesRequest} ListInfoTypesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInfoTypesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListInfoTypesRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.ListInfoTypesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListInfoTypesRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + if (!$util.isString(message.languageCode)) + return "languageCode: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; + return null; + }; + + /** + * Creates a ListInfoTypesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListInfoTypesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListInfoTypesRequest} ListInfoTypesRequest + */ + ListInfoTypesRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ListInfoTypesRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ListInfoTypesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.languageCode != null) + message.languageCode = String(object.languageCode); + if (object.filter != null) + message.filter = String(object.filter); + if (object.locationId != null) + message.locationId = String(object.locationId); + return message; + }; + + /** + * Creates a plain object from a ListInfoTypesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListInfoTypesRequest + * @static + * @param {google.privacy.dlp.v2.ListInfoTypesRequest} message ListInfoTypesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListInfoTypesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.languageCode = ""; + object.filter = ""; + object.locationId = ""; + object.parent = ""; + } + if (message.languageCode != null && message.hasOwnProperty("languageCode")) + object.languageCode = message.languageCode; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this ListInfoTypesRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListInfoTypesRequest + * @instance + * @returns {Object.} JSON object + */ + ListInfoTypesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListInfoTypesRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ListInfoTypesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListInfoTypesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ListInfoTypesRequest"; + }; + + return ListInfoTypesRequest; + })(); + + v2.ListInfoTypesResponse = (function() { + + /** + * Properties of a ListInfoTypesResponse. + * @memberof google.privacy.dlp.v2 + * @interface IListInfoTypesResponse + * @property {Array.|null} [infoTypes] ListInfoTypesResponse infoTypes + */ + + /** + * Constructs a new ListInfoTypesResponse. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListInfoTypesResponse. + * @implements IListInfoTypesResponse + * @constructor + * @param {google.privacy.dlp.v2.IListInfoTypesResponse=} [properties] Properties to set + */ + function ListInfoTypesResponse(properties) { + this.infoTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListInfoTypesResponse infoTypes. + * @member {Array.} infoTypes + * @memberof google.privacy.dlp.v2.ListInfoTypesResponse + * @instance + */ + ListInfoTypesResponse.prototype.infoTypes = $util.emptyArray; + + /** + * Creates a new ListInfoTypesResponse instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListInfoTypesResponse + * @static + * @param {google.privacy.dlp.v2.IListInfoTypesResponse=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListInfoTypesResponse} ListInfoTypesResponse instance + */ + ListInfoTypesResponse.create = function create(properties) { + return new ListInfoTypesResponse(properties); + }; + + /** + * Encodes the specified ListInfoTypesResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListInfoTypesResponse.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListInfoTypesResponse + * @static + * @param {google.privacy.dlp.v2.IListInfoTypesResponse} message ListInfoTypesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInfoTypesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.infoTypes != null && message.infoTypes.length) + for (var i = 0; i < message.infoTypes.length; ++i) + $root.google.privacy.dlp.v2.InfoTypeDescription.encode(message.infoTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListInfoTypesResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListInfoTypesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListInfoTypesResponse + * @static + * @param {google.privacy.dlp.v2.IListInfoTypesResponse} message ListInfoTypesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInfoTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListInfoTypesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListInfoTypesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ListInfoTypesResponse} ListInfoTypesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInfoTypesResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListInfoTypesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.infoTypes && message.infoTypes.length)) + message.infoTypes = []; + message.infoTypes.push($root.google.privacy.dlp.v2.InfoTypeDescription.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListInfoTypesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListInfoTypesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListInfoTypesResponse} ListInfoTypesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInfoTypesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListInfoTypesResponse message. + * @function verify + * @memberof google.privacy.dlp.v2.ListInfoTypesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListInfoTypesResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.infoTypes != null && message.hasOwnProperty("infoTypes")) { + if (!Array.isArray(message.infoTypes)) + return "infoTypes: array expected"; + for (var i = 0; i < message.infoTypes.length; ++i) { + var error = $root.google.privacy.dlp.v2.InfoTypeDescription.verify(message.infoTypes[i], long + 1); + if (error) + return "infoTypes." + error; + } + } + return null; + }; + + /** + * Creates a ListInfoTypesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListInfoTypesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListInfoTypesResponse} ListInfoTypesResponse + */ + ListInfoTypesResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ListInfoTypesResponse) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ListInfoTypesResponse(); + if (object.infoTypes) { + if (!Array.isArray(object.infoTypes)) + throw TypeError(".google.privacy.dlp.v2.ListInfoTypesResponse.infoTypes: array expected"); + message.infoTypes = []; + for (var i = 0; i < object.infoTypes.length; ++i) { + if (typeof object.infoTypes[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.ListInfoTypesResponse.infoTypes: object expected"); + message.infoTypes[i] = $root.google.privacy.dlp.v2.InfoTypeDescription.fromObject(object.infoTypes[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a ListInfoTypesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListInfoTypesResponse + * @static + * @param {google.privacy.dlp.v2.ListInfoTypesResponse} message ListInfoTypesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListInfoTypesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.infoTypes = []; + if (message.infoTypes && message.infoTypes.length) { + object.infoTypes = []; + for (var j = 0; j < message.infoTypes.length; ++j) + object.infoTypes[j] = $root.google.privacy.dlp.v2.InfoTypeDescription.toObject(message.infoTypes[j], options); + } + return object; + }; + + /** + * Converts this ListInfoTypesResponse to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListInfoTypesResponse + * @instance + * @returns {Object.} JSON object + */ + ListInfoTypesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListInfoTypesResponse + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ListInfoTypesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListInfoTypesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ListInfoTypesResponse"; + }; + + return ListInfoTypesResponse; + })(); + + v2.RiskAnalysisJobConfig = (function() { + + /** + * Properties of a RiskAnalysisJobConfig. + * @memberof google.privacy.dlp.v2 + * @interface IRiskAnalysisJobConfig + * @property {google.privacy.dlp.v2.IPrivacyMetric|null} [privacyMetric] RiskAnalysisJobConfig privacyMetric + * @property {google.privacy.dlp.v2.IBigQueryTable|null} [sourceTable] RiskAnalysisJobConfig sourceTable + * @property {Array.|null} [actions] RiskAnalysisJobConfig actions + */ + + /** + * Constructs a new RiskAnalysisJobConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a RiskAnalysisJobConfig. + * @implements IRiskAnalysisJobConfig + * @constructor + * @param {google.privacy.dlp.v2.IRiskAnalysisJobConfig=} [properties] Properties to set + */ + function RiskAnalysisJobConfig(properties) { + this.actions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RiskAnalysisJobConfig privacyMetric. + * @member {google.privacy.dlp.v2.IPrivacyMetric|null|undefined} privacyMetric + * @memberof google.privacy.dlp.v2.RiskAnalysisJobConfig + * @instance + */ + RiskAnalysisJobConfig.prototype.privacyMetric = null; + + /** + * RiskAnalysisJobConfig sourceTable. + * @member {google.privacy.dlp.v2.IBigQueryTable|null|undefined} sourceTable + * @memberof google.privacy.dlp.v2.RiskAnalysisJobConfig + * @instance + */ + RiskAnalysisJobConfig.prototype.sourceTable = null; + + /** + * RiskAnalysisJobConfig actions. + * @member {Array.} actions + * @memberof google.privacy.dlp.v2.RiskAnalysisJobConfig + * @instance + */ + RiskAnalysisJobConfig.prototype.actions = $util.emptyArray; + + /** + * Creates a new RiskAnalysisJobConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.RiskAnalysisJobConfig + * @static + * @param {google.privacy.dlp.v2.IRiskAnalysisJobConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.RiskAnalysisJobConfig} RiskAnalysisJobConfig instance + */ + RiskAnalysisJobConfig.create = function create(properties) { + return new RiskAnalysisJobConfig(properties); + }; + + /** + * Encodes the specified RiskAnalysisJobConfig message. Does not implicitly {@link google.privacy.dlp.v2.RiskAnalysisJobConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.RiskAnalysisJobConfig + * @static + * @param {google.privacy.dlp.v2.IRiskAnalysisJobConfig} message RiskAnalysisJobConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RiskAnalysisJobConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.privacyMetric != null && Object.hasOwnProperty.call(message, "privacyMetric")) + $root.google.privacy.dlp.v2.PrivacyMetric.encode(message.privacyMetric, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.sourceTable != null && Object.hasOwnProperty.call(message, "sourceTable")) + $root.google.privacy.dlp.v2.BigQueryTable.encode(message.sourceTable, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.actions != null && message.actions.length) + for (var i = 0; i < message.actions.length; ++i) + $root.google.privacy.dlp.v2.Action.encode(message.actions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RiskAnalysisJobConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RiskAnalysisJobConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.RiskAnalysisJobConfig + * @static + * @param {google.privacy.dlp.v2.IRiskAnalysisJobConfig} message RiskAnalysisJobConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RiskAnalysisJobConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RiskAnalysisJobConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.RiskAnalysisJobConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.RiskAnalysisJobConfig} RiskAnalysisJobConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RiskAnalysisJobConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.RiskAnalysisJobConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.privacyMetric = $root.google.privacy.dlp.v2.PrivacyMetric.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.sourceTable = $root.google.privacy.dlp.v2.BigQueryTable.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + if (!(message.actions && message.actions.length)) + message.actions = []; + message.actions.push($root.google.privacy.dlp.v2.Action.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RiskAnalysisJobConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.RiskAnalysisJobConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.RiskAnalysisJobConfig} RiskAnalysisJobConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RiskAnalysisJobConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RiskAnalysisJobConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.RiskAnalysisJobConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RiskAnalysisJobConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.privacyMetric != null && message.hasOwnProperty("privacyMetric")) { + var error = $root.google.privacy.dlp.v2.PrivacyMetric.verify(message.privacyMetric, long + 1); + if (error) + return "privacyMetric." + error; + } + if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) { + var error = $root.google.privacy.dlp.v2.BigQueryTable.verify(message.sourceTable, long + 1); + if (error) + return "sourceTable." + error; + } + if (message.actions != null && message.hasOwnProperty("actions")) { + if (!Array.isArray(message.actions)) + return "actions: array expected"; + for (var i = 0; i < message.actions.length; ++i) { + var error = $root.google.privacy.dlp.v2.Action.verify(message.actions[i], long + 1); + if (error) + return "actions." + error; + } + } + return null; + }; + + /** + * Creates a RiskAnalysisJobConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.RiskAnalysisJobConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.RiskAnalysisJobConfig} RiskAnalysisJobConfig + */ + RiskAnalysisJobConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.RiskAnalysisJobConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.RiskAnalysisJobConfig(); + if (object.privacyMetric != null) { + if (typeof object.privacyMetric !== "object") + throw TypeError(".google.privacy.dlp.v2.RiskAnalysisJobConfig.privacyMetric: object expected"); + message.privacyMetric = $root.google.privacy.dlp.v2.PrivacyMetric.fromObject(object.privacyMetric, long + 1); + } + if (object.sourceTable != null) { + if (typeof object.sourceTable !== "object") + throw TypeError(".google.privacy.dlp.v2.RiskAnalysisJobConfig.sourceTable: object expected"); + message.sourceTable = $root.google.privacy.dlp.v2.BigQueryTable.fromObject(object.sourceTable, long + 1); + } + if (object.actions) { + if (!Array.isArray(object.actions)) + throw TypeError(".google.privacy.dlp.v2.RiskAnalysisJobConfig.actions: array expected"); + message.actions = []; + for (var i = 0; i < object.actions.length; ++i) { + if (typeof object.actions[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.RiskAnalysisJobConfig.actions: object expected"); + message.actions[i] = $root.google.privacy.dlp.v2.Action.fromObject(object.actions[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a RiskAnalysisJobConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.RiskAnalysisJobConfig + * @static + * @param {google.privacy.dlp.v2.RiskAnalysisJobConfig} message RiskAnalysisJobConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RiskAnalysisJobConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.actions = []; + if (options.defaults) { + object.privacyMetric = null; + object.sourceTable = null; + } + if (message.privacyMetric != null && message.hasOwnProperty("privacyMetric")) + object.privacyMetric = $root.google.privacy.dlp.v2.PrivacyMetric.toObject(message.privacyMetric, options); + if (message.sourceTable != null && message.hasOwnProperty("sourceTable")) + object.sourceTable = $root.google.privacy.dlp.v2.BigQueryTable.toObject(message.sourceTable, options); + if (message.actions && message.actions.length) { + object.actions = []; + for (var j = 0; j < message.actions.length; ++j) + object.actions[j] = $root.google.privacy.dlp.v2.Action.toObject(message.actions[j], options); + } + return object; + }; + + /** + * Converts this RiskAnalysisJobConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.RiskAnalysisJobConfig + * @instance + * @returns {Object.} JSON object + */ + RiskAnalysisJobConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RiskAnalysisJobConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.RiskAnalysisJobConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RiskAnalysisJobConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.RiskAnalysisJobConfig"; + }; + + return RiskAnalysisJobConfig; + })(); + + v2.QuasiId = (function() { + + /** + * Properties of a QuasiId. + * @memberof google.privacy.dlp.v2 + * @interface IQuasiId + * @property {google.privacy.dlp.v2.IFieldId|null} [field] QuasiId field + * @property {google.privacy.dlp.v2.IInfoType|null} [infoType] QuasiId infoType + * @property {string|null} [customTag] QuasiId customTag + * @property {google.protobuf.IEmpty|null} [inferred] QuasiId inferred + */ + + /** + * Constructs a new QuasiId. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a QuasiId. + * @implements IQuasiId + * @constructor + * @param {google.privacy.dlp.v2.IQuasiId=} [properties] Properties to set + */ + function QuasiId(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * QuasiId field. + * @member {google.privacy.dlp.v2.IFieldId|null|undefined} field + * @memberof google.privacy.dlp.v2.QuasiId + * @instance + */ + QuasiId.prototype.field = null; + + /** + * QuasiId infoType. + * @member {google.privacy.dlp.v2.IInfoType|null|undefined} infoType + * @memberof google.privacy.dlp.v2.QuasiId + * @instance + */ + QuasiId.prototype.infoType = null; + + /** + * QuasiId customTag. + * @member {string|null|undefined} customTag + * @memberof google.privacy.dlp.v2.QuasiId + * @instance + */ + QuasiId.prototype.customTag = null; + + /** + * QuasiId inferred. + * @member {google.protobuf.IEmpty|null|undefined} inferred + * @memberof google.privacy.dlp.v2.QuasiId + * @instance + */ + QuasiId.prototype.inferred = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * QuasiId tag. + * @member {"infoType"|"customTag"|"inferred"|undefined} tag + * @memberof google.privacy.dlp.v2.QuasiId + * @instance + */ + Object.defineProperty(QuasiId.prototype, "tag", { + get: $util.oneOfGetter($oneOfFields = ["infoType", "customTag", "inferred"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new QuasiId instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.QuasiId + * @static + * @param {google.privacy.dlp.v2.IQuasiId=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.QuasiId} QuasiId instance + */ + QuasiId.create = function create(properties) { + return new QuasiId(properties); + }; + + /** + * Encodes the specified QuasiId message. Does not implicitly {@link google.privacy.dlp.v2.QuasiId.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.QuasiId + * @static + * @param {google.privacy.dlp.v2.IQuasiId} message QuasiId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuasiId.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + $root.google.privacy.dlp.v2.FieldId.encode(message.field, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.infoType != null && Object.hasOwnProperty.call(message, "infoType")) + $root.google.privacy.dlp.v2.InfoType.encode(message.infoType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.customTag != null && Object.hasOwnProperty.call(message, "customTag")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.customTag); + if (message.inferred != null && Object.hasOwnProperty.call(message, "inferred")) + $root.google.protobuf.Empty.encode(message.inferred, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QuasiId message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.QuasiId.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.QuasiId + * @static + * @param {google.privacy.dlp.v2.IQuasiId} message QuasiId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuasiId.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuasiId message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.QuasiId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.QuasiId} QuasiId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuasiId.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.QuasiId(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.field = $root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.infoType = $root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.customTag = reader.string(); + break; + } + case 4: { + message.inferred = $root.google.protobuf.Empty.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a QuasiId message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.QuasiId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.QuasiId} QuasiId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuasiId.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuasiId message. + * @function verify + * @memberof google.privacy.dlp.v2.QuasiId + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuasiId.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.field != null && message.hasOwnProperty("field")) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.field, long + 1); + if (error) + return "field." + error; + } + if (message.infoType != null && message.hasOwnProperty("infoType")) { + properties.tag = 1; + { + var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infoType, long + 1); + if (error) + return "infoType." + error; + } + } + if (message.customTag != null && message.hasOwnProperty("customTag")) { + if (properties.tag === 1) + return "tag: multiple values"; + properties.tag = 1; + if (!$util.isString(message.customTag)) + return "customTag: string expected"; + } + if (message.inferred != null && message.hasOwnProperty("inferred")) { + if (properties.tag === 1) + return "tag: multiple values"; + properties.tag = 1; + { + var error = $root.google.protobuf.Empty.verify(message.inferred, long + 1); + if (error) + return "inferred." + error; + } + } + return null; + }; + + /** + * Creates a QuasiId message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.QuasiId + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.QuasiId} QuasiId + */ + QuasiId.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.QuasiId) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.QuasiId(); + if (object.field != null) { + if (typeof object.field !== "object") + throw TypeError(".google.privacy.dlp.v2.QuasiId.field: object expected"); + message.field = $root.google.privacy.dlp.v2.FieldId.fromObject(object.field, long + 1); + } + if (object.infoType != null) { + if (typeof object.infoType !== "object") + throw TypeError(".google.privacy.dlp.v2.QuasiId.infoType: object expected"); + message.infoType = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoType, long + 1); + } + if (object.customTag != null) + message.customTag = String(object.customTag); + if (object.inferred != null) { + if (typeof object.inferred !== "object") + throw TypeError(".google.privacy.dlp.v2.QuasiId.inferred: object expected"); + message.inferred = $root.google.protobuf.Empty.fromObject(object.inferred, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a QuasiId message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.QuasiId + * @static + * @param {google.privacy.dlp.v2.QuasiId} message QuasiId + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuasiId.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.field = null; + if (message.field != null && message.hasOwnProperty("field")) + object.field = $root.google.privacy.dlp.v2.FieldId.toObject(message.field, options); + if (message.infoType != null && message.hasOwnProperty("infoType")) { + object.infoType = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoType, options); + if (options.oneofs) + object.tag = "infoType"; + } + if (message.customTag != null && message.hasOwnProperty("customTag")) { + object.customTag = message.customTag; + if (options.oneofs) + object.tag = "customTag"; + } + if (message.inferred != null && message.hasOwnProperty("inferred")) { + object.inferred = $root.google.protobuf.Empty.toObject(message.inferred, options); + if (options.oneofs) + object.tag = "inferred"; + } + return object; + }; + + /** + * Converts this QuasiId to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.QuasiId + * @instance + * @returns {Object.} JSON object + */ + QuasiId.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuasiId + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.QuasiId + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuasiId.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.QuasiId"; + }; + + return QuasiId; + })(); + + v2.StatisticalTable = (function() { + + /** + * Properties of a StatisticalTable. + * @memberof google.privacy.dlp.v2 + * @interface IStatisticalTable + * @property {google.privacy.dlp.v2.IBigQueryTable|null} [table] StatisticalTable table + * @property {Array.|null} [quasiIds] StatisticalTable quasiIds + * @property {google.privacy.dlp.v2.IFieldId|null} [relativeFrequency] StatisticalTable relativeFrequency + */ + + /** + * Constructs a new StatisticalTable. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a StatisticalTable. + * @implements IStatisticalTable + * @constructor + * @param {google.privacy.dlp.v2.IStatisticalTable=} [properties] Properties to set + */ + function StatisticalTable(properties) { + this.quasiIds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * StatisticalTable table. + * @member {google.privacy.dlp.v2.IBigQueryTable|null|undefined} table + * @memberof google.privacy.dlp.v2.StatisticalTable + * @instance + */ + StatisticalTable.prototype.table = null; + + /** + * StatisticalTable quasiIds. + * @member {Array.} quasiIds + * @memberof google.privacy.dlp.v2.StatisticalTable + * @instance + */ + StatisticalTable.prototype.quasiIds = $util.emptyArray; + + /** + * StatisticalTable relativeFrequency. + * @member {google.privacy.dlp.v2.IFieldId|null|undefined} relativeFrequency + * @memberof google.privacy.dlp.v2.StatisticalTable + * @instance + */ + StatisticalTable.prototype.relativeFrequency = null; + + /** + * Creates a new StatisticalTable instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.StatisticalTable + * @static + * @param {google.privacy.dlp.v2.IStatisticalTable=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.StatisticalTable} StatisticalTable instance + */ + StatisticalTable.create = function create(properties) { + return new StatisticalTable(properties); + }; + + /** + * Encodes the specified StatisticalTable message. Does not implicitly {@link google.privacy.dlp.v2.StatisticalTable.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.StatisticalTable + * @static + * @param {google.privacy.dlp.v2.IStatisticalTable} message StatisticalTable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatisticalTable.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.quasiIds != null && message.quasiIds.length) + for (var i = 0; i < message.quasiIds.length; ++i) + $root.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.encode(message.quasiIds[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.relativeFrequency != null && Object.hasOwnProperty.call(message, "relativeFrequency")) + $root.google.privacy.dlp.v2.FieldId.encode(message.relativeFrequency, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + $root.google.privacy.dlp.v2.BigQueryTable.encode(message.table, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StatisticalTable message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StatisticalTable.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.StatisticalTable + * @static + * @param {google.privacy.dlp.v2.IStatisticalTable} message StatisticalTable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StatisticalTable.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StatisticalTable message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.StatisticalTable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.StatisticalTable} StatisticalTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatisticalTable.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.StatisticalTable(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.table = $root.google.privacy.dlp.v2.BigQueryTable.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 1: { + if (!(message.quasiIds && message.quasiIds.length)) + message.quasiIds = []; + message.quasiIds.push($root.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.relativeFrequency = $root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a StatisticalTable message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.StatisticalTable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.StatisticalTable} StatisticalTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StatisticalTable.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StatisticalTable message. + * @function verify + * @memberof google.privacy.dlp.v2.StatisticalTable + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StatisticalTable.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.table != null && message.hasOwnProperty("table")) { + var error = $root.google.privacy.dlp.v2.BigQueryTable.verify(message.table, long + 1); + if (error) + return "table." + error; + } + if (message.quasiIds != null && message.hasOwnProperty("quasiIds")) { + if (!Array.isArray(message.quasiIds)) + return "quasiIds: array expected"; + for (var i = 0; i < message.quasiIds.length; ++i) { + var error = $root.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.verify(message.quasiIds[i], long + 1); + if (error) + return "quasiIds." + error; + } + } + if (message.relativeFrequency != null && message.hasOwnProperty("relativeFrequency")) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.relativeFrequency, long + 1); + if (error) + return "relativeFrequency." + error; + } + return null; + }; + + /** + * Creates a StatisticalTable message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.StatisticalTable + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.StatisticalTable} StatisticalTable + */ + StatisticalTable.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.StatisticalTable) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.StatisticalTable(); + if (object.table != null) { + if (typeof object.table !== "object") + throw TypeError(".google.privacy.dlp.v2.StatisticalTable.table: object expected"); + message.table = $root.google.privacy.dlp.v2.BigQueryTable.fromObject(object.table, long + 1); + } + if (object.quasiIds) { + if (!Array.isArray(object.quasiIds)) + throw TypeError(".google.privacy.dlp.v2.StatisticalTable.quasiIds: array expected"); + message.quasiIds = []; + for (var i = 0; i < object.quasiIds.length; ++i) { + if (typeof object.quasiIds[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.StatisticalTable.quasiIds: object expected"); + message.quasiIds[i] = $root.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.fromObject(object.quasiIds[i], long + 1); + } + } + if (object.relativeFrequency != null) { + if (typeof object.relativeFrequency !== "object") + throw TypeError(".google.privacy.dlp.v2.StatisticalTable.relativeFrequency: object expected"); + message.relativeFrequency = $root.google.privacy.dlp.v2.FieldId.fromObject(object.relativeFrequency, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a StatisticalTable message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.StatisticalTable + * @static + * @param {google.privacy.dlp.v2.StatisticalTable} message StatisticalTable + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StatisticalTable.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.quasiIds = []; + if (options.defaults) { + object.relativeFrequency = null; + object.table = null; + } + if (message.quasiIds && message.quasiIds.length) { + object.quasiIds = []; + for (var j = 0; j < message.quasiIds.length; ++j) + object.quasiIds[j] = $root.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.toObject(message.quasiIds[j], options); + } + if (message.relativeFrequency != null && message.hasOwnProperty("relativeFrequency")) + object.relativeFrequency = $root.google.privacy.dlp.v2.FieldId.toObject(message.relativeFrequency, options); + if (message.table != null && message.hasOwnProperty("table")) + object.table = $root.google.privacy.dlp.v2.BigQueryTable.toObject(message.table, options); + return object; + }; + + /** + * Converts this StatisticalTable to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.StatisticalTable + * @instance + * @returns {Object.} JSON object + */ + StatisticalTable.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StatisticalTable + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.StatisticalTable + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StatisticalTable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.StatisticalTable"; + }; + + StatisticalTable.QuasiIdentifierField = (function() { + + /** + * Properties of a QuasiIdentifierField. + * @memberof google.privacy.dlp.v2.StatisticalTable + * @interface IQuasiIdentifierField + * @property {google.privacy.dlp.v2.IFieldId|null} [field] QuasiIdentifierField field + * @property {string|null} [customTag] QuasiIdentifierField customTag + */ + + /** + * Constructs a new QuasiIdentifierField. + * @memberof google.privacy.dlp.v2.StatisticalTable + * @classdesc Represents a QuasiIdentifierField. + * @implements IQuasiIdentifierField + * @constructor + * @param {google.privacy.dlp.v2.StatisticalTable.IQuasiIdentifierField=} [properties] Properties to set + */ + function QuasiIdentifierField(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * QuasiIdentifierField field. + * @member {google.privacy.dlp.v2.IFieldId|null|undefined} field + * @memberof google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField + * @instance + */ + QuasiIdentifierField.prototype.field = null; + + /** + * QuasiIdentifierField customTag. + * @member {string} customTag + * @memberof google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField + * @instance + */ + QuasiIdentifierField.prototype.customTag = ""; + + /** + * Creates a new QuasiIdentifierField instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField + * @static + * @param {google.privacy.dlp.v2.StatisticalTable.IQuasiIdentifierField=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField} QuasiIdentifierField instance + */ + QuasiIdentifierField.create = function create(properties) { + return new QuasiIdentifierField(properties); + }; + + /** + * Encodes the specified QuasiIdentifierField message. Does not implicitly {@link google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField + * @static + * @param {google.privacy.dlp.v2.StatisticalTable.IQuasiIdentifierField} message QuasiIdentifierField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuasiIdentifierField.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + $root.google.privacy.dlp.v2.FieldId.encode(message.field, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.customTag != null && Object.hasOwnProperty.call(message, "customTag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.customTag); + return writer; + }; + + /** + * Encodes the specified QuasiIdentifierField message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField + * @static + * @param {google.privacy.dlp.v2.StatisticalTable.IQuasiIdentifierField} message QuasiIdentifierField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuasiIdentifierField.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuasiIdentifierField message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField} QuasiIdentifierField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuasiIdentifierField.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.field = $root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.customTag = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a QuasiIdentifierField message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField} QuasiIdentifierField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuasiIdentifierField.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuasiIdentifierField message. + * @function verify + * @memberof google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuasiIdentifierField.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.field != null && message.hasOwnProperty("field")) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.field, long + 1); + if (error) + return "field." + error; + } + if (message.customTag != null && message.hasOwnProperty("customTag")) + if (!$util.isString(message.customTag)) + return "customTag: string expected"; + return null; + }; + + /** + * Creates a QuasiIdentifierField message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField} QuasiIdentifierField + */ + QuasiIdentifierField.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField(); + if (object.field != null) { + if (typeof object.field !== "object") + throw TypeError(".google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField.field: object expected"); + message.field = $root.google.privacy.dlp.v2.FieldId.fromObject(object.field, long + 1); + } + if (object.customTag != null) + message.customTag = String(object.customTag); + return message; + }; + + /** + * Creates a plain object from a QuasiIdentifierField message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField + * @static + * @param {google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField} message QuasiIdentifierField + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuasiIdentifierField.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.field = null; + object.customTag = ""; + } + if (message.field != null && message.hasOwnProperty("field")) + object.field = $root.google.privacy.dlp.v2.FieldId.toObject(message.field, options); + if (message.customTag != null && message.hasOwnProperty("customTag")) + object.customTag = message.customTag; + return object; + }; + + /** + * Converts this QuasiIdentifierField to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField + * @instance + * @returns {Object.} JSON object + */ + QuasiIdentifierField.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuasiIdentifierField + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuasiIdentifierField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.StatisticalTable.QuasiIdentifierField"; + }; + + return QuasiIdentifierField; + })(); + + return StatisticalTable; + })(); + + v2.PrivacyMetric = (function() { + + /** + * Properties of a PrivacyMetric. + * @memberof google.privacy.dlp.v2 + * @interface IPrivacyMetric + * @property {google.privacy.dlp.v2.PrivacyMetric.INumericalStatsConfig|null} [numericalStatsConfig] PrivacyMetric numericalStatsConfig + * @property {google.privacy.dlp.v2.PrivacyMetric.ICategoricalStatsConfig|null} [categoricalStatsConfig] PrivacyMetric categoricalStatsConfig + * @property {google.privacy.dlp.v2.PrivacyMetric.IKAnonymityConfig|null} [kAnonymityConfig] PrivacyMetric kAnonymityConfig + * @property {google.privacy.dlp.v2.PrivacyMetric.ILDiversityConfig|null} [lDiversityConfig] PrivacyMetric lDiversityConfig + * @property {google.privacy.dlp.v2.PrivacyMetric.IKMapEstimationConfig|null} [kMapEstimationConfig] PrivacyMetric kMapEstimationConfig + * @property {google.privacy.dlp.v2.PrivacyMetric.IDeltaPresenceEstimationConfig|null} [deltaPresenceEstimationConfig] PrivacyMetric deltaPresenceEstimationConfig + */ + + /** + * Constructs a new PrivacyMetric. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a PrivacyMetric. + * @implements IPrivacyMetric + * @constructor + * @param {google.privacy.dlp.v2.IPrivacyMetric=} [properties] Properties to set + */ + function PrivacyMetric(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrivacyMetric numericalStatsConfig. + * @member {google.privacy.dlp.v2.PrivacyMetric.INumericalStatsConfig|null|undefined} numericalStatsConfig + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @instance + */ + PrivacyMetric.prototype.numericalStatsConfig = null; + + /** + * PrivacyMetric categoricalStatsConfig. + * @member {google.privacy.dlp.v2.PrivacyMetric.ICategoricalStatsConfig|null|undefined} categoricalStatsConfig + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @instance + */ + PrivacyMetric.prototype.categoricalStatsConfig = null; + + /** + * PrivacyMetric kAnonymityConfig. + * @member {google.privacy.dlp.v2.PrivacyMetric.IKAnonymityConfig|null|undefined} kAnonymityConfig + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @instance + */ + PrivacyMetric.prototype.kAnonymityConfig = null; + + /** + * PrivacyMetric lDiversityConfig. + * @member {google.privacy.dlp.v2.PrivacyMetric.ILDiversityConfig|null|undefined} lDiversityConfig + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @instance + */ + PrivacyMetric.prototype.lDiversityConfig = null; + + /** + * PrivacyMetric kMapEstimationConfig. + * @member {google.privacy.dlp.v2.PrivacyMetric.IKMapEstimationConfig|null|undefined} kMapEstimationConfig + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @instance + */ + PrivacyMetric.prototype.kMapEstimationConfig = null; + + /** + * PrivacyMetric deltaPresenceEstimationConfig. + * @member {google.privacy.dlp.v2.PrivacyMetric.IDeltaPresenceEstimationConfig|null|undefined} deltaPresenceEstimationConfig + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @instance + */ + PrivacyMetric.prototype.deltaPresenceEstimationConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PrivacyMetric type. + * @member {"numericalStatsConfig"|"categoricalStatsConfig"|"kAnonymityConfig"|"lDiversityConfig"|"kMapEstimationConfig"|"deltaPresenceEstimationConfig"|undefined} type + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @instance + */ + Object.defineProperty(PrivacyMetric.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["numericalStatsConfig", "categoricalStatsConfig", "kAnonymityConfig", "lDiversityConfig", "kMapEstimationConfig", "deltaPresenceEstimationConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PrivacyMetric instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @static + * @param {google.privacy.dlp.v2.IPrivacyMetric=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.PrivacyMetric} PrivacyMetric instance + */ + PrivacyMetric.create = function create(properties) { + return new PrivacyMetric(properties); + }; + + /** + * Encodes the specified PrivacyMetric message. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @static + * @param {google.privacy.dlp.v2.IPrivacyMetric} message PrivacyMetric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivacyMetric.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.numericalStatsConfig != null && Object.hasOwnProperty.call(message, "numericalStatsConfig")) + $root.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.encode(message.numericalStatsConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.categoricalStatsConfig != null && Object.hasOwnProperty.call(message, "categoricalStatsConfig")) + $root.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.encode(message.categoricalStatsConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.kAnonymityConfig != null && Object.hasOwnProperty.call(message, "kAnonymityConfig")) + $root.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.encode(message.kAnonymityConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.lDiversityConfig != null && Object.hasOwnProperty.call(message, "lDiversityConfig")) + $root.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.encode(message.lDiversityConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.kMapEstimationConfig != null && Object.hasOwnProperty.call(message, "kMapEstimationConfig")) + $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.encode(message.kMapEstimationConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.deltaPresenceEstimationConfig != null && Object.hasOwnProperty.call(message, "deltaPresenceEstimationConfig")) + $root.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.encode(message.deltaPresenceEstimationConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PrivacyMetric message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @static + * @param {google.privacy.dlp.v2.IPrivacyMetric} message PrivacyMetric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivacyMetric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivacyMetric message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.PrivacyMetric} PrivacyMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivacyMetric.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.PrivacyMetric(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.numericalStatsConfig = $root.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.categoricalStatsConfig = $root.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.kAnonymityConfig = $root.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.lDiversityConfig = $root.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.kMapEstimationConfig = $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.deltaPresenceEstimationConfig = $root.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PrivacyMetric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.PrivacyMetric} PrivacyMetric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivacyMetric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivacyMetric message. + * @function verify + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivacyMetric.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.numericalStatsConfig != null && message.hasOwnProperty("numericalStatsConfig")) { + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.verify(message.numericalStatsConfig, long + 1); + if (error) + return "numericalStatsConfig." + error; + } + } + if (message.categoricalStatsConfig != null && message.hasOwnProperty("categoricalStatsConfig")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.verify(message.categoricalStatsConfig, long + 1); + if (error) + return "categoricalStatsConfig." + error; + } + } + if (message.kAnonymityConfig != null && message.hasOwnProperty("kAnonymityConfig")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.verify(message.kAnonymityConfig, long + 1); + if (error) + return "kAnonymityConfig." + error; + } + } + if (message.lDiversityConfig != null && message.hasOwnProperty("lDiversityConfig")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.verify(message.lDiversityConfig, long + 1); + if (error) + return "lDiversityConfig." + error; + } + } + if (message.kMapEstimationConfig != null && message.hasOwnProperty("kMapEstimationConfig")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.verify(message.kMapEstimationConfig, long + 1); + if (error) + return "kMapEstimationConfig." + error; + } + } + if (message.deltaPresenceEstimationConfig != null && message.hasOwnProperty("deltaPresenceEstimationConfig")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.verify(message.deltaPresenceEstimationConfig, long + 1); + if (error) + return "deltaPresenceEstimationConfig." + error; + } + } + return null; + }; + + /** + * Creates a PrivacyMetric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.PrivacyMetric} PrivacyMetric + */ + PrivacyMetric.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.PrivacyMetric) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.PrivacyMetric(); + if (object.numericalStatsConfig != null) { + if (typeof object.numericalStatsConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.numericalStatsConfig: object expected"); + message.numericalStatsConfig = $root.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.fromObject(object.numericalStatsConfig, long + 1); + } + if (object.categoricalStatsConfig != null) { + if (typeof object.categoricalStatsConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.categoricalStatsConfig: object expected"); + message.categoricalStatsConfig = $root.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.fromObject(object.categoricalStatsConfig, long + 1); + } + if (object.kAnonymityConfig != null) { + if (typeof object.kAnonymityConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.kAnonymityConfig: object expected"); + message.kAnonymityConfig = $root.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.fromObject(object.kAnonymityConfig, long + 1); + } + if (object.lDiversityConfig != null) { + if (typeof object.lDiversityConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.lDiversityConfig: object expected"); + message.lDiversityConfig = $root.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.fromObject(object.lDiversityConfig, long + 1); + } + if (object.kMapEstimationConfig != null) { + if (typeof object.kMapEstimationConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.kMapEstimationConfig: object expected"); + message.kMapEstimationConfig = $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.fromObject(object.kMapEstimationConfig, long + 1); + } + if (object.deltaPresenceEstimationConfig != null) { + if (typeof object.deltaPresenceEstimationConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.deltaPresenceEstimationConfig: object expected"); + message.deltaPresenceEstimationConfig = $root.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.fromObject(object.deltaPresenceEstimationConfig, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a PrivacyMetric message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric} message PrivacyMetric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivacyMetric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.numericalStatsConfig != null && message.hasOwnProperty("numericalStatsConfig")) { + object.numericalStatsConfig = $root.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.toObject(message.numericalStatsConfig, options); + if (options.oneofs) + object.type = "numericalStatsConfig"; + } + if (message.categoricalStatsConfig != null && message.hasOwnProperty("categoricalStatsConfig")) { + object.categoricalStatsConfig = $root.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.toObject(message.categoricalStatsConfig, options); + if (options.oneofs) + object.type = "categoricalStatsConfig"; + } + if (message.kAnonymityConfig != null && message.hasOwnProperty("kAnonymityConfig")) { + object.kAnonymityConfig = $root.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.toObject(message.kAnonymityConfig, options); + if (options.oneofs) + object.type = "kAnonymityConfig"; + } + if (message.lDiversityConfig != null && message.hasOwnProperty("lDiversityConfig")) { + object.lDiversityConfig = $root.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.toObject(message.lDiversityConfig, options); + if (options.oneofs) + object.type = "lDiversityConfig"; + } + if (message.kMapEstimationConfig != null && message.hasOwnProperty("kMapEstimationConfig")) { + object.kMapEstimationConfig = $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.toObject(message.kMapEstimationConfig, options); + if (options.oneofs) + object.type = "kMapEstimationConfig"; + } + if (message.deltaPresenceEstimationConfig != null && message.hasOwnProperty("deltaPresenceEstimationConfig")) { + object.deltaPresenceEstimationConfig = $root.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.toObject(message.deltaPresenceEstimationConfig, options); + if (options.oneofs) + object.type = "deltaPresenceEstimationConfig"; + } + return object; + }; + + /** + * Converts this PrivacyMetric to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @instance + * @returns {Object.} JSON object + */ + PrivacyMetric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrivacyMetric + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivacyMetric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.PrivacyMetric"; + }; + + PrivacyMetric.NumericalStatsConfig = (function() { + + /** + * Properties of a NumericalStatsConfig. + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @interface INumericalStatsConfig + * @property {google.privacy.dlp.v2.IFieldId|null} [field] NumericalStatsConfig field + */ + + /** + * Constructs a new NumericalStatsConfig. + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @classdesc Represents a NumericalStatsConfig. + * @implements INumericalStatsConfig + * @constructor + * @param {google.privacy.dlp.v2.PrivacyMetric.INumericalStatsConfig=} [properties] Properties to set + */ + function NumericalStatsConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * NumericalStatsConfig field. + * @member {google.privacy.dlp.v2.IFieldId|null|undefined} field + * @memberof google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig + * @instance + */ + NumericalStatsConfig.prototype.field = null; + + /** + * Creates a new NumericalStatsConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.INumericalStatsConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig} NumericalStatsConfig instance + */ + NumericalStatsConfig.create = function create(properties) { + return new NumericalStatsConfig(properties); + }; + + /** + * Encodes the specified NumericalStatsConfig message. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.INumericalStatsConfig} message NumericalStatsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericalStatsConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + $root.google.privacy.dlp.v2.FieldId.encode(message.field, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NumericalStatsConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.INumericalStatsConfig} message NumericalStatsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericalStatsConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NumericalStatsConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig} NumericalStatsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericalStatsConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.field = $root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a NumericalStatsConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig} NumericalStatsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericalStatsConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NumericalStatsConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NumericalStatsConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.field != null && message.hasOwnProperty("field")) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.field, long + 1); + if (error) + return "field." + error; + } + return null; + }; + + /** + * Creates a NumericalStatsConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig} NumericalStatsConfig + */ + NumericalStatsConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig(); + if (object.field != null) { + if (typeof object.field !== "object") + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig.field: object expected"); + message.field = $root.google.privacy.dlp.v2.FieldId.fromObject(object.field, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a NumericalStatsConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig} message NumericalStatsConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NumericalStatsConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.field = null; + if (message.field != null && message.hasOwnProperty("field")) + object.field = $root.google.privacy.dlp.v2.FieldId.toObject(message.field, options); + return object; + }; + + /** + * Converts this NumericalStatsConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig + * @instance + * @returns {Object.} JSON object + */ + NumericalStatsConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NumericalStatsConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NumericalStatsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.PrivacyMetric.NumericalStatsConfig"; + }; + + return NumericalStatsConfig; + })(); + + PrivacyMetric.CategoricalStatsConfig = (function() { + + /** + * Properties of a CategoricalStatsConfig. + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @interface ICategoricalStatsConfig + * @property {google.privacy.dlp.v2.IFieldId|null} [field] CategoricalStatsConfig field + */ + + /** + * Constructs a new CategoricalStatsConfig. + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @classdesc Represents a CategoricalStatsConfig. + * @implements ICategoricalStatsConfig + * @constructor + * @param {google.privacy.dlp.v2.PrivacyMetric.ICategoricalStatsConfig=} [properties] Properties to set + */ + function CategoricalStatsConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CategoricalStatsConfig field. + * @member {google.privacy.dlp.v2.IFieldId|null|undefined} field + * @memberof google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig + * @instance + */ + CategoricalStatsConfig.prototype.field = null; + + /** + * Creates a new CategoricalStatsConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.ICategoricalStatsConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig} CategoricalStatsConfig instance + */ + CategoricalStatsConfig.create = function create(properties) { + return new CategoricalStatsConfig(properties); + }; + + /** + * Encodes the specified CategoricalStatsConfig message. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.ICategoricalStatsConfig} message CategoricalStatsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CategoricalStatsConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + $root.google.privacy.dlp.v2.FieldId.encode(message.field, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CategoricalStatsConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.ICategoricalStatsConfig} message CategoricalStatsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CategoricalStatsConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CategoricalStatsConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig} CategoricalStatsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CategoricalStatsConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.field = $root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CategoricalStatsConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig} CategoricalStatsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CategoricalStatsConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CategoricalStatsConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CategoricalStatsConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.field != null && message.hasOwnProperty("field")) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.field, long + 1); + if (error) + return "field." + error; + } + return null; + }; + + /** + * Creates a CategoricalStatsConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig} CategoricalStatsConfig + */ + CategoricalStatsConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig(); + if (object.field != null) { + if (typeof object.field !== "object") + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig.field: object expected"); + message.field = $root.google.privacy.dlp.v2.FieldId.fromObject(object.field, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CategoricalStatsConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig} message CategoricalStatsConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CategoricalStatsConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.field = null; + if (message.field != null && message.hasOwnProperty("field")) + object.field = $root.google.privacy.dlp.v2.FieldId.toObject(message.field, options); + return object; + }; + + /** + * Converts this CategoricalStatsConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig + * @instance + * @returns {Object.} JSON object + */ + CategoricalStatsConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CategoricalStatsConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CategoricalStatsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.PrivacyMetric.CategoricalStatsConfig"; + }; + + return CategoricalStatsConfig; + })(); + + PrivacyMetric.KAnonymityConfig = (function() { + + /** + * Properties of a KAnonymityConfig. + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @interface IKAnonymityConfig + * @property {Array.|null} [quasiIds] KAnonymityConfig quasiIds + * @property {google.privacy.dlp.v2.IEntityId|null} [entityId] KAnonymityConfig entityId + */ + + /** + * Constructs a new KAnonymityConfig. + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @classdesc Represents a KAnonymityConfig. + * @implements IKAnonymityConfig + * @constructor + * @param {google.privacy.dlp.v2.PrivacyMetric.IKAnonymityConfig=} [properties] Properties to set + */ + function KAnonymityConfig(properties) { + this.quasiIds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * KAnonymityConfig quasiIds. + * @member {Array.} quasiIds + * @memberof google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig + * @instance + */ + KAnonymityConfig.prototype.quasiIds = $util.emptyArray; + + /** + * KAnonymityConfig entityId. + * @member {google.privacy.dlp.v2.IEntityId|null|undefined} entityId + * @memberof google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig + * @instance + */ + KAnonymityConfig.prototype.entityId = null; + + /** + * Creates a new KAnonymityConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.IKAnonymityConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig} KAnonymityConfig instance + */ + KAnonymityConfig.create = function create(properties) { + return new KAnonymityConfig(properties); + }; + + /** + * Encodes the specified KAnonymityConfig message. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.IKAnonymityConfig} message KAnonymityConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KAnonymityConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.quasiIds != null && message.quasiIds.length) + for (var i = 0; i < message.quasiIds.length; ++i) + $root.google.privacy.dlp.v2.FieldId.encode(message.quasiIds[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.entityId != null && Object.hasOwnProperty.call(message, "entityId")) + $root.google.privacy.dlp.v2.EntityId.encode(message.entityId, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified KAnonymityConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.IKAnonymityConfig} message KAnonymityConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KAnonymityConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KAnonymityConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig} KAnonymityConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KAnonymityConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.quasiIds && message.quasiIds.length)) + message.quasiIds = []; + message.quasiIds.push($root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.entityId = $root.google.privacy.dlp.v2.EntityId.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a KAnonymityConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig} KAnonymityConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KAnonymityConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KAnonymityConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KAnonymityConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.quasiIds != null && message.hasOwnProperty("quasiIds")) { + if (!Array.isArray(message.quasiIds)) + return "quasiIds: array expected"; + for (var i = 0; i < message.quasiIds.length; ++i) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.quasiIds[i], long + 1); + if (error) + return "quasiIds." + error; + } + } + if (message.entityId != null && message.hasOwnProperty("entityId")) { + var error = $root.google.privacy.dlp.v2.EntityId.verify(message.entityId, long + 1); + if (error) + return "entityId." + error; + } + return null; + }; + + /** + * Creates a KAnonymityConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig} KAnonymityConfig + */ + KAnonymityConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig(); + if (object.quasiIds) { + if (!Array.isArray(object.quasiIds)) + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.quasiIds: array expected"); + message.quasiIds = []; + for (var i = 0; i < object.quasiIds.length; ++i) { + if (typeof object.quasiIds[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.quasiIds: object expected"); + message.quasiIds[i] = $root.google.privacy.dlp.v2.FieldId.fromObject(object.quasiIds[i], long + 1); + } + } + if (object.entityId != null) { + if (typeof object.entityId !== "object") + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig.entityId: object expected"); + message.entityId = $root.google.privacy.dlp.v2.EntityId.fromObject(object.entityId, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a KAnonymityConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig} message KAnonymityConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KAnonymityConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.quasiIds = []; + if (options.defaults) + object.entityId = null; + if (message.quasiIds && message.quasiIds.length) { + object.quasiIds = []; + for (var j = 0; j < message.quasiIds.length; ++j) + object.quasiIds[j] = $root.google.privacy.dlp.v2.FieldId.toObject(message.quasiIds[j], options); + } + if (message.entityId != null && message.hasOwnProperty("entityId")) + object.entityId = $root.google.privacy.dlp.v2.EntityId.toObject(message.entityId, options); + return object; + }; + + /** + * Converts this KAnonymityConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig + * @instance + * @returns {Object.} JSON object + */ + KAnonymityConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for KAnonymityConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KAnonymityConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.PrivacyMetric.KAnonymityConfig"; + }; + + return KAnonymityConfig; + })(); + + PrivacyMetric.LDiversityConfig = (function() { + + /** + * Properties of a LDiversityConfig. + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @interface ILDiversityConfig + * @property {Array.|null} [quasiIds] LDiversityConfig quasiIds + * @property {google.privacy.dlp.v2.IFieldId|null} [sensitiveAttribute] LDiversityConfig sensitiveAttribute + */ + + /** + * Constructs a new LDiversityConfig. + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @classdesc Represents a LDiversityConfig. + * @implements ILDiversityConfig + * @constructor + * @param {google.privacy.dlp.v2.PrivacyMetric.ILDiversityConfig=} [properties] Properties to set + */ + function LDiversityConfig(properties) { + this.quasiIds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * LDiversityConfig quasiIds. + * @member {Array.} quasiIds + * @memberof google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig + * @instance + */ + LDiversityConfig.prototype.quasiIds = $util.emptyArray; + + /** + * LDiversityConfig sensitiveAttribute. + * @member {google.privacy.dlp.v2.IFieldId|null|undefined} sensitiveAttribute + * @memberof google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig + * @instance + */ + LDiversityConfig.prototype.sensitiveAttribute = null; + + /** + * Creates a new LDiversityConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.ILDiversityConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig} LDiversityConfig instance + */ + LDiversityConfig.create = function create(properties) { + return new LDiversityConfig(properties); + }; + + /** + * Encodes the specified LDiversityConfig message. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.ILDiversityConfig} message LDiversityConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LDiversityConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.quasiIds != null && message.quasiIds.length) + for (var i = 0; i < message.quasiIds.length; ++i) + $root.google.privacy.dlp.v2.FieldId.encode(message.quasiIds[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.sensitiveAttribute != null && Object.hasOwnProperty.call(message, "sensitiveAttribute")) + $root.google.privacy.dlp.v2.FieldId.encode(message.sensitiveAttribute, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LDiversityConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.ILDiversityConfig} message LDiversityConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LDiversityConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LDiversityConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig} LDiversityConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LDiversityConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.quasiIds && message.quasiIds.length)) + message.quasiIds = []; + message.quasiIds.push($root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.sensitiveAttribute = $root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a LDiversityConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig} LDiversityConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LDiversityConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LDiversityConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LDiversityConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.quasiIds != null && message.hasOwnProperty("quasiIds")) { + if (!Array.isArray(message.quasiIds)) + return "quasiIds: array expected"; + for (var i = 0; i < message.quasiIds.length; ++i) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.quasiIds[i], long + 1); + if (error) + return "quasiIds." + error; + } + } + if (message.sensitiveAttribute != null && message.hasOwnProperty("sensitiveAttribute")) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.sensitiveAttribute, long + 1); + if (error) + return "sensitiveAttribute." + error; + } + return null; + }; + + /** + * Creates a LDiversityConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig} LDiversityConfig + */ + LDiversityConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig(); + if (object.quasiIds) { + if (!Array.isArray(object.quasiIds)) + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.quasiIds: array expected"); + message.quasiIds = []; + for (var i = 0; i < object.quasiIds.length; ++i) { + if (typeof object.quasiIds[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.quasiIds: object expected"); + message.quasiIds[i] = $root.google.privacy.dlp.v2.FieldId.fromObject(object.quasiIds[i], long + 1); + } + } + if (object.sensitiveAttribute != null) { + if (typeof object.sensitiveAttribute !== "object") + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig.sensitiveAttribute: object expected"); + message.sensitiveAttribute = $root.google.privacy.dlp.v2.FieldId.fromObject(object.sensitiveAttribute, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a LDiversityConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig} message LDiversityConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LDiversityConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.quasiIds = []; + if (options.defaults) + object.sensitiveAttribute = null; + if (message.quasiIds && message.quasiIds.length) { + object.quasiIds = []; + for (var j = 0; j < message.quasiIds.length; ++j) + object.quasiIds[j] = $root.google.privacy.dlp.v2.FieldId.toObject(message.quasiIds[j], options); + } + if (message.sensitiveAttribute != null && message.hasOwnProperty("sensitiveAttribute")) + object.sensitiveAttribute = $root.google.privacy.dlp.v2.FieldId.toObject(message.sensitiveAttribute, options); + return object; + }; + + /** + * Converts this LDiversityConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig + * @instance + * @returns {Object.} JSON object + */ + LDiversityConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LDiversityConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LDiversityConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.PrivacyMetric.LDiversityConfig"; + }; + + return LDiversityConfig; + })(); + + PrivacyMetric.KMapEstimationConfig = (function() { + + /** + * Properties of a KMapEstimationConfig. + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @interface IKMapEstimationConfig + * @property {Array.|null} [quasiIds] KMapEstimationConfig quasiIds + * @property {string|null} [regionCode] KMapEstimationConfig regionCode + * @property {Array.|null} [auxiliaryTables] KMapEstimationConfig auxiliaryTables + */ + + /** + * Constructs a new KMapEstimationConfig. + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @classdesc Represents a KMapEstimationConfig. + * @implements IKMapEstimationConfig + * @constructor + * @param {google.privacy.dlp.v2.PrivacyMetric.IKMapEstimationConfig=} [properties] Properties to set + */ + function KMapEstimationConfig(properties) { + this.quasiIds = []; + this.auxiliaryTables = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * KMapEstimationConfig quasiIds. + * @member {Array.} quasiIds + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig + * @instance + */ + KMapEstimationConfig.prototype.quasiIds = $util.emptyArray; + + /** + * KMapEstimationConfig regionCode. + * @member {string} regionCode + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig + * @instance + */ + KMapEstimationConfig.prototype.regionCode = ""; + + /** + * KMapEstimationConfig auxiliaryTables. + * @member {Array.} auxiliaryTables + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig + * @instance + */ + KMapEstimationConfig.prototype.auxiliaryTables = $util.emptyArray; + + /** + * Creates a new KMapEstimationConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.IKMapEstimationConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig} KMapEstimationConfig instance + */ + KMapEstimationConfig.create = function create(properties) { + return new KMapEstimationConfig(properties); + }; + + /** + * Encodes the specified KMapEstimationConfig message. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.IKMapEstimationConfig} message KMapEstimationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KMapEstimationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.quasiIds != null && message.quasiIds.length) + for (var i = 0; i < message.quasiIds.length; ++i) + $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.encode(message.quasiIds[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.regionCode); + if (message.auxiliaryTables != null && message.auxiliaryTables.length) + for (var i = 0; i < message.auxiliaryTables.length; ++i) + $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.encode(message.auxiliaryTables[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified KMapEstimationConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.IKMapEstimationConfig} message KMapEstimationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KMapEstimationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KMapEstimationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig} KMapEstimationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KMapEstimationConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.quasiIds && message.quasiIds.length)) + message.quasiIds = []; + message.quasiIds.push($root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.regionCode = reader.string(); + break; + } + case 3: { + if (!(message.auxiliaryTables && message.auxiliaryTables.length)) + message.auxiliaryTables = []; + message.auxiliaryTables.push($root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a KMapEstimationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig} KMapEstimationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KMapEstimationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KMapEstimationConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KMapEstimationConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.quasiIds != null && message.hasOwnProperty("quasiIds")) { + if (!Array.isArray(message.quasiIds)) + return "quasiIds: array expected"; + for (var i = 0; i < message.quasiIds.length; ++i) { + var error = $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.verify(message.quasiIds[i], long + 1); + if (error) + return "quasiIds." + error; + } + } + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + if (!$util.isString(message.regionCode)) + return "regionCode: string expected"; + if (message.auxiliaryTables != null && message.hasOwnProperty("auxiliaryTables")) { + if (!Array.isArray(message.auxiliaryTables)) + return "auxiliaryTables: array expected"; + for (var i = 0; i < message.auxiliaryTables.length; ++i) { + var error = $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.verify(message.auxiliaryTables[i], long + 1); + if (error) + return "auxiliaryTables." + error; + } + } + return null; + }; + + /** + * Creates a KMapEstimationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig} KMapEstimationConfig + */ + KMapEstimationConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig(); + if (object.quasiIds) { + if (!Array.isArray(object.quasiIds)) + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.quasiIds: array expected"); + message.quasiIds = []; + for (var i = 0; i < object.quasiIds.length; ++i) { + if (typeof object.quasiIds[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.quasiIds: object expected"); + message.quasiIds[i] = $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.fromObject(object.quasiIds[i], long + 1); + } + } + if (object.regionCode != null) + message.regionCode = String(object.regionCode); + if (object.auxiliaryTables) { + if (!Array.isArray(object.auxiliaryTables)) + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.auxiliaryTables: array expected"); + message.auxiliaryTables = []; + for (var i = 0; i < object.auxiliaryTables.length; ++i) { + if (typeof object.auxiliaryTables[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.auxiliaryTables: object expected"); + message.auxiliaryTables[i] = $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.fromObject(object.auxiliaryTables[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a KMapEstimationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig} message KMapEstimationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KMapEstimationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.quasiIds = []; + object.auxiliaryTables = []; + } + if (options.defaults) + object.regionCode = ""; + if (message.quasiIds && message.quasiIds.length) { + object.quasiIds = []; + for (var j = 0; j < message.quasiIds.length; ++j) + object.quasiIds[j] = $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.toObject(message.quasiIds[j], options); + } + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + object.regionCode = message.regionCode; + if (message.auxiliaryTables && message.auxiliaryTables.length) { + object.auxiliaryTables = []; + for (var j = 0; j < message.auxiliaryTables.length; ++j) + object.auxiliaryTables[j] = $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.toObject(message.auxiliaryTables[j], options); + } + return object; + }; + + /** + * Converts this KMapEstimationConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig + * @instance + * @returns {Object.} JSON object + */ + KMapEstimationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for KMapEstimationConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KMapEstimationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig"; + }; + + KMapEstimationConfig.TaggedField = (function() { + + /** + * Properties of a TaggedField. + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig + * @interface ITaggedField + * @property {google.privacy.dlp.v2.IFieldId|null} [field] TaggedField field + * @property {google.privacy.dlp.v2.IInfoType|null} [infoType] TaggedField infoType + * @property {string|null} [customTag] TaggedField customTag + * @property {google.protobuf.IEmpty|null} [inferred] TaggedField inferred + */ + + /** + * Constructs a new TaggedField. + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig + * @classdesc Represents a TaggedField. + * @implements ITaggedField + * @constructor + * @param {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.ITaggedField=} [properties] Properties to set + */ + function TaggedField(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TaggedField field. + * @member {google.privacy.dlp.v2.IFieldId|null|undefined} field + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField + * @instance + */ + TaggedField.prototype.field = null; + + /** + * TaggedField infoType. + * @member {google.privacy.dlp.v2.IInfoType|null|undefined} infoType + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField + * @instance + */ + TaggedField.prototype.infoType = null; + + /** + * TaggedField customTag. + * @member {string|null|undefined} customTag + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField + * @instance + */ + TaggedField.prototype.customTag = null; + + /** + * TaggedField inferred. + * @member {google.protobuf.IEmpty|null|undefined} inferred + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField + * @instance + */ + TaggedField.prototype.inferred = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TaggedField tag. + * @member {"infoType"|"customTag"|"inferred"|undefined} tag + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField + * @instance + */ + Object.defineProperty(TaggedField.prototype, "tag", { + get: $util.oneOfGetter($oneOfFields = ["infoType", "customTag", "inferred"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TaggedField instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.ITaggedField=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField} TaggedField instance + */ + TaggedField.create = function create(properties) { + return new TaggedField(properties); + }; + + /** + * Encodes the specified TaggedField message. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.ITaggedField} message TaggedField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TaggedField.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + $root.google.privacy.dlp.v2.FieldId.encode(message.field, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.infoType != null && Object.hasOwnProperty.call(message, "infoType")) + $root.google.privacy.dlp.v2.InfoType.encode(message.infoType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.customTag != null && Object.hasOwnProperty.call(message, "customTag")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.customTag); + if (message.inferred != null && Object.hasOwnProperty.call(message, "inferred")) + $root.google.protobuf.Empty.encode(message.inferred, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TaggedField message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.ITaggedField} message TaggedField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TaggedField.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TaggedField message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField} TaggedField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TaggedField.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.field = $root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.infoType = $root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.customTag = reader.string(); + break; + } + case 4: { + message.inferred = $root.google.protobuf.Empty.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TaggedField message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField} TaggedField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TaggedField.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TaggedField message. + * @function verify + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TaggedField.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.field != null && message.hasOwnProperty("field")) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.field, long + 1); + if (error) + return "field." + error; + } + if (message.infoType != null && message.hasOwnProperty("infoType")) { + properties.tag = 1; + { + var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infoType, long + 1); + if (error) + return "infoType." + error; + } + } + if (message.customTag != null && message.hasOwnProperty("customTag")) { + if (properties.tag === 1) + return "tag: multiple values"; + properties.tag = 1; + if (!$util.isString(message.customTag)) + return "customTag: string expected"; + } + if (message.inferred != null && message.hasOwnProperty("inferred")) { + if (properties.tag === 1) + return "tag: multiple values"; + properties.tag = 1; + { + var error = $root.google.protobuf.Empty.verify(message.inferred, long + 1); + if (error) + return "inferred." + error; + } + } + return null; + }; + + /** + * Creates a TaggedField message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField} TaggedField + */ + TaggedField.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField(); + if (object.field != null) { + if (typeof object.field !== "object") + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.field: object expected"); + message.field = $root.google.privacy.dlp.v2.FieldId.fromObject(object.field, long + 1); + } + if (object.infoType != null) { + if (typeof object.infoType !== "object") + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.infoType: object expected"); + message.infoType = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoType, long + 1); + } + if (object.customTag != null) + message.customTag = String(object.customTag); + if (object.inferred != null) { + if (typeof object.inferred !== "object") + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField.inferred: object expected"); + message.inferred = $root.google.protobuf.Empty.fromObject(object.inferred, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a TaggedField message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField} message TaggedField + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TaggedField.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.field = null; + if (message.field != null && message.hasOwnProperty("field")) + object.field = $root.google.privacy.dlp.v2.FieldId.toObject(message.field, options); + if (message.infoType != null && message.hasOwnProperty("infoType")) { + object.infoType = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoType, options); + if (options.oneofs) + object.tag = "infoType"; + } + if (message.customTag != null && message.hasOwnProperty("customTag")) { + object.customTag = message.customTag; + if (options.oneofs) + object.tag = "customTag"; + } + if (message.inferred != null && message.hasOwnProperty("inferred")) { + object.inferred = $root.google.protobuf.Empty.toObject(message.inferred, options); + if (options.oneofs) + object.tag = "inferred"; + } + return object; + }; + + /** + * Converts this TaggedField to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField + * @instance + * @returns {Object.} JSON object + */ + TaggedField.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TaggedField + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TaggedField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.TaggedField"; + }; + + return TaggedField; + })(); + + KMapEstimationConfig.AuxiliaryTable = (function() { + + /** + * Properties of an AuxiliaryTable. + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig + * @interface IAuxiliaryTable + * @property {google.privacy.dlp.v2.IBigQueryTable|null} [table] AuxiliaryTable table + * @property {Array.|null} [quasiIds] AuxiliaryTable quasiIds + * @property {google.privacy.dlp.v2.IFieldId|null} [relativeFrequency] AuxiliaryTable relativeFrequency + */ + + /** + * Constructs a new AuxiliaryTable. + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig + * @classdesc Represents an AuxiliaryTable. + * @implements IAuxiliaryTable + * @constructor + * @param {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.IAuxiliaryTable=} [properties] Properties to set + */ + function AuxiliaryTable(properties) { + this.quasiIds = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * AuxiliaryTable table. + * @member {google.privacy.dlp.v2.IBigQueryTable|null|undefined} table + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable + * @instance + */ + AuxiliaryTable.prototype.table = null; + + /** + * AuxiliaryTable quasiIds. + * @member {Array.} quasiIds + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable + * @instance + */ + AuxiliaryTable.prototype.quasiIds = $util.emptyArray; + + /** + * AuxiliaryTable relativeFrequency. + * @member {google.privacy.dlp.v2.IFieldId|null|undefined} relativeFrequency + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable + * @instance + */ + AuxiliaryTable.prototype.relativeFrequency = null; + + /** + * Creates a new AuxiliaryTable instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.IAuxiliaryTable=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable} AuxiliaryTable instance + */ + AuxiliaryTable.create = function create(properties) { + return new AuxiliaryTable(properties); + }; + + /** + * Encodes the specified AuxiliaryTable message. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.IAuxiliaryTable} message AuxiliaryTable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuxiliaryTable.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.quasiIds != null && message.quasiIds.length) + for (var i = 0; i < message.quasiIds.length; ++i) + $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.encode(message.quasiIds[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.relativeFrequency != null && Object.hasOwnProperty.call(message, "relativeFrequency")) + $root.google.privacy.dlp.v2.FieldId.encode(message.relativeFrequency, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + $root.google.privacy.dlp.v2.BigQueryTable.encode(message.table, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AuxiliaryTable message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.IAuxiliaryTable} message AuxiliaryTable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AuxiliaryTable.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AuxiliaryTable message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable} AuxiliaryTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuxiliaryTable.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.table = $root.google.privacy.dlp.v2.BigQueryTable.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 1: { + if (!(message.quasiIds && message.quasiIds.length)) + message.quasiIds = []; + message.quasiIds.push($root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.relativeFrequency = $root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AuxiliaryTable message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable} AuxiliaryTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AuxiliaryTable.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AuxiliaryTable message. + * @function verify + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AuxiliaryTable.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.table != null && message.hasOwnProperty("table")) { + var error = $root.google.privacy.dlp.v2.BigQueryTable.verify(message.table, long + 1); + if (error) + return "table." + error; + } + if (message.quasiIds != null && message.hasOwnProperty("quasiIds")) { + if (!Array.isArray(message.quasiIds)) + return "quasiIds: array expected"; + for (var i = 0; i < message.quasiIds.length; ++i) { + var error = $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.verify(message.quasiIds[i], long + 1); + if (error) + return "quasiIds." + error; + } + } + if (message.relativeFrequency != null && message.hasOwnProperty("relativeFrequency")) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.relativeFrequency, long + 1); + if (error) + return "relativeFrequency." + error; + } + return null; + }; + + /** + * Creates an AuxiliaryTable message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable} AuxiliaryTable + */ + AuxiliaryTable.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable(); + if (object.table != null) { + if (typeof object.table !== "object") + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.table: object expected"); + message.table = $root.google.privacy.dlp.v2.BigQueryTable.fromObject(object.table, long + 1); + } + if (object.quasiIds) { + if (!Array.isArray(object.quasiIds)) + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.quasiIds: array expected"); + message.quasiIds = []; + for (var i = 0; i < object.quasiIds.length; ++i) { + if (typeof object.quasiIds[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.quasiIds: object expected"); + message.quasiIds[i] = $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.fromObject(object.quasiIds[i], long + 1); + } + } + if (object.relativeFrequency != null) { + if (typeof object.relativeFrequency !== "object") + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.relativeFrequency: object expected"); + message.relativeFrequency = $root.google.privacy.dlp.v2.FieldId.fromObject(object.relativeFrequency, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an AuxiliaryTable message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable} message AuxiliaryTable + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AuxiliaryTable.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.quasiIds = []; + if (options.defaults) { + object.relativeFrequency = null; + object.table = null; + } + if (message.quasiIds && message.quasiIds.length) { + object.quasiIds = []; + for (var j = 0; j < message.quasiIds.length; ++j) + object.quasiIds[j] = $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.toObject(message.quasiIds[j], options); + } + if (message.relativeFrequency != null && message.hasOwnProperty("relativeFrequency")) + object.relativeFrequency = $root.google.privacy.dlp.v2.FieldId.toObject(message.relativeFrequency, options); + if (message.table != null && message.hasOwnProperty("table")) + object.table = $root.google.privacy.dlp.v2.BigQueryTable.toObject(message.table, options); + return object; + }; + + /** + * Converts this AuxiliaryTable to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable + * @instance + * @returns {Object.} JSON object + */ + AuxiliaryTable.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AuxiliaryTable + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AuxiliaryTable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable"; + }; + + AuxiliaryTable.QuasiIdField = (function() { + + /** + * Properties of a QuasiIdField. + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable + * @interface IQuasiIdField + * @property {google.privacy.dlp.v2.IFieldId|null} [field] QuasiIdField field + * @property {string|null} [customTag] QuasiIdField customTag + */ + + /** + * Constructs a new QuasiIdField. + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable + * @classdesc Represents a QuasiIdField. + * @implements IQuasiIdField + * @constructor + * @param {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.IQuasiIdField=} [properties] Properties to set + */ + function QuasiIdField(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * QuasiIdField field. + * @member {google.privacy.dlp.v2.IFieldId|null|undefined} field + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField + * @instance + */ + QuasiIdField.prototype.field = null; + + /** + * QuasiIdField customTag. + * @member {string} customTag + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField + * @instance + */ + QuasiIdField.prototype.customTag = ""; + + /** + * Creates a new QuasiIdField instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.IQuasiIdField=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField} QuasiIdField instance + */ + QuasiIdField.create = function create(properties) { + return new QuasiIdField(properties); + }; + + /** + * Encodes the specified QuasiIdField message. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.IQuasiIdField} message QuasiIdField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuasiIdField.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + $root.google.privacy.dlp.v2.FieldId.encode(message.field, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.customTag != null && Object.hasOwnProperty.call(message, "customTag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.customTag); + return writer; + }; + + /** + * Encodes the specified QuasiIdField message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.IQuasiIdField} message QuasiIdField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuasiIdField.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuasiIdField message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField} QuasiIdField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuasiIdField.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.field = $root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.customTag = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a QuasiIdField message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField} QuasiIdField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuasiIdField.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuasiIdField message. + * @function verify + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuasiIdField.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.field != null && message.hasOwnProperty("field")) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.field, long + 1); + if (error) + return "field." + error; + } + if (message.customTag != null && message.hasOwnProperty("customTag")) + if (!$util.isString(message.customTag)) + return "customTag: string expected"; + return null; + }; + + /** + * Creates a QuasiIdField message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField} QuasiIdField + */ + QuasiIdField.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField(); + if (object.field != null) { + if (typeof object.field !== "object") + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField.field: object expected"); + message.field = $root.google.privacy.dlp.v2.FieldId.fromObject(object.field, long + 1); + } + if (object.customTag != null) + message.customTag = String(object.customTag); + return message; + }; + + /** + * Creates a plain object from a QuasiIdField message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField} message QuasiIdField + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuasiIdField.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.field = null; + object.customTag = ""; + } + if (message.field != null && message.hasOwnProperty("field")) + object.field = $root.google.privacy.dlp.v2.FieldId.toObject(message.field, options); + if (message.customTag != null && message.hasOwnProperty("customTag")) + object.customTag = message.customTag; + return object; + }; + + /** + * Converts this QuasiIdField to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField + * @instance + * @returns {Object.} JSON object + */ + QuasiIdField.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuasiIdField + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuasiIdField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.PrivacyMetric.KMapEstimationConfig.AuxiliaryTable.QuasiIdField"; + }; + + return QuasiIdField; + })(); + + return AuxiliaryTable; + })(); + + return KMapEstimationConfig; + })(); + + PrivacyMetric.DeltaPresenceEstimationConfig = (function() { + + /** + * Properties of a DeltaPresenceEstimationConfig. + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @interface IDeltaPresenceEstimationConfig + * @property {Array.|null} [quasiIds] DeltaPresenceEstimationConfig quasiIds + * @property {string|null} [regionCode] DeltaPresenceEstimationConfig regionCode + * @property {Array.|null} [auxiliaryTables] DeltaPresenceEstimationConfig auxiliaryTables + */ + + /** + * Constructs a new DeltaPresenceEstimationConfig. + * @memberof google.privacy.dlp.v2.PrivacyMetric + * @classdesc Represents a DeltaPresenceEstimationConfig. + * @implements IDeltaPresenceEstimationConfig + * @constructor + * @param {google.privacy.dlp.v2.PrivacyMetric.IDeltaPresenceEstimationConfig=} [properties] Properties to set + */ + function DeltaPresenceEstimationConfig(properties) { + this.quasiIds = []; + this.auxiliaryTables = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeltaPresenceEstimationConfig quasiIds. + * @member {Array.} quasiIds + * @memberof google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig + * @instance + */ + DeltaPresenceEstimationConfig.prototype.quasiIds = $util.emptyArray; + + /** + * DeltaPresenceEstimationConfig regionCode. + * @member {string} regionCode + * @memberof google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig + * @instance + */ + DeltaPresenceEstimationConfig.prototype.regionCode = ""; + + /** + * DeltaPresenceEstimationConfig auxiliaryTables. + * @member {Array.} auxiliaryTables + * @memberof google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig + * @instance + */ + DeltaPresenceEstimationConfig.prototype.auxiliaryTables = $util.emptyArray; + + /** + * Creates a new DeltaPresenceEstimationConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.IDeltaPresenceEstimationConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig} DeltaPresenceEstimationConfig instance + */ + DeltaPresenceEstimationConfig.create = function create(properties) { + return new DeltaPresenceEstimationConfig(properties); + }; + + /** + * Encodes the specified DeltaPresenceEstimationConfig message. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.IDeltaPresenceEstimationConfig} message DeltaPresenceEstimationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeltaPresenceEstimationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.quasiIds != null && message.quasiIds.length) + for (var i = 0; i < message.quasiIds.length; ++i) + $root.google.privacy.dlp.v2.QuasiId.encode(message.quasiIds[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.regionCode); + if (message.auxiliaryTables != null && message.auxiliaryTables.length) + for (var i = 0; i < message.auxiliaryTables.length; ++i) + $root.google.privacy.dlp.v2.StatisticalTable.encode(message.auxiliaryTables[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeltaPresenceEstimationConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.IDeltaPresenceEstimationConfig} message DeltaPresenceEstimationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeltaPresenceEstimationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeltaPresenceEstimationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig} DeltaPresenceEstimationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeltaPresenceEstimationConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.quasiIds && message.quasiIds.length)) + message.quasiIds = []; + message.quasiIds.push($root.google.privacy.dlp.v2.QuasiId.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.regionCode = reader.string(); + break; + } + case 3: { + if (!(message.auxiliaryTables && message.auxiliaryTables.length)) + message.auxiliaryTables = []; + message.auxiliaryTables.push($root.google.privacy.dlp.v2.StatisticalTable.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeltaPresenceEstimationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig} DeltaPresenceEstimationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeltaPresenceEstimationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeltaPresenceEstimationConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeltaPresenceEstimationConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.quasiIds != null && message.hasOwnProperty("quasiIds")) { + if (!Array.isArray(message.quasiIds)) + return "quasiIds: array expected"; + for (var i = 0; i < message.quasiIds.length; ++i) { + var error = $root.google.privacy.dlp.v2.QuasiId.verify(message.quasiIds[i], long + 1); + if (error) + return "quasiIds." + error; + } + } + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + if (!$util.isString(message.regionCode)) + return "regionCode: string expected"; + if (message.auxiliaryTables != null && message.hasOwnProperty("auxiliaryTables")) { + if (!Array.isArray(message.auxiliaryTables)) + return "auxiliaryTables: array expected"; + for (var i = 0; i < message.auxiliaryTables.length; ++i) { + var error = $root.google.privacy.dlp.v2.StatisticalTable.verify(message.auxiliaryTables[i], long + 1); + if (error) + return "auxiliaryTables." + error; + } + } + return null; + }; + + /** + * Creates a DeltaPresenceEstimationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig} DeltaPresenceEstimationConfig + */ + DeltaPresenceEstimationConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig(); + if (object.quasiIds) { + if (!Array.isArray(object.quasiIds)) + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.quasiIds: array expected"); + message.quasiIds = []; + for (var i = 0; i < object.quasiIds.length; ++i) { + if (typeof object.quasiIds[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.quasiIds: object expected"); + message.quasiIds[i] = $root.google.privacy.dlp.v2.QuasiId.fromObject(object.quasiIds[i], long + 1); + } + } + if (object.regionCode != null) + message.regionCode = String(object.regionCode); + if (object.auxiliaryTables) { + if (!Array.isArray(object.auxiliaryTables)) + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.auxiliaryTables: array expected"); + message.auxiliaryTables = []; + for (var i = 0; i < object.auxiliaryTables.length; ++i) { + if (typeof object.auxiliaryTables[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig.auxiliaryTables: object expected"); + message.auxiliaryTables[i] = $root.google.privacy.dlp.v2.StatisticalTable.fromObject(object.auxiliaryTables[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a DeltaPresenceEstimationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig + * @static + * @param {google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig} message DeltaPresenceEstimationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeltaPresenceEstimationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.quasiIds = []; + object.auxiliaryTables = []; + } + if (options.defaults) + object.regionCode = ""; + if (message.quasiIds && message.quasiIds.length) { + object.quasiIds = []; + for (var j = 0; j < message.quasiIds.length; ++j) + object.quasiIds[j] = $root.google.privacy.dlp.v2.QuasiId.toObject(message.quasiIds[j], options); + } + if (message.regionCode != null && message.hasOwnProperty("regionCode")) + object.regionCode = message.regionCode; + if (message.auxiliaryTables && message.auxiliaryTables.length) { + object.auxiliaryTables = []; + for (var j = 0; j < message.auxiliaryTables.length; ++j) + object.auxiliaryTables[j] = $root.google.privacy.dlp.v2.StatisticalTable.toObject(message.auxiliaryTables[j], options); + } + return object; + }; + + /** + * Converts this DeltaPresenceEstimationConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig + * @instance + * @returns {Object.} JSON object + */ + DeltaPresenceEstimationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeltaPresenceEstimationConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeltaPresenceEstimationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.PrivacyMetric.DeltaPresenceEstimationConfig"; + }; + + return DeltaPresenceEstimationConfig; + })(); + + return PrivacyMetric; + })(); + + v2.AnalyzeDataSourceRiskDetails = (function() { + + /** + * Properties of an AnalyzeDataSourceRiskDetails. + * @memberof google.privacy.dlp.v2 + * @interface IAnalyzeDataSourceRiskDetails + * @property {google.privacy.dlp.v2.IPrivacyMetric|null} [requestedPrivacyMetric] AnalyzeDataSourceRiskDetails requestedPrivacyMetric + * @property {google.privacy.dlp.v2.IBigQueryTable|null} [requestedSourceTable] AnalyzeDataSourceRiskDetails requestedSourceTable + * @property {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.INumericalStatsResult|null} [numericalStatsResult] AnalyzeDataSourceRiskDetails numericalStatsResult + * @property {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ICategoricalStatsResult|null} [categoricalStatsResult] AnalyzeDataSourceRiskDetails categoricalStatsResult + * @property {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IKAnonymityResult|null} [kAnonymityResult] AnalyzeDataSourceRiskDetails kAnonymityResult + * @property {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ILDiversityResult|null} [lDiversityResult] AnalyzeDataSourceRiskDetails lDiversityResult + * @property {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IKMapEstimationResult|null} [kMapEstimationResult] AnalyzeDataSourceRiskDetails kMapEstimationResult + * @property {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IDeltaPresenceEstimationResult|null} [deltaPresenceEstimationResult] AnalyzeDataSourceRiskDetails deltaPresenceEstimationResult + * @property {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IRequestedRiskAnalysisOptions|null} [requestedOptions] AnalyzeDataSourceRiskDetails requestedOptions + */ + + /** + * Constructs a new AnalyzeDataSourceRiskDetails. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an AnalyzeDataSourceRiskDetails. + * @implements IAnalyzeDataSourceRiskDetails + * @constructor + * @param {google.privacy.dlp.v2.IAnalyzeDataSourceRiskDetails=} [properties] Properties to set + */ + function AnalyzeDataSourceRiskDetails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalyzeDataSourceRiskDetails requestedPrivacyMetric. + * @member {google.privacy.dlp.v2.IPrivacyMetric|null|undefined} requestedPrivacyMetric + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @instance + */ + AnalyzeDataSourceRiskDetails.prototype.requestedPrivacyMetric = null; + + /** + * AnalyzeDataSourceRiskDetails requestedSourceTable. + * @member {google.privacy.dlp.v2.IBigQueryTable|null|undefined} requestedSourceTable + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @instance + */ + AnalyzeDataSourceRiskDetails.prototype.requestedSourceTable = null; + + /** + * AnalyzeDataSourceRiskDetails numericalStatsResult. + * @member {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.INumericalStatsResult|null|undefined} numericalStatsResult + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @instance + */ + AnalyzeDataSourceRiskDetails.prototype.numericalStatsResult = null; + + /** + * AnalyzeDataSourceRiskDetails categoricalStatsResult. + * @member {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ICategoricalStatsResult|null|undefined} categoricalStatsResult + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @instance + */ + AnalyzeDataSourceRiskDetails.prototype.categoricalStatsResult = null; + + /** + * AnalyzeDataSourceRiskDetails kAnonymityResult. + * @member {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IKAnonymityResult|null|undefined} kAnonymityResult + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @instance + */ + AnalyzeDataSourceRiskDetails.prototype.kAnonymityResult = null; + + /** + * AnalyzeDataSourceRiskDetails lDiversityResult. + * @member {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ILDiversityResult|null|undefined} lDiversityResult + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @instance + */ + AnalyzeDataSourceRiskDetails.prototype.lDiversityResult = null; + + /** + * AnalyzeDataSourceRiskDetails kMapEstimationResult. + * @member {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IKMapEstimationResult|null|undefined} kMapEstimationResult + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @instance + */ + AnalyzeDataSourceRiskDetails.prototype.kMapEstimationResult = null; + + /** + * AnalyzeDataSourceRiskDetails deltaPresenceEstimationResult. + * @member {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IDeltaPresenceEstimationResult|null|undefined} deltaPresenceEstimationResult + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @instance + */ + AnalyzeDataSourceRiskDetails.prototype.deltaPresenceEstimationResult = null; + + /** + * AnalyzeDataSourceRiskDetails requestedOptions. + * @member {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IRequestedRiskAnalysisOptions|null|undefined} requestedOptions + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @instance + */ + AnalyzeDataSourceRiskDetails.prototype.requestedOptions = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AnalyzeDataSourceRiskDetails result. + * @member {"numericalStatsResult"|"categoricalStatsResult"|"kAnonymityResult"|"lDiversityResult"|"kMapEstimationResult"|"deltaPresenceEstimationResult"|undefined} result + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @instance + */ + Object.defineProperty(AnalyzeDataSourceRiskDetails.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["numericalStatsResult", "categoricalStatsResult", "kAnonymityResult", "lDiversityResult", "kMapEstimationResult", "deltaPresenceEstimationResult"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AnalyzeDataSourceRiskDetails instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @static + * @param {google.privacy.dlp.v2.IAnalyzeDataSourceRiskDetails=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails} AnalyzeDataSourceRiskDetails instance + */ + AnalyzeDataSourceRiskDetails.create = function create(properties) { + return new AnalyzeDataSourceRiskDetails(properties); + }; + + /** + * Encodes the specified AnalyzeDataSourceRiskDetails message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @static + * @param {google.privacy.dlp.v2.IAnalyzeDataSourceRiskDetails} message AnalyzeDataSourceRiskDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeDataSourceRiskDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.requestedPrivacyMetric != null && Object.hasOwnProperty.call(message, "requestedPrivacyMetric")) + $root.google.privacy.dlp.v2.PrivacyMetric.encode(message.requestedPrivacyMetric, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.requestedSourceTable != null && Object.hasOwnProperty.call(message, "requestedSourceTable")) + $root.google.privacy.dlp.v2.BigQueryTable.encode(message.requestedSourceTable, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.numericalStatsResult != null && Object.hasOwnProperty.call(message, "numericalStatsResult")) + $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.encode(message.numericalStatsResult, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.categoricalStatsResult != null && Object.hasOwnProperty.call(message, "categoricalStatsResult")) + $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.encode(message.categoricalStatsResult, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.kAnonymityResult != null && Object.hasOwnProperty.call(message, "kAnonymityResult")) + $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.encode(message.kAnonymityResult, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.lDiversityResult != null && Object.hasOwnProperty.call(message, "lDiversityResult")) + $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.encode(message.lDiversityResult, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.kMapEstimationResult != null && Object.hasOwnProperty.call(message, "kMapEstimationResult")) + $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.encode(message.kMapEstimationResult, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.deltaPresenceEstimationResult != null && Object.hasOwnProperty.call(message, "deltaPresenceEstimationResult")) + $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.encode(message.deltaPresenceEstimationResult, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.requestedOptions != null && Object.hasOwnProperty.call(message, "requestedOptions")) + $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.encode(message.requestedOptions, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AnalyzeDataSourceRiskDetails message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @static + * @param {google.privacy.dlp.v2.IAnalyzeDataSourceRiskDetails} message AnalyzeDataSourceRiskDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyzeDataSourceRiskDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalyzeDataSourceRiskDetails message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails} AnalyzeDataSourceRiskDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeDataSourceRiskDetails.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.requestedPrivacyMetric = $root.google.privacy.dlp.v2.PrivacyMetric.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.requestedSourceTable = $root.google.privacy.dlp.v2.BigQueryTable.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.numericalStatsResult = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.categoricalStatsResult = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.kAnonymityResult = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.lDiversityResult = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 7: { + message.kMapEstimationResult = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 9: { + message.deltaPresenceEstimationResult = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 10: { + message.requestedOptions = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AnalyzeDataSourceRiskDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails} AnalyzeDataSourceRiskDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyzeDataSourceRiskDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalyzeDataSourceRiskDetails message. + * @function verify + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalyzeDataSourceRiskDetails.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.requestedPrivacyMetric != null && message.hasOwnProperty("requestedPrivacyMetric")) { + var error = $root.google.privacy.dlp.v2.PrivacyMetric.verify(message.requestedPrivacyMetric, long + 1); + if (error) + return "requestedPrivacyMetric." + error; + } + if (message.requestedSourceTable != null && message.hasOwnProperty("requestedSourceTable")) { + var error = $root.google.privacy.dlp.v2.BigQueryTable.verify(message.requestedSourceTable, long + 1); + if (error) + return "requestedSourceTable." + error; + } + if (message.numericalStatsResult != null && message.hasOwnProperty("numericalStatsResult")) { + properties.result = 1; + { + var error = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.verify(message.numericalStatsResult, long + 1); + if (error) + return "numericalStatsResult." + error; + } + } + if (message.categoricalStatsResult != null && message.hasOwnProperty("categoricalStatsResult")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.verify(message.categoricalStatsResult, long + 1); + if (error) + return "categoricalStatsResult." + error; + } + } + if (message.kAnonymityResult != null && message.hasOwnProperty("kAnonymityResult")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.verify(message.kAnonymityResult, long + 1); + if (error) + return "kAnonymityResult." + error; + } + } + if (message.lDiversityResult != null && message.hasOwnProperty("lDiversityResult")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.verify(message.lDiversityResult, long + 1); + if (error) + return "lDiversityResult." + error; + } + } + if (message.kMapEstimationResult != null && message.hasOwnProperty("kMapEstimationResult")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.verify(message.kMapEstimationResult, long + 1); + if (error) + return "kMapEstimationResult." + error; + } + } + if (message.deltaPresenceEstimationResult != null && message.hasOwnProperty("deltaPresenceEstimationResult")) { + if (properties.result === 1) + return "result: multiple values"; + properties.result = 1; + { + var error = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.verify(message.deltaPresenceEstimationResult, long + 1); + if (error) + return "deltaPresenceEstimationResult." + error; + } + } + if (message.requestedOptions != null && message.hasOwnProperty("requestedOptions")) { + var error = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.verify(message.requestedOptions, long + 1); + if (error) + return "requestedOptions." + error; + } + return null; + }; + + /** + * Creates an AnalyzeDataSourceRiskDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails} AnalyzeDataSourceRiskDetails + */ + AnalyzeDataSourceRiskDetails.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails(); + if (object.requestedPrivacyMetric != null) { + if (typeof object.requestedPrivacyMetric !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.requestedPrivacyMetric: object expected"); + message.requestedPrivacyMetric = $root.google.privacy.dlp.v2.PrivacyMetric.fromObject(object.requestedPrivacyMetric, long + 1); + } + if (object.requestedSourceTable != null) { + if (typeof object.requestedSourceTable !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.requestedSourceTable: object expected"); + message.requestedSourceTable = $root.google.privacy.dlp.v2.BigQueryTable.fromObject(object.requestedSourceTable, long + 1); + } + if (object.numericalStatsResult != null) { + if (typeof object.numericalStatsResult !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.numericalStatsResult: object expected"); + message.numericalStatsResult = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.fromObject(object.numericalStatsResult, long + 1); + } + if (object.categoricalStatsResult != null) { + if (typeof object.categoricalStatsResult !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.categoricalStatsResult: object expected"); + message.categoricalStatsResult = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.fromObject(object.categoricalStatsResult, long + 1); + } + if (object.kAnonymityResult != null) { + if (typeof object.kAnonymityResult !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.kAnonymityResult: object expected"); + message.kAnonymityResult = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.fromObject(object.kAnonymityResult, long + 1); + } + if (object.lDiversityResult != null) { + if (typeof object.lDiversityResult !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.lDiversityResult: object expected"); + message.lDiversityResult = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.fromObject(object.lDiversityResult, long + 1); + } + if (object.kMapEstimationResult != null) { + if (typeof object.kMapEstimationResult !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.kMapEstimationResult: object expected"); + message.kMapEstimationResult = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.fromObject(object.kMapEstimationResult, long + 1); + } + if (object.deltaPresenceEstimationResult != null) { + if (typeof object.deltaPresenceEstimationResult !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.deltaPresenceEstimationResult: object expected"); + message.deltaPresenceEstimationResult = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.fromObject(object.deltaPresenceEstimationResult, long + 1); + } + if (object.requestedOptions != null) { + if (typeof object.requestedOptions !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.requestedOptions: object expected"); + message.requestedOptions = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.fromObject(object.requestedOptions, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an AnalyzeDataSourceRiskDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails} message AnalyzeDataSourceRiskDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalyzeDataSourceRiskDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.requestedPrivacyMetric = null; + object.requestedSourceTable = null; + object.requestedOptions = null; + } + if (message.requestedPrivacyMetric != null && message.hasOwnProperty("requestedPrivacyMetric")) + object.requestedPrivacyMetric = $root.google.privacy.dlp.v2.PrivacyMetric.toObject(message.requestedPrivacyMetric, options); + if (message.requestedSourceTable != null && message.hasOwnProperty("requestedSourceTable")) + object.requestedSourceTable = $root.google.privacy.dlp.v2.BigQueryTable.toObject(message.requestedSourceTable, options); + if (message.numericalStatsResult != null && message.hasOwnProperty("numericalStatsResult")) { + object.numericalStatsResult = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.toObject(message.numericalStatsResult, options); + if (options.oneofs) + object.result = "numericalStatsResult"; + } + if (message.categoricalStatsResult != null && message.hasOwnProperty("categoricalStatsResult")) { + object.categoricalStatsResult = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.toObject(message.categoricalStatsResult, options); + if (options.oneofs) + object.result = "categoricalStatsResult"; + } + if (message.kAnonymityResult != null && message.hasOwnProperty("kAnonymityResult")) { + object.kAnonymityResult = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.toObject(message.kAnonymityResult, options); + if (options.oneofs) + object.result = "kAnonymityResult"; + } + if (message.lDiversityResult != null && message.hasOwnProperty("lDiversityResult")) { + object.lDiversityResult = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.toObject(message.lDiversityResult, options); + if (options.oneofs) + object.result = "lDiversityResult"; + } + if (message.kMapEstimationResult != null && message.hasOwnProperty("kMapEstimationResult")) { + object.kMapEstimationResult = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.toObject(message.kMapEstimationResult, options); + if (options.oneofs) + object.result = "kMapEstimationResult"; + } + if (message.deltaPresenceEstimationResult != null && message.hasOwnProperty("deltaPresenceEstimationResult")) { + object.deltaPresenceEstimationResult = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.toObject(message.deltaPresenceEstimationResult, options); + if (options.oneofs) + object.result = "deltaPresenceEstimationResult"; + } + if (message.requestedOptions != null && message.hasOwnProperty("requestedOptions")) + object.requestedOptions = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.toObject(message.requestedOptions, options); + return object; + }; + + /** + * Converts this AnalyzeDataSourceRiskDetails to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @instance + * @returns {Object.} JSON object + */ + AnalyzeDataSourceRiskDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AnalyzeDataSourceRiskDetails + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalyzeDataSourceRiskDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails"; + }; + + AnalyzeDataSourceRiskDetails.NumericalStatsResult = (function() { + + /** + * Properties of a NumericalStatsResult. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @interface INumericalStatsResult + * @property {google.privacy.dlp.v2.IValue|null} [minValue] NumericalStatsResult minValue + * @property {google.privacy.dlp.v2.IValue|null} [maxValue] NumericalStatsResult maxValue + * @property {Array.|null} [quantileValues] NumericalStatsResult quantileValues + */ + + /** + * Constructs a new NumericalStatsResult. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @classdesc Represents a NumericalStatsResult. + * @implements INumericalStatsResult + * @constructor + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.INumericalStatsResult=} [properties] Properties to set + */ + function NumericalStatsResult(properties) { + this.quantileValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * NumericalStatsResult minValue. + * @member {google.privacy.dlp.v2.IValue|null|undefined} minValue + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult + * @instance + */ + NumericalStatsResult.prototype.minValue = null; + + /** + * NumericalStatsResult maxValue. + * @member {google.privacy.dlp.v2.IValue|null|undefined} maxValue + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult + * @instance + */ + NumericalStatsResult.prototype.maxValue = null; + + /** + * NumericalStatsResult quantileValues. + * @member {Array.} quantileValues + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult + * @instance + */ + NumericalStatsResult.prototype.quantileValues = $util.emptyArray; + + /** + * Creates a new NumericalStatsResult instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.INumericalStatsResult=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult} NumericalStatsResult instance + */ + NumericalStatsResult.create = function create(properties) { + return new NumericalStatsResult(properties); + }; + + /** + * Encodes the specified NumericalStatsResult message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.INumericalStatsResult} message NumericalStatsResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericalStatsResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minValue != null && Object.hasOwnProperty.call(message, "minValue")) + $root.google.privacy.dlp.v2.Value.encode(message.minValue, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.maxValue != null && Object.hasOwnProperty.call(message, "maxValue")) + $root.google.privacy.dlp.v2.Value.encode(message.maxValue, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.quantileValues != null && message.quantileValues.length) + for (var i = 0; i < message.quantileValues.length; ++i) + $root.google.privacy.dlp.v2.Value.encode(message.quantileValues[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NumericalStatsResult message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.INumericalStatsResult} message NumericalStatsResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NumericalStatsResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NumericalStatsResult message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult} NumericalStatsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericalStatsResult.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.minValue = $root.google.privacy.dlp.v2.Value.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.maxValue = $root.google.privacy.dlp.v2.Value.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + if (!(message.quantileValues && message.quantileValues.length)) + message.quantileValues = []; + message.quantileValues.push($root.google.privacy.dlp.v2.Value.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a NumericalStatsResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult} NumericalStatsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NumericalStatsResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NumericalStatsResult message. + * @function verify + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NumericalStatsResult.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.minValue != null && message.hasOwnProperty("minValue")) { + var error = $root.google.privacy.dlp.v2.Value.verify(message.minValue, long + 1); + if (error) + return "minValue." + error; + } + if (message.maxValue != null && message.hasOwnProperty("maxValue")) { + var error = $root.google.privacy.dlp.v2.Value.verify(message.maxValue, long + 1); + if (error) + return "maxValue." + error; + } + if (message.quantileValues != null && message.hasOwnProperty("quantileValues")) { + if (!Array.isArray(message.quantileValues)) + return "quantileValues: array expected"; + for (var i = 0; i < message.quantileValues.length; ++i) { + var error = $root.google.privacy.dlp.v2.Value.verify(message.quantileValues[i], long + 1); + if (error) + return "quantileValues." + error; + } + } + return null; + }; + + /** + * Creates a NumericalStatsResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult} NumericalStatsResult + */ + NumericalStatsResult.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult(); + if (object.minValue != null) { + if (typeof object.minValue !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.minValue: object expected"); + message.minValue = $root.google.privacy.dlp.v2.Value.fromObject(object.minValue, long + 1); + } + if (object.maxValue != null) { + if (typeof object.maxValue !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.maxValue: object expected"); + message.maxValue = $root.google.privacy.dlp.v2.Value.fromObject(object.maxValue, long + 1); + } + if (object.quantileValues) { + if (!Array.isArray(object.quantileValues)) + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.quantileValues: array expected"); + message.quantileValues = []; + for (var i = 0; i < object.quantileValues.length; ++i) { + if (typeof object.quantileValues[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult.quantileValues: object expected"); + message.quantileValues[i] = $root.google.privacy.dlp.v2.Value.fromObject(object.quantileValues[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a NumericalStatsResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult} message NumericalStatsResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NumericalStatsResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.quantileValues = []; + if (options.defaults) { + object.minValue = null; + object.maxValue = null; + } + if (message.minValue != null && message.hasOwnProperty("minValue")) + object.minValue = $root.google.privacy.dlp.v2.Value.toObject(message.minValue, options); + if (message.maxValue != null && message.hasOwnProperty("maxValue")) + object.maxValue = $root.google.privacy.dlp.v2.Value.toObject(message.maxValue, options); + if (message.quantileValues && message.quantileValues.length) { + object.quantileValues = []; + for (var j = 0; j < message.quantileValues.length; ++j) + object.quantileValues[j] = $root.google.privacy.dlp.v2.Value.toObject(message.quantileValues[j], options); + } + return object; + }; + + /** + * Converts this NumericalStatsResult to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult + * @instance + * @returns {Object.} JSON object + */ + NumericalStatsResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NumericalStatsResult + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NumericalStatsResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.NumericalStatsResult"; + }; + + return NumericalStatsResult; + })(); + + AnalyzeDataSourceRiskDetails.CategoricalStatsResult = (function() { + + /** + * Properties of a CategoricalStatsResult. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @interface ICategoricalStatsResult + * @property {Array.|null} [valueFrequencyHistogramBuckets] CategoricalStatsResult valueFrequencyHistogramBuckets + */ + + /** + * Constructs a new CategoricalStatsResult. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @classdesc Represents a CategoricalStatsResult. + * @implements ICategoricalStatsResult + * @constructor + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ICategoricalStatsResult=} [properties] Properties to set + */ + function CategoricalStatsResult(properties) { + this.valueFrequencyHistogramBuckets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CategoricalStatsResult valueFrequencyHistogramBuckets. + * @member {Array.} valueFrequencyHistogramBuckets + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult + * @instance + */ + CategoricalStatsResult.prototype.valueFrequencyHistogramBuckets = $util.emptyArray; + + /** + * Creates a new CategoricalStatsResult instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ICategoricalStatsResult=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult} CategoricalStatsResult instance + */ + CategoricalStatsResult.create = function create(properties) { + return new CategoricalStatsResult(properties); + }; + + /** + * Encodes the specified CategoricalStatsResult message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ICategoricalStatsResult} message CategoricalStatsResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CategoricalStatsResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.valueFrequencyHistogramBuckets != null && message.valueFrequencyHistogramBuckets.length) + for (var i = 0; i < message.valueFrequencyHistogramBuckets.length; ++i) + $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.encode(message.valueFrequencyHistogramBuckets[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CategoricalStatsResult message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ICategoricalStatsResult} message CategoricalStatsResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CategoricalStatsResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CategoricalStatsResult message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult} CategoricalStatsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CategoricalStatsResult.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 5: { + if (!(message.valueFrequencyHistogramBuckets && message.valueFrequencyHistogramBuckets.length)) + message.valueFrequencyHistogramBuckets = []; + message.valueFrequencyHistogramBuckets.push($root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CategoricalStatsResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult} CategoricalStatsResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CategoricalStatsResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CategoricalStatsResult message. + * @function verify + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CategoricalStatsResult.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.valueFrequencyHistogramBuckets != null && message.hasOwnProperty("valueFrequencyHistogramBuckets")) { + if (!Array.isArray(message.valueFrequencyHistogramBuckets)) + return "valueFrequencyHistogramBuckets: array expected"; + for (var i = 0; i < message.valueFrequencyHistogramBuckets.length; ++i) { + var error = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.verify(message.valueFrequencyHistogramBuckets[i], long + 1); + if (error) + return "valueFrequencyHistogramBuckets." + error; + } + } + return null; + }; + + /** + * Creates a CategoricalStatsResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult} CategoricalStatsResult + */ + CategoricalStatsResult.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult(); + if (object.valueFrequencyHistogramBuckets) { + if (!Array.isArray(object.valueFrequencyHistogramBuckets)) + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.valueFrequencyHistogramBuckets: array expected"); + message.valueFrequencyHistogramBuckets = []; + for (var i = 0; i < object.valueFrequencyHistogramBuckets.length; ++i) { + if (typeof object.valueFrequencyHistogramBuckets[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.valueFrequencyHistogramBuckets: object expected"); + message.valueFrequencyHistogramBuckets[i] = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.fromObject(object.valueFrequencyHistogramBuckets[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a CategoricalStatsResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult} message CategoricalStatsResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CategoricalStatsResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.valueFrequencyHistogramBuckets = []; + if (message.valueFrequencyHistogramBuckets && message.valueFrequencyHistogramBuckets.length) { + object.valueFrequencyHistogramBuckets = []; + for (var j = 0; j < message.valueFrequencyHistogramBuckets.length; ++j) + object.valueFrequencyHistogramBuckets[j] = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.toObject(message.valueFrequencyHistogramBuckets[j], options); + } + return object; + }; + + /** + * Converts this CategoricalStatsResult to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult + * @instance + * @returns {Object.} JSON object + */ + CategoricalStatsResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CategoricalStatsResult + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CategoricalStatsResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult"; + }; + + CategoricalStatsResult.CategoricalStatsHistogramBucket = (function() { + + /** + * Properties of a CategoricalStatsHistogramBucket. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult + * @interface ICategoricalStatsHistogramBucket + * @property {number|Long|null} [valueFrequencyLowerBound] CategoricalStatsHistogramBucket valueFrequencyLowerBound + * @property {number|Long|null} [valueFrequencyUpperBound] CategoricalStatsHistogramBucket valueFrequencyUpperBound + * @property {number|Long|null} [bucketSize] CategoricalStatsHistogramBucket bucketSize + * @property {Array.|null} [bucketValues] CategoricalStatsHistogramBucket bucketValues + * @property {number|Long|null} [bucketValueCount] CategoricalStatsHistogramBucket bucketValueCount + */ + + /** + * Constructs a new CategoricalStatsHistogramBucket. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult + * @classdesc Represents a CategoricalStatsHistogramBucket. + * @implements ICategoricalStatsHistogramBucket + * @constructor + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.ICategoricalStatsHistogramBucket=} [properties] Properties to set + */ + function CategoricalStatsHistogramBucket(properties) { + this.bucketValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CategoricalStatsHistogramBucket valueFrequencyLowerBound. + * @member {number|Long} valueFrequencyLowerBound + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket + * @instance + */ + CategoricalStatsHistogramBucket.prototype.valueFrequencyLowerBound = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * CategoricalStatsHistogramBucket valueFrequencyUpperBound. + * @member {number|Long} valueFrequencyUpperBound + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket + * @instance + */ + CategoricalStatsHistogramBucket.prototype.valueFrequencyUpperBound = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * CategoricalStatsHistogramBucket bucketSize. + * @member {number|Long} bucketSize + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket + * @instance + */ + CategoricalStatsHistogramBucket.prototype.bucketSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * CategoricalStatsHistogramBucket bucketValues. + * @member {Array.} bucketValues + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket + * @instance + */ + CategoricalStatsHistogramBucket.prototype.bucketValues = $util.emptyArray; + + /** + * CategoricalStatsHistogramBucket bucketValueCount. + * @member {number|Long} bucketValueCount + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket + * @instance + */ + CategoricalStatsHistogramBucket.prototype.bucketValueCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new CategoricalStatsHistogramBucket instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.ICategoricalStatsHistogramBucket=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket} CategoricalStatsHistogramBucket instance + */ + CategoricalStatsHistogramBucket.create = function create(properties) { + return new CategoricalStatsHistogramBucket(properties); + }; + + /** + * Encodes the specified CategoricalStatsHistogramBucket message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.ICategoricalStatsHistogramBucket} message CategoricalStatsHistogramBucket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CategoricalStatsHistogramBucket.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.valueFrequencyLowerBound != null && Object.hasOwnProperty.call(message, "valueFrequencyLowerBound")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.valueFrequencyLowerBound); + if (message.valueFrequencyUpperBound != null && Object.hasOwnProperty.call(message, "valueFrequencyUpperBound")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.valueFrequencyUpperBound); + if (message.bucketSize != null && Object.hasOwnProperty.call(message, "bucketSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.bucketSize); + if (message.bucketValues != null && message.bucketValues.length) + for (var i = 0; i < message.bucketValues.length; ++i) + $root.google.privacy.dlp.v2.ValueFrequency.encode(message.bucketValues[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.bucketValueCount != null && Object.hasOwnProperty.call(message, "bucketValueCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.bucketValueCount); + return writer; + }; + + /** + * Encodes the specified CategoricalStatsHistogramBucket message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.ICategoricalStatsHistogramBucket} message CategoricalStatsHistogramBucket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CategoricalStatsHistogramBucket.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CategoricalStatsHistogramBucket message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket} CategoricalStatsHistogramBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CategoricalStatsHistogramBucket.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.valueFrequencyLowerBound = reader.int64(); + break; + } + case 2: { + message.valueFrequencyUpperBound = reader.int64(); + break; + } + case 3: { + message.bucketSize = reader.int64(); + break; + } + case 4: { + if (!(message.bucketValues && message.bucketValues.length)) + message.bucketValues = []; + message.bucketValues.push($root.google.privacy.dlp.v2.ValueFrequency.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 5: { + message.bucketValueCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CategoricalStatsHistogramBucket message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket} CategoricalStatsHistogramBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CategoricalStatsHistogramBucket.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CategoricalStatsHistogramBucket message. + * @function verify + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CategoricalStatsHistogramBucket.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.valueFrequencyLowerBound != null && message.hasOwnProperty("valueFrequencyLowerBound")) + if (!$util.isInteger(message.valueFrequencyLowerBound) && !(message.valueFrequencyLowerBound && $util.isInteger(message.valueFrequencyLowerBound.low) && $util.isInteger(message.valueFrequencyLowerBound.high))) + return "valueFrequencyLowerBound: integer|Long expected"; + if (message.valueFrequencyUpperBound != null && message.hasOwnProperty("valueFrequencyUpperBound")) + if (!$util.isInteger(message.valueFrequencyUpperBound) && !(message.valueFrequencyUpperBound && $util.isInteger(message.valueFrequencyUpperBound.low) && $util.isInteger(message.valueFrequencyUpperBound.high))) + return "valueFrequencyUpperBound: integer|Long expected"; + if (message.bucketSize != null && message.hasOwnProperty("bucketSize")) + if (!$util.isInteger(message.bucketSize) && !(message.bucketSize && $util.isInteger(message.bucketSize.low) && $util.isInteger(message.bucketSize.high))) + return "bucketSize: integer|Long expected"; + if (message.bucketValues != null && message.hasOwnProperty("bucketValues")) { + if (!Array.isArray(message.bucketValues)) + return "bucketValues: array expected"; + for (var i = 0; i < message.bucketValues.length; ++i) { + var error = $root.google.privacy.dlp.v2.ValueFrequency.verify(message.bucketValues[i], long + 1); + if (error) + return "bucketValues." + error; + } + } + if (message.bucketValueCount != null && message.hasOwnProperty("bucketValueCount")) + if (!$util.isInteger(message.bucketValueCount) && !(message.bucketValueCount && $util.isInteger(message.bucketValueCount.low) && $util.isInteger(message.bucketValueCount.high))) + return "bucketValueCount: integer|Long expected"; + return null; + }; + + /** + * Creates a CategoricalStatsHistogramBucket message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket} CategoricalStatsHistogramBucket + */ + CategoricalStatsHistogramBucket.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket(); + if (object.valueFrequencyLowerBound != null) + if ($util.Long) + (message.valueFrequencyLowerBound = $util.Long.fromValue(object.valueFrequencyLowerBound)).unsigned = false; + else if (typeof object.valueFrequencyLowerBound === "string") + message.valueFrequencyLowerBound = parseInt(object.valueFrequencyLowerBound, 10); + else if (typeof object.valueFrequencyLowerBound === "number") + message.valueFrequencyLowerBound = object.valueFrequencyLowerBound; + else if (typeof object.valueFrequencyLowerBound === "object") + message.valueFrequencyLowerBound = new $util.LongBits(object.valueFrequencyLowerBound.low >>> 0, object.valueFrequencyLowerBound.high >>> 0).toNumber(); + if (object.valueFrequencyUpperBound != null) + if ($util.Long) + (message.valueFrequencyUpperBound = $util.Long.fromValue(object.valueFrequencyUpperBound)).unsigned = false; + else if (typeof object.valueFrequencyUpperBound === "string") + message.valueFrequencyUpperBound = parseInt(object.valueFrequencyUpperBound, 10); + else if (typeof object.valueFrequencyUpperBound === "number") + message.valueFrequencyUpperBound = object.valueFrequencyUpperBound; + else if (typeof object.valueFrequencyUpperBound === "object") + message.valueFrequencyUpperBound = new $util.LongBits(object.valueFrequencyUpperBound.low >>> 0, object.valueFrequencyUpperBound.high >>> 0).toNumber(); + if (object.bucketSize != null) + if ($util.Long) + (message.bucketSize = $util.Long.fromValue(object.bucketSize)).unsigned = false; + else if (typeof object.bucketSize === "string") + message.bucketSize = parseInt(object.bucketSize, 10); + else if (typeof object.bucketSize === "number") + message.bucketSize = object.bucketSize; + else if (typeof object.bucketSize === "object") + message.bucketSize = new $util.LongBits(object.bucketSize.low >>> 0, object.bucketSize.high >>> 0).toNumber(); + if (object.bucketValues) { + if (!Array.isArray(object.bucketValues)) + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.bucketValues: array expected"); + message.bucketValues = []; + for (var i = 0; i < object.bucketValues.length; ++i) { + if (typeof object.bucketValues[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket.bucketValues: object expected"); + message.bucketValues[i] = $root.google.privacy.dlp.v2.ValueFrequency.fromObject(object.bucketValues[i], long + 1); + } + } + if (object.bucketValueCount != null) + if ($util.Long) + (message.bucketValueCount = $util.Long.fromValue(object.bucketValueCount)).unsigned = false; + else if (typeof object.bucketValueCount === "string") + message.bucketValueCount = parseInt(object.bucketValueCount, 10); + else if (typeof object.bucketValueCount === "number") + message.bucketValueCount = object.bucketValueCount; + else if (typeof object.bucketValueCount === "object") + message.bucketValueCount = new $util.LongBits(object.bucketValueCount.low >>> 0, object.bucketValueCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a CategoricalStatsHistogramBucket message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket} message CategoricalStatsHistogramBucket + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CategoricalStatsHistogramBucket.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.bucketValues = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.valueFrequencyLowerBound = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.valueFrequencyLowerBound = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.valueFrequencyUpperBound = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.valueFrequencyUpperBound = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.bucketSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.bucketSize = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.bucketValueCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.bucketValueCount = options.longs === String ? "0" : 0; + } + if (message.valueFrequencyLowerBound != null && message.hasOwnProperty("valueFrequencyLowerBound")) + if (typeof message.valueFrequencyLowerBound === "number") + object.valueFrequencyLowerBound = options.longs === String ? String(message.valueFrequencyLowerBound) : message.valueFrequencyLowerBound; + else + object.valueFrequencyLowerBound = options.longs === String ? $util.Long.prototype.toString.call(message.valueFrequencyLowerBound) : options.longs === Number ? new $util.LongBits(message.valueFrequencyLowerBound.low >>> 0, message.valueFrequencyLowerBound.high >>> 0).toNumber() : message.valueFrequencyLowerBound; + if (message.valueFrequencyUpperBound != null && message.hasOwnProperty("valueFrequencyUpperBound")) + if (typeof message.valueFrequencyUpperBound === "number") + object.valueFrequencyUpperBound = options.longs === String ? String(message.valueFrequencyUpperBound) : message.valueFrequencyUpperBound; + else + object.valueFrequencyUpperBound = options.longs === String ? $util.Long.prototype.toString.call(message.valueFrequencyUpperBound) : options.longs === Number ? new $util.LongBits(message.valueFrequencyUpperBound.low >>> 0, message.valueFrequencyUpperBound.high >>> 0).toNumber() : message.valueFrequencyUpperBound; + if (message.bucketSize != null && message.hasOwnProperty("bucketSize")) + if (typeof message.bucketSize === "number") + object.bucketSize = options.longs === String ? String(message.bucketSize) : message.bucketSize; + else + object.bucketSize = options.longs === String ? $util.Long.prototype.toString.call(message.bucketSize) : options.longs === Number ? new $util.LongBits(message.bucketSize.low >>> 0, message.bucketSize.high >>> 0).toNumber() : message.bucketSize; + if (message.bucketValues && message.bucketValues.length) { + object.bucketValues = []; + for (var j = 0; j < message.bucketValues.length; ++j) + object.bucketValues[j] = $root.google.privacy.dlp.v2.ValueFrequency.toObject(message.bucketValues[j], options); + } + if (message.bucketValueCount != null && message.hasOwnProperty("bucketValueCount")) + if (typeof message.bucketValueCount === "number") + object.bucketValueCount = options.longs === String ? String(message.bucketValueCount) : message.bucketValueCount; + else + object.bucketValueCount = options.longs === String ? $util.Long.prototype.toString.call(message.bucketValueCount) : options.longs === Number ? new $util.LongBits(message.bucketValueCount.low >>> 0, message.bucketValueCount.high >>> 0).toNumber() : message.bucketValueCount; + return object; + }; + + /** + * Converts this CategoricalStatsHistogramBucket to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket + * @instance + * @returns {Object.} JSON object + */ + CategoricalStatsHistogramBucket.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CategoricalStatsHistogramBucket + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CategoricalStatsHistogramBucket.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.CategoricalStatsResult.CategoricalStatsHistogramBucket"; + }; + + return CategoricalStatsHistogramBucket; + })(); + + return CategoricalStatsResult; + })(); + + AnalyzeDataSourceRiskDetails.KAnonymityResult = (function() { + + /** + * Properties of a KAnonymityResult. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @interface IKAnonymityResult + * @property {Array.|null} [equivalenceClassHistogramBuckets] KAnonymityResult equivalenceClassHistogramBuckets + */ + + /** + * Constructs a new KAnonymityResult. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @classdesc Represents a KAnonymityResult. + * @implements IKAnonymityResult + * @constructor + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IKAnonymityResult=} [properties] Properties to set + */ + function KAnonymityResult(properties) { + this.equivalenceClassHistogramBuckets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * KAnonymityResult equivalenceClassHistogramBuckets. + * @member {Array.} equivalenceClassHistogramBuckets + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult + * @instance + */ + KAnonymityResult.prototype.equivalenceClassHistogramBuckets = $util.emptyArray; + + /** + * Creates a new KAnonymityResult instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IKAnonymityResult=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult} KAnonymityResult instance + */ + KAnonymityResult.create = function create(properties) { + return new KAnonymityResult(properties); + }; + + /** + * Encodes the specified KAnonymityResult message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IKAnonymityResult} message KAnonymityResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KAnonymityResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.equivalenceClassHistogramBuckets != null && message.equivalenceClassHistogramBuckets.length) + for (var i = 0; i < message.equivalenceClassHistogramBuckets.length; ++i) + $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.encode(message.equivalenceClassHistogramBuckets[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified KAnonymityResult message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IKAnonymityResult} message KAnonymityResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KAnonymityResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KAnonymityResult message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult} KAnonymityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KAnonymityResult.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 5: { + if (!(message.equivalenceClassHistogramBuckets && message.equivalenceClassHistogramBuckets.length)) + message.equivalenceClassHistogramBuckets = []; + message.equivalenceClassHistogramBuckets.push($root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a KAnonymityResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult} KAnonymityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KAnonymityResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KAnonymityResult message. + * @function verify + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KAnonymityResult.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.equivalenceClassHistogramBuckets != null && message.hasOwnProperty("equivalenceClassHistogramBuckets")) { + if (!Array.isArray(message.equivalenceClassHistogramBuckets)) + return "equivalenceClassHistogramBuckets: array expected"; + for (var i = 0; i < message.equivalenceClassHistogramBuckets.length; ++i) { + var error = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.verify(message.equivalenceClassHistogramBuckets[i], long + 1); + if (error) + return "equivalenceClassHistogramBuckets." + error; + } + } + return null; + }; + + /** + * Creates a KAnonymityResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult} KAnonymityResult + */ + KAnonymityResult.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult(); + if (object.equivalenceClassHistogramBuckets) { + if (!Array.isArray(object.equivalenceClassHistogramBuckets)) + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.equivalenceClassHistogramBuckets: array expected"); + message.equivalenceClassHistogramBuckets = []; + for (var i = 0; i < object.equivalenceClassHistogramBuckets.length; ++i) { + if (typeof object.equivalenceClassHistogramBuckets[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.equivalenceClassHistogramBuckets: object expected"); + message.equivalenceClassHistogramBuckets[i] = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.fromObject(object.equivalenceClassHistogramBuckets[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a KAnonymityResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult} message KAnonymityResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KAnonymityResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.equivalenceClassHistogramBuckets = []; + if (message.equivalenceClassHistogramBuckets && message.equivalenceClassHistogramBuckets.length) { + object.equivalenceClassHistogramBuckets = []; + for (var j = 0; j < message.equivalenceClassHistogramBuckets.length; ++j) + object.equivalenceClassHistogramBuckets[j] = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.toObject(message.equivalenceClassHistogramBuckets[j], options); + } + return object; + }; + + /** + * Converts this KAnonymityResult to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult + * @instance + * @returns {Object.} JSON object + */ + KAnonymityResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for KAnonymityResult + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KAnonymityResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult"; + }; + + KAnonymityResult.KAnonymityEquivalenceClass = (function() { + + /** + * Properties of a KAnonymityEquivalenceClass. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult + * @interface IKAnonymityEquivalenceClass + * @property {Array.|null} [quasiIdsValues] KAnonymityEquivalenceClass quasiIdsValues + * @property {number|Long|null} [equivalenceClassSize] KAnonymityEquivalenceClass equivalenceClassSize + */ + + /** + * Constructs a new KAnonymityEquivalenceClass. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult + * @classdesc Represents a KAnonymityEquivalenceClass. + * @implements IKAnonymityEquivalenceClass + * @constructor + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.IKAnonymityEquivalenceClass=} [properties] Properties to set + */ + function KAnonymityEquivalenceClass(properties) { + this.quasiIdsValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * KAnonymityEquivalenceClass quasiIdsValues. + * @member {Array.} quasiIdsValues + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass + * @instance + */ + KAnonymityEquivalenceClass.prototype.quasiIdsValues = $util.emptyArray; + + /** + * KAnonymityEquivalenceClass equivalenceClassSize. + * @member {number|Long} equivalenceClassSize + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass + * @instance + */ + KAnonymityEquivalenceClass.prototype.equivalenceClassSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new KAnonymityEquivalenceClass instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.IKAnonymityEquivalenceClass=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass} KAnonymityEquivalenceClass instance + */ + KAnonymityEquivalenceClass.create = function create(properties) { + return new KAnonymityEquivalenceClass(properties); + }; + + /** + * Encodes the specified KAnonymityEquivalenceClass message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.IKAnonymityEquivalenceClass} message KAnonymityEquivalenceClass message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KAnonymityEquivalenceClass.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.quasiIdsValues != null && message.quasiIdsValues.length) + for (var i = 0; i < message.quasiIdsValues.length; ++i) + $root.google.privacy.dlp.v2.Value.encode(message.quasiIdsValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.equivalenceClassSize != null && Object.hasOwnProperty.call(message, "equivalenceClassSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.equivalenceClassSize); + return writer; + }; + + /** + * Encodes the specified KAnonymityEquivalenceClass message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.IKAnonymityEquivalenceClass} message KAnonymityEquivalenceClass message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KAnonymityEquivalenceClass.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KAnonymityEquivalenceClass message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass} KAnonymityEquivalenceClass + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KAnonymityEquivalenceClass.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.quasiIdsValues && message.quasiIdsValues.length)) + message.quasiIdsValues = []; + message.quasiIdsValues.push($root.google.privacy.dlp.v2.Value.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.equivalenceClassSize = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a KAnonymityEquivalenceClass message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass} KAnonymityEquivalenceClass + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KAnonymityEquivalenceClass.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KAnonymityEquivalenceClass message. + * @function verify + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KAnonymityEquivalenceClass.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.quasiIdsValues != null && message.hasOwnProperty("quasiIdsValues")) { + if (!Array.isArray(message.quasiIdsValues)) + return "quasiIdsValues: array expected"; + for (var i = 0; i < message.quasiIdsValues.length; ++i) { + var error = $root.google.privacy.dlp.v2.Value.verify(message.quasiIdsValues[i], long + 1); + if (error) + return "quasiIdsValues." + error; + } + } + if (message.equivalenceClassSize != null && message.hasOwnProperty("equivalenceClassSize")) + if (!$util.isInteger(message.equivalenceClassSize) && !(message.equivalenceClassSize && $util.isInteger(message.equivalenceClassSize.low) && $util.isInteger(message.equivalenceClassSize.high))) + return "equivalenceClassSize: integer|Long expected"; + return null; + }; + + /** + * Creates a KAnonymityEquivalenceClass message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass} KAnonymityEquivalenceClass + */ + KAnonymityEquivalenceClass.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass(); + if (object.quasiIdsValues) { + if (!Array.isArray(object.quasiIdsValues)) + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.quasiIdsValues: array expected"); + message.quasiIdsValues = []; + for (var i = 0; i < object.quasiIdsValues.length; ++i) { + if (typeof object.quasiIdsValues[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.quasiIdsValues: object expected"); + message.quasiIdsValues[i] = $root.google.privacy.dlp.v2.Value.fromObject(object.quasiIdsValues[i], long + 1); + } + } + if (object.equivalenceClassSize != null) + if ($util.Long) + (message.equivalenceClassSize = $util.Long.fromValue(object.equivalenceClassSize)).unsigned = false; + else if (typeof object.equivalenceClassSize === "string") + message.equivalenceClassSize = parseInt(object.equivalenceClassSize, 10); + else if (typeof object.equivalenceClassSize === "number") + message.equivalenceClassSize = object.equivalenceClassSize; + else if (typeof object.equivalenceClassSize === "object") + message.equivalenceClassSize = new $util.LongBits(object.equivalenceClassSize.low >>> 0, object.equivalenceClassSize.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a KAnonymityEquivalenceClass message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass} message KAnonymityEquivalenceClass + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KAnonymityEquivalenceClass.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.quasiIdsValues = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.equivalenceClassSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.equivalenceClassSize = options.longs === String ? "0" : 0; + if (message.quasiIdsValues && message.quasiIdsValues.length) { + object.quasiIdsValues = []; + for (var j = 0; j < message.quasiIdsValues.length; ++j) + object.quasiIdsValues[j] = $root.google.privacy.dlp.v2.Value.toObject(message.quasiIdsValues[j], options); + } + if (message.equivalenceClassSize != null && message.hasOwnProperty("equivalenceClassSize")) + if (typeof message.equivalenceClassSize === "number") + object.equivalenceClassSize = options.longs === String ? String(message.equivalenceClassSize) : message.equivalenceClassSize; + else + object.equivalenceClassSize = options.longs === String ? $util.Long.prototype.toString.call(message.equivalenceClassSize) : options.longs === Number ? new $util.LongBits(message.equivalenceClassSize.low >>> 0, message.equivalenceClassSize.high >>> 0).toNumber() : message.equivalenceClassSize; + return object; + }; + + /** + * Converts this KAnonymityEquivalenceClass to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass + * @instance + * @returns {Object.} JSON object + */ + KAnonymityEquivalenceClass.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for KAnonymityEquivalenceClass + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KAnonymityEquivalenceClass.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass"; + }; + + return KAnonymityEquivalenceClass; + })(); + + KAnonymityResult.KAnonymityHistogramBucket = (function() { + + /** + * Properties of a KAnonymityHistogramBucket. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult + * @interface IKAnonymityHistogramBucket + * @property {number|Long|null} [equivalenceClassSizeLowerBound] KAnonymityHistogramBucket equivalenceClassSizeLowerBound + * @property {number|Long|null} [equivalenceClassSizeUpperBound] KAnonymityHistogramBucket equivalenceClassSizeUpperBound + * @property {number|Long|null} [bucketSize] KAnonymityHistogramBucket bucketSize + * @property {Array.|null} [bucketValues] KAnonymityHistogramBucket bucketValues + * @property {number|Long|null} [bucketValueCount] KAnonymityHistogramBucket bucketValueCount + */ + + /** + * Constructs a new KAnonymityHistogramBucket. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult + * @classdesc Represents a KAnonymityHistogramBucket. + * @implements IKAnonymityHistogramBucket + * @constructor + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.IKAnonymityHistogramBucket=} [properties] Properties to set + */ + function KAnonymityHistogramBucket(properties) { + this.bucketValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * KAnonymityHistogramBucket equivalenceClassSizeLowerBound. + * @member {number|Long} equivalenceClassSizeLowerBound + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket + * @instance + */ + KAnonymityHistogramBucket.prototype.equivalenceClassSizeLowerBound = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * KAnonymityHistogramBucket equivalenceClassSizeUpperBound. + * @member {number|Long} equivalenceClassSizeUpperBound + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket + * @instance + */ + KAnonymityHistogramBucket.prototype.equivalenceClassSizeUpperBound = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * KAnonymityHistogramBucket bucketSize. + * @member {number|Long} bucketSize + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket + * @instance + */ + KAnonymityHistogramBucket.prototype.bucketSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * KAnonymityHistogramBucket bucketValues. + * @member {Array.} bucketValues + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket + * @instance + */ + KAnonymityHistogramBucket.prototype.bucketValues = $util.emptyArray; + + /** + * KAnonymityHistogramBucket bucketValueCount. + * @member {number|Long} bucketValueCount + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket + * @instance + */ + KAnonymityHistogramBucket.prototype.bucketValueCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new KAnonymityHistogramBucket instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.IKAnonymityHistogramBucket=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket} KAnonymityHistogramBucket instance + */ + KAnonymityHistogramBucket.create = function create(properties) { + return new KAnonymityHistogramBucket(properties); + }; + + /** + * Encodes the specified KAnonymityHistogramBucket message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.IKAnonymityHistogramBucket} message KAnonymityHistogramBucket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KAnonymityHistogramBucket.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.equivalenceClassSizeLowerBound != null && Object.hasOwnProperty.call(message, "equivalenceClassSizeLowerBound")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.equivalenceClassSizeLowerBound); + if (message.equivalenceClassSizeUpperBound != null && Object.hasOwnProperty.call(message, "equivalenceClassSizeUpperBound")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.equivalenceClassSizeUpperBound); + if (message.bucketSize != null && Object.hasOwnProperty.call(message, "bucketSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.bucketSize); + if (message.bucketValues != null && message.bucketValues.length) + for (var i = 0; i < message.bucketValues.length; ++i) + $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.encode(message.bucketValues[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.bucketValueCount != null && Object.hasOwnProperty.call(message, "bucketValueCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.bucketValueCount); + return writer; + }; + + /** + * Encodes the specified KAnonymityHistogramBucket message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.IKAnonymityHistogramBucket} message KAnonymityHistogramBucket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KAnonymityHistogramBucket.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KAnonymityHistogramBucket message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket} KAnonymityHistogramBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KAnonymityHistogramBucket.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.equivalenceClassSizeLowerBound = reader.int64(); + break; + } + case 2: { + message.equivalenceClassSizeUpperBound = reader.int64(); + break; + } + case 3: { + message.bucketSize = reader.int64(); + break; + } + case 4: { + if (!(message.bucketValues && message.bucketValues.length)) + message.bucketValues = []; + message.bucketValues.push($root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 5: { + message.bucketValueCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a KAnonymityHistogramBucket message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket} KAnonymityHistogramBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KAnonymityHistogramBucket.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KAnonymityHistogramBucket message. + * @function verify + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KAnonymityHistogramBucket.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.equivalenceClassSizeLowerBound != null && message.hasOwnProperty("equivalenceClassSizeLowerBound")) + if (!$util.isInteger(message.equivalenceClassSizeLowerBound) && !(message.equivalenceClassSizeLowerBound && $util.isInteger(message.equivalenceClassSizeLowerBound.low) && $util.isInteger(message.equivalenceClassSizeLowerBound.high))) + return "equivalenceClassSizeLowerBound: integer|Long expected"; + if (message.equivalenceClassSizeUpperBound != null && message.hasOwnProperty("equivalenceClassSizeUpperBound")) + if (!$util.isInteger(message.equivalenceClassSizeUpperBound) && !(message.equivalenceClassSizeUpperBound && $util.isInteger(message.equivalenceClassSizeUpperBound.low) && $util.isInteger(message.equivalenceClassSizeUpperBound.high))) + return "equivalenceClassSizeUpperBound: integer|Long expected"; + if (message.bucketSize != null && message.hasOwnProperty("bucketSize")) + if (!$util.isInteger(message.bucketSize) && !(message.bucketSize && $util.isInteger(message.bucketSize.low) && $util.isInteger(message.bucketSize.high))) + return "bucketSize: integer|Long expected"; + if (message.bucketValues != null && message.hasOwnProperty("bucketValues")) { + if (!Array.isArray(message.bucketValues)) + return "bucketValues: array expected"; + for (var i = 0; i < message.bucketValues.length; ++i) { + var error = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.verify(message.bucketValues[i], long + 1); + if (error) + return "bucketValues." + error; + } + } + if (message.bucketValueCount != null && message.hasOwnProperty("bucketValueCount")) + if (!$util.isInteger(message.bucketValueCount) && !(message.bucketValueCount && $util.isInteger(message.bucketValueCount.low) && $util.isInteger(message.bucketValueCount.high))) + return "bucketValueCount: integer|Long expected"; + return null; + }; + + /** + * Creates a KAnonymityHistogramBucket message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket} KAnonymityHistogramBucket + */ + KAnonymityHistogramBucket.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket(); + if (object.equivalenceClassSizeLowerBound != null) + if ($util.Long) + (message.equivalenceClassSizeLowerBound = $util.Long.fromValue(object.equivalenceClassSizeLowerBound)).unsigned = false; + else if (typeof object.equivalenceClassSizeLowerBound === "string") + message.equivalenceClassSizeLowerBound = parseInt(object.equivalenceClassSizeLowerBound, 10); + else if (typeof object.equivalenceClassSizeLowerBound === "number") + message.equivalenceClassSizeLowerBound = object.equivalenceClassSizeLowerBound; + else if (typeof object.equivalenceClassSizeLowerBound === "object") + message.equivalenceClassSizeLowerBound = new $util.LongBits(object.equivalenceClassSizeLowerBound.low >>> 0, object.equivalenceClassSizeLowerBound.high >>> 0).toNumber(); + if (object.equivalenceClassSizeUpperBound != null) + if ($util.Long) + (message.equivalenceClassSizeUpperBound = $util.Long.fromValue(object.equivalenceClassSizeUpperBound)).unsigned = false; + else if (typeof object.equivalenceClassSizeUpperBound === "string") + message.equivalenceClassSizeUpperBound = parseInt(object.equivalenceClassSizeUpperBound, 10); + else if (typeof object.equivalenceClassSizeUpperBound === "number") + message.equivalenceClassSizeUpperBound = object.equivalenceClassSizeUpperBound; + else if (typeof object.equivalenceClassSizeUpperBound === "object") + message.equivalenceClassSizeUpperBound = new $util.LongBits(object.equivalenceClassSizeUpperBound.low >>> 0, object.equivalenceClassSizeUpperBound.high >>> 0).toNumber(); + if (object.bucketSize != null) + if ($util.Long) + (message.bucketSize = $util.Long.fromValue(object.bucketSize)).unsigned = false; + else if (typeof object.bucketSize === "string") + message.bucketSize = parseInt(object.bucketSize, 10); + else if (typeof object.bucketSize === "number") + message.bucketSize = object.bucketSize; + else if (typeof object.bucketSize === "object") + message.bucketSize = new $util.LongBits(object.bucketSize.low >>> 0, object.bucketSize.high >>> 0).toNumber(); + if (object.bucketValues) { + if (!Array.isArray(object.bucketValues)) + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.bucketValues: array expected"); + message.bucketValues = []; + for (var i = 0; i < object.bucketValues.length; ++i) { + if (typeof object.bucketValues[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket.bucketValues: object expected"); + message.bucketValues[i] = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.fromObject(object.bucketValues[i], long + 1); + } + } + if (object.bucketValueCount != null) + if ($util.Long) + (message.bucketValueCount = $util.Long.fromValue(object.bucketValueCount)).unsigned = false; + else if (typeof object.bucketValueCount === "string") + message.bucketValueCount = parseInt(object.bucketValueCount, 10); + else if (typeof object.bucketValueCount === "number") + message.bucketValueCount = object.bucketValueCount; + else if (typeof object.bucketValueCount === "object") + message.bucketValueCount = new $util.LongBits(object.bucketValueCount.low >>> 0, object.bucketValueCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a KAnonymityHistogramBucket message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket} message KAnonymityHistogramBucket + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KAnonymityHistogramBucket.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.bucketValues = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.equivalenceClassSizeLowerBound = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.equivalenceClassSizeLowerBound = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.equivalenceClassSizeUpperBound = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.equivalenceClassSizeUpperBound = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.bucketSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.bucketSize = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.bucketValueCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.bucketValueCount = options.longs === String ? "0" : 0; + } + if (message.equivalenceClassSizeLowerBound != null && message.hasOwnProperty("equivalenceClassSizeLowerBound")) + if (typeof message.equivalenceClassSizeLowerBound === "number") + object.equivalenceClassSizeLowerBound = options.longs === String ? String(message.equivalenceClassSizeLowerBound) : message.equivalenceClassSizeLowerBound; + else + object.equivalenceClassSizeLowerBound = options.longs === String ? $util.Long.prototype.toString.call(message.equivalenceClassSizeLowerBound) : options.longs === Number ? new $util.LongBits(message.equivalenceClassSizeLowerBound.low >>> 0, message.equivalenceClassSizeLowerBound.high >>> 0).toNumber() : message.equivalenceClassSizeLowerBound; + if (message.equivalenceClassSizeUpperBound != null && message.hasOwnProperty("equivalenceClassSizeUpperBound")) + if (typeof message.equivalenceClassSizeUpperBound === "number") + object.equivalenceClassSizeUpperBound = options.longs === String ? String(message.equivalenceClassSizeUpperBound) : message.equivalenceClassSizeUpperBound; + else + object.equivalenceClassSizeUpperBound = options.longs === String ? $util.Long.prototype.toString.call(message.equivalenceClassSizeUpperBound) : options.longs === Number ? new $util.LongBits(message.equivalenceClassSizeUpperBound.low >>> 0, message.equivalenceClassSizeUpperBound.high >>> 0).toNumber() : message.equivalenceClassSizeUpperBound; + if (message.bucketSize != null && message.hasOwnProperty("bucketSize")) + if (typeof message.bucketSize === "number") + object.bucketSize = options.longs === String ? String(message.bucketSize) : message.bucketSize; + else + object.bucketSize = options.longs === String ? $util.Long.prototype.toString.call(message.bucketSize) : options.longs === Number ? new $util.LongBits(message.bucketSize.low >>> 0, message.bucketSize.high >>> 0).toNumber() : message.bucketSize; + if (message.bucketValues && message.bucketValues.length) { + object.bucketValues = []; + for (var j = 0; j < message.bucketValues.length; ++j) + object.bucketValues[j] = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityEquivalenceClass.toObject(message.bucketValues[j], options); + } + if (message.bucketValueCount != null && message.hasOwnProperty("bucketValueCount")) + if (typeof message.bucketValueCount === "number") + object.bucketValueCount = options.longs === String ? String(message.bucketValueCount) : message.bucketValueCount; + else + object.bucketValueCount = options.longs === String ? $util.Long.prototype.toString.call(message.bucketValueCount) : options.longs === Number ? new $util.LongBits(message.bucketValueCount.low >>> 0, message.bucketValueCount.high >>> 0).toNumber() : message.bucketValueCount; + return object; + }; + + /** + * Converts this KAnonymityHistogramBucket to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket + * @instance + * @returns {Object.} JSON object + */ + KAnonymityHistogramBucket.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for KAnonymityHistogramBucket + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KAnonymityHistogramBucket.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KAnonymityResult.KAnonymityHistogramBucket"; + }; + + return KAnonymityHistogramBucket; + })(); + + return KAnonymityResult; + })(); + + AnalyzeDataSourceRiskDetails.LDiversityResult = (function() { + + /** + * Properties of a LDiversityResult. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @interface ILDiversityResult + * @property {Array.|null} [sensitiveValueFrequencyHistogramBuckets] LDiversityResult sensitiveValueFrequencyHistogramBuckets + */ + + /** + * Constructs a new LDiversityResult. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @classdesc Represents a LDiversityResult. + * @implements ILDiversityResult + * @constructor + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ILDiversityResult=} [properties] Properties to set + */ + function LDiversityResult(properties) { + this.sensitiveValueFrequencyHistogramBuckets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * LDiversityResult sensitiveValueFrequencyHistogramBuckets. + * @member {Array.} sensitiveValueFrequencyHistogramBuckets + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult + * @instance + */ + LDiversityResult.prototype.sensitiveValueFrequencyHistogramBuckets = $util.emptyArray; + + /** + * Creates a new LDiversityResult instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ILDiversityResult=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult} LDiversityResult instance + */ + LDiversityResult.create = function create(properties) { + return new LDiversityResult(properties); + }; + + /** + * Encodes the specified LDiversityResult message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ILDiversityResult} message LDiversityResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LDiversityResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sensitiveValueFrequencyHistogramBuckets != null && message.sensitiveValueFrequencyHistogramBuckets.length) + for (var i = 0; i < message.sensitiveValueFrequencyHistogramBuckets.length; ++i) + $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.encode(message.sensitiveValueFrequencyHistogramBuckets[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LDiversityResult message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.ILDiversityResult} message LDiversityResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LDiversityResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LDiversityResult message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult} LDiversityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LDiversityResult.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 5: { + if (!(message.sensitiveValueFrequencyHistogramBuckets && message.sensitiveValueFrequencyHistogramBuckets.length)) + message.sensitiveValueFrequencyHistogramBuckets = []; + message.sensitiveValueFrequencyHistogramBuckets.push($root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a LDiversityResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult} LDiversityResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LDiversityResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LDiversityResult message. + * @function verify + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LDiversityResult.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.sensitiveValueFrequencyHistogramBuckets != null && message.hasOwnProperty("sensitiveValueFrequencyHistogramBuckets")) { + if (!Array.isArray(message.sensitiveValueFrequencyHistogramBuckets)) + return "sensitiveValueFrequencyHistogramBuckets: array expected"; + for (var i = 0; i < message.sensitiveValueFrequencyHistogramBuckets.length; ++i) { + var error = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.verify(message.sensitiveValueFrequencyHistogramBuckets[i], long + 1); + if (error) + return "sensitiveValueFrequencyHistogramBuckets." + error; + } + } + return null; + }; + + /** + * Creates a LDiversityResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult} LDiversityResult + */ + LDiversityResult.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult(); + if (object.sensitiveValueFrequencyHistogramBuckets) { + if (!Array.isArray(object.sensitiveValueFrequencyHistogramBuckets)) + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.sensitiveValueFrequencyHistogramBuckets: array expected"); + message.sensitiveValueFrequencyHistogramBuckets = []; + for (var i = 0; i < object.sensitiveValueFrequencyHistogramBuckets.length; ++i) { + if (typeof object.sensitiveValueFrequencyHistogramBuckets[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.sensitiveValueFrequencyHistogramBuckets: object expected"); + message.sensitiveValueFrequencyHistogramBuckets[i] = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.fromObject(object.sensitiveValueFrequencyHistogramBuckets[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a LDiversityResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult} message LDiversityResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LDiversityResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.sensitiveValueFrequencyHistogramBuckets = []; + if (message.sensitiveValueFrequencyHistogramBuckets && message.sensitiveValueFrequencyHistogramBuckets.length) { + object.sensitiveValueFrequencyHistogramBuckets = []; + for (var j = 0; j < message.sensitiveValueFrequencyHistogramBuckets.length; ++j) + object.sensitiveValueFrequencyHistogramBuckets[j] = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.toObject(message.sensitiveValueFrequencyHistogramBuckets[j], options); + } + return object; + }; + + /** + * Converts this LDiversityResult to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult + * @instance + * @returns {Object.} JSON object + */ + LDiversityResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LDiversityResult + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LDiversityResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult"; + }; + + LDiversityResult.LDiversityEquivalenceClass = (function() { + + /** + * Properties of a LDiversityEquivalenceClass. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult + * @interface ILDiversityEquivalenceClass + * @property {Array.|null} [quasiIdsValues] LDiversityEquivalenceClass quasiIdsValues + * @property {number|Long|null} [equivalenceClassSize] LDiversityEquivalenceClass equivalenceClassSize + * @property {number|Long|null} [numDistinctSensitiveValues] LDiversityEquivalenceClass numDistinctSensitiveValues + * @property {Array.|null} [topSensitiveValues] LDiversityEquivalenceClass topSensitiveValues + */ + + /** + * Constructs a new LDiversityEquivalenceClass. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult + * @classdesc Represents a LDiversityEquivalenceClass. + * @implements ILDiversityEquivalenceClass + * @constructor + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.ILDiversityEquivalenceClass=} [properties] Properties to set + */ + function LDiversityEquivalenceClass(properties) { + this.quasiIdsValues = []; + this.topSensitiveValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * LDiversityEquivalenceClass quasiIdsValues. + * @member {Array.} quasiIdsValues + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass + * @instance + */ + LDiversityEquivalenceClass.prototype.quasiIdsValues = $util.emptyArray; + + /** + * LDiversityEquivalenceClass equivalenceClassSize. + * @member {number|Long} equivalenceClassSize + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass + * @instance + */ + LDiversityEquivalenceClass.prototype.equivalenceClassSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * LDiversityEquivalenceClass numDistinctSensitiveValues. + * @member {number|Long} numDistinctSensitiveValues + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass + * @instance + */ + LDiversityEquivalenceClass.prototype.numDistinctSensitiveValues = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * LDiversityEquivalenceClass topSensitiveValues. + * @member {Array.} topSensitiveValues + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass + * @instance + */ + LDiversityEquivalenceClass.prototype.topSensitiveValues = $util.emptyArray; + + /** + * Creates a new LDiversityEquivalenceClass instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.ILDiversityEquivalenceClass=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass} LDiversityEquivalenceClass instance + */ + LDiversityEquivalenceClass.create = function create(properties) { + return new LDiversityEquivalenceClass(properties); + }; + + /** + * Encodes the specified LDiversityEquivalenceClass message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.ILDiversityEquivalenceClass} message LDiversityEquivalenceClass message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LDiversityEquivalenceClass.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.quasiIdsValues != null && message.quasiIdsValues.length) + for (var i = 0; i < message.quasiIdsValues.length; ++i) + $root.google.privacy.dlp.v2.Value.encode(message.quasiIdsValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.equivalenceClassSize != null && Object.hasOwnProperty.call(message, "equivalenceClassSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.equivalenceClassSize); + if (message.numDistinctSensitiveValues != null && Object.hasOwnProperty.call(message, "numDistinctSensitiveValues")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.numDistinctSensitiveValues); + if (message.topSensitiveValues != null && message.topSensitiveValues.length) + for (var i = 0; i < message.topSensitiveValues.length; ++i) + $root.google.privacy.dlp.v2.ValueFrequency.encode(message.topSensitiveValues[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LDiversityEquivalenceClass message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.ILDiversityEquivalenceClass} message LDiversityEquivalenceClass message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LDiversityEquivalenceClass.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LDiversityEquivalenceClass message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass} LDiversityEquivalenceClass + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LDiversityEquivalenceClass.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.quasiIdsValues && message.quasiIdsValues.length)) + message.quasiIdsValues = []; + message.quasiIdsValues.push($root.google.privacy.dlp.v2.Value.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.equivalenceClassSize = reader.int64(); + break; + } + case 3: { + message.numDistinctSensitiveValues = reader.int64(); + break; + } + case 4: { + if (!(message.topSensitiveValues && message.topSensitiveValues.length)) + message.topSensitiveValues = []; + message.topSensitiveValues.push($root.google.privacy.dlp.v2.ValueFrequency.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a LDiversityEquivalenceClass message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass} LDiversityEquivalenceClass + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LDiversityEquivalenceClass.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LDiversityEquivalenceClass message. + * @function verify + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LDiversityEquivalenceClass.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.quasiIdsValues != null && message.hasOwnProperty("quasiIdsValues")) { + if (!Array.isArray(message.quasiIdsValues)) + return "quasiIdsValues: array expected"; + for (var i = 0; i < message.quasiIdsValues.length; ++i) { + var error = $root.google.privacy.dlp.v2.Value.verify(message.quasiIdsValues[i], long + 1); + if (error) + return "quasiIdsValues." + error; + } + } + if (message.equivalenceClassSize != null && message.hasOwnProperty("equivalenceClassSize")) + if (!$util.isInteger(message.equivalenceClassSize) && !(message.equivalenceClassSize && $util.isInteger(message.equivalenceClassSize.low) && $util.isInteger(message.equivalenceClassSize.high))) + return "equivalenceClassSize: integer|Long expected"; + if (message.numDistinctSensitiveValues != null && message.hasOwnProperty("numDistinctSensitiveValues")) + if (!$util.isInteger(message.numDistinctSensitiveValues) && !(message.numDistinctSensitiveValues && $util.isInteger(message.numDistinctSensitiveValues.low) && $util.isInteger(message.numDistinctSensitiveValues.high))) + return "numDistinctSensitiveValues: integer|Long expected"; + if (message.topSensitiveValues != null && message.hasOwnProperty("topSensitiveValues")) { + if (!Array.isArray(message.topSensitiveValues)) + return "topSensitiveValues: array expected"; + for (var i = 0; i < message.topSensitiveValues.length; ++i) { + var error = $root.google.privacy.dlp.v2.ValueFrequency.verify(message.topSensitiveValues[i], long + 1); + if (error) + return "topSensitiveValues." + error; + } + } + return null; + }; + + /** + * Creates a LDiversityEquivalenceClass message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass} LDiversityEquivalenceClass + */ + LDiversityEquivalenceClass.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass(); + if (object.quasiIdsValues) { + if (!Array.isArray(object.quasiIdsValues)) + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.quasiIdsValues: array expected"); + message.quasiIdsValues = []; + for (var i = 0; i < object.quasiIdsValues.length; ++i) { + if (typeof object.quasiIdsValues[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.quasiIdsValues: object expected"); + message.quasiIdsValues[i] = $root.google.privacy.dlp.v2.Value.fromObject(object.quasiIdsValues[i], long + 1); + } + } + if (object.equivalenceClassSize != null) + if ($util.Long) + (message.equivalenceClassSize = $util.Long.fromValue(object.equivalenceClassSize)).unsigned = false; + else if (typeof object.equivalenceClassSize === "string") + message.equivalenceClassSize = parseInt(object.equivalenceClassSize, 10); + else if (typeof object.equivalenceClassSize === "number") + message.equivalenceClassSize = object.equivalenceClassSize; + else if (typeof object.equivalenceClassSize === "object") + message.equivalenceClassSize = new $util.LongBits(object.equivalenceClassSize.low >>> 0, object.equivalenceClassSize.high >>> 0).toNumber(); + if (object.numDistinctSensitiveValues != null) + if ($util.Long) + (message.numDistinctSensitiveValues = $util.Long.fromValue(object.numDistinctSensitiveValues)).unsigned = false; + else if (typeof object.numDistinctSensitiveValues === "string") + message.numDistinctSensitiveValues = parseInt(object.numDistinctSensitiveValues, 10); + else if (typeof object.numDistinctSensitiveValues === "number") + message.numDistinctSensitiveValues = object.numDistinctSensitiveValues; + else if (typeof object.numDistinctSensitiveValues === "object") + message.numDistinctSensitiveValues = new $util.LongBits(object.numDistinctSensitiveValues.low >>> 0, object.numDistinctSensitiveValues.high >>> 0).toNumber(); + if (object.topSensitiveValues) { + if (!Array.isArray(object.topSensitiveValues)) + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.topSensitiveValues: array expected"); + message.topSensitiveValues = []; + for (var i = 0; i < object.topSensitiveValues.length; ++i) { + if (typeof object.topSensitiveValues[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.topSensitiveValues: object expected"); + message.topSensitiveValues[i] = $root.google.privacy.dlp.v2.ValueFrequency.fromObject(object.topSensitiveValues[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a LDiversityEquivalenceClass message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass} message LDiversityEquivalenceClass + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LDiversityEquivalenceClass.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.quasiIdsValues = []; + object.topSensitiveValues = []; + } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.equivalenceClassSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.equivalenceClassSize = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.numDistinctSensitiveValues = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.numDistinctSensitiveValues = options.longs === String ? "0" : 0; + } + if (message.quasiIdsValues && message.quasiIdsValues.length) { + object.quasiIdsValues = []; + for (var j = 0; j < message.quasiIdsValues.length; ++j) + object.quasiIdsValues[j] = $root.google.privacy.dlp.v2.Value.toObject(message.quasiIdsValues[j], options); + } + if (message.equivalenceClassSize != null && message.hasOwnProperty("equivalenceClassSize")) + if (typeof message.equivalenceClassSize === "number") + object.equivalenceClassSize = options.longs === String ? String(message.equivalenceClassSize) : message.equivalenceClassSize; + else + object.equivalenceClassSize = options.longs === String ? $util.Long.prototype.toString.call(message.equivalenceClassSize) : options.longs === Number ? new $util.LongBits(message.equivalenceClassSize.low >>> 0, message.equivalenceClassSize.high >>> 0).toNumber() : message.equivalenceClassSize; + if (message.numDistinctSensitiveValues != null && message.hasOwnProperty("numDistinctSensitiveValues")) + if (typeof message.numDistinctSensitiveValues === "number") + object.numDistinctSensitiveValues = options.longs === String ? String(message.numDistinctSensitiveValues) : message.numDistinctSensitiveValues; + else + object.numDistinctSensitiveValues = options.longs === String ? $util.Long.prototype.toString.call(message.numDistinctSensitiveValues) : options.longs === Number ? new $util.LongBits(message.numDistinctSensitiveValues.low >>> 0, message.numDistinctSensitiveValues.high >>> 0).toNumber() : message.numDistinctSensitiveValues; + if (message.topSensitiveValues && message.topSensitiveValues.length) { + object.topSensitiveValues = []; + for (var j = 0; j < message.topSensitiveValues.length; ++j) + object.topSensitiveValues[j] = $root.google.privacy.dlp.v2.ValueFrequency.toObject(message.topSensitiveValues[j], options); + } + return object; + }; + + /** + * Converts this LDiversityEquivalenceClass to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass + * @instance + * @returns {Object.} JSON object + */ + LDiversityEquivalenceClass.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LDiversityEquivalenceClass + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LDiversityEquivalenceClass.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass"; + }; + + return LDiversityEquivalenceClass; + })(); + + LDiversityResult.LDiversityHistogramBucket = (function() { + + /** + * Properties of a LDiversityHistogramBucket. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult + * @interface ILDiversityHistogramBucket + * @property {number|Long|null} [sensitiveValueFrequencyLowerBound] LDiversityHistogramBucket sensitiveValueFrequencyLowerBound + * @property {number|Long|null} [sensitiveValueFrequencyUpperBound] LDiversityHistogramBucket sensitiveValueFrequencyUpperBound + * @property {number|Long|null} [bucketSize] LDiversityHistogramBucket bucketSize + * @property {Array.|null} [bucketValues] LDiversityHistogramBucket bucketValues + * @property {number|Long|null} [bucketValueCount] LDiversityHistogramBucket bucketValueCount + */ + + /** + * Constructs a new LDiversityHistogramBucket. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult + * @classdesc Represents a LDiversityHistogramBucket. + * @implements ILDiversityHistogramBucket + * @constructor + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.ILDiversityHistogramBucket=} [properties] Properties to set + */ + function LDiversityHistogramBucket(properties) { + this.bucketValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * LDiversityHistogramBucket sensitiveValueFrequencyLowerBound. + * @member {number|Long} sensitiveValueFrequencyLowerBound + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket + * @instance + */ + LDiversityHistogramBucket.prototype.sensitiveValueFrequencyLowerBound = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * LDiversityHistogramBucket sensitiveValueFrequencyUpperBound. + * @member {number|Long} sensitiveValueFrequencyUpperBound + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket + * @instance + */ + LDiversityHistogramBucket.prototype.sensitiveValueFrequencyUpperBound = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * LDiversityHistogramBucket bucketSize. + * @member {number|Long} bucketSize + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket + * @instance + */ + LDiversityHistogramBucket.prototype.bucketSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * LDiversityHistogramBucket bucketValues. + * @member {Array.} bucketValues + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket + * @instance + */ + LDiversityHistogramBucket.prototype.bucketValues = $util.emptyArray; + + /** + * LDiversityHistogramBucket bucketValueCount. + * @member {number|Long} bucketValueCount + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket + * @instance + */ + LDiversityHistogramBucket.prototype.bucketValueCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new LDiversityHistogramBucket instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.ILDiversityHistogramBucket=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket} LDiversityHistogramBucket instance + */ + LDiversityHistogramBucket.create = function create(properties) { + return new LDiversityHistogramBucket(properties); + }; + + /** + * Encodes the specified LDiversityHistogramBucket message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.ILDiversityHistogramBucket} message LDiversityHistogramBucket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LDiversityHistogramBucket.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.sensitiveValueFrequencyLowerBound != null && Object.hasOwnProperty.call(message, "sensitiveValueFrequencyLowerBound")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.sensitiveValueFrequencyLowerBound); + if (message.sensitiveValueFrequencyUpperBound != null && Object.hasOwnProperty.call(message, "sensitiveValueFrequencyUpperBound")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.sensitiveValueFrequencyUpperBound); + if (message.bucketSize != null && Object.hasOwnProperty.call(message, "bucketSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.bucketSize); + if (message.bucketValues != null && message.bucketValues.length) + for (var i = 0; i < message.bucketValues.length; ++i) + $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.encode(message.bucketValues[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.bucketValueCount != null && Object.hasOwnProperty.call(message, "bucketValueCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.bucketValueCount); + return writer; + }; + + /** + * Encodes the specified LDiversityHistogramBucket message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.ILDiversityHistogramBucket} message LDiversityHistogramBucket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LDiversityHistogramBucket.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LDiversityHistogramBucket message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket} LDiversityHistogramBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LDiversityHistogramBucket.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.sensitiveValueFrequencyLowerBound = reader.int64(); + break; + } + case 2: { + message.sensitiveValueFrequencyUpperBound = reader.int64(); + break; + } + case 3: { + message.bucketSize = reader.int64(); + break; + } + case 4: { + if (!(message.bucketValues && message.bucketValues.length)) + message.bucketValues = []; + message.bucketValues.push($root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 5: { + message.bucketValueCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a LDiversityHistogramBucket message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket} LDiversityHistogramBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LDiversityHistogramBucket.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LDiversityHistogramBucket message. + * @function verify + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LDiversityHistogramBucket.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.sensitiveValueFrequencyLowerBound != null && message.hasOwnProperty("sensitiveValueFrequencyLowerBound")) + if (!$util.isInteger(message.sensitiveValueFrequencyLowerBound) && !(message.sensitiveValueFrequencyLowerBound && $util.isInteger(message.sensitiveValueFrequencyLowerBound.low) && $util.isInteger(message.sensitiveValueFrequencyLowerBound.high))) + return "sensitiveValueFrequencyLowerBound: integer|Long expected"; + if (message.sensitiveValueFrequencyUpperBound != null && message.hasOwnProperty("sensitiveValueFrequencyUpperBound")) + if (!$util.isInteger(message.sensitiveValueFrequencyUpperBound) && !(message.sensitiveValueFrequencyUpperBound && $util.isInteger(message.sensitiveValueFrequencyUpperBound.low) && $util.isInteger(message.sensitiveValueFrequencyUpperBound.high))) + return "sensitiveValueFrequencyUpperBound: integer|Long expected"; + if (message.bucketSize != null && message.hasOwnProperty("bucketSize")) + if (!$util.isInteger(message.bucketSize) && !(message.bucketSize && $util.isInteger(message.bucketSize.low) && $util.isInteger(message.bucketSize.high))) + return "bucketSize: integer|Long expected"; + if (message.bucketValues != null && message.hasOwnProperty("bucketValues")) { + if (!Array.isArray(message.bucketValues)) + return "bucketValues: array expected"; + for (var i = 0; i < message.bucketValues.length; ++i) { + var error = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.verify(message.bucketValues[i], long + 1); + if (error) + return "bucketValues." + error; + } + } + if (message.bucketValueCount != null && message.hasOwnProperty("bucketValueCount")) + if (!$util.isInteger(message.bucketValueCount) && !(message.bucketValueCount && $util.isInteger(message.bucketValueCount.low) && $util.isInteger(message.bucketValueCount.high))) + return "bucketValueCount: integer|Long expected"; + return null; + }; + + /** + * Creates a LDiversityHistogramBucket message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket} LDiversityHistogramBucket + */ + LDiversityHistogramBucket.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket(); + if (object.sensitiveValueFrequencyLowerBound != null) + if ($util.Long) + (message.sensitiveValueFrequencyLowerBound = $util.Long.fromValue(object.sensitiveValueFrequencyLowerBound)).unsigned = false; + else if (typeof object.sensitiveValueFrequencyLowerBound === "string") + message.sensitiveValueFrequencyLowerBound = parseInt(object.sensitiveValueFrequencyLowerBound, 10); + else if (typeof object.sensitiveValueFrequencyLowerBound === "number") + message.sensitiveValueFrequencyLowerBound = object.sensitiveValueFrequencyLowerBound; + else if (typeof object.sensitiveValueFrequencyLowerBound === "object") + message.sensitiveValueFrequencyLowerBound = new $util.LongBits(object.sensitiveValueFrequencyLowerBound.low >>> 0, object.sensitiveValueFrequencyLowerBound.high >>> 0).toNumber(); + if (object.sensitiveValueFrequencyUpperBound != null) + if ($util.Long) + (message.sensitiveValueFrequencyUpperBound = $util.Long.fromValue(object.sensitiveValueFrequencyUpperBound)).unsigned = false; + else if (typeof object.sensitiveValueFrequencyUpperBound === "string") + message.sensitiveValueFrequencyUpperBound = parseInt(object.sensitiveValueFrequencyUpperBound, 10); + else if (typeof object.sensitiveValueFrequencyUpperBound === "number") + message.sensitiveValueFrequencyUpperBound = object.sensitiveValueFrequencyUpperBound; + else if (typeof object.sensitiveValueFrequencyUpperBound === "object") + message.sensitiveValueFrequencyUpperBound = new $util.LongBits(object.sensitiveValueFrequencyUpperBound.low >>> 0, object.sensitiveValueFrequencyUpperBound.high >>> 0).toNumber(); + if (object.bucketSize != null) + if ($util.Long) + (message.bucketSize = $util.Long.fromValue(object.bucketSize)).unsigned = false; + else if (typeof object.bucketSize === "string") + message.bucketSize = parseInt(object.bucketSize, 10); + else if (typeof object.bucketSize === "number") + message.bucketSize = object.bucketSize; + else if (typeof object.bucketSize === "object") + message.bucketSize = new $util.LongBits(object.bucketSize.low >>> 0, object.bucketSize.high >>> 0).toNumber(); + if (object.bucketValues) { + if (!Array.isArray(object.bucketValues)) + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.bucketValues: array expected"); + message.bucketValues = []; + for (var i = 0; i < object.bucketValues.length; ++i) { + if (typeof object.bucketValues[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket.bucketValues: object expected"); + message.bucketValues[i] = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.fromObject(object.bucketValues[i], long + 1); + } + } + if (object.bucketValueCount != null) + if ($util.Long) + (message.bucketValueCount = $util.Long.fromValue(object.bucketValueCount)).unsigned = false; + else if (typeof object.bucketValueCount === "string") + message.bucketValueCount = parseInt(object.bucketValueCount, 10); + else if (typeof object.bucketValueCount === "number") + message.bucketValueCount = object.bucketValueCount; + else if (typeof object.bucketValueCount === "object") + message.bucketValueCount = new $util.LongBits(object.bucketValueCount.low >>> 0, object.bucketValueCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a LDiversityHistogramBucket message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket} message LDiversityHistogramBucket + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LDiversityHistogramBucket.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.bucketValues = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.sensitiveValueFrequencyLowerBound = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sensitiveValueFrequencyLowerBound = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.sensitiveValueFrequencyUpperBound = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.sensitiveValueFrequencyUpperBound = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.bucketSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.bucketSize = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.bucketValueCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.bucketValueCount = options.longs === String ? "0" : 0; + } + if (message.sensitiveValueFrequencyLowerBound != null && message.hasOwnProperty("sensitiveValueFrequencyLowerBound")) + if (typeof message.sensitiveValueFrequencyLowerBound === "number") + object.sensitiveValueFrequencyLowerBound = options.longs === String ? String(message.sensitiveValueFrequencyLowerBound) : message.sensitiveValueFrequencyLowerBound; + else + object.sensitiveValueFrequencyLowerBound = options.longs === String ? $util.Long.prototype.toString.call(message.sensitiveValueFrequencyLowerBound) : options.longs === Number ? new $util.LongBits(message.sensitiveValueFrequencyLowerBound.low >>> 0, message.sensitiveValueFrequencyLowerBound.high >>> 0).toNumber() : message.sensitiveValueFrequencyLowerBound; + if (message.sensitiveValueFrequencyUpperBound != null && message.hasOwnProperty("sensitiveValueFrequencyUpperBound")) + if (typeof message.sensitiveValueFrequencyUpperBound === "number") + object.sensitiveValueFrequencyUpperBound = options.longs === String ? String(message.sensitiveValueFrequencyUpperBound) : message.sensitiveValueFrequencyUpperBound; + else + object.sensitiveValueFrequencyUpperBound = options.longs === String ? $util.Long.prototype.toString.call(message.sensitiveValueFrequencyUpperBound) : options.longs === Number ? new $util.LongBits(message.sensitiveValueFrequencyUpperBound.low >>> 0, message.sensitiveValueFrequencyUpperBound.high >>> 0).toNumber() : message.sensitiveValueFrequencyUpperBound; + if (message.bucketSize != null && message.hasOwnProperty("bucketSize")) + if (typeof message.bucketSize === "number") + object.bucketSize = options.longs === String ? String(message.bucketSize) : message.bucketSize; + else + object.bucketSize = options.longs === String ? $util.Long.prototype.toString.call(message.bucketSize) : options.longs === Number ? new $util.LongBits(message.bucketSize.low >>> 0, message.bucketSize.high >>> 0).toNumber() : message.bucketSize; + if (message.bucketValues && message.bucketValues.length) { + object.bucketValues = []; + for (var j = 0; j < message.bucketValues.length; ++j) + object.bucketValues[j] = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityEquivalenceClass.toObject(message.bucketValues[j], options); + } + if (message.bucketValueCount != null && message.hasOwnProperty("bucketValueCount")) + if (typeof message.bucketValueCount === "number") + object.bucketValueCount = options.longs === String ? String(message.bucketValueCount) : message.bucketValueCount; + else + object.bucketValueCount = options.longs === String ? $util.Long.prototype.toString.call(message.bucketValueCount) : options.longs === Number ? new $util.LongBits(message.bucketValueCount.low >>> 0, message.bucketValueCount.high >>> 0).toNumber() : message.bucketValueCount; + return object; + }; + + /** + * Converts this LDiversityHistogramBucket to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket + * @instance + * @returns {Object.} JSON object + */ + LDiversityHistogramBucket.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LDiversityHistogramBucket + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LDiversityHistogramBucket.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.LDiversityResult.LDiversityHistogramBucket"; + }; + + return LDiversityHistogramBucket; + })(); + + return LDiversityResult; + })(); + + AnalyzeDataSourceRiskDetails.KMapEstimationResult = (function() { + + /** + * Properties of a KMapEstimationResult. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @interface IKMapEstimationResult + * @property {Array.|null} [kMapEstimationHistogram] KMapEstimationResult kMapEstimationHistogram + */ + + /** + * Constructs a new KMapEstimationResult. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @classdesc Represents a KMapEstimationResult. + * @implements IKMapEstimationResult + * @constructor + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IKMapEstimationResult=} [properties] Properties to set + */ + function KMapEstimationResult(properties) { + this.kMapEstimationHistogram = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * KMapEstimationResult kMapEstimationHistogram. + * @member {Array.} kMapEstimationHistogram + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult + * @instance + */ + KMapEstimationResult.prototype.kMapEstimationHistogram = $util.emptyArray; + + /** + * Creates a new KMapEstimationResult instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IKMapEstimationResult=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult} KMapEstimationResult instance + */ + KMapEstimationResult.create = function create(properties) { + return new KMapEstimationResult(properties); + }; + + /** + * Encodes the specified KMapEstimationResult message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IKMapEstimationResult} message KMapEstimationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KMapEstimationResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kMapEstimationHistogram != null && message.kMapEstimationHistogram.length) + for (var i = 0; i < message.kMapEstimationHistogram.length; ++i) + $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.encode(message.kMapEstimationHistogram[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified KMapEstimationResult message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IKMapEstimationResult} message KMapEstimationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KMapEstimationResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KMapEstimationResult message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult} KMapEstimationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KMapEstimationResult.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.kMapEstimationHistogram && message.kMapEstimationHistogram.length)) + message.kMapEstimationHistogram = []; + message.kMapEstimationHistogram.push($root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a KMapEstimationResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult} KMapEstimationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KMapEstimationResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KMapEstimationResult message. + * @function verify + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KMapEstimationResult.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.kMapEstimationHistogram != null && message.hasOwnProperty("kMapEstimationHistogram")) { + if (!Array.isArray(message.kMapEstimationHistogram)) + return "kMapEstimationHistogram: array expected"; + for (var i = 0; i < message.kMapEstimationHistogram.length; ++i) { + var error = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.verify(message.kMapEstimationHistogram[i], long + 1); + if (error) + return "kMapEstimationHistogram." + error; + } + } + return null; + }; + + /** + * Creates a KMapEstimationResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult} KMapEstimationResult + */ + KMapEstimationResult.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult(); + if (object.kMapEstimationHistogram) { + if (!Array.isArray(object.kMapEstimationHistogram)) + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.kMapEstimationHistogram: array expected"); + message.kMapEstimationHistogram = []; + for (var i = 0; i < object.kMapEstimationHistogram.length; ++i) { + if (typeof object.kMapEstimationHistogram[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.kMapEstimationHistogram: object expected"); + message.kMapEstimationHistogram[i] = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.fromObject(object.kMapEstimationHistogram[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a KMapEstimationResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult} message KMapEstimationResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KMapEstimationResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.kMapEstimationHistogram = []; + if (message.kMapEstimationHistogram && message.kMapEstimationHistogram.length) { + object.kMapEstimationHistogram = []; + for (var j = 0; j < message.kMapEstimationHistogram.length; ++j) + object.kMapEstimationHistogram[j] = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.toObject(message.kMapEstimationHistogram[j], options); + } + return object; + }; + + /** + * Converts this KMapEstimationResult to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult + * @instance + * @returns {Object.} JSON object + */ + KMapEstimationResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for KMapEstimationResult + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KMapEstimationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult"; + }; + + KMapEstimationResult.KMapEstimationQuasiIdValues = (function() { + + /** + * Properties of a KMapEstimationQuasiIdValues. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult + * @interface IKMapEstimationQuasiIdValues + * @property {Array.|null} [quasiIdsValues] KMapEstimationQuasiIdValues quasiIdsValues + * @property {number|Long|null} [estimatedAnonymity] KMapEstimationQuasiIdValues estimatedAnonymity + */ + + /** + * Constructs a new KMapEstimationQuasiIdValues. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult + * @classdesc Represents a KMapEstimationQuasiIdValues. + * @implements IKMapEstimationQuasiIdValues + * @constructor + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.IKMapEstimationQuasiIdValues=} [properties] Properties to set + */ + function KMapEstimationQuasiIdValues(properties) { + this.quasiIdsValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * KMapEstimationQuasiIdValues quasiIdsValues. + * @member {Array.} quasiIdsValues + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues + * @instance + */ + KMapEstimationQuasiIdValues.prototype.quasiIdsValues = $util.emptyArray; + + /** + * KMapEstimationQuasiIdValues estimatedAnonymity. + * @member {number|Long} estimatedAnonymity + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues + * @instance + */ + KMapEstimationQuasiIdValues.prototype.estimatedAnonymity = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new KMapEstimationQuasiIdValues instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.IKMapEstimationQuasiIdValues=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues} KMapEstimationQuasiIdValues instance + */ + KMapEstimationQuasiIdValues.create = function create(properties) { + return new KMapEstimationQuasiIdValues(properties); + }; + + /** + * Encodes the specified KMapEstimationQuasiIdValues message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.IKMapEstimationQuasiIdValues} message KMapEstimationQuasiIdValues message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KMapEstimationQuasiIdValues.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.quasiIdsValues != null && message.quasiIdsValues.length) + for (var i = 0; i < message.quasiIdsValues.length; ++i) + $root.google.privacy.dlp.v2.Value.encode(message.quasiIdsValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.estimatedAnonymity != null && Object.hasOwnProperty.call(message, "estimatedAnonymity")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.estimatedAnonymity); + return writer; + }; + + /** + * Encodes the specified KMapEstimationQuasiIdValues message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.IKMapEstimationQuasiIdValues} message KMapEstimationQuasiIdValues message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KMapEstimationQuasiIdValues.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KMapEstimationQuasiIdValues message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues} KMapEstimationQuasiIdValues + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KMapEstimationQuasiIdValues.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.quasiIdsValues && message.quasiIdsValues.length)) + message.quasiIdsValues = []; + message.quasiIdsValues.push($root.google.privacy.dlp.v2.Value.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.estimatedAnonymity = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a KMapEstimationQuasiIdValues message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues} KMapEstimationQuasiIdValues + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KMapEstimationQuasiIdValues.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KMapEstimationQuasiIdValues message. + * @function verify + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KMapEstimationQuasiIdValues.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.quasiIdsValues != null && message.hasOwnProperty("quasiIdsValues")) { + if (!Array.isArray(message.quasiIdsValues)) + return "quasiIdsValues: array expected"; + for (var i = 0; i < message.quasiIdsValues.length; ++i) { + var error = $root.google.privacy.dlp.v2.Value.verify(message.quasiIdsValues[i], long + 1); + if (error) + return "quasiIdsValues." + error; + } + } + if (message.estimatedAnonymity != null && message.hasOwnProperty("estimatedAnonymity")) + if (!$util.isInteger(message.estimatedAnonymity) && !(message.estimatedAnonymity && $util.isInteger(message.estimatedAnonymity.low) && $util.isInteger(message.estimatedAnonymity.high))) + return "estimatedAnonymity: integer|Long expected"; + return null; + }; + + /** + * Creates a KMapEstimationQuasiIdValues message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues} KMapEstimationQuasiIdValues + */ + KMapEstimationQuasiIdValues.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues(); + if (object.quasiIdsValues) { + if (!Array.isArray(object.quasiIdsValues)) + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.quasiIdsValues: array expected"); + message.quasiIdsValues = []; + for (var i = 0; i < object.quasiIdsValues.length; ++i) { + if (typeof object.quasiIdsValues[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.quasiIdsValues: object expected"); + message.quasiIdsValues[i] = $root.google.privacy.dlp.v2.Value.fromObject(object.quasiIdsValues[i], long + 1); + } + } + if (object.estimatedAnonymity != null) + if ($util.Long) + (message.estimatedAnonymity = $util.Long.fromValue(object.estimatedAnonymity)).unsigned = false; + else if (typeof object.estimatedAnonymity === "string") + message.estimatedAnonymity = parseInt(object.estimatedAnonymity, 10); + else if (typeof object.estimatedAnonymity === "number") + message.estimatedAnonymity = object.estimatedAnonymity; + else if (typeof object.estimatedAnonymity === "object") + message.estimatedAnonymity = new $util.LongBits(object.estimatedAnonymity.low >>> 0, object.estimatedAnonymity.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a KMapEstimationQuasiIdValues message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues} message KMapEstimationQuasiIdValues + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KMapEstimationQuasiIdValues.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.quasiIdsValues = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.estimatedAnonymity = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.estimatedAnonymity = options.longs === String ? "0" : 0; + if (message.quasiIdsValues && message.quasiIdsValues.length) { + object.quasiIdsValues = []; + for (var j = 0; j < message.quasiIdsValues.length; ++j) + object.quasiIdsValues[j] = $root.google.privacy.dlp.v2.Value.toObject(message.quasiIdsValues[j], options); + } + if (message.estimatedAnonymity != null && message.hasOwnProperty("estimatedAnonymity")) + if (typeof message.estimatedAnonymity === "number") + object.estimatedAnonymity = options.longs === String ? String(message.estimatedAnonymity) : message.estimatedAnonymity; + else + object.estimatedAnonymity = options.longs === String ? $util.Long.prototype.toString.call(message.estimatedAnonymity) : options.longs === Number ? new $util.LongBits(message.estimatedAnonymity.low >>> 0, message.estimatedAnonymity.high >>> 0).toNumber() : message.estimatedAnonymity; + return object; + }; + + /** + * Converts this KMapEstimationQuasiIdValues to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues + * @instance + * @returns {Object.} JSON object + */ + KMapEstimationQuasiIdValues.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for KMapEstimationQuasiIdValues + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KMapEstimationQuasiIdValues.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues"; + }; + + return KMapEstimationQuasiIdValues; + })(); + + KMapEstimationResult.KMapEstimationHistogramBucket = (function() { + + /** + * Properties of a KMapEstimationHistogramBucket. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult + * @interface IKMapEstimationHistogramBucket + * @property {number|Long|null} [minAnonymity] KMapEstimationHistogramBucket minAnonymity + * @property {number|Long|null} [maxAnonymity] KMapEstimationHistogramBucket maxAnonymity + * @property {number|Long|null} [bucketSize] KMapEstimationHistogramBucket bucketSize + * @property {Array.|null} [bucketValues] KMapEstimationHistogramBucket bucketValues + * @property {number|Long|null} [bucketValueCount] KMapEstimationHistogramBucket bucketValueCount + */ + + /** + * Constructs a new KMapEstimationHistogramBucket. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult + * @classdesc Represents a KMapEstimationHistogramBucket. + * @implements IKMapEstimationHistogramBucket + * @constructor + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.IKMapEstimationHistogramBucket=} [properties] Properties to set + */ + function KMapEstimationHistogramBucket(properties) { + this.bucketValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * KMapEstimationHistogramBucket minAnonymity. + * @member {number|Long} minAnonymity + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket + * @instance + */ + KMapEstimationHistogramBucket.prototype.minAnonymity = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * KMapEstimationHistogramBucket maxAnonymity. + * @member {number|Long} maxAnonymity + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket + * @instance + */ + KMapEstimationHistogramBucket.prototype.maxAnonymity = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * KMapEstimationHistogramBucket bucketSize. + * @member {number|Long} bucketSize + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket + * @instance + */ + KMapEstimationHistogramBucket.prototype.bucketSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * KMapEstimationHistogramBucket bucketValues. + * @member {Array.} bucketValues + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket + * @instance + */ + KMapEstimationHistogramBucket.prototype.bucketValues = $util.emptyArray; + + /** + * KMapEstimationHistogramBucket bucketValueCount. + * @member {number|Long} bucketValueCount + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket + * @instance + */ + KMapEstimationHistogramBucket.prototype.bucketValueCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new KMapEstimationHistogramBucket instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.IKMapEstimationHistogramBucket=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket} KMapEstimationHistogramBucket instance + */ + KMapEstimationHistogramBucket.create = function create(properties) { + return new KMapEstimationHistogramBucket(properties); + }; + + /** + * Encodes the specified KMapEstimationHistogramBucket message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.IKMapEstimationHistogramBucket} message KMapEstimationHistogramBucket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KMapEstimationHistogramBucket.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minAnonymity != null && Object.hasOwnProperty.call(message, "minAnonymity")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.minAnonymity); + if (message.maxAnonymity != null && Object.hasOwnProperty.call(message, "maxAnonymity")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.maxAnonymity); + if (message.bucketSize != null && Object.hasOwnProperty.call(message, "bucketSize")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.bucketSize); + if (message.bucketValues != null && message.bucketValues.length) + for (var i = 0; i < message.bucketValues.length; ++i) + $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.encode(message.bucketValues[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.bucketValueCount != null && Object.hasOwnProperty.call(message, "bucketValueCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.bucketValueCount); + return writer; + }; + + /** + * Encodes the specified KMapEstimationHistogramBucket message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.IKMapEstimationHistogramBucket} message KMapEstimationHistogramBucket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KMapEstimationHistogramBucket.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KMapEstimationHistogramBucket message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket} KMapEstimationHistogramBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KMapEstimationHistogramBucket.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.minAnonymity = reader.int64(); + break; + } + case 2: { + message.maxAnonymity = reader.int64(); + break; + } + case 5: { + message.bucketSize = reader.int64(); + break; + } + case 6: { + if (!(message.bucketValues && message.bucketValues.length)) + message.bucketValues = []; + message.bucketValues.push($root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 7: { + message.bucketValueCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a KMapEstimationHistogramBucket message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket} KMapEstimationHistogramBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KMapEstimationHistogramBucket.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KMapEstimationHistogramBucket message. + * @function verify + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KMapEstimationHistogramBucket.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.minAnonymity != null && message.hasOwnProperty("minAnonymity")) + if (!$util.isInteger(message.minAnonymity) && !(message.minAnonymity && $util.isInteger(message.minAnonymity.low) && $util.isInteger(message.minAnonymity.high))) + return "minAnonymity: integer|Long expected"; + if (message.maxAnonymity != null && message.hasOwnProperty("maxAnonymity")) + if (!$util.isInteger(message.maxAnonymity) && !(message.maxAnonymity && $util.isInteger(message.maxAnonymity.low) && $util.isInteger(message.maxAnonymity.high))) + return "maxAnonymity: integer|Long expected"; + if (message.bucketSize != null && message.hasOwnProperty("bucketSize")) + if (!$util.isInteger(message.bucketSize) && !(message.bucketSize && $util.isInteger(message.bucketSize.low) && $util.isInteger(message.bucketSize.high))) + return "bucketSize: integer|Long expected"; + if (message.bucketValues != null && message.hasOwnProperty("bucketValues")) { + if (!Array.isArray(message.bucketValues)) + return "bucketValues: array expected"; + for (var i = 0; i < message.bucketValues.length; ++i) { + var error = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.verify(message.bucketValues[i], long + 1); + if (error) + return "bucketValues." + error; + } + } + if (message.bucketValueCount != null && message.hasOwnProperty("bucketValueCount")) + if (!$util.isInteger(message.bucketValueCount) && !(message.bucketValueCount && $util.isInteger(message.bucketValueCount.low) && $util.isInteger(message.bucketValueCount.high))) + return "bucketValueCount: integer|Long expected"; + return null; + }; + + /** + * Creates a KMapEstimationHistogramBucket message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket} KMapEstimationHistogramBucket + */ + KMapEstimationHistogramBucket.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket(); + if (object.minAnonymity != null) + if ($util.Long) + (message.minAnonymity = $util.Long.fromValue(object.minAnonymity)).unsigned = false; + else if (typeof object.minAnonymity === "string") + message.minAnonymity = parseInt(object.minAnonymity, 10); + else if (typeof object.minAnonymity === "number") + message.minAnonymity = object.minAnonymity; + else if (typeof object.minAnonymity === "object") + message.minAnonymity = new $util.LongBits(object.minAnonymity.low >>> 0, object.minAnonymity.high >>> 0).toNumber(); + if (object.maxAnonymity != null) + if ($util.Long) + (message.maxAnonymity = $util.Long.fromValue(object.maxAnonymity)).unsigned = false; + else if (typeof object.maxAnonymity === "string") + message.maxAnonymity = parseInt(object.maxAnonymity, 10); + else if (typeof object.maxAnonymity === "number") + message.maxAnonymity = object.maxAnonymity; + else if (typeof object.maxAnonymity === "object") + message.maxAnonymity = new $util.LongBits(object.maxAnonymity.low >>> 0, object.maxAnonymity.high >>> 0).toNumber(); + if (object.bucketSize != null) + if ($util.Long) + (message.bucketSize = $util.Long.fromValue(object.bucketSize)).unsigned = false; + else if (typeof object.bucketSize === "string") + message.bucketSize = parseInt(object.bucketSize, 10); + else if (typeof object.bucketSize === "number") + message.bucketSize = object.bucketSize; + else if (typeof object.bucketSize === "object") + message.bucketSize = new $util.LongBits(object.bucketSize.low >>> 0, object.bucketSize.high >>> 0).toNumber(); + if (object.bucketValues) { + if (!Array.isArray(object.bucketValues)) + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.bucketValues: array expected"); + message.bucketValues = []; + for (var i = 0; i < object.bucketValues.length; ++i) { + if (typeof object.bucketValues[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket.bucketValues: object expected"); + message.bucketValues[i] = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.fromObject(object.bucketValues[i], long + 1); + } + } + if (object.bucketValueCount != null) + if ($util.Long) + (message.bucketValueCount = $util.Long.fromValue(object.bucketValueCount)).unsigned = false; + else if (typeof object.bucketValueCount === "string") + message.bucketValueCount = parseInt(object.bucketValueCount, 10); + else if (typeof object.bucketValueCount === "number") + message.bucketValueCount = object.bucketValueCount; + else if (typeof object.bucketValueCount === "object") + message.bucketValueCount = new $util.LongBits(object.bucketValueCount.low >>> 0, object.bucketValueCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a KMapEstimationHistogramBucket message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket} message KMapEstimationHistogramBucket + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KMapEstimationHistogramBucket.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.bucketValues = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.minAnonymity = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.minAnonymity = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.maxAnonymity = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.maxAnonymity = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.bucketSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.bucketSize = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.bucketValueCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.bucketValueCount = options.longs === String ? "0" : 0; + } + if (message.minAnonymity != null && message.hasOwnProperty("minAnonymity")) + if (typeof message.minAnonymity === "number") + object.minAnonymity = options.longs === String ? String(message.minAnonymity) : message.minAnonymity; + else + object.minAnonymity = options.longs === String ? $util.Long.prototype.toString.call(message.minAnonymity) : options.longs === Number ? new $util.LongBits(message.minAnonymity.low >>> 0, message.minAnonymity.high >>> 0).toNumber() : message.minAnonymity; + if (message.maxAnonymity != null && message.hasOwnProperty("maxAnonymity")) + if (typeof message.maxAnonymity === "number") + object.maxAnonymity = options.longs === String ? String(message.maxAnonymity) : message.maxAnonymity; + else + object.maxAnonymity = options.longs === String ? $util.Long.prototype.toString.call(message.maxAnonymity) : options.longs === Number ? new $util.LongBits(message.maxAnonymity.low >>> 0, message.maxAnonymity.high >>> 0).toNumber() : message.maxAnonymity; + if (message.bucketSize != null && message.hasOwnProperty("bucketSize")) + if (typeof message.bucketSize === "number") + object.bucketSize = options.longs === String ? String(message.bucketSize) : message.bucketSize; + else + object.bucketSize = options.longs === String ? $util.Long.prototype.toString.call(message.bucketSize) : options.longs === Number ? new $util.LongBits(message.bucketSize.low >>> 0, message.bucketSize.high >>> 0).toNumber() : message.bucketSize; + if (message.bucketValues && message.bucketValues.length) { + object.bucketValues = []; + for (var j = 0; j < message.bucketValues.length; ++j) + object.bucketValues[j] = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationQuasiIdValues.toObject(message.bucketValues[j], options); + } + if (message.bucketValueCount != null && message.hasOwnProperty("bucketValueCount")) + if (typeof message.bucketValueCount === "number") + object.bucketValueCount = options.longs === String ? String(message.bucketValueCount) : message.bucketValueCount; + else + object.bucketValueCount = options.longs === String ? $util.Long.prototype.toString.call(message.bucketValueCount) : options.longs === Number ? new $util.LongBits(message.bucketValueCount.low >>> 0, message.bucketValueCount.high >>> 0).toNumber() : message.bucketValueCount; + return object; + }; + + /** + * Converts this KMapEstimationHistogramBucket to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket + * @instance + * @returns {Object.} JSON object + */ + KMapEstimationHistogramBucket.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for KMapEstimationHistogramBucket + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KMapEstimationHistogramBucket.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.KMapEstimationResult.KMapEstimationHistogramBucket"; + }; + + return KMapEstimationHistogramBucket; + })(); + + return KMapEstimationResult; + })(); + + AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult = (function() { + + /** + * Properties of a DeltaPresenceEstimationResult. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @interface IDeltaPresenceEstimationResult + * @property {Array.|null} [deltaPresenceEstimationHistogram] DeltaPresenceEstimationResult deltaPresenceEstimationHistogram + */ + + /** + * Constructs a new DeltaPresenceEstimationResult. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @classdesc Represents a DeltaPresenceEstimationResult. + * @implements IDeltaPresenceEstimationResult + * @constructor + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IDeltaPresenceEstimationResult=} [properties] Properties to set + */ + function DeltaPresenceEstimationResult(properties) { + this.deltaPresenceEstimationHistogram = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeltaPresenceEstimationResult deltaPresenceEstimationHistogram. + * @member {Array.} deltaPresenceEstimationHistogram + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult + * @instance + */ + DeltaPresenceEstimationResult.prototype.deltaPresenceEstimationHistogram = $util.emptyArray; + + /** + * Creates a new DeltaPresenceEstimationResult instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IDeltaPresenceEstimationResult=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult} DeltaPresenceEstimationResult instance + */ + DeltaPresenceEstimationResult.create = function create(properties) { + return new DeltaPresenceEstimationResult(properties); + }; + + /** + * Encodes the specified DeltaPresenceEstimationResult message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IDeltaPresenceEstimationResult} message DeltaPresenceEstimationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeltaPresenceEstimationResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deltaPresenceEstimationHistogram != null && message.deltaPresenceEstimationHistogram.length) + for (var i = 0; i < message.deltaPresenceEstimationHistogram.length; ++i) + $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.encode(message.deltaPresenceEstimationHistogram[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeltaPresenceEstimationResult message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IDeltaPresenceEstimationResult} message DeltaPresenceEstimationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeltaPresenceEstimationResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeltaPresenceEstimationResult message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult} DeltaPresenceEstimationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeltaPresenceEstimationResult.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.deltaPresenceEstimationHistogram && message.deltaPresenceEstimationHistogram.length)) + message.deltaPresenceEstimationHistogram = []; + message.deltaPresenceEstimationHistogram.push($root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeltaPresenceEstimationResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult} DeltaPresenceEstimationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeltaPresenceEstimationResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeltaPresenceEstimationResult message. + * @function verify + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeltaPresenceEstimationResult.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.deltaPresenceEstimationHistogram != null && message.hasOwnProperty("deltaPresenceEstimationHistogram")) { + if (!Array.isArray(message.deltaPresenceEstimationHistogram)) + return "deltaPresenceEstimationHistogram: array expected"; + for (var i = 0; i < message.deltaPresenceEstimationHistogram.length; ++i) { + var error = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.verify(message.deltaPresenceEstimationHistogram[i], long + 1); + if (error) + return "deltaPresenceEstimationHistogram." + error; + } + } + return null; + }; + + /** + * Creates a DeltaPresenceEstimationResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult} DeltaPresenceEstimationResult + */ + DeltaPresenceEstimationResult.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult(); + if (object.deltaPresenceEstimationHistogram) { + if (!Array.isArray(object.deltaPresenceEstimationHistogram)) + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.deltaPresenceEstimationHistogram: array expected"); + message.deltaPresenceEstimationHistogram = []; + for (var i = 0; i < object.deltaPresenceEstimationHistogram.length; ++i) { + if (typeof object.deltaPresenceEstimationHistogram[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.deltaPresenceEstimationHistogram: object expected"); + message.deltaPresenceEstimationHistogram[i] = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.fromObject(object.deltaPresenceEstimationHistogram[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a DeltaPresenceEstimationResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult} message DeltaPresenceEstimationResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeltaPresenceEstimationResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.deltaPresenceEstimationHistogram = []; + if (message.deltaPresenceEstimationHistogram && message.deltaPresenceEstimationHistogram.length) { + object.deltaPresenceEstimationHistogram = []; + for (var j = 0; j < message.deltaPresenceEstimationHistogram.length; ++j) + object.deltaPresenceEstimationHistogram[j] = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.toObject(message.deltaPresenceEstimationHistogram[j], options); + } + return object; + }; + + /** + * Converts this DeltaPresenceEstimationResult to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult + * @instance + * @returns {Object.} JSON object + */ + DeltaPresenceEstimationResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeltaPresenceEstimationResult + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeltaPresenceEstimationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult"; + }; + + DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues = (function() { + + /** + * Properties of a DeltaPresenceEstimationQuasiIdValues. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult + * @interface IDeltaPresenceEstimationQuasiIdValues + * @property {Array.|null} [quasiIdsValues] DeltaPresenceEstimationQuasiIdValues quasiIdsValues + * @property {number|null} [estimatedProbability] DeltaPresenceEstimationQuasiIdValues estimatedProbability + */ + + /** + * Constructs a new DeltaPresenceEstimationQuasiIdValues. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult + * @classdesc Represents a DeltaPresenceEstimationQuasiIdValues. + * @implements IDeltaPresenceEstimationQuasiIdValues + * @constructor + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.IDeltaPresenceEstimationQuasiIdValues=} [properties] Properties to set + */ + function DeltaPresenceEstimationQuasiIdValues(properties) { + this.quasiIdsValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeltaPresenceEstimationQuasiIdValues quasiIdsValues. + * @member {Array.} quasiIdsValues + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues + * @instance + */ + DeltaPresenceEstimationQuasiIdValues.prototype.quasiIdsValues = $util.emptyArray; + + /** + * DeltaPresenceEstimationQuasiIdValues estimatedProbability. + * @member {number} estimatedProbability + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues + * @instance + */ + DeltaPresenceEstimationQuasiIdValues.prototype.estimatedProbability = 0; + + /** + * Creates a new DeltaPresenceEstimationQuasiIdValues instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.IDeltaPresenceEstimationQuasiIdValues=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues} DeltaPresenceEstimationQuasiIdValues instance + */ + DeltaPresenceEstimationQuasiIdValues.create = function create(properties) { + return new DeltaPresenceEstimationQuasiIdValues(properties); + }; + + /** + * Encodes the specified DeltaPresenceEstimationQuasiIdValues message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.IDeltaPresenceEstimationQuasiIdValues} message DeltaPresenceEstimationQuasiIdValues message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeltaPresenceEstimationQuasiIdValues.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.quasiIdsValues != null && message.quasiIdsValues.length) + for (var i = 0; i < message.quasiIdsValues.length; ++i) + $root.google.privacy.dlp.v2.Value.encode(message.quasiIdsValues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.estimatedProbability != null && Object.hasOwnProperty.call(message, "estimatedProbability")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.estimatedProbability); + return writer; + }; + + /** + * Encodes the specified DeltaPresenceEstimationQuasiIdValues message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.IDeltaPresenceEstimationQuasiIdValues} message DeltaPresenceEstimationQuasiIdValues message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeltaPresenceEstimationQuasiIdValues.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeltaPresenceEstimationQuasiIdValues message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues} DeltaPresenceEstimationQuasiIdValues + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeltaPresenceEstimationQuasiIdValues.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.quasiIdsValues && message.quasiIdsValues.length)) + message.quasiIdsValues = []; + message.quasiIdsValues.push($root.google.privacy.dlp.v2.Value.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.estimatedProbability = reader.double(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeltaPresenceEstimationQuasiIdValues message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues} DeltaPresenceEstimationQuasiIdValues + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeltaPresenceEstimationQuasiIdValues.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeltaPresenceEstimationQuasiIdValues message. + * @function verify + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeltaPresenceEstimationQuasiIdValues.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.quasiIdsValues != null && message.hasOwnProperty("quasiIdsValues")) { + if (!Array.isArray(message.quasiIdsValues)) + return "quasiIdsValues: array expected"; + for (var i = 0; i < message.quasiIdsValues.length; ++i) { + var error = $root.google.privacy.dlp.v2.Value.verify(message.quasiIdsValues[i], long + 1); + if (error) + return "quasiIdsValues." + error; + } + } + if (message.estimatedProbability != null && message.hasOwnProperty("estimatedProbability")) + if (typeof message.estimatedProbability !== "number") + return "estimatedProbability: number expected"; + return null; + }; + + /** + * Creates a DeltaPresenceEstimationQuasiIdValues message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues} DeltaPresenceEstimationQuasiIdValues + */ + DeltaPresenceEstimationQuasiIdValues.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues(); + if (object.quasiIdsValues) { + if (!Array.isArray(object.quasiIdsValues)) + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.quasiIdsValues: array expected"); + message.quasiIdsValues = []; + for (var i = 0; i < object.quasiIdsValues.length; ++i) { + if (typeof object.quasiIdsValues[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.quasiIdsValues: object expected"); + message.quasiIdsValues[i] = $root.google.privacy.dlp.v2.Value.fromObject(object.quasiIdsValues[i], long + 1); + } + } + if (object.estimatedProbability != null) + message.estimatedProbability = Number(object.estimatedProbability); + return message; + }; + + /** + * Creates a plain object from a DeltaPresenceEstimationQuasiIdValues message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues} message DeltaPresenceEstimationQuasiIdValues + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeltaPresenceEstimationQuasiIdValues.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.quasiIdsValues = []; + if (options.defaults) + object.estimatedProbability = 0; + if (message.quasiIdsValues && message.quasiIdsValues.length) { + object.quasiIdsValues = []; + for (var j = 0; j < message.quasiIdsValues.length; ++j) + object.quasiIdsValues[j] = $root.google.privacy.dlp.v2.Value.toObject(message.quasiIdsValues[j], options); + } + if (message.estimatedProbability != null && message.hasOwnProperty("estimatedProbability")) + object.estimatedProbability = options.json && !isFinite(message.estimatedProbability) ? String(message.estimatedProbability) : message.estimatedProbability; + return object; + }; + + /** + * Converts this DeltaPresenceEstimationQuasiIdValues to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues + * @instance + * @returns {Object.} JSON object + */ + DeltaPresenceEstimationQuasiIdValues.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeltaPresenceEstimationQuasiIdValues + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeltaPresenceEstimationQuasiIdValues.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues"; + }; + + return DeltaPresenceEstimationQuasiIdValues; + })(); + + DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket = (function() { + + /** + * Properties of a DeltaPresenceEstimationHistogramBucket. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult + * @interface IDeltaPresenceEstimationHistogramBucket + * @property {number|null} [minProbability] DeltaPresenceEstimationHistogramBucket minProbability + * @property {number|null} [maxProbability] DeltaPresenceEstimationHistogramBucket maxProbability + * @property {number|Long|null} [bucketSize] DeltaPresenceEstimationHistogramBucket bucketSize + * @property {Array.|null} [bucketValues] DeltaPresenceEstimationHistogramBucket bucketValues + * @property {number|Long|null} [bucketValueCount] DeltaPresenceEstimationHistogramBucket bucketValueCount + */ + + /** + * Constructs a new DeltaPresenceEstimationHistogramBucket. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult + * @classdesc Represents a DeltaPresenceEstimationHistogramBucket. + * @implements IDeltaPresenceEstimationHistogramBucket + * @constructor + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.IDeltaPresenceEstimationHistogramBucket=} [properties] Properties to set + */ + function DeltaPresenceEstimationHistogramBucket(properties) { + this.bucketValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeltaPresenceEstimationHistogramBucket minProbability. + * @member {number} minProbability + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket + * @instance + */ + DeltaPresenceEstimationHistogramBucket.prototype.minProbability = 0; + + /** + * DeltaPresenceEstimationHistogramBucket maxProbability. + * @member {number} maxProbability + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket + * @instance + */ + DeltaPresenceEstimationHistogramBucket.prototype.maxProbability = 0; + + /** + * DeltaPresenceEstimationHistogramBucket bucketSize. + * @member {number|Long} bucketSize + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket + * @instance + */ + DeltaPresenceEstimationHistogramBucket.prototype.bucketSize = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * DeltaPresenceEstimationHistogramBucket bucketValues. + * @member {Array.} bucketValues + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket + * @instance + */ + DeltaPresenceEstimationHistogramBucket.prototype.bucketValues = $util.emptyArray; + + /** + * DeltaPresenceEstimationHistogramBucket bucketValueCount. + * @member {number|Long} bucketValueCount + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket + * @instance + */ + DeltaPresenceEstimationHistogramBucket.prototype.bucketValueCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new DeltaPresenceEstimationHistogramBucket instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.IDeltaPresenceEstimationHistogramBucket=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket} DeltaPresenceEstimationHistogramBucket instance + */ + DeltaPresenceEstimationHistogramBucket.create = function create(properties) { + return new DeltaPresenceEstimationHistogramBucket(properties); + }; + + /** + * Encodes the specified DeltaPresenceEstimationHistogramBucket message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.IDeltaPresenceEstimationHistogramBucket} message DeltaPresenceEstimationHistogramBucket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeltaPresenceEstimationHistogramBucket.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minProbability != null && Object.hasOwnProperty.call(message, "minProbability")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.minProbability); + if (message.maxProbability != null && Object.hasOwnProperty.call(message, "maxProbability")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.maxProbability); + if (message.bucketSize != null && Object.hasOwnProperty.call(message, "bucketSize")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.bucketSize); + if (message.bucketValues != null && message.bucketValues.length) + for (var i = 0; i < message.bucketValues.length; ++i) + $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.encode(message.bucketValues[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.bucketValueCount != null && Object.hasOwnProperty.call(message, "bucketValueCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.bucketValueCount); + return writer; + }; + + /** + * Encodes the specified DeltaPresenceEstimationHistogramBucket message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.IDeltaPresenceEstimationHistogramBucket} message DeltaPresenceEstimationHistogramBucket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeltaPresenceEstimationHistogramBucket.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeltaPresenceEstimationHistogramBucket message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket} DeltaPresenceEstimationHistogramBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeltaPresenceEstimationHistogramBucket.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.minProbability = reader.double(); + break; + } + case 2: { + message.maxProbability = reader.double(); + break; + } + case 5: { + message.bucketSize = reader.int64(); + break; + } + case 6: { + if (!(message.bucketValues && message.bucketValues.length)) + message.bucketValues = []; + message.bucketValues.push($root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 7: { + message.bucketValueCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeltaPresenceEstimationHistogramBucket message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket} DeltaPresenceEstimationHistogramBucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeltaPresenceEstimationHistogramBucket.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeltaPresenceEstimationHistogramBucket message. + * @function verify + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeltaPresenceEstimationHistogramBucket.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.minProbability != null && message.hasOwnProperty("minProbability")) + if (typeof message.minProbability !== "number") + return "minProbability: number expected"; + if (message.maxProbability != null && message.hasOwnProperty("maxProbability")) + if (typeof message.maxProbability !== "number") + return "maxProbability: number expected"; + if (message.bucketSize != null && message.hasOwnProperty("bucketSize")) + if (!$util.isInteger(message.bucketSize) && !(message.bucketSize && $util.isInteger(message.bucketSize.low) && $util.isInteger(message.bucketSize.high))) + return "bucketSize: integer|Long expected"; + if (message.bucketValues != null && message.hasOwnProperty("bucketValues")) { + if (!Array.isArray(message.bucketValues)) + return "bucketValues: array expected"; + for (var i = 0; i < message.bucketValues.length; ++i) { + var error = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.verify(message.bucketValues[i], long + 1); + if (error) + return "bucketValues." + error; + } + } + if (message.bucketValueCount != null && message.hasOwnProperty("bucketValueCount")) + if (!$util.isInteger(message.bucketValueCount) && !(message.bucketValueCount && $util.isInteger(message.bucketValueCount.low) && $util.isInteger(message.bucketValueCount.high))) + return "bucketValueCount: integer|Long expected"; + return null; + }; + + /** + * Creates a DeltaPresenceEstimationHistogramBucket message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket} DeltaPresenceEstimationHistogramBucket + */ + DeltaPresenceEstimationHistogramBucket.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket(); + if (object.minProbability != null) + message.minProbability = Number(object.minProbability); + if (object.maxProbability != null) + message.maxProbability = Number(object.maxProbability); + if (object.bucketSize != null) + if ($util.Long) + (message.bucketSize = $util.Long.fromValue(object.bucketSize)).unsigned = false; + else if (typeof object.bucketSize === "string") + message.bucketSize = parseInt(object.bucketSize, 10); + else if (typeof object.bucketSize === "number") + message.bucketSize = object.bucketSize; + else if (typeof object.bucketSize === "object") + message.bucketSize = new $util.LongBits(object.bucketSize.low >>> 0, object.bucketSize.high >>> 0).toNumber(); + if (object.bucketValues) { + if (!Array.isArray(object.bucketValues)) + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.bucketValues: array expected"); + message.bucketValues = []; + for (var i = 0; i < object.bucketValues.length; ++i) { + if (typeof object.bucketValues[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket.bucketValues: object expected"); + message.bucketValues[i] = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.fromObject(object.bucketValues[i], long + 1); + } + } + if (object.bucketValueCount != null) + if ($util.Long) + (message.bucketValueCount = $util.Long.fromValue(object.bucketValueCount)).unsigned = false; + else if (typeof object.bucketValueCount === "string") + message.bucketValueCount = parseInt(object.bucketValueCount, 10); + else if (typeof object.bucketValueCount === "number") + message.bucketValueCount = object.bucketValueCount; + else if (typeof object.bucketValueCount === "object") + message.bucketValueCount = new $util.LongBits(object.bucketValueCount.low >>> 0, object.bucketValueCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a DeltaPresenceEstimationHistogramBucket message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket} message DeltaPresenceEstimationHistogramBucket + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeltaPresenceEstimationHistogramBucket.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.bucketValues = []; + if (options.defaults) { + object.minProbability = 0; + object.maxProbability = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.bucketSize = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.bucketSize = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.bucketValueCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.bucketValueCount = options.longs === String ? "0" : 0; + } + if (message.minProbability != null && message.hasOwnProperty("minProbability")) + object.minProbability = options.json && !isFinite(message.minProbability) ? String(message.minProbability) : message.minProbability; + if (message.maxProbability != null && message.hasOwnProperty("maxProbability")) + object.maxProbability = options.json && !isFinite(message.maxProbability) ? String(message.maxProbability) : message.maxProbability; + if (message.bucketSize != null && message.hasOwnProperty("bucketSize")) + if (typeof message.bucketSize === "number") + object.bucketSize = options.longs === String ? String(message.bucketSize) : message.bucketSize; + else + object.bucketSize = options.longs === String ? $util.Long.prototype.toString.call(message.bucketSize) : options.longs === Number ? new $util.LongBits(message.bucketSize.low >>> 0, message.bucketSize.high >>> 0).toNumber() : message.bucketSize; + if (message.bucketValues && message.bucketValues.length) { + object.bucketValues = []; + for (var j = 0; j < message.bucketValues.length; ++j) + object.bucketValues[j] = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationQuasiIdValues.toObject(message.bucketValues[j], options); + } + if (message.bucketValueCount != null && message.hasOwnProperty("bucketValueCount")) + if (typeof message.bucketValueCount === "number") + object.bucketValueCount = options.longs === String ? String(message.bucketValueCount) : message.bucketValueCount; + else + object.bucketValueCount = options.longs === String ? $util.Long.prototype.toString.call(message.bucketValueCount) : options.longs === Number ? new $util.LongBits(message.bucketValueCount.low >>> 0, message.bucketValueCount.high >>> 0).toNumber() : message.bucketValueCount; + return object; + }; + + /** + * Converts this DeltaPresenceEstimationHistogramBucket to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket + * @instance + * @returns {Object.} JSON object + */ + DeltaPresenceEstimationHistogramBucket.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeltaPresenceEstimationHistogramBucket + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeltaPresenceEstimationHistogramBucket.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.DeltaPresenceEstimationResult.DeltaPresenceEstimationHistogramBucket"; + }; + + return DeltaPresenceEstimationHistogramBucket; + })(); + + return DeltaPresenceEstimationResult; + })(); + + AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions = (function() { + + /** + * Properties of a RequestedRiskAnalysisOptions. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @interface IRequestedRiskAnalysisOptions + * @property {google.privacy.dlp.v2.IRiskAnalysisJobConfig|null} [jobConfig] RequestedRiskAnalysisOptions jobConfig + */ + + /** + * Constructs a new RequestedRiskAnalysisOptions. + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails + * @classdesc Represents a RequestedRiskAnalysisOptions. + * @implements IRequestedRiskAnalysisOptions + * @constructor + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IRequestedRiskAnalysisOptions=} [properties] Properties to set + */ + function RequestedRiskAnalysisOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RequestedRiskAnalysisOptions jobConfig. + * @member {google.privacy.dlp.v2.IRiskAnalysisJobConfig|null|undefined} jobConfig + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions + * @instance + */ + RequestedRiskAnalysisOptions.prototype.jobConfig = null; + + /** + * Creates a new RequestedRiskAnalysisOptions instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IRequestedRiskAnalysisOptions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions} RequestedRiskAnalysisOptions instance + */ + RequestedRiskAnalysisOptions.create = function create(properties) { + return new RequestedRiskAnalysisOptions(properties); + }; + + /** + * Encodes the specified RequestedRiskAnalysisOptions message. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IRequestedRiskAnalysisOptions} message RequestedRiskAnalysisOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestedRiskAnalysisOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.jobConfig != null && Object.hasOwnProperty.call(message, "jobConfig")) + $root.google.privacy.dlp.v2.RiskAnalysisJobConfig.encode(message.jobConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RequestedRiskAnalysisOptions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.IRequestedRiskAnalysisOptions} message RequestedRiskAnalysisOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestedRiskAnalysisOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestedRiskAnalysisOptions message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions} RequestedRiskAnalysisOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestedRiskAnalysisOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.jobConfig = $root.google.privacy.dlp.v2.RiskAnalysisJobConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RequestedRiskAnalysisOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions} RequestedRiskAnalysisOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestedRiskAnalysisOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestedRiskAnalysisOptions message. + * @function verify + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestedRiskAnalysisOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.jobConfig != null && message.hasOwnProperty("jobConfig")) { + var error = $root.google.privacy.dlp.v2.RiskAnalysisJobConfig.verify(message.jobConfig, long + 1); + if (error) + return "jobConfig." + error; + } + return null; + }; + + /** + * Creates a RequestedRiskAnalysisOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions} RequestedRiskAnalysisOptions + */ + RequestedRiskAnalysisOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions(); + if (object.jobConfig != null) { + if (typeof object.jobConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions.jobConfig: object expected"); + message.jobConfig = $root.google.privacy.dlp.v2.RiskAnalysisJobConfig.fromObject(object.jobConfig, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a RequestedRiskAnalysisOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions + * @static + * @param {google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions} message RequestedRiskAnalysisOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestedRiskAnalysisOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.jobConfig = null; + if (message.jobConfig != null && message.hasOwnProperty("jobConfig")) + object.jobConfig = $root.google.privacy.dlp.v2.RiskAnalysisJobConfig.toObject(message.jobConfig, options); + return object; + }; + + /** + * Converts this RequestedRiskAnalysisOptions to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions + * @instance + * @returns {Object.} JSON object + */ + RequestedRiskAnalysisOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RequestedRiskAnalysisOptions + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RequestedRiskAnalysisOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.RequestedRiskAnalysisOptions"; + }; + + return RequestedRiskAnalysisOptions; + })(); + + return AnalyzeDataSourceRiskDetails; + })(); + + v2.ValueFrequency = (function() { + + /** + * Properties of a ValueFrequency. + * @memberof google.privacy.dlp.v2 + * @interface IValueFrequency + * @property {google.privacy.dlp.v2.IValue|null} [value] ValueFrequency value + * @property {number|Long|null} [count] ValueFrequency count + */ + + /** + * Constructs a new ValueFrequency. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ValueFrequency. + * @implements IValueFrequency + * @constructor + * @param {google.privacy.dlp.v2.IValueFrequency=} [properties] Properties to set + */ + function ValueFrequency(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ValueFrequency value. + * @member {google.privacy.dlp.v2.IValue|null|undefined} value + * @memberof google.privacy.dlp.v2.ValueFrequency + * @instance + */ + ValueFrequency.prototype.value = null; + + /** + * ValueFrequency count. + * @member {number|Long} count + * @memberof google.privacy.dlp.v2.ValueFrequency + * @instance + */ + ValueFrequency.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ValueFrequency instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ValueFrequency + * @static + * @param {google.privacy.dlp.v2.IValueFrequency=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ValueFrequency} ValueFrequency instance + */ + ValueFrequency.create = function create(properties) { + return new ValueFrequency(properties); + }; + + /** + * Encodes the specified ValueFrequency message. Does not implicitly {@link google.privacy.dlp.v2.ValueFrequency.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ValueFrequency + * @static + * @param {google.privacy.dlp.v2.IValueFrequency} message ValueFrequency message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValueFrequency.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.privacy.dlp.v2.Value.encode(message.value, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.count); + return writer; + }; + + /** + * Encodes the specified ValueFrequency message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ValueFrequency.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ValueFrequency + * @static + * @param {google.privacy.dlp.v2.IValueFrequency} message ValueFrequency message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ValueFrequency.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ValueFrequency message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ValueFrequency + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ValueFrequency} ValueFrequency + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValueFrequency.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ValueFrequency(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.value = $root.google.privacy.dlp.v2.Value.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.count = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ValueFrequency message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ValueFrequency + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ValueFrequency} ValueFrequency + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ValueFrequency.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ValueFrequency message. + * @function verify + * @memberof google.privacy.dlp.v2.ValueFrequency + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ValueFrequency.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.privacy.dlp.v2.Value.verify(message.value, long + 1); + if (error) + return "value." + error; + } + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + return null; + }; + + /** + * Creates a ValueFrequency message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ValueFrequency + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ValueFrequency} ValueFrequency + */ + ValueFrequency.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ValueFrequency) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ValueFrequency(); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.privacy.dlp.v2.ValueFrequency.value: object expected"); + message.value = $root.google.privacy.dlp.v2.Value.fromObject(object.value, long + 1); + } + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ValueFrequency message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ValueFrequency + * @static + * @param {google.privacy.dlp.v2.ValueFrequency} message ValueFrequency + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ValueFrequency.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.privacy.dlp.v2.Value.toObject(message.value, options); + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + return object; + }; + + /** + * Converts this ValueFrequency to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ValueFrequency + * @instance + * @returns {Object.} JSON object + */ + ValueFrequency.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ValueFrequency + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ValueFrequency + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ValueFrequency.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ValueFrequency"; + }; + + return ValueFrequency; + })(); + + v2.Value = (function() { + + /** + * Properties of a Value. + * @memberof google.privacy.dlp.v2 + * @interface IValue + * @property {number|Long|null} [integerValue] Value integerValue + * @property {number|null} [floatValue] Value floatValue + * @property {string|null} [stringValue] Value stringValue + * @property {boolean|null} [booleanValue] Value booleanValue + * @property {google.protobuf.ITimestamp|null} [timestampValue] Value timestampValue + * @property {google.type.ITimeOfDay|null} [timeValue] Value timeValue + * @property {google.type.IDate|null} [dateValue] Value dateValue + * @property {google.type.DayOfWeek|null} [dayOfWeekValue] Value dayOfWeekValue + */ + + /** + * Constructs a new Value. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a Value. + * @implements IValue + * @constructor + * @param {google.privacy.dlp.v2.IValue=} [properties] Properties to set + */ + function Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Value integerValue. + * @member {number|Long|null|undefined} integerValue + * @memberof google.privacy.dlp.v2.Value + * @instance + */ + Value.prototype.integerValue = null; + + /** + * Value floatValue. + * @member {number|null|undefined} floatValue + * @memberof google.privacy.dlp.v2.Value + * @instance + */ + Value.prototype.floatValue = null; + + /** + * Value stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.privacy.dlp.v2.Value + * @instance + */ + Value.prototype.stringValue = null; + + /** + * Value booleanValue. + * @member {boolean|null|undefined} booleanValue + * @memberof google.privacy.dlp.v2.Value + * @instance + */ + Value.prototype.booleanValue = null; + + /** + * Value timestampValue. + * @member {google.protobuf.ITimestamp|null|undefined} timestampValue + * @memberof google.privacy.dlp.v2.Value + * @instance + */ + Value.prototype.timestampValue = null; + + /** + * Value timeValue. + * @member {google.type.ITimeOfDay|null|undefined} timeValue + * @memberof google.privacy.dlp.v2.Value + * @instance + */ + Value.prototype.timeValue = null; + + /** + * Value dateValue. + * @member {google.type.IDate|null|undefined} dateValue + * @memberof google.privacy.dlp.v2.Value + * @instance + */ + Value.prototype.dateValue = null; + + /** + * Value dayOfWeekValue. + * @member {google.type.DayOfWeek|null|undefined} dayOfWeekValue + * @memberof google.privacy.dlp.v2.Value + * @instance + */ + Value.prototype.dayOfWeekValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Value type. + * @member {"integerValue"|"floatValue"|"stringValue"|"booleanValue"|"timestampValue"|"timeValue"|"dateValue"|"dayOfWeekValue"|undefined} type + * @memberof google.privacy.dlp.v2.Value + * @instance + */ + Object.defineProperty(Value.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["integerValue", "floatValue", "stringValue", "booleanValue", "timestampValue", "timeValue", "dateValue", "dayOfWeekValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Value instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Value + * @static + * @param {google.privacy.dlp.v2.IValue=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Value} Value instance + */ + Value.create = function create(properties) { + return new Value(properties); + }; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.privacy.dlp.v2.Value.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Value + * @static + * @param {google.privacy.dlp.v2.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.integerValue != null && Object.hasOwnProperty.call(message, "integerValue")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.integerValue); + if (message.floatValue != null && Object.hasOwnProperty.call(message, "floatValue")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.floatValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue); + if (message.booleanValue != null && Object.hasOwnProperty.call(message, "booleanValue")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.booleanValue); + if (message.timestampValue != null && Object.hasOwnProperty.call(message, "timestampValue")) + $root.google.protobuf.Timestamp.encode(message.timestampValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.timeValue != null && Object.hasOwnProperty.call(message, "timeValue")) + $root.google.type.TimeOfDay.encode(message.timeValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.dateValue != null && Object.hasOwnProperty.call(message, "dateValue")) + $root.google.type.Date.encode(message.dateValue, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.dayOfWeekValue != null && Object.hasOwnProperty.call(message, "dayOfWeekValue")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.dayOfWeekValue); + return writer; + }; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Value + * @static + * @param {google.privacy.dlp.v2.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Value message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.integerValue = reader.int64(); + break; + } + case 2: { + message.floatValue = reader.double(); + break; + } + case 3: { + message.stringValue = reader.string(); + break; + } + case 4: { + message.booleanValue = reader.bool(); + break; + } + case 5: { + message.timestampValue = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.timeValue = $root.google.type.TimeOfDay.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 7: { + message.dateValue = $root.google.type.Date.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 8: { + message.dayOfWeekValue = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Value message. + * @function verify + * @memberof google.privacy.dlp.v2.Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Value.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.integerValue != null && message.hasOwnProperty("integerValue")) { + properties.type = 1; + if (!$util.isInteger(message.integerValue) && !(message.integerValue && $util.isInteger(message.integerValue.low) && $util.isInteger(message.integerValue.high))) + return "integerValue: integer|Long expected"; + } + if (message.floatValue != null && message.hasOwnProperty("floatValue")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + if (typeof message.floatValue !== "number") + return "floatValue: number expected"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.booleanValue != null && message.hasOwnProperty("booleanValue")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + if (typeof message.booleanValue !== "boolean") + return "booleanValue: boolean expected"; + } + if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.timestampValue, long + 1); + if (error) + return "timestampValue." + error; + } + } + if (message.timeValue != null && message.hasOwnProperty("timeValue")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.type.TimeOfDay.verify(message.timeValue, long + 1); + if (error) + return "timeValue." + error; + } + } + if (message.dateValue != null && message.hasOwnProperty("dateValue")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.type.Date.verify(message.dateValue, long + 1); + if (error) + return "dateValue." + error; + } + } + if (message.dayOfWeekValue != null && message.hasOwnProperty("dayOfWeekValue")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + switch (message.dayOfWeekValue) { + default: + return "dayOfWeekValue: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + } + return null; + }; + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Value + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Value} Value + */ + Value.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Value) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.Value(); + if (object.integerValue != null) + if ($util.Long) + (message.integerValue = $util.Long.fromValue(object.integerValue)).unsigned = false; + else if (typeof object.integerValue === "string") + message.integerValue = parseInt(object.integerValue, 10); + else if (typeof object.integerValue === "number") + message.integerValue = object.integerValue; + else if (typeof object.integerValue === "object") + message.integerValue = new $util.LongBits(object.integerValue.low >>> 0, object.integerValue.high >>> 0).toNumber(); + if (object.floatValue != null) + message.floatValue = Number(object.floatValue); + if (object.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.booleanValue != null) + message.booleanValue = Boolean(object.booleanValue); + if (object.timestampValue != null) { + if (typeof object.timestampValue !== "object") + throw TypeError(".google.privacy.dlp.v2.Value.timestampValue: object expected"); + message.timestampValue = $root.google.protobuf.Timestamp.fromObject(object.timestampValue, long + 1); + } + if (object.timeValue != null) { + if (typeof object.timeValue !== "object") + throw TypeError(".google.privacy.dlp.v2.Value.timeValue: object expected"); + message.timeValue = $root.google.type.TimeOfDay.fromObject(object.timeValue, long + 1); + } + if (object.dateValue != null) { + if (typeof object.dateValue !== "object") + throw TypeError(".google.privacy.dlp.v2.Value.dateValue: object expected"); + message.dateValue = $root.google.type.Date.fromObject(object.dateValue, long + 1); + } + switch (object.dayOfWeekValue) { + default: + if (typeof object.dayOfWeekValue === "number") { + message.dayOfWeekValue = object.dayOfWeekValue; + break; + } + break; + case "DAY_OF_WEEK_UNSPECIFIED": + case 0: + message.dayOfWeekValue = 0; + break; + case "MONDAY": + case 1: + message.dayOfWeekValue = 1; + break; + case "TUESDAY": + case 2: + message.dayOfWeekValue = 2; + break; + case "WEDNESDAY": + case 3: + message.dayOfWeekValue = 3; + break; + case "THURSDAY": + case 4: + message.dayOfWeekValue = 4; + break; + case "FRIDAY": + case 5: + message.dayOfWeekValue = 5; + break; + case "SATURDAY": + case 6: + message.dayOfWeekValue = 6; + break; + case "SUNDAY": + case 7: + message.dayOfWeekValue = 7; + break; + } + return message; + }; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Value + * @static + * @param {google.privacy.dlp.v2.Value} message Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.integerValue != null && message.hasOwnProperty("integerValue")) { + if (typeof message.integerValue === "number") + object.integerValue = options.longs === String ? String(message.integerValue) : message.integerValue; + else + object.integerValue = options.longs === String ? $util.Long.prototype.toString.call(message.integerValue) : options.longs === Number ? new $util.LongBits(message.integerValue.low >>> 0, message.integerValue.high >>> 0).toNumber() : message.integerValue; + if (options.oneofs) + object.type = "integerValue"; + } + if (message.floatValue != null && message.hasOwnProperty("floatValue")) { + object.floatValue = options.json && !isFinite(message.floatValue) ? String(message.floatValue) : message.floatValue; + if (options.oneofs) + object.type = "floatValue"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.type = "stringValue"; + } + if (message.booleanValue != null && message.hasOwnProperty("booleanValue")) { + object.booleanValue = message.booleanValue; + if (options.oneofs) + object.type = "booleanValue"; + } + if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) { + object.timestampValue = $root.google.protobuf.Timestamp.toObject(message.timestampValue, options); + if (options.oneofs) + object.type = "timestampValue"; + } + if (message.timeValue != null && message.hasOwnProperty("timeValue")) { + object.timeValue = $root.google.type.TimeOfDay.toObject(message.timeValue, options); + if (options.oneofs) + object.type = "timeValue"; + } + if (message.dateValue != null && message.hasOwnProperty("dateValue")) { + object.dateValue = $root.google.type.Date.toObject(message.dateValue, options); + if (options.oneofs) + object.type = "dateValue"; + } + if (message.dayOfWeekValue != null && message.hasOwnProperty("dayOfWeekValue")) { + object.dayOfWeekValue = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeekValue] === undefined ? message.dayOfWeekValue : $root.google.type.DayOfWeek[message.dayOfWeekValue] : message.dayOfWeekValue; + if (options.oneofs) + object.type = "dayOfWeekValue"; + } + return object; + }; + + /** + * Converts this Value to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Value + * @instance + * @returns {Object.} JSON object + */ + Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Value + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Value"; + }; + + return Value; + })(); + + v2.QuoteInfo = (function() { + + /** + * Properties of a QuoteInfo. + * @memberof google.privacy.dlp.v2 + * @interface IQuoteInfo + * @property {google.privacy.dlp.v2.IDateTime|null} [dateTime] QuoteInfo dateTime + */ + + /** + * Constructs a new QuoteInfo. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a QuoteInfo. + * @implements IQuoteInfo + * @constructor + * @param {google.privacy.dlp.v2.IQuoteInfo=} [properties] Properties to set + */ + function QuoteInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * QuoteInfo dateTime. + * @member {google.privacy.dlp.v2.IDateTime|null|undefined} dateTime + * @memberof google.privacy.dlp.v2.QuoteInfo + * @instance + */ + QuoteInfo.prototype.dateTime = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * QuoteInfo parsedQuote. + * @member {"dateTime"|undefined} parsedQuote + * @memberof google.privacy.dlp.v2.QuoteInfo + * @instance + */ + Object.defineProperty(QuoteInfo.prototype, "parsedQuote", { + get: $util.oneOfGetter($oneOfFields = ["dateTime"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new QuoteInfo instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.QuoteInfo + * @static + * @param {google.privacy.dlp.v2.IQuoteInfo=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.QuoteInfo} QuoteInfo instance + */ + QuoteInfo.create = function create(properties) { + return new QuoteInfo(properties); + }; + + /** + * Encodes the specified QuoteInfo message. Does not implicitly {@link google.privacy.dlp.v2.QuoteInfo.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.QuoteInfo + * @static + * @param {google.privacy.dlp.v2.IQuoteInfo} message QuoteInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuoteInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dateTime != null && Object.hasOwnProperty.call(message, "dateTime")) + $root.google.privacy.dlp.v2.DateTime.encode(message.dateTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QuoteInfo message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.QuoteInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.QuoteInfo + * @static + * @param {google.privacy.dlp.v2.IQuoteInfo} message QuoteInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuoteInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuoteInfo message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.QuoteInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.QuoteInfo} QuoteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuoteInfo.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.QuoteInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.dateTime = $root.google.privacy.dlp.v2.DateTime.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a QuoteInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.QuoteInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.QuoteInfo} QuoteInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuoteInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuoteInfo message. + * @function verify + * @memberof google.privacy.dlp.v2.QuoteInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuoteInfo.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.dateTime != null && message.hasOwnProperty("dateTime")) { + properties.parsedQuote = 1; + { + var error = $root.google.privacy.dlp.v2.DateTime.verify(message.dateTime, long + 1); + if (error) + return "dateTime." + error; + } + } + return null; + }; + + /** + * Creates a QuoteInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.QuoteInfo + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.QuoteInfo} QuoteInfo + */ + QuoteInfo.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.QuoteInfo) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.QuoteInfo(); + if (object.dateTime != null) { + if (typeof object.dateTime !== "object") + throw TypeError(".google.privacy.dlp.v2.QuoteInfo.dateTime: object expected"); + message.dateTime = $root.google.privacy.dlp.v2.DateTime.fromObject(object.dateTime, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a QuoteInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.QuoteInfo + * @static + * @param {google.privacy.dlp.v2.QuoteInfo} message QuoteInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuoteInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.dateTime != null && message.hasOwnProperty("dateTime")) { + object.dateTime = $root.google.privacy.dlp.v2.DateTime.toObject(message.dateTime, options); + if (options.oneofs) + object.parsedQuote = "dateTime"; + } + return object; + }; + + /** + * Converts this QuoteInfo to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.QuoteInfo + * @instance + * @returns {Object.} JSON object + */ + QuoteInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuoteInfo + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.QuoteInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuoteInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.QuoteInfo"; + }; + + return QuoteInfo; + })(); + + v2.DateTime = (function() { + + /** + * Properties of a DateTime. + * @memberof google.privacy.dlp.v2 + * @interface IDateTime + * @property {google.type.IDate|null} [date] DateTime date + * @property {google.type.DayOfWeek|null} [dayOfWeek] DateTime dayOfWeek + * @property {google.type.ITimeOfDay|null} [time] DateTime time + * @property {google.privacy.dlp.v2.DateTime.ITimeZone|null} [timeZone] DateTime timeZone + */ + + /** + * Constructs a new DateTime. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DateTime. + * @implements IDateTime + * @constructor + * @param {google.privacy.dlp.v2.IDateTime=} [properties] Properties to set + */ + function DateTime(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DateTime date. + * @member {google.type.IDate|null|undefined} date + * @memberof google.privacy.dlp.v2.DateTime + * @instance + */ + DateTime.prototype.date = null; + + /** + * DateTime dayOfWeek. + * @member {google.type.DayOfWeek} dayOfWeek + * @memberof google.privacy.dlp.v2.DateTime + * @instance + */ + DateTime.prototype.dayOfWeek = 0; + + /** + * DateTime time. + * @member {google.type.ITimeOfDay|null|undefined} time + * @memberof google.privacy.dlp.v2.DateTime + * @instance + */ + DateTime.prototype.time = null; + + /** + * DateTime timeZone. + * @member {google.privacy.dlp.v2.DateTime.ITimeZone|null|undefined} timeZone + * @memberof google.privacy.dlp.v2.DateTime + * @instance + */ + DateTime.prototype.timeZone = null; + + /** + * Creates a new DateTime instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DateTime + * @static + * @param {google.privacy.dlp.v2.IDateTime=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DateTime} DateTime instance + */ + DateTime.create = function create(properties) { + return new DateTime(properties); + }; + + /** + * Encodes the specified DateTime message. Does not implicitly {@link google.privacy.dlp.v2.DateTime.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DateTime + * @static + * @param {google.privacy.dlp.v2.IDateTime} message DateTime message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DateTime.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.date != null && Object.hasOwnProperty.call(message, "date")) + $root.google.type.Date.encode(message.date, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dayOfWeek != null && Object.hasOwnProperty.call(message, "dayOfWeek")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.dayOfWeek); + if (message.time != null && Object.hasOwnProperty.call(message, "time")) + $root.google.type.TimeOfDay.encode(message.time, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + $root.google.privacy.dlp.v2.DateTime.TimeZone.encode(message.timeZone, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DateTime message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DateTime.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DateTime + * @static + * @param {google.privacy.dlp.v2.IDateTime} message DateTime message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DateTime.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DateTime message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DateTime + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DateTime} DateTime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DateTime.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DateTime(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.date = $root.google.type.Date.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.dayOfWeek = reader.int32(); + break; + } + case 3: { + message.time = $root.google.type.TimeOfDay.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.timeZone = $root.google.privacy.dlp.v2.DateTime.TimeZone.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DateTime message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DateTime + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DateTime} DateTime + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DateTime.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DateTime message. + * @function verify + * @memberof google.privacy.dlp.v2.DateTime + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DateTime.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.date != null && message.hasOwnProperty("date")) { + var error = $root.google.type.Date.verify(message.date, long + 1); + if (error) + return "date." + error; + } + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + switch (message.dayOfWeek) { + default: + return "dayOfWeek: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.time != null && message.hasOwnProperty("time")) { + var error = $root.google.type.TimeOfDay.verify(message.time, long + 1); + if (error) + return "time." + error; + } + if (message.timeZone != null && message.hasOwnProperty("timeZone")) { + var error = $root.google.privacy.dlp.v2.DateTime.TimeZone.verify(message.timeZone, long + 1); + if (error) + return "timeZone." + error; + } + return null; + }; + + /** + * Creates a DateTime message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DateTime + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DateTime} DateTime + */ + DateTime.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DateTime) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DateTime(); + if (object.date != null) { + if (typeof object.date !== "object") + throw TypeError(".google.privacy.dlp.v2.DateTime.date: object expected"); + message.date = $root.google.type.Date.fromObject(object.date, long + 1); + } + switch (object.dayOfWeek) { + default: + if (typeof object.dayOfWeek === "number") { + message.dayOfWeek = object.dayOfWeek; + break; + } + break; + case "DAY_OF_WEEK_UNSPECIFIED": + case 0: + message.dayOfWeek = 0; + break; + case "MONDAY": + case 1: + message.dayOfWeek = 1; + break; + case "TUESDAY": + case 2: + message.dayOfWeek = 2; + break; + case "WEDNESDAY": + case 3: + message.dayOfWeek = 3; + break; + case "THURSDAY": + case 4: + message.dayOfWeek = 4; + break; + case "FRIDAY": + case 5: + message.dayOfWeek = 5; + break; + case "SATURDAY": + case 6: + message.dayOfWeek = 6; + break; + case "SUNDAY": + case 7: + message.dayOfWeek = 7; + break; + } + if (object.time != null) { + if (typeof object.time !== "object") + throw TypeError(".google.privacy.dlp.v2.DateTime.time: object expected"); + message.time = $root.google.type.TimeOfDay.fromObject(object.time, long + 1); + } + if (object.timeZone != null) { + if (typeof object.timeZone !== "object") + throw TypeError(".google.privacy.dlp.v2.DateTime.timeZone: object expected"); + message.timeZone = $root.google.privacy.dlp.v2.DateTime.TimeZone.fromObject(object.timeZone, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DateTime message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DateTime + * @static + * @param {google.privacy.dlp.v2.DateTime} message DateTime + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DateTime.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.date = null; + object.dayOfWeek = options.enums === String ? "DAY_OF_WEEK_UNSPECIFIED" : 0; + object.time = null; + object.timeZone = null; + } + if (message.date != null && message.hasOwnProperty("date")) + object.date = $root.google.type.Date.toObject(message.date, options); + if (message.dayOfWeek != null && message.hasOwnProperty("dayOfWeek")) + object.dayOfWeek = options.enums === String ? $root.google.type.DayOfWeek[message.dayOfWeek] === undefined ? message.dayOfWeek : $root.google.type.DayOfWeek[message.dayOfWeek] : message.dayOfWeek; + if (message.time != null && message.hasOwnProperty("time")) + object.time = $root.google.type.TimeOfDay.toObject(message.time, options); + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + object.timeZone = $root.google.privacy.dlp.v2.DateTime.TimeZone.toObject(message.timeZone, options); + return object; + }; + + /** + * Converts this DateTime to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DateTime + * @instance + * @returns {Object.} JSON object + */ + DateTime.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DateTime + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DateTime + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DateTime.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DateTime"; + }; + + DateTime.TimeZone = (function() { + + /** + * Properties of a TimeZone. + * @memberof google.privacy.dlp.v2.DateTime + * @interface ITimeZone + * @property {number|null} [offsetMinutes] TimeZone offsetMinutes + */ + + /** + * Constructs a new TimeZone. + * @memberof google.privacy.dlp.v2.DateTime + * @classdesc Represents a TimeZone. + * @implements ITimeZone + * @constructor + * @param {google.privacy.dlp.v2.DateTime.ITimeZone=} [properties] Properties to set + */ + function TimeZone(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeZone offsetMinutes. + * @member {number} offsetMinutes + * @memberof google.privacy.dlp.v2.DateTime.TimeZone + * @instance + */ + TimeZone.prototype.offsetMinutes = 0; + + /** + * Creates a new TimeZone instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DateTime.TimeZone + * @static + * @param {google.privacy.dlp.v2.DateTime.ITimeZone=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DateTime.TimeZone} TimeZone instance + */ + TimeZone.create = function create(properties) { + return new TimeZone(properties); + }; + + /** + * Encodes the specified TimeZone message. Does not implicitly {@link google.privacy.dlp.v2.DateTime.TimeZone.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DateTime.TimeZone + * @static + * @param {google.privacy.dlp.v2.DateTime.ITimeZone} message TimeZone message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeZone.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.offsetMinutes != null && Object.hasOwnProperty.call(message, "offsetMinutes")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.offsetMinutes); + return writer; + }; + + /** + * Encodes the specified TimeZone message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DateTime.TimeZone.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DateTime.TimeZone + * @static + * @param {google.privacy.dlp.v2.DateTime.ITimeZone} message TimeZone message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeZone.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeZone message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DateTime.TimeZone + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DateTime.TimeZone} TimeZone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeZone.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DateTime.TimeZone(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.offsetMinutes = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TimeZone message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DateTime.TimeZone + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DateTime.TimeZone} TimeZone + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeZone.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeZone message. + * @function verify + * @memberof google.privacy.dlp.v2.DateTime.TimeZone + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeZone.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.offsetMinutes != null && message.hasOwnProperty("offsetMinutes")) + if (!$util.isInteger(message.offsetMinutes)) + return "offsetMinutes: integer expected"; + return null; + }; + + /** + * Creates a TimeZone message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DateTime.TimeZone + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DateTime.TimeZone} TimeZone + */ + TimeZone.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DateTime.TimeZone) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DateTime.TimeZone(); + if (object.offsetMinutes != null) + message.offsetMinutes = object.offsetMinutes | 0; + return message; + }; + + /** + * Creates a plain object from a TimeZone message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DateTime.TimeZone + * @static + * @param {google.privacy.dlp.v2.DateTime.TimeZone} message TimeZone + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeZone.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.offsetMinutes = 0; + if (message.offsetMinutes != null && message.hasOwnProperty("offsetMinutes")) + object.offsetMinutes = message.offsetMinutes; + return object; + }; + + /** + * Converts this TimeZone to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DateTime.TimeZone + * @instance + * @returns {Object.} JSON object + */ + TimeZone.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimeZone + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DateTime.TimeZone + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeZone.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DateTime.TimeZone"; + }; + + return TimeZone; + })(); + + return DateTime; + })(); + + v2.DeidentifyConfig = (function() { + + /** + * Properties of a DeidentifyConfig. + * @memberof google.privacy.dlp.v2 + * @interface IDeidentifyConfig + * @property {google.privacy.dlp.v2.IInfoTypeTransformations|null} [infoTypeTransformations] DeidentifyConfig infoTypeTransformations + * @property {google.privacy.dlp.v2.IRecordTransformations|null} [recordTransformations] DeidentifyConfig recordTransformations + * @property {google.privacy.dlp.v2.IImageTransformations|null} [imageTransformations] DeidentifyConfig imageTransformations + * @property {google.privacy.dlp.v2.ITransformationErrorHandling|null} [transformationErrorHandling] DeidentifyConfig transformationErrorHandling + */ + + /** + * Constructs a new DeidentifyConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DeidentifyConfig. + * @implements IDeidentifyConfig + * @constructor + * @param {google.privacy.dlp.v2.IDeidentifyConfig=} [properties] Properties to set + */ + function DeidentifyConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeidentifyConfig infoTypeTransformations. + * @member {google.privacy.dlp.v2.IInfoTypeTransformations|null|undefined} infoTypeTransformations + * @memberof google.privacy.dlp.v2.DeidentifyConfig + * @instance + */ + DeidentifyConfig.prototype.infoTypeTransformations = null; + + /** + * DeidentifyConfig recordTransformations. + * @member {google.privacy.dlp.v2.IRecordTransformations|null|undefined} recordTransformations + * @memberof google.privacy.dlp.v2.DeidentifyConfig + * @instance + */ + DeidentifyConfig.prototype.recordTransformations = null; + + /** + * DeidentifyConfig imageTransformations. + * @member {google.privacy.dlp.v2.IImageTransformations|null|undefined} imageTransformations + * @memberof google.privacy.dlp.v2.DeidentifyConfig + * @instance + */ + DeidentifyConfig.prototype.imageTransformations = null; + + /** + * DeidentifyConfig transformationErrorHandling. + * @member {google.privacy.dlp.v2.ITransformationErrorHandling|null|undefined} transformationErrorHandling + * @memberof google.privacy.dlp.v2.DeidentifyConfig + * @instance + */ + DeidentifyConfig.prototype.transformationErrorHandling = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DeidentifyConfig transformation. + * @member {"infoTypeTransformations"|"recordTransformations"|"imageTransformations"|undefined} transformation + * @memberof google.privacy.dlp.v2.DeidentifyConfig + * @instance + */ + Object.defineProperty(DeidentifyConfig.prototype, "transformation", { + get: $util.oneOfGetter($oneOfFields = ["infoTypeTransformations", "recordTransformations", "imageTransformations"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DeidentifyConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DeidentifyConfig + * @static + * @param {google.privacy.dlp.v2.IDeidentifyConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DeidentifyConfig} DeidentifyConfig instance + */ + DeidentifyConfig.create = function create(properties) { + return new DeidentifyConfig(properties); + }; + + /** + * Encodes the specified DeidentifyConfig message. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DeidentifyConfig + * @static + * @param {google.privacy.dlp.v2.IDeidentifyConfig} message DeidentifyConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeidentifyConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.infoTypeTransformations != null && Object.hasOwnProperty.call(message, "infoTypeTransformations")) + $root.google.privacy.dlp.v2.InfoTypeTransformations.encode(message.infoTypeTransformations, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.recordTransformations != null && Object.hasOwnProperty.call(message, "recordTransformations")) + $root.google.privacy.dlp.v2.RecordTransformations.encode(message.recordTransformations, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.transformationErrorHandling != null && Object.hasOwnProperty.call(message, "transformationErrorHandling")) + $root.google.privacy.dlp.v2.TransformationErrorHandling.encode(message.transformationErrorHandling, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.imageTransformations != null && Object.hasOwnProperty.call(message, "imageTransformations")) + $root.google.privacy.dlp.v2.ImageTransformations.encode(message.imageTransformations, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeidentifyConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DeidentifyConfig + * @static + * @param {google.privacy.dlp.v2.IDeidentifyConfig} message DeidentifyConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeidentifyConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeidentifyConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DeidentifyConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DeidentifyConfig} DeidentifyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeidentifyConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DeidentifyConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.infoTypeTransformations = $root.google.privacy.dlp.v2.InfoTypeTransformations.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.recordTransformations = $root.google.privacy.dlp.v2.RecordTransformations.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.imageTransformations = $root.google.privacy.dlp.v2.ImageTransformations.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.transformationErrorHandling = $root.google.privacy.dlp.v2.TransformationErrorHandling.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeidentifyConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DeidentifyConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DeidentifyConfig} DeidentifyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeidentifyConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeidentifyConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.DeidentifyConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeidentifyConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.infoTypeTransformations != null && message.hasOwnProperty("infoTypeTransformations")) { + properties.transformation = 1; + { + var error = $root.google.privacy.dlp.v2.InfoTypeTransformations.verify(message.infoTypeTransformations, long + 1); + if (error) + return "infoTypeTransformations." + error; + } + } + if (message.recordTransformations != null && message.hasOwnProperty("recordTransformations")) { + if (properties.transformation === 1) + return "transformation: multiple values"; + properties.transformation = 1; + { + var error = $root.google.privacy.dlp.v2.RecordTransformations.verify(message.recordTransformations, long + 1); + if (error) + return "recordTransformations." + error; + } + } + if (message.imageTransformations != null && message.hasOwnProperty("imageTransformations")) { + if (properties.transformation === 1) + return "transformation: multiple values"; + properties.transformation = 1; + { + var error = $root.google.privacy.dlp.v2.ImageTransformations.verify(message.imageTransformations, long + 1); + if (error) + return "imageTransformations." + error; + } + } + if (message.transformationErrorHandling != null && message.hasOwnProperty("transformationErrorHandling")) { + var error = $root.google.privacy.dlp.v2.TransformationErrorHandling.verify(message.transformationErrorHandling, long + 1); + if (error) + return "transformationErrorHandling." + error; + } + return null; + }; + + /** + * Creates a DeidentifyConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DeidentifyConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DeidentifyConfig} DeidentifyConfig + */ + DeidentifyConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DeidentifyConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DeidentifyConfig(); + if (object.infoTypeTransformations != null) { + if (typeof object.infoTypeTransformations !== "object") + throw TypeError(".google.privacy.dlp.v2.DeidentifyConfig.infoTypeTransformations: object expected"); + message.infoTypeTransformations = $root.google.privacy.dlp.v2.InfoTypeTransformations.fromObject(object.infoTypeTransformations, long + 1); + } + if (object.recordTransformations != null) { + if (typeof object.recordTransformations !== "object") + throw TypeError(".google.privacy.dlp.v2.DeidentifyConfig.recordTransformations: object expected"); + message.recordTransformations = $root.google.privacy.dlp.v2.RecordTransformations.fromObject(object.recordTransformations, long + 1); + } + if (object.imageTransformations != null) { + if (typeof object.imageTransformations !== "object") + throw TypeError(".google.privacy.dlp.v2.DeidentifyConfig.imageTransformations: object expected"); + message.imageTransformations = $root.google.privacy.dlp.v2.ImageTransformations.fromObject(object.imageTransformations, long + 1); + } + if (object.transformationErrorHandling != null) { + if (typeof object.transformationErrorHandling !== "object") + throw TypeError(".google.privacy.dlp.v2.DeidentifyConfig.transformationErrorHandling: object expected"); + message.transformationErrorHandling = $root.google.privacy.dlp.v2.TransformationErrorHandling.fromObject(object.transformationErrorHandling, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DeidentifyConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DeidentifyConfig + * @static + * @param {google.privacy.dlp.v2.DeidentifyConfig} message DeidentifyConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeidentifyConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.transformationErrorHandling = null; + if (message.infoTypeTransformations != null && message.hasOwnProperty("infoTypeTransformations")) { + object.infoTypeTransformations = $root.google.privacy.dlp.v2.InfoTypeTransformations.toObject(message.infoTypeTransformations, options); + if (options.oneofs) + object.transformation = "infoTypeTransformations"; + } + if (message.recordTransformations != null && message.hasOwnProperty("recordTransformations")) { + object.recordTransformations = $root.google.privacy.dlp.v2.RecordTransformations.toObject(message.recordTransformations, options); + if (options.oneofs) + object.transformation = "recordTransformations"; + } + if (message.transformationErrorHandling != null && message.hasOwnProperty("transformationErrorHandling")) + object.transformationErrorHandling = $root.google.privacy.dlp.v2.TransformationErrorHandling.toObject(message.transformationErrorHandling, options); + if (message.imageTransformations != null && message.hasOwnProperty("imageTransformations")) { + object.imageTransformations = $root.google.privacy.dlp.v2.ImageTransformations.toObject(message.imageTransformations, options); + if (options.oneofs) + object.transformation = "imageTransformations"; + } + return object; + }; + + /** + * Converts this DeidentifyConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DeidentifyConfig + * @instance + * @returns {Object.} JSON object + */ + DeidentifyConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeidentifyConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DeidentifyConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeidentifyConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DeidentifyConfig"; + }; + + return DeidentifyConfig; + })(); + + v2.ImageTransformations = (function() { + + /** + * Properties of an ImageTransformations. + * @memberof google.privacy.dlp.v2 + * @interface IImageTransformations + * @property {Array.|null} [transforms] ImageTransformations transforms + */ + + /** + * Constructs a new ImageTransformations. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an ImageTransformations. + * @implements IImageTransformations + * @constructor + * @param {google.privacy.dlp.v2.IImageTransformations=} [properties] Properties to set + */ + function ImageTransformations(properties) { + this.transforms = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImageTransformations transforms. + * @member {Array.} transforms + * @memberof google.privacy.dlp.v2.ImageTransformations + * @instance + */ + ImageTransformations.prototype.transforms = $util.emptyArray; + + /** + * Creates a new ImageTransformations instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ImageTransformations + * @static + * @param {google.privacy.dlp.v2.IImageTransformations=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ImageTransformations} ImageTransformations instance + */ + ImageTransformations.create = function create(properties) { + return new ImageTransformations(properties); + }; + + /** + * Encodes the specified ImageTransformations message. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ImageTransformations + * @static + * @param {google.privacy.dlp.v2.IImageTransformations} message ImageTransformations message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageTransformations.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.transforms != null && message.transforms.length) + for (var i = 0; i < message.transforms.length; ++i) + $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.encode(message.transforms[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ImageTransformations message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ImageTransformations + * @static + * @param {google.privacy.dlp.v2.IImageTransformations} message ImageTransformations message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageTransformations.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImageTransformations message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ImageTransformations + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ImageTransformations} ImageTransformations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageTransformations.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ImageTransformations(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.transforms && message.transforms.length)) + message.transforms = []; + message.transforms.push($root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an ImageTransformations message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ImageTransformations + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ImageTransformations} ImageTransformations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageTransformations.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImageTransformations message. + * @function verify + * @memberof google.privacy.dlp.v2.ImageTransformations + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImageTransformations.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.transforms != null && message.hasOwnProperty("transforms")) { + if (!Array.isArray(message.transforms)) + return "transforms: array expected"; + for (var i = 0; i < message.transforms.length; ++i) { + var error = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.verify(message.transforms[i], long + 1); + if (error) + return "transforms." + error; + } + } + return null; + }; + + /** + * Creates an ImageTransformations message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ImageTransformations + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ImageTransformations} ImageTransformations + */ + ImageTransformations.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ImageTransformations) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ImageTransformations(); + if (object.transforms) { + if (!Array.isArray(object.transforms)) + throw TypeError(".google.privacy.dlp.v2.ImageTransformations.transforms: array expected"); + message.transforms = []; + for (var i = 0; i < object.transforms.length; ++i) { + if (typeof object.transforms[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.ImageTransformations.transforms: object expected"); + message.transforms[i] = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.fromObject(object.transforms[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from an ImageTransformations message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ImageTransformations + * @static + * @param {google.privacy.dlp.v2.ImageTransformations} message ImageTransformations + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImageTransformations.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.transforms = []; + if (message.transforms && message.transforms.length) { + object.transforms = []; + for (var j = 0; j < message.transforms.length; ++j) + object.transforms[j] = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.toObject(message.transforms[j], options); + } + return object; + }; + + /** + * Converts this ImageTransformations to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ImageTransformations + * @instance + * @returns {Object.} JSON object + */ + ImageTransformations.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImageTransformations + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ImageTransformations + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImageTransformations.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ImageTransformations"; + }; + + ImageTransformations.ImageTransformation = (function() { + + /** + * Properties of an ImageTransformation. + * @memberof google.privacy.dlp.v2.ImageTransformations + * @interface IImageTransformation + * @property {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.ISelectedInfoTypes|null} [selectedInfoTypes] ImageTransformation selectedInfoTypes + * @property {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllInfoTypes|null} [allInfoTypes] ImageTransformation allInfoTypes + * @property {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllText|null} [allText] ImageTransformation allText + * @property {google.privacy.dlp.v2.IColor|null} [redactionColor] ImageTransformation redactionColor + */ + + /** + * Constructs a new ImageTransformation. + * @memberof google.privacy.dlp.v2.ImageTransformations + * @classdesc Represents an ImageTransformation. + * @implements IImageTransformation + * @constructor + * @param {google.privacy.dlp.v2.ImageTransformations.IImageTransformation=} [properties] Properties to set + */ + function ImageTransformation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImageTransformation selectedInfoTypes. + * @member {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.ISelectedInfoTypes|null|undefined} selectedInfoTypes + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation + * @instance + */ + ImageTransformation.prototype.selectedInfoTypes = null; + + /** + * ImageTransformation allInfoTypes. + * @member {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllInfoTypes|null|undefined} allInfoTypes + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation + * @instance + */ + ImageTransformation.prototype.allInfoTypes = null; + + /** + * ImageTransformation allText. + * @member {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllText|null|undefined} allText + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation + * @instance + */ + ImageTransformation.prototype.allText = null; + + /** + * ImageTransformation redactionColor. + * @member {google.privacy.dlp.v2.IColor|null|undefined} redactionColor + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation + * @instance + */ + ImageTransformation.prototype.redactionColor = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ImageTransformation target. + * @member {"selectedInfoTypes"|"allInfoTypes"|"allText"|undefined} target + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation + * @instance + */ + Object.defineProperty(ImageTransformation.prototype, "target", { + get: $util.oneOfGetter($oneOfFields = ["selectedInfoTypes", "allInfoTypes", "allText"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImageTransformation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation + * @static + * @param {google.privacy.dlp.v2.ImageTransformations.IImageTransformation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation} ImageTransformation instance + */ + ImageTransformation.create = function create(properties) { + return new ImageTransformation(properties); + }; + + /** + * Encodes the specified ImageTransformation message. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation + * @static + * @param {google.privacy.dlp.v2.ImageTransformations.IImageTransformation} message ImageTransformation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageTransformation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.redactionColor != null && Object.hasOwnProperty.call(message, "redactionColor")) + $root.google.privacy.dlp.v2.Color.encode(message.redactionColor, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.selectedInfoTypes != null && Object.hasOwnProperty.call(message, "selectedInfoTypes")) + $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.encode(message.selectedInfoTypes, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.allInfoTypes != null && Object.hasOwnProperty.call(message, "allInfoTypes")) + $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.encode(message.allInfoTypes, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.allText != null && Object.hasOwnProperty.call(message, "allText")) + $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.encode(message.allText, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ImageTransformation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation + * @static + * @param {google.privacy.dlp.v2.ImageTransformations.IImageTransformation} message ImageTransformation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageTransformation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImageTransformation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation} ImageTransformation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageTransformation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.selectedInfoTypes = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.allInfoTypes = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.allText = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.redactionColor = $root.google.privacy.dlp.v2.Color.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an ImageTransformation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation} ImageTransformation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageTransformation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImageTransformation message. + * @function verify + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImageTransformation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.selectedInfoTypes != null && message.hasOwnProperty("selectedInfoTypes")) { + properties.target = 1; + { + var error = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.verify(message.selectedInfoTypes, long + 1); + if (error) + return "selectedInfoTypes." + error; + } + } + if (message.allInfoTypes != null && message.hasOwnProperty("allInfoTypes")) { + if (properties.target === 1) + return "target: multiple values"; + properties.target = 1; + { + var error = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.verify(message.allInfoTypes, long + 1); + if (error) + return "allInfoTypes." + error; + } + } + if (message.allText != null && message.hasOwnProperty("allText")) { + if (properties.target === 1) + return "target: multiple values"; + properties.target = 1; + { + var error = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.verify(message.allText, long + 1); + if (error) + return "allText." + error; + } + } + if (message.redactionColor != null && message.hasOwnProperty("redactionColor")) { + var error = $root.google.privacy.dlp.v2.Color.verify(message.redactionColor, long + 1); + if (error) + return "redactionColor." + error; + } + return null; + }; + + /** + * Creates an ImageTransformation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation} ImageTransformation + */ + ImageTransformation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation(); + if (object.selectedInfoTypes != null) { + if (typeof object.selectedInfoTypes !== "object") + throw TypeError(".google.privacy.dlp.v2.ImageTransformations.ImageTransformation.selectedInfoTypes: object expected"); + message.selectedInfoTypes = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.fromObject(object.selectedInfoTypes, long + 1); + } + if (object.allInfoTypes != null) { + if (typeof object.allInfoTypes !== "object") + throw TypeError(".google.privacy.dlp.v2.ImageTransformations.ImageTransformation.allInfoTypes: object expected"); + message.allInfoTypes = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.fromObject(object.allInfoTypes, long + 1); + } + if (object.allText != null) { + if (typeof object.allText !== "object") + throw TypeError(".google.privacy.dlp.v2.ImageTransformations.ImageTransformation.allText: object expected"); + message.allText = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.fromObject(object.allText, long + 1); + } + if (object.redactionColor != null) { + if (typeof object.redactionColor !== "object") + throw TypeError(".google.privacy.dlp.v2.ImageTransformations.ImageTransformation.redactionColor: object expected"); + message.redactionColor = $root.google.privacy.dlp.v2.Color.fromObject(object.redactionColor, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an ImageTransformation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation + * @static + * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation} message ImageTransformation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImageTransformation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.redactionColor = null; + if (message.redactionColor != null && message.hasOwnProperty("redactionColor")) + object.redactionColor = $root.google.privacy.dlp.v2.Color.toObject(message.redactionColor, options); + if (message.selectedInfoTypes != null && message.hasOwnProperty("selectedInfoTypes")) { + object.selectedInfoTypes = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.toObject(message.selectedInfoTypes, options); + if (options.oneofs) + object.target = "selectedInfoTypes"; + } + if (message.allInfoTypes != null && message.hasOwnProperty("allInfoTypes")) { + object.allInfoTypes = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.toObject(message.allInfoTypes, options); + if (options.oneofs) + object.target = "allInfoTypes"; + } + if (message.allText != null && message.hasOwnProperty("allText")) { + object.allText = $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.toObject(message.allText, options); + if (options.oneofs) + object.target = "allText"; + } + return object; + }; + + /** + * Converts this ImageTransformation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation + * @instance + * @returns {Object.} JSON object + */ + ImageTransformation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImageTransformation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImageTransformation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ImageTransformations.ImageTransformation"; + }; + + ImageTransformation.SelectedInfoTypes = (function() { + + /** + * Properties of a SelectedInfoTypes. + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation + * @interface ISelectedInfoTypes + * @property {Array.|null} [infoTypes] SelectedInfoTypes infoTypes + */ + + /** + * Constructs a new SelectedInfoTypes. + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation + * @classdesc Represents a SelectedInfoTypes. + * @implements ISelectedInfoTypes + * @constructor + * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.ISelectedInfoTypes=} [properties] Properties to set + */ + function SelectedInfoTypes(properties) { + this.infoTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SelectedInfoTypes infoTypes. + * @member {Array.} infoTypes + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + * @instance + */ + SelectedInfoTypes.prototype.infoTypes = $util.emptyArray; + + /** + * Creates a new SelectedInfoTypes instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + * @static + * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.ISelectedInfoTypes=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes} SelectedInfoTypes instance + */ + SelectedInfoTypes.create = function create(properties) { + return new SelectedInfoTypes(properties); + }; + + /** + * Encodes the specified SelectedInfoTypes message. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + * @static + * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.ISelectedInfoTypes} message SelectedInfoTypes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectedInfoTypes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.infoTypes != null && message.infoTypes.length) + for (var i = 0; i < message.infoTypes.length; ++i) + $root.google.privacy.dlp.v2.InfoType.encode(message.infoTypes[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SelectedInfoTypes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + * @static + * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.ISelectedInfoTypes} message SelectedInfoTypes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectedInfoTypes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SelectedInfoTypes message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes} SelectedInfoTypes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectedInfoTypes.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 5: { + if (!(message.infoTypes && message.infoTypes.length)) + message.infoTypes = []; + message.infoTypes.push($root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SelectedInfoTypes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes} SelectedInfoTypes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectedInfoTypes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectedInfoTypes message. + * @function verify + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectedInfoTypes.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.infoTypes != null && message.hasOwnProperty("infoTypes")) { + if (!Array.isArray(message.infoTypes)) + return "infoTypes: array expected"; + for (var i = 0; i < message.infoTypes.length; ++i) { + var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infoTypes[i], long + 1); + if (error) + return "infoTypes." + error; + } + } + return null; + }; + + /** + * Creates a SelectedInfoTypes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes} SelectedInfoTypes + */ + SelectedInfoTypes.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes(); + if (object.infoTypes) { + if (!Array.isArray(object.infoTypes)) + throw TypeError(".google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.infoTypes: array expected"); + message.infoTypes = []; + for (var i = 0; i < object.infoTypes.length; ++i) { + if (typeof object.infoTypes[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes.infoTypes: object expected"); + message.infoTypes[i] = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoTypes[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a SelectedInfoTypes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + * @static + * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes} message SelectedInfoTypes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectedInfoTypes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.infoTypes = []; + if (message.infoTypes && message.infoTypes.length) { + object.infoTypes = []; + for (var j = 0; j < message.infoTypes.length; ++j) + object.infoTypes[j] = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoTypes[j], options); + } + return object; + }; + + /** + * Converts this SelectedInfoTypes to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + * @instance + * @returns {Object.} JSON object + */ + SelectedInfoTypes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SelectedInfoTypes + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectedInfoTypes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ImageTransformations.ImageTransformation.SelectedInfoTypes"; + }; + + return SelectedInfoTypes; + })(); + + ImageTransformation.AllInfoTypes = (function() { + + /** + * Properties of an AllInfoTypes. + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation + * @interface IAllInfoTypes + */ + + /** + * Constructs a new AllInfoTypes. + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation + * @classdesc Represents an AllInfoTypes. + * @implements IAllInfoTypes + * @constructor + * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllInfoTypes=} [properties] Properties to set + */ + function AllInfoTypes(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new AllInfoTypes instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + * @static + * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllInfoTypes=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes} AllInfoTypes instance + */ + AllInfoTypes.create = function create(properties) { + return new AllInfoTypes(properties); + }; + + /** + * Encodes the specified AllInfoTypes message. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + * @static + * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllInfoTypes} message AllInfoTypes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllInfoTypes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AllInfoTypes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + * @static + * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllInfoTypes} message AllInfoTypes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllInfoTypes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AllInfoTypes message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes} AllInfoTypes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllInfoTypes.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AllInfoTypes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes} AllInfoTypes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllInfoTypes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AllInfoTypes message. + * @function verify + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AllInfoTypes.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates an AllInfoTypes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes} AllInfoTypes + */ + AllInfoTypes.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes(); + }; + + /** + * Creates a plain object from an AllInfoTypes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + * @static + * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes} message AllInfoTypes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AllInfoTypes.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AllInfoTypes to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + * @instance + * @returns {Object.} JSON object + */ + AllInfoTypes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AllInfoTypes + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AllInfoTypes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllInfoTypes"; + }; + + return AllInfoTypes; + })(); + + ImageTransformation.AllText = (function() { + + /** + * Properties of an AllText. + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation + * @interface IAllText + */ + + /** + * Constructs a new AllText. + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation + * @classdesc Represents an AllText. + * @implements IAllText + * @constructor + * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllText=} [properties] Properties to set + */ + function AllText(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new AllText instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + * @static + * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllText=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText} AllText instance + */ + AllText.create = function create(properties) { + return new AllText(properties); + }; + + /** + * Encodes the specified AllText message. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + * @static + * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllText} message AllText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllText.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AllText message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + * @static + * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.IAllText} message AllText message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllText.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AllText message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText} AllText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllText.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AllText message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText} AllText + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllText.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AllText message. + * @function verify + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AllText.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates an AllText message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText} AllText + */ + AllText.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText(); + }; + + /** + * Creates a plain object from an AllText message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + * @static + * @param {google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText} message AllText + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AllText.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AllText to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + * @instance + * @returns {Object.} JSON object + */ + AllText.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AllText + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AllText.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ImageTransformations.ImageTransformation.AllText"; + }; + + return AllText; + })(); + + return ImageTransformation; + })(); + + return ImageTransformations; + })(); + + v2.TransformationErrorHandling = (function() { + + /** + * Properties of a TransformationErrorHandling. + * @memberof google.privacy.dlp.v2 + * @interface ITransformationErrorHandling + * @property {google.privacy.dlp.v2.TransformationErrorHandling.IThrowError|null} [throwError] TransformationErrorHandling throwError + * @property {google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed|null} [leaveUntransformed] TransformationErrorHandling leaveUntransformed + */ + + /** + * Constructs a new TransformationErrorHandling. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a TransformationErrorHandling. + * @implements ITransformationErrorHandling + * @constructor + * @param {google.privacy.dlp.v2.ITransformationErrorHandling=} [properties] Properties to set + */ + function TransformationErrorHandling(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TransformationErrorHandling throwError. + * @member {google.privacy.dlp.v2.TransformationErrorHandling.IThrowError|null|undefined} throwError + * @memberof google.privacy.dlp.v2.TransformationErrorHandling + * @instance + */ + TransformationErrorHandling.prototype.throwError = null; + + /** + * TransformationErrorHandling leaveUntransformed. + * @member {google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed|null|undefined} leaveUntransformed + * @memberof google.privacy.dlp.v2.TransformationErrorHandling + * @instance + */ + TransformationErrorHandling.prototype.leaveUntransformed = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TransformationErrorHandling mode. + * @member {"throwError"|"leaveUntransformed"|undefined} mode + * @memberof google.privacy.dlp.v2.TransformationErrorHandling + * @instance + */ + Object.defineProperty(TransformationErrorHandling.prototype, "mode", { + get: $util.oneOfGetter($oneOfFields = ["throwError", "leaveUntransformed"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TransformationErrorHandling instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.TransformationErrorHandling + * @static + * @param {google.privacy.dlp.v2.ITransformationErrorHandling=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.TransformationErrorHandling} TransformationErrorHandling instance + */ + TransformationErrorHandling.create = function create(properties) { + return new TransformationErrorHandling(properties); + }; + + /** + * Encodes the specified TransformationErrorHandling message. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.TransformationErrorHandling + * @static + * @param {google.privacy.dlp.v2.ITransformationErrorHandling} message TransformationErrorHandling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransformationErrorHandling.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.throwError != null && Object.hasOwnProperty.call(message, "throwError")) + $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.encode(message.throwError, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.leaveUntransformed != null && Object.hasOwnProperty.call(message, "leaveUntransformed")) + $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.encode(message.leaveUntransformed, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TransformationErrorHandling message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.TransformationErrorHandling + * @static + * @param {google.privacy.dlp.v2.ITransformationErrorHandling} message TransformationErrorHandling message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransformationErrorHandling.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TransformationErrorHandling message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.TransformationErrorHandling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.TransformationErrorHandling} TransformationErrorHandling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransformationErrorHandling.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationErrorHandling(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.throwError = $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.leaveUntransformed = $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TransformationErrorHandling message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.TransformationErrorHandling + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.TransformationErrorHandling} TransformationErrorHandling + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransformationErrorHandling.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TransformationErrorHandling message. + * @function verify + * @memberof google.privacy.dlp.v2.TransformationErrorHandling + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransformationErrorHandling.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.throwError != null && message.hasOwnProperty("throwError")) { + properties.mode = 1; + { + var error = $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.verify(message.throwError, long + 1); + if (error) + return "throwError." + error; + } + } + if (message.leaveUntransformed != null && message.hasOwnProperty("leaveUntransformed")) { + if (properties.mode === 1) + return "mode: multiple values"; + properties.mode = 1; + { + var error = $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.verify(message.leaveUntransformed, long + 1); + if (error) + return "leaveUntransformed." + error; + } + } + return null; + }; + + /** + * Creates a TransformationErrorHandling message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.TransformationErrorHandling + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.TransformationErrorHandling} TransformationErrorHandling + */ + TransformationErrorHandling.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.TransformationErrorHandling) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.TransformationErrorHandling(); + if (object.throwError != null) { + if (typeof object.throwError !== "object") + throw TypeError(".google.privacy.dlp.v2.TransformationErrorHandling.throwError: object expected"); + message.throwError = $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.fromObject(object.throwError, long + 1); + } + if (object.leaveUntransformed != null) { + if (typeof object.leaveUntransformed !== "object") + throw TypeError(".google.privacy.dlp.v2.TransformationErrorHandling.leaveUntransformed: object expected"); + message.leaveUntransformed = $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.fromObject(object.leaveUntransformed, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a TransformationErrorHandling message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.TransformationErrorHandling + * @static + * @param {google.privacy.dlp.v2.TransformationErrorHandling} message TransformationErrorHandling + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransformationErrorHandling.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.throwError != null && message.hasOwnProperty("throwError")) { + object.throwError = $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.toObject(message.throwError, options); + if (options.oneofs) + object.mode = "throwError"; + } + if (message.leaveUntransformed != null && message.hasOwnProperty("leaveUntransformed")) { + object.leaveUntransformed = $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.toObject(message.leaveUntransformed, options); + if (options.oneofs) + object.mode = "leaveUntransformed"; + } + return object; + }; + + /** + * Converts this TransformationErrorHandling to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.TransformationErrorHandling + * @instance + * @returns {Object.} JSON object + */ + TransformationErrorHandling.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TransformationErrorHandling + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.TransformationErrorHandling + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TransformationErrorHandling.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationErrorHandling"; + }; + + TransformationErrorHandling.ThrowError = (function() { + + /** + * Properties of a ThrowError. + * @memberof google.privacy.dlp.v2.TransformationErrorHandling + * @interface IThrowError + */ + + /** + * Constructs a new ThrowError. + * @memberof google.privacy.dlp.v2.TransformationErrorHandling + * @classdesc Represents a ThrowError. + * @implements IThrowError + * @constructor + * @param {google.privacy.dlp.v2.TransformationErrorHandling.IThrowError=} [properties] Properties to set + */ + function ThrowError(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new ThrowError instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError + * @static + * @param {google.privacy.dlp.v2.TransformationErrorHandling.IThrowError=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.TransformationErrorHandling.ThrowError} ThrowError instance + */ + ThrowError.create = function create(properties) { + return new ThrowError(properties); + }; + + /** + * Encodes the specified ThrowError message. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError + * @static + * @param {google.privacy.dlp.v2.TransformationErrorHandling.IThrowError} message ThrowError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ThrowError.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ThrowError message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.ThrowError.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError + * @static + * @param {google.privacy.dlp.v2.TransformationErrorHandling.IThrowError} message ThrowError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ThrowError.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ThrowError message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.TransformationErrorHandling.ThrowError} ThrowError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ThrowError.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ThrowError message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.TransformationErrorHandling.ThrowError} ThrowError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ThrowError.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ThrowError message. + * @function verify + * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ThrowError.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a ThrowError message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.TransformationErrorHandling.ThrowError} ThrowError + */ + ThrowError.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.TransformationErrorHandling.ThrowError(); + }; + + /** + * Creates a plain object from a ThrowError message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError + * @static + * @param {google.privacy.dlp.v2.TransformationErrorHandling.ThrowError} message ThrowError + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ThrowError.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ThrowError to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError + * @instance + * @returns {Object.} JSON object + */ + ThrowError.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ThrowError + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.TransformationErrorHandling.ThrowError + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ThrowError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationErrorHandling.ThrowError"; + }; + + return ThrowError; + })(); + + TransformationErrorHandling.LeaveUntransformed = (function() { + + /** + * Properties of a LeaveUntransformed. + * @memberof google.privacy.dlp.v2.TransformationErrorHandling + * @interface ILeaveUntransformed + */ + + /** + * Constructs a new LeaveUntransformed. + * @memberof google.privacy.dlp.v2.TransformationErrorHandling + * @classdesc Represents a LeaveUntransformed. + * @implements ILeaveUntransformed + * @constructor + * @param {google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed=} [properties] Properties to set + */ + function LeaveUntransformed(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new LeaveUntransformed instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed + * @static + * @param {google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed} LeaveUntransformed instance + */ + LeaveUntransformed.create = function create(properties) { + return new LeaveUntransformed(properties); + }; + + /** + * Encodes the specified LeaveUntransformed message. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed + * @static + * @param {google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed} message LeaveUntransformed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LeaveUntransformed.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified LeaveUntransformed message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed + * @static + * @param {google.privacy.dlp.v2.TransformationErrorHandling.ILeaveUntransformed} message LeaveUntransformed message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LeaveUntransformed.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LeaveUntransformed message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed} LeaveUntransformed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LeaveUntransformed.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a LeaveUntransformed message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed} LeaveUntransformed + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LeaveUntransformed.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LeaveUntransformed message. + * @function verify + * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LeaveUntransformed.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a LeaveUntransformed message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed} LeaveUntransformed + */ + LeaveUntransformed.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed(); + }; + + /** + * Creates a plain object from a LeaveUntransformed message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed + * @static + * @param {google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed} message LeaveUntransformed + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LeaveUntransformed.toObject = function toObject() { + return {}; + }; + + /** + * Converts this LeaveUntransformed to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed + * @instance + * @returns {Object.} JSON object + */ + LeaveUntransformed.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LeaveUntransformed + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LeaveUntransformed.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationErrorHandling.LeaveUntransformed"; + }; + + return LeaveUntransformed; + })(); + + return TransformationErrorHandling; + })(); + + v2.PrimitiveTransformation = (function() { + + /** + * Properties of a PrimitiveTransformation. + * @memberof google.privacy.dlp.v2 + * @interface IPrimitiveTransformation + * @property {google.privacy.dlp.v2.IReplaceValueConfig|null} [replaceConfig] PrimitiveTransformation replaceConfig + * @property {google.privacy.dlp.v2.IRedactConfig|null} [redactConfig] PrimitiveTransformation redactConfig + * @property {google.privacy.dlp.v2.ICharacterMaskConfig|null} [characterMaskConfig] PrimitiveTransformation characterMaskConfig + * @property {google.privacy.dlp.v2.ICryptoReplaceFfxFpeConfig|null} [cryptoReplaceFfxFpeConfig] PrimitiveTransformation cryptoReplaceFfxFpeConfig + * @property {google.privacy.dlp.v2.IFixedSizeBucketingConfig|null} [fixedSizeBucketingConfig] PrimitiveTransformation fixedSizeBucketingConfig + * @property {google.privacy.dlp.v2.IBucketingConfig|null} [bucketingConfig] PrimitiveTransformation bucketingConfig + * @property {google.privacy.dlp.v2.IReplaceWithInfoTypeConfig|null} [replaceWithInfoTypeConfig] PrimitiveTransformation replaceWithInfoTypeConfig + * @property {google.privacy.dlp.v2.ITimePartConfig|null} [timePartConfig] PrimitiveTransformation timePartConfig + * @property {google.privacy.dlp.v2.ICryptoHashConfig|null} [cryptoHashConfig] PrimitiveTransformation cryptoHashConfig + * @property {google.privacy.dlp.v2.IDateShiftConfig|null} [dateShiftConfig] PrimitiveTransformation dateShiftConfig + * @property {google.privacy.dlp.v2.ICryptoDeterministicConfig|null} [cryptoDeterministicConfig] PrimitiveTransformation cryptoDeterministicConfig + * @property {google.privacy.dlp.v2.IReplaceDictionaryConfig|null} [replaceDictionaryConfig] PrimitiveTransformation replaceDictionaryConfig + */ + + /** + * Constructs a new PrimitiveTransformation. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a PrimitiveTransformation. + * @implements IPrimitiveTransformation + * @constructor + * @param {google.privacy.dlp.v2.IPrimitiveTransformation=} [properties] Properties to set + */ + function PrimitiveTransformation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrimitiveTransformation replaceConfig. + * @member {google.privacy.dlp.v2.IReplaceValueConfig|null|undefined} replaceConfig + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @instance + */ + PrimitiveTransformation.prototype.replaceConfig = null; + + /** + * PrimitiveTransformation redactConfig. + * @member {google.privacy.dlp.v2.IRedactConfig|null|undefined} redactConfig + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @instance + */ + PrimitiveTransformation.prototype.redactConfig = null; + + /** + * PrimitiveTransformation characterMaskConfig. + * @member {google.privacy.dlp.v2.ICharacterMaskConfig|null|undefined} characterMaskConfig + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @instance + */ + PrimitiveTransformation.prototype.characterMaskConfig = null; + + /** + * PrimitiveTransformation cryptoReplaceFfxFpeConfig. + * @member {google.privacy.dlp.v2.ICryptoReplaceFfxFpeConfig|null|undefined} cryptoReplaceFfxFpeConfig + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @instance + */ + PrimitiveTransformation.prototype.cryptoReplaceFfxFpeConfig = null; + + /** + * PrimitiveTransformation fixedSizeBucketingConfig. + * @member {google.privacy.dlp.v2.IFixedSizeBucketingConfig|null|undefined} fixedSizeBucketingConfig + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @instance + */ + PrimitiveTransformation.prototype.fixedSizeBucketingConfig = null; + + /** + * PrimitiveTransformation bucketingConfig. + * @member {google.privacy.dlp.v2.IBucketingConfig|null|undefined} bucketingConfig + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @instance + */ + PrimitiveTransformation.prototype.bucketingConfig = null; + + /** + * PrimitiveTransformation replaceWithInfoTypeConfig. + * @member {google.privacy.dlp.v2.IReplaceWithInfoTypeConfig|null|undefined} replaceWithInfoTypeConfig + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @instance + */ + PrimitiveTransformation.prototype.replaceWithInfoTypeConfig = null; + + /** + * PrimitiveTransformation timePartConfig. + * @member {google.privacy.dlp.v2.ITimePartConfig|null|undefined} timePartConfig + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @instance + */ + PrimitiveTransformation.prototype.timePartConfig = null; + + /** + * PrimitiveTransformation cryptoHashConfig. + * @member {google.privacy.dlp.v2.ICryptoHashConfig|null|undefined} cryptoHashConfig + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @instance + */ + PrimitiveTransformation.prototype.cryptoHashConfig = null; + + /** + * PrimitiveTransformation dateShiftConfig. + * @member {google.privacy.dlp.v2.IDateShiftConfig|null|undefined} dateShiftConfig + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @instance + */ + PrimitiveTransformation.prototype.dateShiftConfig = null; + + /** + * PrimitiveTransformation cryptoDeterministicConfig. + * @member {google.privacy.dlp.v2.ICryptoDeterministicConfig|null|undefined} cryptoDeterministicConfig + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @instance + */ + PrimitiveTransformation.prototype.cryptoDeterministicConfig = null; + + /** + * PrimitiveTransformation replaceDictionaryConfig. + * @member {google.privacy.dlp.v2.IReplaceDictionaryConfig|null|undefined} replaceDictionaryConfig + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @instance + */ + PrimitiveTransformation.prototype.replaceDictionaryConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PrimitiveTransformation transformation. + * @member {"replaceConfig"|"redactConfig"|"characterMaskConfig"|"cryptoReplaceFfxFpeConfig"|"fixedSizeBucketingConfig"|"bucketingConfig"|"replaceWithInfoTypeConfig"|"timePartConfig"|"cryptoHashConfig"|"dateShiftConfig"|"cryptoDeterministicConfig"|"replaceDictionaryConfig"|undefined} transformation + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @instance + */ + Object.defineProperty(PrimitiveTransformation.prototype, "transformation", { + get: $util.oneOfGetter($oneOfFields = ["replaceConfig", "redactConfig", "characterMaskConfig", "cryptoReplaceFfxFpeConfig", "fixedSizeBucketingConfig", "bucketingConfig", "replaceWithInfoTypeConfig", "timePartConfig", "cryptoHashConfig", "dateShiftConfig", "cryptoDeterministicConfig", "replaceDictionaryConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PrimitiveTransformation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @static + * @param {google.privacy.dlp.v2.IPrimitiveTransformation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.PrimitiveTransformation} PrimitiveTransformation instance + */ + PrimitiveTransformation.create = function create(properties) { + return new PrimitiveTransformation(properties); + }; + + /** + * Encodes the specified PrimitiveTransformation message. Does not implicitly {@link google.privacy.dlp.v2.PrimitiveTransformation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @static + * @param {google.privacy.dlp.v2.IPrimitiveTransformation} message PrimitiveTransformation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrimitiveTransformation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.replaceConfig != null && Object.hasOwnProperty.call(message, "replaceConfig")) + $root.google.privacy.dlp.v2.ReplaceValueConfig.encode(message.replaceConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.redactConfig != null && Object.hasOwnProperty.call(message, "redactConfig")) + $root.google.privacy.dlp.v2.RedactConfig.encode(message.redactConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.characterMaskConfig != null && Object.hasOwnProperty.call(message, "characterMaskConfig")) + $root.google.privacy.dlp.v2.CharacterMaskConfig.encode(message.characterMaskConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.cryptoReplaceFfxFpeConfig != null && Object.hasOwnProperty.call(message, "cryptoReplaceFfxFpeConfig")) + $root.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.encode(message.cryptoReplaceFfxFpeConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.fixedSizeBucketingConfig != null && Object.hasOwnProperty.call(message, "fixedSizeBucketingConfig")) + $root.google.privacy.dlp.v2.FixedSizeBucketingConfig.encode(message.fixedSizeBucketingConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.bucketingConfig != null && Object.hasOwnProperty.call(message, "bucketingConfig")) + $root.google.privacy.dlp.v2.BucketingConfig.encode(message.bucketingConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.replaceWithInfoTypeConfig != null && Object.hasOwnProperty.call(message, "replaceWithInfoTypeConfig")) + $root.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.encode(message.replaceWithInfoTypeConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.timePartConfig != null && Object.hasOwnProperty.call(message, "timePartConfig")) + $root.google.privacy.dlp.v2.TimePartConfig.encode(message.timePartConfig, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.cryptoHashConfig != null && Object.hasOwnProperty.call(message, "cryptoHashConfig")) + $root.google.privacy.dlp.v2.CryptoHashConfig.encode(message.cryptoHashConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.dateShiftConfig != null && Object.hasOwnProperty.call(message, "dateShiftConfig")) + $root.google.privacy.dlp.v2.DateShiftConfig.encode(message.dateShiftConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.cryptoDeterministicConfig != null && Object.hasOwnProperty.call(message, "cryptoDeterministicConfig")) + $root.google.privacy.dlp.v2.CryptoDeterministicConfig.encode(message.cryptoDeterministicConfig, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.replaceDictionaryConfig != null && Object.hasOwnProperty.call(message, "replaceDictionaryConfig")) + $root.google.privacy.dlp.v2.ReplaceDictionaryConfig.encode(message.replaceDictionaryConfig, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PrimitiveTransformation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PrimitiveTransformation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @static + * @param {google.privacy.dlp.v2.IPrimitiveTransformation} message PrimitiveTransformation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrimitiveTransformation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrimitiveTransformation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.PrimitiveTransformation} PrimitiveTransformation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrimitiveTransformation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.PrimitiveTransformation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.replaceConfig = $root.google.privacy.dlp.v2.ReplaceValueConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.redactConfig = $root.google.privacy.dlp.v2.RedactConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.characterMaskConfig = $root.google.privacy.dlp.v2.CharacterMaskConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.cryptoReplaceFfxFpeConfig = $root.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.fixedSizeBucketingConfig = $root.google.privacy.dlp.v2.FixedSizeBucketingConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.bucketingConfig = $root.google.privacy.dlp.v2.BucketingConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 7: { + message.replaceWithInfoTypeConfig = $root.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 8: { + message.timePartConfig = $root.google.privacy.dlp.v2.TimePartConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 9: { + message.cryptoHashConfig = $root.google.privacy.dlp.v2.CryptoHashConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 11: { + message.dateShiftConfig = $root.google.privacy.dlp.v2.DateShiftConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 12: { + message.cryptoDeterministicConfig = $root.google.privacy.dlp.v2.CryptoDeterministicConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 13: { + message.replaceDictionaryConfig = $root.google.privacy.dlp.v2.ReplaceDictionaryConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PrimitiveTransformation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.PrimitiveTransformation} PrimitiveTransformation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrimitiveTransformation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrimitiveTransformation message. + * @function verify + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrimitiveTransformation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.replaceConfig != null && message.hasOwnProperty("replaceConfig")) { + properties.transformation = 1; + { + var error = $root.google.privacy.dlp.v2.ReplaceValueConfig.verify(message.replaceConfig, long + 1); + if (error) + return "replaceConfig." + error; + } + } + if (message.redactConfig != null && message.hasOwnProperty("redactConfig")) { + if (properties.transformation === 1) + return "transformation: multiple values"; + properties.transformation = 1; + { + var error = $root.google.privacy.dlp.v2.RedactConfig.verify(message.redactConfig, long + 1); + if (error) + return "redactConfig." + error; + } + } + if (message.characterMaskConfig != null && message.hasOwnProperty("characterMaskConfig")) { + if (properties.transformation === 1) + return "transformation: multiple values"; + properties.transformation = 1; + { + var error = $root.google.privacy.dlp.v2.CharacterMaskConfig.verify(message.characterMaskConfig, long + 1); + if (error) + return "characterMaskConfig." + error; + } + } + if (message.cryptoReplaceFfxFpeConfig != null && message.hasOwnProperty("cryptoReplaceFfxFpeConfig")) { + if (properties.transformation === 1) + return "transformation: multiple values"; + properties.transformation = 1; + { + var error = $root.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.verify(message.cryptoReplaceFfxFpeConfig, long + 1); + if (error) + return "cryptoReplaceFfxFpeConfig." + error; + } + } + if (message.fixedSizeBucketingConfig != null && message.hasOwnProperty("fixedSizeBucketingConfig")) { + if (properties.transformation === 1) + return "transformation: multiple values"; + properties.transformation = 1; + { + var error = $root.google.privacy.dlp.v2.FixedSizeBucketingConfig.verify(message.fixedSizeBucketingConfig, long + 1); + if (error) + return "fixedSizeBucketingConfig." + error; + } + } + if (message.bucketingConfig != null && message.hasOwnProperty("bucketingConfig")) { + if (properties.transformation === 1) + return "transformation: multiple values"; + properties.transformation = 1; + { + var error = $root.google.privacy.dlp.v2.BucketingConfig.verify(message.bucketingConfig, long + 1); + if (error) + return "bucketingConfig." + error; + } + } + if (message.replaceWithInfoTypeConfig != null && message.hasOwnProperty("replaceWithInfoTypeConfig")) { + if (properties.transformation === 1) + return "transformation: multiple values"; + properties.transformation = 1; + { + var error = $root.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.verify(message.replaceWithInfoTypeConfig, long + 1); + if (error) + return "replaceWithInfoTypeConfig." + error; + } + } + if (message.timePartConfig != null && message.hasOwnProperty("timePartConfig")) { + if (properties.transformation === 1) + return "transformation: multiple values"; + properties.transformation = 1; + { + var error = $root.google.privacy.dlp.v2.TimePartConfig.verify(message.timePartConfig, long + 1); + if (error) + return "timePartConfig." + error; + } + } + if (message.cryptoHashConfig != null && message.hasOwnProperty("cryptoHashConfig")) { + if (properties.transformation === 1) + return "transformation: multiple values"; + properties.transformation = 1; + { + var error = $root.google.privacy.dlp.v2.CryptoHashConfig.verify(message.cryptoHashConfig, long + 1); + if (error) + return "cryptoHashConfig." + error; + } + } + if (message.dateShiftConfig != null && message.hasOwnProperty("dateShiftConfig")) { + if (properties.transformation === 1) + return "transformation: multiple values"; + properties.transformation = 1; + { + var error = $root.google.privacy.dlp.v2.DateShiftConfig.verify(message.dateShiftConfig, long + 1); + if (error) + return "dateShiftConfig." + error; + } + } + if (message.cryptoDeterministicConfig != null && message.hasOwnProperty("cryptoDeterministicConfig")) { + if (properties.transformation === 1) + return "transformation: multiple values"; + properties.transformation = 1; + { + var error = $root.google.privacy.dlp.v2.CryptoDeterministicConfig.verify(message.cryptoDeterministicConfig, long + 1); + if (error) + return "cryptoDeterministicConfig." + error; + } + } + if (message.replaceDictionaryConfig != null && message.hasOwnProperty("replaceDictionaryConfig")) { + if (properties.transformation === 1) + return "transformation: multiple values"; + properties.transformation = 1; + { + var error = $root.google.privacy.dlp.v2.ReplaceDictionaryConfig.verify(message.replaceDictionaryConfig, long + 1); + if (error) + return "replaceDictionaryConfig." + error; + } + } + return null; + }; + + /** + * Creates a PrimitiveTransformation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.PrimitiveTransformation} PrimitiveTransformation + */ + PrimitiveTransformation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.PrimitiveTransformation) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.PrimitiveTransformation(); + if (object.replaceConfig != null) { + if (typeof object.replaceConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.replaceConfig: object expected"); + message.replaceConfig = $root.google.privacy.dlp.v2.ReplaceValueConfig.fromObject(object.replaceConfig, long + 1); + } + if (object.redactConfig != null) { + if (typeof object.redactConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.redactConfig: object expected"); + message.redactConfig = $root.google.privacy.dlp.v2.RedactConfig.fromObject(object.redactConfig, long + 1); + } + if (object.characterMaskConfig != null) { + if (typeof object.characterMaskConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.characterMaskConfig: object expected"); + message.characterMaskConfig = $root.google.privacy.dlp.v2.CharacterMaskConfig.fromObject(object.characterMaskConfig, long + 1); + } + if (object.cryptoReplaceFfxFpeConfig != null) { + if (typeof object.cryptoReplaceFfxFpeConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.cryptoReplaceFfxFpeConfig: object expected"); + message.cryptoReplaceFfxFpeConfig = $root.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.fromObject(object.cryptoReplaceFfxFpeConfig, long + 1); + } + if (object.fixedSizeBucketingConfig != null) { + if (typeof object.fixedSizeBucketingConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.fixedSizeBucketingConfig: object expected"); + message.fixedSizeBucketingConfig = $root.google.privacy.dlp.v2.FixedSizeBucketingConfig.fromObject(object.fixedSizeBucketingConfig, long + 1); + } + if (object.bucketingConfig != null) { + if (typeof object.bucketingConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.bucketingConfig: object expected"); + message.bucketingConfig = $root.google.privacy.dlp.v2.BucketingConfig.fromObject(object.bucketingConfig, long + 1); + } + if (object.replaceWithInfoTypeConfig != null) { + if (typeof object.replaceWithInfoTypeConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.replaceWithInfoTypeConfig: object expected"); + message.replaceWithInfoTypeConfig = $root.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.fromObject(object.replaceWithInfoTypeConfig, long + 1); + } + if (object.timePartConfig != null) { + if (typeof object.timePartConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.timePartConfig: object expected"); + message.timePartConfig = $root.google.privacy.dlp.v2.TimePartConfig.fromObject(object.timePartConfig, long + 1); + } + if (object.cryptoHashConfig != null) { + if (typeof object.cryptoHashConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.cryptoHashConfig: object expected"); + message.cryptoHashConfig = $root.google.privacy.dlp.v2.CryptoHashConfig.fromObject(object.cryptoHashConfig, long + 1); + } + if (object.dateShiftConfig != null) { + if (typeof object.dateShiftConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.dateShiftConfig: object expected"); + message.dateShiftConfig = $root.google.privacy.dlp.v2.DateShiftConfig.fromObject(object.dateShiftConfig, long + 1); + } + if (object.cryptoDeterministicConfig != null) { + if (typeof object.cryptoDeterministicConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.cryptoDeterministicConfig: object expected"); + message.cryptoDeterministicConfig = $root.google.privacy.dlp.v2.CryptoDeterministicConfig.fromObject(object.cryptoDeterministicConfig, long + 1); + } + if (object.replaceDictionaryConfig != null) { + if (typeof object.replaceDictionaryConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.PrimitiveTransformation.replaceDictionaryConfig: object expected"); + message.replaceDictionaryConfig = $root.google.privacy.dlp.v2.ReplaceDictionaryConfig.fromObject(object.replaceDictionaryConfig, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a PrimitiveTransformation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @static + * @param {google.privacy.dlp.v2.PrimitiveTransformation} message PrimitiveTransformation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrimitiveTransformation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.replaceConfig != null && message.hasOwnProperty("replaceConfig")) { + object.replaceConfig = $root.google.privacy.dlp.v2.ReplaceValueConfig.toObject(message.replaceConfig, options); + if (options.oneofs) + object.transformation = "replaceConfig"; + } + if (message.redactConfig != null && message.hasOwnProperty("redactConfig")) { + object.redactConfig = $root.google.privacy.dlp.v2.RedactConfig.toObject(message.redactConfig, options); + if (options.oneofs) + object.transformation = "redactConfig"; + } + if (message.characterMaskConfig != null && message.hasOwnProperty("characterMaskConfig")) { + object.characterMaskConfig = $root.google.privacy.dlp.v2.CharacterMaskConfig.toObject(message.characterMaskConfig, options); + if (options.oneofs) + object.transformation = "characterMaskConfig"; + } + if (message.cryptoReplaceFfxFpeConfig != null && message.hasOwnProperty("cryptoReplaceFfxFpeConfig")) { + object.cryptoReplaceFfxFpeConfig = $root.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.toObject(message.cryptoReplaceFfxFpeConfig, options); + if (options.oneofs) + object.transformation = "cryptoReplaceFfxFpeConfig"; + } + if (message.fixedSizeBucketingConfig != null && message.hasOwnProperty("fixedSizeBucketingConfig")) { + object.fixedSizeBucketingConfig = $root.google.privacy.dlp.v2.FixedSizeBucketingConfig.toObject(message.fixedSizeBucketingConfig, options); + if (options.oneofs) + object.transformation = "fixedSizeBucketingConfig"; + } + if (message.bucketingConfig != null && message.hasOwnProperty("bucketingConfig")) { + object.bucketingConfig = $root.google.privacy.dlp.v2.BucketingConfig.toObject(message.bucketingConfig, options); + if (options.oneofs) + object.transformation = "bucketingConfig"; + } + if (message.replaceWithInfoTypeConfig != null && message.hasOwnProperty("replaceWithInfoTypeConfig")) { + object.replaceWithInfoTypeConfig = $root.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.toObject(message.replaceWithInfoTypeConfig, options); + if (options.oneofs) + object.transformation = "replaceWithInfoTypeConfig"; + } + if (message.timePartConfig != null && message.hasOwnProperty("timePartConfig")) { + object.timePartConfig = $root.google.privacy.dlp.v2.TimePartConfig.toObject(message.timePartConfig, options); + if (options.oneofs) + object.transformation = "timePartConfig"; + } + if (message.cryptoHashConfig != null && message.hasOwnProperty("cryptoHashConfig")) { + object.cryptoHashConfig = $root.google.privacy.dlp.v2.CryptoHashConfig.toObject(message.cryptoHashConfig, options); + if (options.oneofs) + object.transformation = "cryptoHashConfig"; + } + if (message.dateShiftConfig != null && message.hasOwnProperty("dateShiftConfig")) { + object.dateShiftConfig = $root.google.privacy.dlp.v2.DateShiftConfig.toObject(message.dateShiftConfig, options); + if (options.oneofs) + object.transformation = "dateShiftConfig"; + } + if (message.cryptoDeterministicConfig != null && message.hasOwnProperty("cryptoDeterministicConfig")) { + object.cryptoDeterministicConfig = $root.google.privacy.dlp.v2.CryptoDeterministicConfig.toObject(message.cryptoDeterministicConfig, options); + if (options.oneofs) + object.transformation = "cryptoDeterministicConfig"; + } + if (message.replaceDictionaryConfig != null && message.hasOwnProperty("replaceDictionaryConfig")) { + object.replaceDictionaryConfig = $root.google.privacy.dlp.v2.ReplaceDictionaryConfig.toObject(message.replaceDictionaryConfig, options); + if (options.oneofs) + object.transformation = "replaceDictionaryConfig"; + } + return object; + }; + + /** + * Converts this PrimitiveTransformation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @instance + * @returns {Object.} JSON object + */ + PrimitiveTransformation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrimitiveTransformation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.PrimitiveTransformation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrimitiveTransformation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.PrimitiveTransformation"; + }; + + return PrimitiveTransformation; + })(); + + v2.TimePartConfig = (function() { + + /** + * Properties of a TimePartConfig. + * @memberof google.privacy.dlp.v2 + * @interface ITimePartConfig + * @property {google.privacy.dlp.v2.TimePartConfig.TimePart|null} [partToExtract] TimePartConfig partToExtract + */ + + /** + * Constructs a new TimePartConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a TimePartConfig. + * @implements ITimePartConfig + * @constructor + * @param {google.privacy.dlp.v2.ITimePartConfig=} [properties] Properties to set + */ + function TimePartConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimePartConfig partToExtract. + * @member {google.privacy.dlp.v2.TimePartConfig.TimePart} partToExtract + * @memberof google.privacy.dlp.v2.TimePartConfig + * @instance + */ + TimePartConfig.prototype.partToExtract = 0; + + /** + * Creates a new TimePartConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.TimePartConfig + * @static + * @param {google.privacy.dlp.v2.ITimePartConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.TimePartConfig} TimePartConfig instance + */ + TimePartConfig.create = function create(properties) { + return new TimePartConfig(properties); + }; + + /** + * Encodes the specified TimePartConfig message. Does not implicitly {@link google.privacy.dlp.v2.TimePartConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.TimePartConfig + * @static + * @param {google.privacy.dlp.v2.ITimePartConfig} message TimePartConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimePartConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partToExtract != null && Object.hasOwnProperty.call(message, "partToExtract")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.partToExtract); + return writer; + }; + + /** + * Encodes the specified TimePartConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TimePartConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.TimePartConfig + * @static + * @param {google.privacy.dlp.v2.ITimePartConfig} message TimePartConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimePartConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimePartConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.TimePartConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.TimePartConfig} TimePartConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimePartConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TimePartConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.partToExtract = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TimePartConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.TimePartConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.TimePartConfig} TimePartConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimePartConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimePartConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.TimePartConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimePartConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.partToExtract != null && message.hasOwnProperty("partToExtract")) + switch (message.partToExtract) { + default: + return "partToExtract: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + return null; + }; + + /** + * Creates a TimePartConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.TimePartConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.TimePartConfig} TimePartConfig + */ + TimePartConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.TimePartConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.TimePartConfig(); + switch (object.partToExtract) { + default: + if (typeof object.partToExtract === "number") { + message.partToExtract = object.partToExtract; + break; + } + break; + case "TIME_PART_UNSPECIFIED": + case 0: + message.partToExtract = 0; + break; + case "YEAR": + case 1: + message.partToExtract = 1; + break; + case "MONTH": + case 2: + message.partToExtract = 2; + break; + case "DAY_OF_MONTH": + case 3: + message.partToExtract = 3; + break; + case "DAY_OF_WEEK": + case 4: + message.partToExtract = 4; + break; + case "WEEK_OF_YEAR": + case 5: + message.partToExtract = 5; + break; + case "HOUR_OF_DAY": + case 6: + message.partToExtract = 6; + break; + } + return message; + }; + + /** + * Creates a plain object from a TimePartConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.TimePartConfig + * @static + * @param {google.privacy.dlp.v2.TimePartConfig} message TimePartConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimePartConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.partToExtract = options.enums === String ? "TIME_PART_UNSPECIFIED" : 0; + if (message.partToExtract != null && message.hasOwnProperty("partToExtract")) + object.partToExtract = options.enums === String ? $root.google.privacy.dlp.v2.TimePartConfig.TimePart[message.partToExtract] === undefined ? message.partToExtract : $root.google.privacy.dlp.v2.TimePartConfig.TimePart[message.partToExtract] : message.partToExtract; + return object; + }; + + /** + * Converts this TimePartConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.TimePartConfig + * @instance + * @returns {Object.} JSON object + */ + TimePartConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimePartConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.TimePartConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimePartConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.TimePartConfig"; + }; + + /** + * TimePart enum. + * @name google.privacy.dlp.v2.TimePartConfig.TimePart + * @enum {number} + * @property {number} TIME_PART_UNSPECIFIED=0 TIME_PART_UNSPECIFIED value + * @property {number} YEAR=1 YEAR value + * @property {number} MONTH=2 MONTH value + * @property {number} DAY_OF_MONTH=3 DAY_OF_MONTH value + * @property {number} DAY_OF_WEEK=4 DAY_OF_WEEK value + * @property {number} WEEK_OF_YEAR=5 WEEK_OF_YEAR value + * @property {number} HOUR_OF_DAY=6 HOUR_OF_DAY value + */ + TimePartConfig.TimePart = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TIME_PART_UNSPECIFIED"] = 0; + values[valuesById[1] = "YEAR"] = 1; + values[valuesById[2] = "MONTH"] = 2; + values[valuesById[3] = "DAY_OF_MONTH"] = 3; + values[valuesById[4] = "DAY_OF_WEEK"] = 4; + values[valuesById[5] = "WEEK_OF_YEAR"] = 5; + values[valuesById[6] = "HOUR_OF_DAY"] = 6; + return values; + })(); + + return TimePartConfig; + })(); + + v2.CryptoHashConfig = (function() { + + /** + * Properties of a CryptoHashConfig. + * @memberof google.privacy.dlp.v2 + * @interface ICryptoHashConfig + * @property {google.privacy.dlp.v2.ICryptoKey|null} [cryptoKey] CryptoHashConfig cryptoKey + */ + + /** + * Constructs a new CryptoHashConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CryptoHashConfig. + * @implements ICryptoHashConfig + * @constructor + * @param {google.privacy.dlp.v2.ICryptoHashConfig=} [properties] Properties to set + */ + function CryptoHashConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CryptoHashConfig cryptoKey. + * @member {google.privacy.dlp.v2.ICryptoKey|null|undefined} cryptoKey + * @memberof google.privacy.dlp.v2.CryptoHashConfig + * @instance + */ + CryptoHashConfig.prototype.cryptoKey = null; + + /** + * Creates a new CryptoHashConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CryptoHashConfig + * @static + * @param {google.privacy.dlp.v2.ICryptoHashConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CryptoHashConfig} CryptoHashConfig instance + */ + CryptoHashConfig.create = function create(properties) { + return new CryptoHashConfig(properties); + }; + + /** + * Encodes the specified CryptoHashConfig message. Does not implicitly {@link google.privacy.dlp.v2.CryptoHashConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CryptoHashConfig + * @static + * @param {google.privacy.dlp.v2.ICryptoHashConfig} message CryptoHashConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CryptoHashConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cryptoKey != null && Object.hasOwnProperty.call(message, "cryptoKey")) + $root.google.privacy.dlp.v2.CryptoKey.encode(message.cryptoKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CryptoHashConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CryptoHashConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CryptoHashConfig + * @static + * @param {google.privacy.dlp.v2.ICryptoHashConfig} message CryptoHashConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CryptoHashConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CryptoHashConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CryptoHashConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CryptoHashConfig} CryptoHashConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CryptoHashConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CryptoHashConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.cryptoKey = $root.google.privacy.dlp.v2.CryptoKey.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CryptoHashConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CryptoHashConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CryptoHashConfig} CryptoHashConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CryptoHashConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CryptoHashConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.CryptoHashConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CryptoHashConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.cryptoKey != null && message.hasOwnProperty("cryptoKey")) { + var error = $root.google.privacy.dlp.v2.CryptoKey.verify(message.cryptoKey, long + 1); + if (error) + return "cryptoKey." + error; + } + return null; + }; + + /** + * Creates a CryptoHashConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CryptoHashConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CryptoHashConfig} CryptoHashConfig + */ + CryptoHashConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CryptoHashConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CryptoHashConfig(); + if (object.cryptoKey != null) { + if (typeof object.cryptoKey !== "object") + throw TypeError(".google.privacy.dlp.v2.CryptoHashConfig.cryptoKey: object expected"); + message.cryptoKey = $root.google.privacy.dlp.v2.CryptoKey.fromObject(object.cryptoKey, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CryptoHashConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CryptoHashConfig + * @static + * @param {google.privacy.dlp.v2.CryptoHashConfig} message CryptoHashConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CryptoHashConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.cryptoKey = null; + if (message.cryptoKey != null && message.hasOwnProperty("cryptoKey")) + object.cryptoKey = $root.google.privacy.dlp.v2.CryptoKey.toObject(message.cryptoKey, options); + return object; + }; + + /** + * Converts this CryptoHashConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CryptoHashConfig + * @instance + * @returns {Object.} JSON object + */ + CryptoHashConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CryptoHashConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CryptoHashConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CryptoHashConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CryptoHashConfig"; + }; + + return CryptoHashConfig; + })(); + + v2.CryptoDeterministicConfig = (function() { + + /** + * Properties of a CryptoDeterministicConfig. + * @memberof google.privacy.dlp.v2 + * @interface ICryptoDeterministicConfig + * @property {google.privacy.dlp.v2.ICryptoKey|null} [cryptoKey] CryptoDeterministicConfig cryptoKey + * @property {google.privacy.dlp.v2.IInfoType|null} [surrogateInfoType] CryptoDeterministicConfig surrogateInfoType + * @property {google.privacy.dlp.v2.IFieldId|null} [context] CryptoDeterministicConfig context + */ + + /** + * Constructs a new CryptoDeterministicConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CryptoDeterministicConfig. + * @implements ICryptoDeterministicConfig + * @constructor + * @param {google.privacy.dlp.v2.ICryptoDeterministicConfig=} [properties] Properties to set + */ + function CryptoDeterministicConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CryptoDeterministicConfig cryptoKey. + * @member {google.privacy.dlp.v2.ICryptoKey|null|undefined} cryptoKey + * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig + * @instance + */ + CryptoDeterministicConfig.prototype.cryptoKey = null; + + /** + * CryptoDeterministicConfig surrogateInfoType. + * @member {google.privacy.dlp.v2.IInfoType|null|undefined} surrogateInfoType + * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig + * @instance + */ + CryptoDeterministicConfig.prototype.surrogateInfoType = null; + + /** + * CryptoDeterministicConfig context. + * @member {google.privacy.dlp.v2.IFieldId|null|undefined} context + * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig + * @instance + */ + CryptoDeterministicConfig.prototype.context = null; + + /** + * Creates a new CryptoDeterministicConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig + * @static + * @param {google.privacy.dlp.v2.ICryptoDeterministicConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CryptoDeterministicConfig} CryptoDeterministicConfig instance + */ + CryptoDeterministicConfig.create = function create(properties) { + return new CryptoDeterministicConfig(properties); + }; + + /** + * Encodes the specified CryptoDeterministicConfig message. Does not implicitly {@link google.privacy.dlp.v2.CryptoDeterministicConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig + * @static + * @param {google.privacy.dlp.v2.ICryptoDeterministicConfig} message CryptoDeterministicConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CryptoDeterministicConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cryptoKey != null && Object.hasOwnProperty.call(message, "cryptoKey")) + $root.google.privacy.dlp.v2.CryptoKey.encode(message.cryptoKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.surrogateInfoType != null && Object.hasOwnProperty.call(message, "surrogateInfoType")) + $root.google.privacy.dlp.v2.InfoType.encode(message.surrogateInfoType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.context != null && Object.hasOwnProperty.call(message, "context")) + $root.google.privacy.dlp.v2.FieldId.encode(message.context, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CryptoDeterministicConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CryptoDeterministicConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig + * @static + * @param {google.privacy.dlp.v2.ICryptoDeterministicConfig} message CryptoDeterministicConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CryptoDeterministicConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CryptoDeterministicConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CryptoDeterministicConfig} CryptoDeterministicConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CryptoDeterministicConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CryptoDeterministicConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.cryptoKey = $root.google.privacy.dlp.v2.CryptoKey.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.surrogateInfoType = $root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.context = $root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CryptoDeterministicConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CryptoDeterministicConfig} CryptoDeterministicConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CryptoDeterministicConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CryptoDeterministicConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CryptoDeterministicConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.cryptoKey != null && message.hasOwnProperty("cryptoKey")) { + var error = $root.google.privacy.dlp.v2.CryptoKey.verify(message.cryptoKey, long + 1); + if (error) + return "cryptoKey." + error; + } + if (message.surrogateInfoType != null && message.hasOwnProperty("surrogateInfoType")) { + var error = $root.google.privacy.dlp.v2.InfoType.verify(message.surrogateInfoType, long + 1); + if (error) + return "surrogateInfoType." + error; + } + if (message.context != null && message.hasOwnProperty("context")) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.context, long + 1); + if (error) + return "context." + error; + } + return null; + }; + + /** + * Creates a CryptoDeterministicConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CryptoDeterministicConfig} CryptoDeterministicConfig + */ + CryptoDeterministicConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CryptoDeterministicConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CryptoDeterministicConfig(); + if (object.cryptoKey != null) { + if (typeof object.cryptoKey !== "object") + throw TypeError(".google.privacy.dlp.v2.CryptoDeterministicConfig.cryptoKey: object expected"); + message.cryptoKey = $root.google.privacy.dlp.v2.CryptoKey.fromObject(object.cryptoKey, long + 1); + } + if (object.surrogateInfoType != null) { + if (typeof object.surrogateInfoType !== "object") + throw TypeError(".google.privacy.dlp.v2.CryptoDeterministicConfig.surrogateInfoType: object expected"); + message.surrogateInfoType = $root.google.privacy.dlp.v2.InfoType.fromObject(object.surrogateInfoType, long + 1); + } + if (object.context != null) { + if (typeof object.context !== "object") + throw TypeError(".google.privacy.dlp.v2.CryptoDeterministicConfig.context: object expected"); + message.context = $root.google.privacy.dlp.v2.FieldId.fromObject(object.context, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CryptoDeterministicConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig + * @static + * @param {google.privacy.dlp.v2.CryptoDeterministicConfig} message CryptoDeterministicConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CryptoDeterministicConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cryptoKey = null; + object.surrogateInfoType = null; + object.context = null; + } + if (message.cryptoKey != null && message.hasOwnProperty("cryptoKey")) + object.cryptoKey = $root.google.privacy.dlp.v2.CryptoKey.toObject(message.cryptoKey, options); + if (message.surrogateInfoType != null && message.hasOwnProperty("surrogateInfoType")) + object.surrogateInfoType = $root.google.privacy.dlp.v2.InfoType.toObject(message.surrogateInfoType, options); + if (message.context != null && message.hasOwnProperty("context")) + object.context = $root.google.privacy.dlp.v2.FieldId.toObject(message.context, options); + return object; + }; + + /** + * Converts this CryptoDeterministicConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig + * @instance + * @returns {Object.} JSON object + */ + CryptoDeterministicConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CryptoDeterministicConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CryptoDeterministicConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CryptoDeterministicConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CryptoDeterministicConfig"; + }; + + return CryptoDeterministicConfig; + })(); + + v2.ReplaceValueConfig = (function() { + + /** + * Properties of a ReplaceValueConfig. + * @memberof google.privacy.dlp.v2 + * @interface IReplaceValueConfig + * @property {google.privacy.dlp.v2.IValue|null} [newValue] ReplaceValueConfig newValue + */ + + /** + * Constructs a new ReplaceValueConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ReplaceValueConfig. + * @implements IReplaceValueConfig + * @constructor + * @param {google.privacy.dlp.v2.IReplaceValueConfig=} [properties] Properties to set + */ + function ReplaceValueConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReplaceValueConfig newValue. + * @member {google.privacy.dlp.v2.IValue|null|undefined} newValue + * @memberof google.privacy.dlp.v2.ReplaceValueConfig + * @instance + */ + ReplaceValueConfig.prototype.newValue = null; + + /** + * Creates a new ReplaceValueConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ReplaceValueConfig + * @static + * @param {google.privacy.dlp.v2.IReplaceValueConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ReplaceValueConfig} ReplaceValueConfig instance + */ + ReplaceValueConfig.create = function create(properties) { + return new ReplaceValueConfig(properties); + }; + + /** + * Encodes the specified ReplaceValueConfig message. Does not implicitly {@link google.privacy.dlp.v2.ReplaceValueConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ReplaceValueConfig + * @static + * @param {google.privacy.dlp.v2.IReplaceValueConfig} message ReplaceValueConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReplaceValueConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.newValue != null && Object.hasOwnProperty.call(message, "newValue")) + $root.google.privacy.dlp.v2.Value.encode(message.newValue, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReplaceValueConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ReplaceValueConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ReplaceValueConfig + * @static + * @param {google.privacy.dlp.v2.IReplaceValueConfig} message ReplaceValueConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReplaceValueConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReplaceValueConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ReplaceValueConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ReplaceValueConfig} ReplaceValueConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReplaceValueConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ReplaceValueConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.newValue = $root.google.privacy.dlp.v2.Value.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ReplaceValueConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ReplaceValueConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ReplaceValueConfig} ReplaceValueConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReplaceValueConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReplaceValueConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.ReplaceValueConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReplaceValueConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.newValue != null && message.hasOwnProperty("newValue")) { + var error = $root.google.privacy.dlp.v2.Value.verify(message.newValue, long + 1); + if (error) + return "newValue." + error; + } + return null; + }; + + /** + * Creates a ReplaceValueConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ReplaceValueConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ReplaceValueConfig} ReplaceValueConfig + */ + ReplaceValueConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ReplaceValueConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ReplaceValueConfig(); + if (object.newValue != null) { + if (typeof object.newValue !== "object") + throw TypeError(".google.privacy.dlp.v2.ReplaceValueConfig.newValue: object expected"); + message.newValue = $root.google.privacy.dlp.v2.Value.fromObject(object.newValue, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a ReplaceValueConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ReplaceValueConfig + * @static + * @param {google.privacy.dlp.v2.ReplaceValueConfig} message ReplaceValueConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReplaceValueConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.newValue = null; + if (message.newValue != null && message.hasOwnProperty("newValue")) + object.newValue = $root.google.privacy.dlp.v2.Value.toObject(message.newValue, options); + return object; + }; + + /** + * Converts this ReplaceValueConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ReplaceValueConfig + * @instance + * @returns {Object.} JSON object + */ + ReplaceValueConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReplaceValueConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ReplaceValueConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReplaceValueConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ReplaceValueConfig"; + }; + + return ReplaceValueConfig; + })(); + + v2.ReplaceDictionaryConfig = (function() { + + /** + * Properties of a ReplaceDictionaryConfig. + * @memberof google.privacy.dlp.v2 + * @interface IReplaceDictionaryConfig + * @property {google.privacy.dlp.v2.CustomInfoType.Dictionary.IWordList|null} [wordList] ReplaceDictionaryConfig wordList + */ + + /** + * Constructs a new ReplaceDictionaryConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ReplaceDictionaryConfig. + * @implements IReplaceDictionaryConfig + * @constructor + * @param {google.privacy.dlp.v2.IReplaceDictionaryConfig=} [properties] Properties to set + */ + function ReplaceDictionaryConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReplaceDictionaryConfig wordList. + * @member {google.privacy.dlp.v2.CustomInfoType.Dictionary.IWordList|null|undefined} wordList + * @memberof google.privacy.dlp.v2.ReplaceDictionaryConfig + * @instance + */ + ReplaceDictionaryConfig.prototype.wordList = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ReplaceDictionaryConfig type. + * @member {"wordList"|undefined} type + * @memberof google.privacy.dlp.v2.ReplaceDictionaryConfig + * @instance + */ + Object.defineProperty(ReplaceDictionaryConfig.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["wordList"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ReplaceDictionaryConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ReplaceDictionaryConfig + * @static + * @param {google.privacy.dlp.v2.IReplaceDictionaryConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ReplaceDictionaryConfig} ReplaceDictionaryConfig instance + */ + ReplaceDictionaryConfig.create = function create(properties) { + return new ReplaceDictionaryConfig(properties); + }; + + /** + * Encodes the specified ReplaceDictionaryConfig message. Does not implicitly {@link google.privacy.dlp.v2.ReplaceDictionaryConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ReplaceDictionaryConfig + * @static + * @param {google.privacy.dlp.v2.IReplaceDictionaryConfig} message ReplaceDictionaryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReplaceDictionaryConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.wordList != null && Object.hasOwnProperty.call(message, "wordList")) + $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.encode(message.wordList, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ReplaceDictionaryConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ReplaceDictionaryConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ReplaceDictionaryConfig + * @static + * @param {google.privacy.dlp.v2.IReplaceDictionaryConfig} message ReplaceDictionaryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReplaceDictionaryConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReplaceDictionaryConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ReplaceDictionaryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ReplaceDictionaryConfig} ReplaceDictionaryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReplaceDictionaryConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ReplaceDictionaryConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.wordList = $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ReplaceDictionaryConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ReplaceDictionaryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ReplaceDictionaryConfig} ReplaceDictionaryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReplaceDictionaryConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReplaceDictionaryConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.ReplaceDictionaryConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReplaceDictionaryConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.wordList != null && message.hasOwnProperty("wordList")) { + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.verify(message.wordList, long + 1); + if (error) + return "wordList." + error; + } + } + return null; + }; + + /** + * Creates a ReplaceDictionaryConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ReplaceDictionaryConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ReplaceDictionaryConfig} ReplaceDictionaryConfig + */ + ReplaceDictionaryConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ReplaceDictionaryConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ReplaceDictionaryConfig(); + if (object.wordList != null) { + if (typeof object.wordList !== "object") + throw TypeError(".google.privacy.dlp.v2.ReplaceDictionaryConfig.wordList: object expected"); + message.wordList = $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.fromObject(object.wordList, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a ReplaceDictionaryConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ReplaceDictionaryConfig + * @static + * @param {google.privacy.dlp.v2.ReplaceDictionaryConfig} message ReplaceDictionaryConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReplaceDictionaryConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.wordList != null && message.hasOwnProperty("wordList")) { + object.wordList = $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.toObject(message.wordList, options); + if (options.oneofs) + object.type = "wordList"; + } + return object; + }; + + /** + * Converts this ReplaceDictionaryConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ReplaceDictionaryConfig + * @instance + * @returns {Object.} JSON object + */ + ReplaceDictionaryConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReplaceDictionaryConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ReplaceDictionaryConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReplaceDictionaryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ReplaceDictionaryConfig"; + }; + + return ReplaceDictionaryConfig; + })(); + + v2.ReplaceWithInfoTypeConfig = (function() { + + /** + * Properties of a ReplaceWithInfoTypeConfig. + * @memberof google.privacy.dlp.v2 + * @interface IReplaceWithInfoTypeConfig + */ + + /** + * Constructs a new ReplaceWithInfoTypeConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ReplaceWithInfoTypeConfig. + * @implements IReplaceWithInfoTypeConfig + * @constructor + * @param {google.privacy.dlp.v2.IReplaceWithInfoTypeConfig=} [properties] Properties to set + */ + function ReplaceWithInfoTypeConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new ReplaceWithInfoTypeConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ReplaceWithInfoTypeConfig + * @static + * @param {google.privacy.dlp.v2.IReplaceWithInfoTypeConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ReplaceWithInfoTypeConfig} ReplaceWithInfoTypeConfig instance + */ + ReplaceWithInfoTypeConfig.create = function create(properties) { + return new ReplaceWithInfoTypeConfig(properties); + }; + + /** + * Encodes the specified ReplaceWithInfoTypeConfig message. Does not implicitly {@link google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ReplaceWithInfoTypeConfig + * @static + * @param {google.privacy.dlp.v2.IReplaceWithInfoTypeConfig} message ReplaceWithInfoTypeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReplaceWithInfoTypeConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ReplaceWithInfoTypeConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ReplaceWithInfoTypeConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ReplaceWithInfoTypeConfig + * @static + * @param {google.privacy.dlp.v2.IReplaceWithInfoTypeConfig} message ReplaceWithInfoTypeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReplaceWithInfoTypeConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReplaceWithInfoTypeConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ReplaceWithInfoTypeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ReplaceWithInfoTypeConfig} ReplaceWithInfoTypeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReplaceWithInfoTypeConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ReplaceWithInfoTypeConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ReplaceWithInfoTypeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ReplaceWithInfoTypeConfig} ReplaceWithInfoTypeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReplaceWithInfoTypeConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReplaceWithInfoTypeConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.ReplaceWithInfoTypeConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReplaceWithInfoTypeConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a ReplaceWithInfoTypeConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ReplaceWithInfoTypeConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ReplaceWithInfoTypeConfig} ReplaceWithInfoTypeConfig + */ + ReplaceWithInfoTypeConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.ReplaceWithInfoTypeConfig(); + }; + + /** + * Creates a plain object from a ReplaceWithInfoTypeConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ReplaceWithInfoTypeConfig + * @static + * @param {google.privacy.dlp.v2.ReplaceWithInfoTypeConfig} message ReplaceWithInfoTypeConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReplaceWithInfoTypeConfig.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ReplaceWithInfoTypeConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ReplaceWithInfoTypeConfig + * @instance + * @returns {Object.} JSON object + */ + ReplaceWithInfoTypeConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReplaceWithInfoTypeConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ReplaceWithInfoTypeConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReplaceWithInfoTypeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ReplaceWithInfoTypeConfig"; + }; + + return ReplaceWithInfoTypeConfig; + })(); + + v2.RedactConfig = (function() { + + /** + * Properties of a RedactConfig. + * @memberof google.privacy.dlp.v2 + * @interface IRedactConfig + */ + + /** + * Constructs a new RedactConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a RedactConfig. + * @implements IRedactConfig + * @constructor + * @param {google.privacy.dlp.v2.IRedactConfig=} [properties] Properties to set + */ + function RedactConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new RedactConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.RedactConfig + * @static + * @param {google.privacy.dlp.v2.IRedactConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.RedactConfig} RedactConfig instance + */ + RedactConfig.create = function create(properties) { + return new RedactConfig(properties); + }; + + /** + * Encodes the specified RedactConfig message. Does not implicitly {@link google.privacy.dlp.v2.RedactConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.RedactConfig + * @static + * @param {google.privacy.dlp.v2.IRedactConfig} message RedactConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedactConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified RedactConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RedactConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.RedactConfig + * @static + * @param {google.privacy.dlp.v2.IRedactConfig} message RedactConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RedactConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RedactConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.RedactConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.RedactConfig} RedactConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedactConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.RedactConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RedactConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.RedactConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.RedactConfig} RedactConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RedactConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RedactConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.RedactConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RedactConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a RedactConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.RedactConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.RedactConfig} RedactConfig + */ + RedactConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.RedactConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.RedactConfig(); + }; + + /** + * Creates a plain object from a RedactConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.RedactConfig + * @static + * @param {google.privacy.dlp.v2.RedactConfig} message RedactConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RedactConfig.toObject = function toObject() { + return {}; + }; + + /** + * Converts this RedactConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.RedactConfig + * @instance + * @returns {Object.} JSON object + */ + RedactConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RedactConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.RedactConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RedactConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.RedactConfig"; + }; + + return RedactConfig; + })(); + + v2.CharsToIgnore = (function() { + + /** + * Properties of a CharsToIgnore. + * @memberof google.privacy.dlp.v2 + * @interface ICharsToIgnore + * @property {string|null} [charactersToSkip] CharsToIgnore charactersToSkip + * @property {google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore|null} [commonCharactersToIgnore] CharsToIgnore commonCharactersToIgnore + */ + + /** + * Constructs a new CharsToIgnore. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CharsToIgnore. + * @implements ICharsToIgnore + * @constructor + * @param {google.privacy.dlp.v2.ICharsToIgnore=} [properties] Properties to set + */ + function CharsToIgnore(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CharsToIgnore charactersToSkip. + * @member {string|null|undefined} charactersToSkip + * @memberof google.privacy.dlp.v2.CharsToIgnore + * @instance + */ + CharsToIgnore.prototype.charactersToSkip = null; + + /** + * CharsToIgnore commonCharactersToIgnore. + * @member {google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore|null|undefined} commonCharactersToIgnore + * @memberof google.privacy.dlp.v2.CharsToIgnore + * @instance + */ + CharsToIgnore.prototype.commonCharactersToIgnore = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CharsToIgnore characters. + * @member {"charactersToSkip"|"commonCharactersToIgnore"|undefined} characters + * @memberof google.privacy.dlp.v2.CharsToIgnore + * @instance + */ + Object.defineProperty(CharsToIgnore.prototype, "characters", { + get: $util.oneOfGetter($oneOfFields = ["charactersToSkip", "commonCharactersToIgnore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CharsToIgnore instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CharsToIgnore + * @static + * @param {google.privacy.dlp.v2.ICharsToIgnore=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CharsToIgnore} CharsToIgnore instance + */ + CharsToIgnore.create = function create(properties) { + return new CharsToIgnore(properties); + }; + + /** + * Encodes the specified CharsToIgnore message. Does not implicitly {@link google.privacy.dlp.v2.CharsToIgnore.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CharsToIgnore + * @static + * @param {google.privacy.dlp.v2.ICharsToIgnore} message CharsToIgnore message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CharsToIgnore.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.charactersToSkip != null && Object.hasOwnProperty.call(message, "charactersToSkip")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.charactersToSkip); + if (message.commonCharactersToIgnore != null && Object.hasOwnProperty.call(message, "commonCharactersToIgnore")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.commonCharactersToIgnore); + return writer; + }; + + /** + * Encodes the specified CharsToIgnore message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CharsToIgnore.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CharsToIgnore + * @static + * @param {google.privacy.dlp.v2.ICharsToIgnore} message CharsToIgnore message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CharsToIgnore.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CharsToIgnore message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CharsToIgnore + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CharsToIgnore} CharsToIgnore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CharsToIgnore.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CharsToIgnore(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.charactersToSkip = reader.string(); + break; + } + case 2: { + message.commonCharactersToIgnore = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CharsToIgnore message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CharsToIgnore + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CharsToIgnore} CharsToIgnore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CharsToIgnore.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CharsToIgnore message. + * @function verify + * @memberof google.privacy.dlp.v2.CharsToIgnore + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CharsToIgnore.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.charactersToSkip != null && message.hasOwnProperty("charactersToSkip")) { + properties.characters = 1; + if (!$util.isString(message.charactersToSkip)) + return "charactersToSkip: string expected"; + } + if (message.commonCharactersToIgnore != null && message.hasOwnProperty("commonCharactersToIgnore")) { + if (properties.characters === 1) + return "characters: multiple values"; + properties.characters = 1; + switch (message.commonCharactersToIgnore) { + default: + return "commonCharactersToIgnore: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + return null; + }; + + /** + * Creates a CharsToIgnore message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CharsToIgnore + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CharsToIgnore} CharsToIgnore + */ + CharsToIgnore.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CharsToIgnore) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CharsToIgnore(); + if (object.charactersToSkip != null) + message.charactersToSkip = String(object.charactersToSkip); + switch (object.commonCharactersToIgnore) { + default: + if (typeof object.commonCharactersToIgnore === "number") { + message.commonCharactersToIgnore = object.commonCharactersToIgnore; + break; + } + break; + case "COMMON_CHARS_TO_IGNORE_UNSPECIFIED": + case 0: + message.commonCharactersToIgnore = 0; + break; + case "NUMERIC": + case 1: + message.commonCharactersToIgnore = 1; + break; + case "ALPHA_UPPER_CASE": + case 2: + message.commonCharactersToIgnore = 2; + break; + case "ALPHA_LOWER_CASE": + case 3: + message.commonCharactersToIgnore = 3; + break; + case "PUNCTUATION": + case 4: + message.commonCharactersToIgnore = 4; + break; + case "WHITESPACE": + case 5: + message.commonCharactersToIgnore = 5; + break; + } + return message; + }; + + /** + * Creates a plain object from a CharsToIgnore message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CharsToIgnore + * @static + * @param {google.privacy.dlp.v2.CharsToIgnore} message CharsToIgnore + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CharsToIgnore.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.charactersToSkip != null && message.hasOwnProperty("charactersToSkip")) { + object.charactersToSkip = message.charactersToSkip; + if (options.oneofs) + object.characters = "charactersToSkip"; + } + if (message.commonCharactersToIgnore != null && message.hasOwnProperty("commonCharactersToIgnore")) { + object.commonCharactersToIgnore = options.enums === String ? $root.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore[message.commonCharactersToIgnore] === undefined ? message.commonCharactersToIgnore : $root.google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore[message.commonCharactersToIgnore] : message.commonCharactersToIgnore; + if (options.oneofs) + object.characters = "commonCharactersToIgnore"; + } + return object; + }; + + /** + * Converts this CharsToIgnore to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CharsToIgnore + * @instance + * @returns {Object.} JSON object + */ + CharsToIgnore.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CharsToIgnore + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CharsToIgnore + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CharsToIgnore.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CharsToIgnore"; + }; + + /** + * CommonCharsToIgnore enum. + * @name google.privacy.dlp.v2.CharsToIgnore.CommonCharsToIgnore + * @enum {number} + * @property {number} COMMON_CHARS_TO_IGNORE_UNSPECIFIED=0 COMMON_CHARS_TO_IGNORE_UNSPECIFIED value + * @property {number} NUMERIC=1 NUMERIC value + * @property {number} ALPHA_UPPER_CASE=2 ALPHA_UPPER_CASE value + * @property {number} ALPHA_LOWER_CASE=3 ALPHA_LOWER_CASE value + * @property {number} PUNCTUATION=4 PUNCTUATION value + * @property {number} WHITESPACE=5 WHITESPACE value + */ + CharsToIgnore.CommonCharsToIgnore = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMMON_CHARS_TO_IGNORE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NUMERIC"] = 1; + values[valuesById[2] = "ALPHA_UPPER_CASE"] = 2; + values[valuesById[3] = "ALPHA_LOWER_CASE"] = 3; + values[valuesById[4] = "PUNCTUATION"] = 4; + values[valuesById[5] = "WHITESPACE"] = 5; + return values; + })(); + + return CharsToIgnore; + })(); + + v2.CharacterMaskConfig = (function() { + + /** + * Properties of a CharacterMaskConfig. + * @memberof google.privacy.dlp.v2 + * @interface ICharacterMaskConfig + * @property {string|null} [maskingCharacter] CharacterMaskConfig maskingCharacter + * @property {number|null} [numberToMask] CharacterMaskConfig numberToMask + * @property {boolean|null} [reverseOrder] CharacterMaskConfig reverseOrder + * @property {Array.|null} [charactersToIgnore] CharacterMaskConfig charactersToIgnore + */ + + /** + * Constructs a new CharacterMaskConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CharacterMaskConfig. + * @implements ICharacterMaskConfig + * @constructor + * @param {google.privacy.dlp.v2.ICharacterMaskConfig=} [properties] Properties to set + */ + function CharacterMaskConfig(properties) { + this.charactersToIgnore = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CharacterMaskConfig maskingCharacter. + * @member {string} maskingCharacter + * @memberof google.privacy.dlp.v2.CharacterMaskConfig + * @instance + */ + CharacterMaskConfig.prototype.maskingCharacter = ""; + + /** + * CharacterMaskConfig numberToMask. + * @member {number} numberToMask + * @memberof google.privacy.dlp.v2.CharacterMaskConfig + * @instance + */ + CharacterMaskConfig.prototype.numberToMask = 0; + + /** + * CharacterMaskConfig reverseOrder. + * @member {boolean} reverseOrder + * @memberof google.privacy.dlp.v2.CharacterMaskConfig + * @instance + */ + CharacterMaskConfig.prototype.reverseOrder = false; + + /** + * CharacterMaskConfig charactersToIgnore. + * @member {Array.} charactersToIgnore + * @memberof google.privacy.dlp.v2.CharacterMaskConfig + * @instance + */ + CharacterMaskConfig.prototype.charactersToIgnore = $util.emptyArray; + + /** + * Creates a new CharacterMaskConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CharacterMaskConfig + * @static + * @param {google.privacy.dlp.v2.ICharacterMaskConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CharacterMaskConfig} CharacterMaskConfig instance + */ + CharacterMaskConfig.create = function create(properties) { + return new CharacterMaskConfig(properties); + }; + + /** + * Encodes the specified CharacterMaskConfig message. Does not implicitly {@link google.privacy.dlp.v2.CharacterMaskConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CharacterMaskConfig + * @static + * @param {google.privacy.dlp.v2.ICharacterMaskConfig} message CharacterMaskConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CharacterMaskConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.maskingCharacter != null && Object.hasOwnProperty.call(message, "maskingCharacter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.maskingCharacter); + if (message.numberToMask != null && Object.hasOwnProperty.call(message, "numberToMask")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.numberToMask); + if (message.reverseOrder != null && Object.hasOwnProperty.call(message, "reverseOrder")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.reverseOrder); + if (message.charactersToIgnore != null && message.charactersToIgnore.length) + for (var i = 0; i < message.charactersToIgnore.length; ++i) + $root.google.privacy.dlp.v2.CharsToIgnore.encode(message.charactersToIgnore[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CharacterMaskConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CharacterMaskConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CharacterMaskConfig + * @static + * @param {google.privacy.dlp.v2.ICharacterMaskConfig} message CharacterMaskConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CharacterMaskConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CharacterMaskConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CharacterMaskConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CharacterMaskConfig} CharacterMaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CharacterMaskConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CharacterMaskConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.maskingCharacter = reader.string(); + break; + } + case 2: { + message.numberToMask = reader.int32(); + break; + } + case 3: { + message.reverseOrder = reader.bool(); + break; + } + case 4: { + if (!(message.charactersToIgnore && message.charactersToIgnore.length)) + message.charactersToIgnore = []; + message.charactersToIgnore.push($root.google.privacy.dlp.v2.CharsToIgnore.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CharacterMaskConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CharacterMaskConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CharacterMaskConfig} CharacterMaskConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CharacterMaskConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CharacterMaskConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.CharacterMaskConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CharacterMaskConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.maskingCharacter != null && message.hasOwnProperty("maskingCharacter")) + if (!$util.isString(message.maskingCharacter)) + return "maskingCharacter: string expected"; + if (message.numberToMask != null && message.hasOwnProperty("numberToMask")) + if (!$util.isInteger(message.numberToMask)) + return "numberToMask: integer expected"; + if (message.reverseOrder != null && message.hasOwnProperty("reverseOrder")) + if (typeof message.reverseOrder !== "boolean") + return "reverseOrder: boolean expected"; + if (message.charactersToIgnore != null && message.hasOwnProperty("charactersToIgnore")) { + if (!Array.isArray(message.charactersToIgnore)) + return "charactersToIgnore: array expected"; + for (var i = 0; i < message.charactersToIgnore.length; ++i) { + var error = $root.google.privacy.dlp.v2.CharsToIgnore.verify(message.charactersToIgnore[i], long + 1); + if (error) + return "charactersToIgnore." + error; + } + } + return null; + }; + + /** + * Creates a CharacterMaskConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CharacterMaskConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CharacterMaskConfig} CharacterMaskConfig + */ + CharacterMaskConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CharacterMaskConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CharacterMaskConfig(); + if (object.maskingCharacter != null) + message.maskingCharacter = String(object.maskingCharacter); + if (object.numberToMask != null) + message.numberToMask = object.numberToMask | 0; + if (object.reverseOrder != null) + message.reverseOrder = Boolean(object.reverseOrder); + if (object.charactersToIgnore) { + if (!Array.isArray(object.charactersToIgnore)) + throw TypeError(".google.privacy.dlp.v2.CharacterMaskConfig.charactersToIgnore: array expected"); + message.charactersToIgnore = []; + for (var i = 0; i < object.charactersToIgnore.length; ++i) { + if (typeof object.charactersToIgnore[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.CharacterMaskConfig.charactersToIgnore: object expected"); + message.charactersToIgnore[i] = $root.google.privacy.dlp.v2.CharsToIgnore.fromObject(object.charactersToIgnore[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a CharacterMaskConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CharacterMaskConfig + * @static + * @param {google.privacy.dlp.v2.CharacterMaskConfig} message CharacterMaskConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CharacterMaskConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.charactersToIgnore = []; + if (options.defaults) { + object.maskingCharacter = ""; + object.numberToMask = 0; + object.reverseOrder = false; + } + if (message.maskingCharacter != null && message.hasOwnProperty("maskingCharacter")) + object.maskingCharacter = message.maskingCharacter; + if (message.numberToMask != null && message.hasOwnProperty("numberToMask")) + object.numberToMask = message.numberToMask; + if (message.reverseOrder != null && message.hasOwnProperty("reverseOrder")) + object.reverseOrder = message.reverseOrder; + if (message.charactersToIgnore && message.charactersToIgnore.length) { + object.charactersToIgnore = []; + for (var j = 0; j < message.charactersToIgnore.length; ++j) + object.charactersToIgnore[j] = $root.google.privacy.dlp.v2.CharsToIgnore.toObject(message.charactersToIgnore[j], options); + } + return object; + }; + + /** + * Converts this CharacterMaskConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CharacterMaskConfig + * @instance + * @returns {Object.} JSON object + */ + CharacterMaskConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CharacterMaskConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CharacterMaskConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CharacterMaskConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CharacterMaskConfig"; + }; + + return CharacterMaskConfig; + })(); + + v2.FixedSizeBucketingConfig = (function() { + + /** + * Properties of a FixedSizeBucketingConfig. + * @memberof google.privacy.dlp.v2 + * @interface IFixedSizeBucketingConfig + * @property {google.privacy.dlp.v2.IValue|null} [lowerBound] FixedSizeBucketingConfig lowerBound + * @property {google.privacy.dlp.v2.IValue|null} [upperBound] FixedSizeBucketingConfig upperBound + * @property {number|null} [bucketSize] FixedSizeBucketingConfig bucketSize + */ + + /** + * Constructs a new FixedSizeBucketingConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a FixedSizeBucketingConfig. + * @implements IFixedSizeBucketingConfig + * @constructor + * @param {google.privacy.dlp.v2.IFixedSizeBucketingConfig=} [properties] Properties to set + */ + function FixedSizeBucketingConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FixedSizeBucketingConfig lowerBound. + * @member {google.privacy.dlp.v2.IValue|null|undefined} lowerBound + * @memberof google.privacy.dlp.v2.FixedSizeBucketingConfig + * @instance + */ + FixedSizeBucketingConfig.prototype.lowerBound = null; + + /** + * FixedSizeBucketingConfig upperBound. + * @member {google.privacy.dlp.v2.IValue|null|undefined} upperBound + * @memberof google.privacy.dlp.v2.FixedSizeBucketingConfig + * @instance + */ + FixedSizeBucketingConfig.prototype.upperBound = null; + + /** + * FixedSizeBucketingConfig bucketSize. + * @member {number} bucketSize + * @memberof google.privacy.dlp.v2.FixedSizeBucketingConfig + * @instance + */ + FixedSizeBucketingConfig.prototype.bucketSize = 0; + + /** + * Creates a new FixedSizeBucketingConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.FixedSizeBucketingConfig + * @static + * @param {google.privacy.dlp.v2.IFixedSizeBucketingConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.FixedSizeBucketingConfig} FixedSizeBucketingConfig instance + */ + FixedSizeBucketingConfig.create = function create(properties) { + return new FixedSizeBucketingConfig(properties); + }; + + /** + * Encodes the specified FixedSizeBucketingConfig message. Does not implicitly {@link google.privacy.dlp.v2.FixedSizeBucketingConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.FixedSizeBucketingConfig + * @static + * @param {google.privacy.dlp.v2.IFixedSizeBucketingConfig} message FixedSizeBucketingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FixedSizeBucketingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lowerBound != null && Object.hasOwnProperty.call(message, "lowerBound")) + $root.google.privacy.dlp.v2.Value.encode(message.lowerBound, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.upperBound != null && Object.hasOwnProperty.call(message, "upperBound")) + $root.google.privacy.dlp.v2.Value.encode(message.upperBound, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.bucketSize != null && Object.hasOwnProperty.call(message, "bucketSize")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.bucketSize); + return writer; + }; + + /** + * Encodes the specified FixedSizeBucketingConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FixedSizeBucketingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.FixedSizeBucketingConfig + * @static + * @param {google.privacy.dlp.v2.IFixedSizeBucketingConfig} message FixedSizeBucketingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FixedSizeBucketingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FixedSizeBucketingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.FixedSizeBucketingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.FixedSizeBucketingConfig} FixedSizeBucketingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FixedSizeBucketingConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.FixedSizeBucketingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.lowerBound = $root.google.privacy.dlp.v2.Value.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.upperBound = $root.google.privacy.dlp.v2.Value.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.bucketSize = reader.double(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FixedSizeBucketingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.FixedSizeBucketingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.FixedSizeBucketingConfig} FixedSizeBucketingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FixedSizeBucketingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FixedSizeBucketingConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.FixedSizeBucketingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FixedSizeBucketingConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) { + var error = $root.google.privacy.dlp.v2.Value.verify(message.lowerBound, long + 1); + if (error) + return "lowerBound." + error; + } + if (message.upperBound != null && message.hasOwnProperty("upperBound")) { + var error = $root.google.privacy.dlp.v2.Value.verify(message.upperBound, long + 1); + if (error) + return "upperBound." + error; + } + if (message.bucketSize != null && message.hasOwnProperty("bucketSize")) + if (typeof message.bucketSize !== "number") + return "bucketSize: number expected"; + return null; + }; + + /** + * Creates a FixedSizeBucketingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.FixedSizeBucketingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.FixedSizeBucketingConfig} FixedSizeBucketingConfig + */ + FixedSizeBucketingConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.FixedSizeBucketingConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.FixedSizeBucketingConfig(); + if (object.lowerBound != null) { + if (typeof object.lowerBound !== "object") + throw TypeError(".google.privacy.dlp.v2.FixedSizeBucketingConfig.lowerBound: object expected"); + message.lowerBound = $root.google.privacy.dlp.v2.Value.fromObject(object.lowerBound, long + 1); + } + if (object.upperBound != null) { + if (typeof object.upperBound !== "object") + throw TypeError(".google.privacy.dlp.v2.FixedSizeBucketingConfig.upperBound: object expected"); + message.upperBound = $root.google.privacy.dlp.v2.Value.fromObject(object.upperBound, long + 1); + } + if (object.bucketSize != null) + message.bucketSize = Number(object.bucketSize); + return message; + }; + + /** + * Creates a plain object from a FixedSizeBucketingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.FixedSizeBucketingConfig + * @static + * @param {google.privacy.dlp.v2.FixedSizeBucketingConfig} message FixedSizeBucketingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FixedSizeBucketingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lowerBound = null; + object.upperBound = null; + object.bucketSize = 0; + } + if (message.lowerBound != null && message.hasOwnProperty("lowerBound")) + object.lowerBound = $root.google.privacy.dlp.v2.Value.toObject(message.lowerBound, options); + if (message.upperBound != null && message.hasOwnProperty("upperBound")) + object.upperBound = $root.google.privacy.dlp.v2.Value.toObject(message.upperBound, options); + if (message.bucketSize != null && message.hasOwnProperty("bucketSize")) + object.bucketSize = options.json && !isFinite(message.bucketSize) ? String(message.bucketSize) : message.bucketSize; + return object; + }; + + /** + * Converts this FixedSizeBucketingConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.FixedSizeBucketingConfig + * @instance + * @returns {Object.} JSON object + */ + FixedSizeBucketingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FixedSizeBucketingConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.FixedSizeBucketingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FixedSizeBucketingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.FixedSizeBucketingConfig"; + }; + + return FixedSizeBucketingConfig; + })(); + + v2.BucketingConfig = (function() { + + /** + * Properties of a BucketingConfig. + * @memberof google.privacy.dlp.v2 + * @interface IBucketingConfig + * @property {Array.|null} [buckets] BucketingConfig buckets + */ + + /** + * Constructs a new BucketingConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a BucketingConfig. + * @implements IBucketingConfig + * @constructor + * @param {google.privacy.dlp.v2.IBucketingConfig=} [properties] Properties to set + */ + function BucketingConfig(properties) { + this.buckets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * BucketingConfig buckets. + * @member {Array.} buckets + * @memberof google.privacy.dlp.v2.BucketingConfig + * @instance + */ + BucketingConfig.prototype.buckets = $util.emptyArray; + + /** + * Creates a new BucketingConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.BucketingConfig + * @static + * @param {google.privacy.dlp.v2.IBucketingConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.BucketingConfig} BucketingConfig instance + */ + BucketingConfig.create = function create(properties) { + return new BucketingConfig(properties); + }; + + /** + * Encodes the specified BucketingConfig message. Does not implicitly {@link google.privacy.dlp.v2.BucketingConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.BucketingConfig + * @static + * @param {google.privacy.dlp.v2.IBucketingConfig} message BucketingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BucketingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.buckets != null && message.buckets.length) + for (var i = 0; i < message.buckets.length; ++i) + $root.google.privacy.dlp.v2.BucketingConfig.Bucket.encode(message.buckets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BucketingConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BucketingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.BucketingConfig + * @static + * @param {google.privacy.dlp.v2.IBucketingConfig} message BucketingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BucketingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BucketingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.BucketingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.BucketingConfig} BucketingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BucketingConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.BucketingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.buckets && message.buckets.length)) + message.buckets = []; + message.buckets.push($root.google.privacy.dlp.v2.BucketingConfig.Bucket.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a BucketingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.BucketingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.BucketingConfig} BucketingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BucketingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BucketingConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.BucketingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BucketingConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.buckets != null && message.hasOwnProperty("buckets")) { + if (!Array.isArray(message.buckets)) + return "buckets: array expected"; + for (var i = 0; i < message.buckets.length; ++i) { + var error = $root.google.privacy.dlp.v2.BucketingConfig.Bucket.verify(message.buckets[i], long + 1); + if (error) + return "buckets." + error; + } + } + return null; + }; + + /** + * Creates a BucketingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.BucketingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.BucketingConfig} BucketingConfig + */ + BucketingConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.BucketingConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.BucketingConfig(); + if (object.buckets) { + if (!Array.isArray(object.buckets)) + throw TypeError(".google.privacy.dlp.v2.BucketingConfig.buckets: array expected"); + message.buckets = []; + for (var i = 0; i < object.buckets.length; ++i) { + if (typeof object.buckets[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.BucketingConfig.buckets: object expected"); + message.buckets[i] = $root.google.privacy.dlp.v2.BucketingConfig.Bucket.fromObject(object.buckets[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a BucketingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.BucketingConfig + * @static + * @param {google.privacy.dlp.v2.BucketingConfig} message BucketingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BucketingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.buckets = []; + if (message.buckets && message.buckets.length) { + object.buckets = []; + for (var j = 0; j < message.buckets.length; ++j) + object.buckets[j] = $root.google.privacy.dlp.v2.BucketingConfig.Bucket.toObject(message.buckets[j], options); + } + return object; + }; + + /** + * Converts this BucketingConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.BucketingConfig + * @instance + * @returns {Object.} JSON object + */ + BucketingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BucketingConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.BucketingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BucketingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.BucketingConfig"; + }; + + BucketingConfig.Bucket = (function() { + + /** + * Properties of a Bucket. + * @memberof google.privacy.dlp.v2.BucketingConfig + * @interface IBucket + * @property {google.privacy.dlp.v2.IValue|null} [min] Bucket min + * @property {google.privacy.dlp.v2.IValue|null} [max] Bucket max + * @property {google.privacy.dlp.v2.IValue|null} [replacementValue] Bucket replacementValue + */ + + /** + * Constructs a new Bucket. + * @memberof google.privacy.dlp.v2.BucketingConfig + * @classdesc Represents a Bucket. + * @implements IBucket + * @constructor + * @param {google.privacy.dlp.v2.BucketingConfig.IBucket=} [properties] Properties to set + */ + function Bucket(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Bucket min. + * @member {google.privacy.dlp.v2.IValue|null|undefined} min + * @memberof google.privacy.dlp.v2.BucketingConfig.Bucket + * @instance + */ + Bucket.prototype.min = null; + + /** + * Bucket max. + * @member {google.privacy.dlp.v2.IValue|null|undefined} max + * @memberof google.privacy.dlp.v2.BucketingConfig.Bucket + * @instance + */ + Bucket.prototype.max = null; + + /** + * Bucket replacementValue. + * @member {google.privacy.dlp.v2.IValue|null|undefined} replacementValue + * @memberof google.privacy.dlp.v2.BucketingConfig.Bucket + * @instance + */ + Bucket.prototype.replacementValue = null; + + /** + * Creates a new Bucket instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.BucketingConfig.Bucket + * @static + * @param {google.privacy.dlp.v2.BucketingConfig.IBucket=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.BucketingConfig.Bucket} Bucket instance + */ + Bucket.create = function create(properties) { + return new Bucket(properties); + }; + + /** + * Encodes the specified Bucket message. Does not implicitly {@link google.privacy.dlp.v2.BucketingConfig.Bucket.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.BucketingConfig.Bucket + * @static + * @param {google.privacy.dlp.v2.BucketingConfig.IBucket} message Bucket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Bucket.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.min != null && Object.hasOwnProperty.call(message, "min")) + $root.google.privacy.dlp.v2.Value.encode(message.min, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.max != null && Object.hasOwnProperty.call(message, "max")) + $root.google.privacy.dlp.v2.Value.encode(message.max, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.replacementValue != null && Object.hasOwnProperty.call(message, "replacementValue")) + $root.google.privacy.dlp.v2.Value.encode(message.replacementValue, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Bucket message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BucketingConfig.Bucket.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.BucketingConfig.Bucket + * @static + * @param {google.privacy.dlp.v2.BucketingConfig.IBucket} message Bucket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Bucket.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Bucket message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.BucketingConfig.Bucket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.BucketingConfig.Bucket} Bucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Bucket.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.BucketingConfig.Bucket(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.min = $root.google.privacy.dlp.v2.Value.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.max = $root.google.privacy.dlp.v2.Value.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.replacementValue = $root.google.privacy.dlp.v2.Value.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Bucket message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.BucketingConfig.Bucket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.BucketingConfig.Bucket} Bucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Bucket.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Bucket message. + * @function verify + * @memberof google.privacy.dlp.v2.BucketingConfig.Bucket + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Bucket.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.min != null && message.hasOwnProperty("min")) { + var error = $root.google.privacy.dlp.v2.Value.verify(message.min, long + 1); + if (error) + return "min." + error; + } + if (message.max != null && message.hasOwnProperty("max")) { + var error = $root.google.privacy.dlp.v2.Value.verify(message.max, long + 1); + if (error) + return "max." + error; + } + if (message.replacementValue != null && message.hasOwnProperty("replacementValue")) { + var error = $root.google.privacy.dlp.v2.Value.verify(message.replacementValue, long + 1); + if (error) + return "replacementValue." + error; + } + return null; + }; + + /** + * Creates a Bucket message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.BucketingConfig.Bucket + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.BucketingConfig.Bucket} Bucket + */ + Bucket.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.BucketingConfig.Bucket) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.BucketingConfig.Bucket(); + if (object.min != null) { + if (typeof object.min !== "object") + throw TypeError(".google.privacy.dlp.v2.BucketingConfig.Bucket.min: object expected"); + message.min = $root.google.privacy.dlp.v2.Value.fromObject(object.min, long + 1); + } + if (object.max != null) { + if (typeof object.max !== "object") + throw TypeError(".google.privacy.dlp.v2.BucketingConfig.Bucket.max: object expected"); + message.max = $root.google.privacy.dlp.v2.Value.fromObject(object.max, long + 1); + } + if (object.replacementValue != null) { + if (typeof object.replacementValue !== "object") + throw TypeError(".google.privacy.dlp.v2.BucketingConfig.Bucket.replacementValue: object expected"); + message.replacementValue = $root.google.privacy.dlp.v2.Value.fromObject(object.replacementValue, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Bucket message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.BucketingConfig.Bucket + * @static + * @param {google.privacy.dlp.v2.BucketingConfig.Bucket} message Bucket + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Bucket.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.min = null; + object.max = null; + object.replacementValue = null; + } + if (message.min != null && message.hasOwnProperty("min")) + object.min = $root.google.privacy.dlp.v2.Value.toObject(message.min, options); + if (message.max != null && message.hasOwnProperty("max")) + object.max = $root.google.privacy.dlp.v2.Value.toObject(message.max, options); + if (message.replacementValue != null && message.hasOwnProperty("replacementValue")) + object.replacementValue = $root.google.privacy.dlp.v2.Value.toObject(message.replacementValue, options); + return object; + }; + + /** + * Converts this Bucket to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.BucketingConfig.Bucket + * @instance + * @returns {Object.} JSON object + */ + Bucket.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Bucket + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.BucketingConfig.Bucket + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Bucket.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.BucketingConfig.Bucket"; + }; + + return Bucket; + })(); + + return BucketingConfig; + })(); + + v2.CryptoReplaceFfxFpeConfig = (function() { + + /** + * Properties of a CryptoReplaceFfxFpeConfig. + * @memberof google.privacy.dlp.v2 + * @interface ICryptoReplaceFfxFpeConfig + * @property {google.privacy.dlp.v2.ICryptoKey|null} [cryptoKey] CryptoReplaceFfxFpeConfig cryptoKey + * @property {google.privacy.dlp.v2.IFieldId|null} [context] CryptoReplaceFfxFpeConfig context + * @property {google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet|null} [commonAlphabet] CryptoReplaceFfxFpeConfig commonAlphabet + * @property {string|null} [customAlphabet] CryptoReplaceFfxFpeConfig customAlphabet + * @property {number|null} [radix] CryptoReplaceFfxFpeConfig radix + * @property {google.privacy.dlp.v2.IInfoType|null} [surrogateInfoType] CryptoReplaceFfxFpeConfig surrogateInfoType + */ + + /** + * Constructs a new CryptoReplaceFfxFpeConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CryptoReplaceFfxFpeConfig. + * @implements ICryptoReplaceFfxFpeConfig + * @constructor + * @param {google.privacy.dlp.v2.ICryptoReplaceFfxFpeConfig=} [properties] Properties to set + */ + function CryptoReplaceFfxFpeConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CryptoReplaceFfxFpeConfig cryptoKey. + * @member {google.privacy.dlp.v2.ICryptoKey|null|undefined} cryptoKey + * @memberof google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig + * @instance + */ + CryptoReplaceFfxFpeConfig.prototype.cryptoKey = null; + + /** + * CryptoReplaceFfxFpeConfig context. + * @member {google.privacy.dlp.v2.IFieldId|null|undefined} context + * @memberof google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig + * @instance + */ + CryptoReplaceFfxFpeConfig.prototype.context = null; + + /** + * CryptoReplaceFfxFpeConfig commonAlphabet. + * @member {google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet|null|undefined} commonAlphabet + * @memberof google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig + * @instance + */ + CryptoReplaceFfxFpeConfig.prototype.commonAlphabet = null; + + /** + * CryptoReplaceFfxFpeConfig customAlphabet. + * @member {string|null|undefined} customAlphabet + * @memberof google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig + * @instance + */ + CryptoReplaceFfxFpeConfig.prototype.customAlphabet = null; + + /** + * CryptoReplaceFfxFpeConfig radix. + * @member {number|null|undefined} radix + * @memberof google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig + * @instance + */ + CryptoReplaceFfxFpeConfig.prototype.radix = null; + + /** + * CryptoReplaceFfxFpeConfig surrogateInfoType. + * @member {google.privacy.dlp.v2.IInfoType|null|undefined} surrogateInfoType + * @memberof google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig + * @instance + */ + CryptoReplaceFfxFpeConfig.prototype.surrogateInfoType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CryptoReplaceFfxFpeConfig alphabet. + * @member {"commonAlphabet"|"customAlphabet"|"radix"|undefined} alphabet + * @memberof google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig + * @instance + */ + Object.defineProperty(CryptoReplaceFfxFpeConfig.prototype, "alphabet", { + get: $util.oneOfGetter($oneOfFields = ["commonAlphabet", "customAlphabet", "radix"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CryptoReplaceFfxFpeConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig + * @static + * @param {google.privacy.dlp.v2.ICryptoReplaceFfxFpeConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig} CryptoReplaceFfxFpeConfig instance + */ + CryptoReplaceFfxFpeConfig.create = function create(properties) { + return new CryptoReplaceFfxFpeConfig(properties); + }; + + /** + * Encodes the specified CryptoReplaceFfxFpeConfig message. Does not implicitly {@link google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig + * @static + * @param {google.privacy.dlp.v2.ICryptoReplaceFfxFpeConfig} message CryptoReplaceFfxFpeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CryptoReplaceFfxFpeConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cryptoKey != null && Object.hasOwnProperty.call(message, "cryptoKey")) + $root.google.privacy.dlp.v2.CryptoKey.encode(message.cryptoKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.context != null && Object.hasOwnProperty.call(message, "context")) + $root.google.privacy.dlp.v2.FieldId.encode(message.context, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.commonAlphabet != null && Object.hasOwnProperty.call(message, "commonAlphabet")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.commonAlphabet); + if (message.customAlphabet != null && Object.hasOwnProperty.call(message, "customAlphabet")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.customAlphabet); + if (message.radix != null && Object.hasOwnProperty.call(message, "radix")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.radix); + if (message.surrogateInfoType != null && Object.hasOwnProperty.call(message, "surrogateInfoType")) + $root.google.privacy.dlp.v2.InfoType.encode(message.surrogateInfoType, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CryptoReplaceFfxFpeConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig + * @static + * @param {google.privacy.dlp.v2.ICryptoReplaceFfxFpeConfig} message CryptoReplaceFfxFpeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CryptoReplaceFfxFpeConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CryptoReplaceFfxFpeConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig} CryptoReplaceFfxFpeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CryptoReplaceFfxFpeConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.cryptoKey = $root.google.privacy.dlp.v2.CryptoKey.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.context = $root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.commonAlphabet = reader.int32(); + break; + } + case 5: { + message.customAlphabet = reader.string(); + break; + } + case 6: { + message.radix = reader.int32(); + break; + } + case 8: { + message.surrogateInfoType = $root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CryptoReplaceFfxFpeConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig} CryptoReplaceFfxFpeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CryptoReplaceFfxFpeConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CryptoReplaceFfxFpeConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CryptoReplaceFfxFpeConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.cryptoKey != null && message.hasOwnProperty("cryptoKey")) { + var error = $root.google.privacy.dlp.v2.CryptoKey.verify(message.cryptoKey, long + 1); + if (error) + return "cryptoKey." + error; + } + if (message.context != null && message.hasOwnProperty("context")) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.context, long + 1); + if (error) + return "context." + error; + } + if (message.commonAlphabet != null && message.hasOwnProperty("commonAlphabet")) { + properties.alphabet = 1; + switch (message.commonAlphabet) { + default: + return "commonAlphabet: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + } + if (message.customAlphabet != null && message.hasOwnProperty("customAlphabet")) { + if (properties.alphabet === 1) + return "alphabet: multiple values"; + properties.alphabet = 1; + if (!$util.isString(message.customAlphabet)) + return "customAlphabet: string expected"; + } + if (message.radix != null && message.hasOwnProperty("radix")) { + if (properties.alphabet === 1) + return "alphabet: multiple values"; + properties.alphabet = 1; + if (!$util.isInteger(message.radix)) + return "radix: integer expected"; + } + if (message.surrogateInfoType != null && message.hasOwnProperty("surrogateInfoType")) { + var error = $root.google.privacy.dlp.v2.InfoType.verify(message.surrogateInfoType, long + 1); + if (error) + return "surrogateInfoType." + error; + } + return null; + }; + + /** + * Creates a CryptoReplaceFfxFpeConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig} CryptoReplaceFfxFpeConfig + */ + CryptoReplaceFfxFpeConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig(); + if (object.cryptoKey != null) { + if (typeof object.cryptoKey !== "object") + throw TypeError(".google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.cryptoKey: object expected"); + message.cryptoKey = $root.google.privacy.dlp.v2.CryptoKey.fromObject(object.cryptoKey, long + 1); + } + if (object.context != null) { + if (typeof object.context !== "object") + throw TypeError(".google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.context: object expected"); + message.context = $root.google.privacy.dlp.v2.FieldId.fromObject(object.context, long + 1); + } + switch (object.commonAlphabet) { + default: + if (typeof object.commonAlphabet === "number") { + message.commonAlphabet = object.commonAlphabet; + break; + } + break; + case "FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED": + case 0: + message.commonAlphabet = 0; + break; + case "NUMERIC": + case 1: + message.commonAlphabet = 1; + break; + case "HEXADECIMAL": + case 2: + message.commonAlphabet = 2; + break; + case "UPPER_CASE_ALPHA_NUMERIC": + case 3: + message.commonAlphabet = 3; + break; + case "ALPHA_NUMERIC": + case 4: + message.commonAlphabet = 4; + break; + } + if (object.customAlphabet != null) + message.customAlphabet = String(object.customAlphabet); + if (object.radix != null) + message.radix = object.radix | 0; + if (object.surrogateInfoType != null) { + if (typeof object.surrogateInfoType !== "object") + throw TypeError(".google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.surrogateInfoType: object expected"); + message.surrogateInfoType = $root.google.privacy.dlp.v2.InfoType.fromObject(object.surrogateInfoType, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CryptoReplaceFfxFpeConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig + * @static + * @param {google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig} message CryptoReplaceFfxFpeConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CryptoReplaceFfxFpeConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cryptoKey = null; + object.context = null; + object.surrogateInfoType = null; + } + if (message.cryptoKey != null && message.hasOwnProperty("cryptoKey")) + object.cryptoKey = $root.google.privacy.dlp.v2.CryptoKey.toObject(message.cryptoKey, options); + if (message.context != null && message.hasOwnProperty("context")) + object.context = $root.google.privacy.dlp.v2.FieldId.toObject(message.context, options); + if (message.commonAlphabet != null && message.hasOwnProperty("commonAlphabet")) { + object.commonAlphabet = options.enums === String ? $root.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet[message.commonAlphabet] === undefined ? message.commonAlphabet : $root.google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet[message.commonAlphabet] : message.commonAlphabet; + if (options.oneofs) + object.alphabet = "commonAlphabet"; + } + if (message.customAlphabet != null && message.hasOwnProperty("customAlphabet")) { + object.customAlphabet = message.customAlphabet; + if (options.oneofs) + object.alphabet = "customAlphabet"; + } + if (message.radix != null && message.hasOwnProperty("radix")) { + object.radix = message.radix; + if (options.oneofs) + object.alphabet = "radix"; + } + if (message.surrogateInfoType != null && message.hasOwnProperty("surrogateInfoType")) + object.surrogateInfoType = $root.google.privacy.dlp.v2.InfoType.toObject(message.surrogateInfoType, options); + return object; + }; + + /** + * Converts this CryptoReplaceFfxFpeConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig + * @instance + * @returns {Object.} JSON object + */ + CryptoReplaceFfxFpeConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CryptoReplaceFfxFpeConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CryptoReplaceFfxFpeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig"; + }; + + /** + * FfxCommonNativeAlphabet enum. + * @name google.privacy.dlp.v2.CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet + * @enum {number} + * @property {number} FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED=0 FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED value + * @property {number} NUMERIC=1 NUMERIC value + * @property {number} HEXADECIMAL=2 HEXADECIMAL value + * @property {number} UPPER_CASE_ALPHA_NUMERIC=3 UPPER_CASE_ALPHA_NUMERIC value + * @property {number} ALPHA_NUMERIC=4 ALPHA_NUMERIC value + */ + CryptoReplaceFfxFpeConfig.FfxCommonNativeAlphabet = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED"] = 0; + values[valuesById[1] = "NUMERIC"] = 1; + values[valuesById[2] = "HEXADECIMAL"] = 2; + values[valuesById[3] = "UPPER_CASE_ALPHA_NUMERIC"] = 3; + values[valuesById[4] = "ALPHA_NUMERIC"] = 4; + return values; + })(); + + return CryptoReplaceFfxFpeConfig; + })(); + + v2.CryptoKey = (function() { + + /** + * Properties of a CryptoKey. + * @memberof google.privacy.dlp.v2 + * @interface ICryptoKey + * @property {google.privacy.dlp.v2.ITransientCryptoKey|null} [transient] CryptoKey transient + * @property {google.privacy.dlp.v2.IUnwrappedCryptoKey|null} [unwrapped] CryptoKey unwrapped + * @property {google.privacy.dlp.v2.IKmsWrappedCryptoKey|null} [kmsWrapped] CryptoKey kmsWrapped + */ + + /** + * Constructs a new CryptoKey. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CryptoKey. + * @implements ICryptoKey + * @constructor + * @param {google.privacy.dlp.v2.ICryptoKey=} [properties] Properties to set + */ + function CryptoKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CryptoKey transient. + * @member {google.privacy.dlp.v2.ITransientCryptoKey|null|undefined} transient + * @memberof google.privacy.dlp.v2.CryptoKey + * @instance + */ + CryptoKey.prototype.transient = null; + + /** + * CryptoKey unwrapped. + * @member {google.privacy.dlp.v2.IUnwrappedCryptoKey|null|undefined} unwrapped + * @memberof google.privacy.dlp.v2.CryptoKey + * @instance + */ + CryptoKey.prototype.unwrapped = null; + + /** + * CryptoKey kmsWrapped. + * @member {google.privacy.dlp.v2.IKmsWrappedCryptoKey|null|undefined} kmsWrapped + * @memberof google.privacy.dlp.v2.CryptoKey + * @instance + */ + CryptoKey.prototype.kmsWrapped = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CryptoKey source. + * @member {"transient"|"unwrapped"|"kmsWrapped"|undefined} source + * @memberof google.privacy.dlp.v2.CryptoKey + * @instance + */ + Object.defineProperty(CryptoKey.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["transient", "unwrapped", "kmsWrapped"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CryptoKey instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CryptoKey + * @static + * @param {google.privacy.dlp.v2.ICryptoKey=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CryptoKey} CryptoKey instance + */ + CryptoKey.create = function create(properties) { + return new CryptoKey(properties); + }; + + /** + * Encodes the specified CryptoKey message. Does not implicitly {@link google.privacy.dlp.v2.CryptoKey.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CryptoKey + * @static + * @param {google.privacy.dlp.v2.ICryptoKey} message CryptoKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CryptoKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.transient != null && Object.hasOwnProperty.call(message, "transient")) + $root.google.privacy.dlp.v2.TransientCryptoKey.encode(message.transient, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.unwrapped != null && Object.hasOwnProperty.call(message, "unwrapped")) + $root.google.privacy.dlp.v2.UnwrappedCryptoKey.encode(message.unwrapped, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.kmsWrapped != null && Object.hasOwnProperty.call(message, "kmsWrapped")) + $root.google.privacy.dlp.v2.KmsWrappedCryptoKey.encode(message.kmsWrapped, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CryptoKey message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CryptoKey.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CryptoKey + * @static + * @param {google.privacy.dlp.v2.ICryptoKey} message CryptoKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CryptoKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CryptoKey message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CryptoKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CryptoKey} CryptoKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CryptoKey.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CryptoKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.transient = $root.google.privacy.dlp.v2.TransientCryptoKey.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.unwrapped = $root.google.privacy.dlp.v2.UnwrappedCryptoKey.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.kmsWrapped = $root.google.privacy.dlp.v2.KmsWrappedCryptoKey.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CryptoKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CryptoKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CryptoKey} CryptoKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CryptoKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CryptoKey message. + * @function verify + * @memberof google.privacy.dlp.v2.CryptoKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CryptoKey.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.transient != null && message.hasOwnProperty("transient")) { + properties.source = 1; + { + var error = $root.google.privacy.dlp.v2.TransientCryptoKey.verify(message.transient, long + 1); + if (error) + return "transient." + error; + } + } + if (message.unwrapped != null && message.hasOwnProperty("unwrapped")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.privacy.dlp.v2.UnwrappedCryptoKey.verify(message.unwrapped, long + 1); + if (error) + return "unwrapped." + error; + } + } + if (message.kmsWrapped != null && message.hasOwnProperty("kmsWrapped")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.privacy.dlp.v2.KmsWrappedCryptoKey.verify(message.kmsWrapped, long + 1); + if (error) + return "kmsWrapped." + error; + } + } + return null; + }; + + /** + * Creates a CryptoKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CryptoKey + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CryptoKey} CryptoKey + */ + CryptoKey.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CryptoKey) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CryptoKey(); + if (object.transient != null) { + if (typeof object.transient !== "object") + throw TypeError(".google.privacy.dlp.v2.CryptoKey.transient: object expected"); + message.transient = $root.google.privacy.dlp.v2.TransientCryptoKey.fromObject(object.transient, long + 1); + } + if (object.unwrapped != null) { + if (typeof object.unwrapped !== "object") + throw TypeError(".google.privacy.dlp.v2.CryptoKey.unwrapped: object expected"); + message.unwrapped = $root.google.privacy.dlp.v2.UnwrappedCryptoKey.fromObject(object.unwrapped, long + 1); + } + if (object.kmsWrapped != null) { + if (typeof object.kmsWrapped !== "object") + throw TypeError(".google.privacy.dlp.v2.CryptoKey.kmsWrapped: object expected"); + message.kmsWrapped = $root.google.privacy.dlp.v2.KmsWrappedCryptoKey.fromObject(object.kmsWrapped, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CryptoKey message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CryptoKey + * @static + * @param {google.privacy.dlp.v2.CryptoKey} message CryptoKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CryptoKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.transient != null && message.hasOwnProperty("transient")) { + object.transient = $root.google.privacy.dlp.v2.TransientCryptoKey.toObject(message.transient, options); + if (options.oneofs) + object.source = "transient"; + } + if (message.unwrapped != null && message.hasOwnProperty("unwrapped")) { + object.unwrapped = $root.google.privacy.dlp.v2.UnwrappedCryptoKey.toObject(message.unwrapped, options); + if (options.oneofs) + object.source = "unwrapped"; + } + if (message.kmsWrapped != null && message.hasOwnProperty("kmsWrapped")) { + object.kmsWrapped = $root.google.privacy.dlp.v2.KmsWrappedCryptoKey.toObject(message.kmsWrapped, options); + if (options.oneofs) + object.source = "kmsWrapped"; + } + return object; + }; + + /** + * Converts this CryptoKey to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CryptoKey + * @instance + * @returns {Object.} JSON object + */ + CryptoKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CryptoKey + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CryptoKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CryptoKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CryptoKey"; + }; + + return CryptoKey; + })(); + + v2.TransientCryptoKey = (function() { + + /** + * Properties of a TransientCryptoKey. + * @memberof google.privacy.dlp.v2 + * @interface ITransientCryptoKey + * @property {string|null} [name] TransientCryptoKey name + */ + + /** + * Constructs a new TransientCryptoKey. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a TransientCryptoKey. + * @implements ITransientCryptoKey + * @constructor + * @param {google.privacy.dlp.v2.ITransientCryptoKey=} [properties] Properties to set + */ + function TransientCryptoKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TransientCryptoKey name. + * @member {string} name + * @memberof google.privacy.dlp.v2.TransientCryptoKey + * @instance + */ + TransientCryptoKey.prototype.name = ""; + + /** + * Creates a new TransientCryptoKey instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.TransientCryptoKey + * @static + * @param {google.privacy.dlp.v2.ITransientCryptoKey=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.TransientCryptoKey} TransientCryptoKey instance + */ + TransientCryptoKey.create = function create(properties) { + return new TransientCryptoKey(properties); + }; + + /** + * Encodes the specified TransientCryptoKey message. Does not implicitly {@link google.privacy.dlp.v2.TransientCryptoKey.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.TransientCryptoKey + * @static + * @param {google.privacy.dlp.v2.ITransientCryptoKey} message TransientCryptoKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransientCryptoKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified TransientCryptoKey message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransientCryptoKey.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.TransientCryptoKey + * @static + * @param {google.privacy.dlp.v2.ITransientCryptoKey} message TransientCryptoKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransientCryptoKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TransientCryptoKey message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.TransientCryptoKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.TransientCryptoKey} TransientCryptoKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransientCryptoKey.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransientCryptoKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TransientCryptoKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.TransientCryptoKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.TransientCryptoKey} TransientCryptoKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransientCryptoKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TransientCryptoKey message. + * @function verify + * @memberof google.privacy.dlp.v2.TransientCryptoKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransientCryptoKey.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a TransientCryptoKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.TransientCryptoKey + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.TransientCryptoKey} TransientCryptoKey + */ + TransientCryptoKey.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.TransientCryptoKey) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.TransientCryptoKey(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a TransientCryptoKey message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.TransientCryptoKey + * @static + * @param {google.privacy.dlp.v2.TransientCryptoKey} message TransientCryptoKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransientCryptoKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this TransientCryptoKey to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.TransientCryptoKey + * @instance + * @returns {Object.} JSON object + */ + TransientCryptoKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TransientCryptoKey + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.TransientCryptoKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TransientCryptoKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.TransientCryptoKey"; + }; + + return TransientCryptoKey; + })(); + + v2.UnwrappedCryptoKey = (function() { + + /** + * Properties of an UnwrappedCryptoKey. + * @memberof google.privacy.dlp.v2 + * @interface IUnwrappedCryptoKey + * @property {Uint8Array|null} [key] UnwrappedCryptoKey key + */ + + /** + * Constructs a new UnwrappedCryptoKey. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an UnwrappedCryptoKey. + * @implements IUnwrappedCryptoKey + * @constructor + * @param {google.privacy.dlp.v2.IUnwrappedCryptoKey=} [properties] Properties to set + */ + function UnwrappedCryptoKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UnwrappedCryptoKey key. + * @member {Uint8Array} key + * @memberof google.privacy.dlp.v2.UnwrappedCryptoKey + * @instance + */ + UnwrappedCryptoKey.prototype.key = $util.newBuffer([]); + + /** + * Creates a new UnwrappedCryptoKey instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.UnwrappedCryptoKey + * @static + * @param {google.privacy.dlp.v2.IUnwrappedCryptoKey=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.UnwrappedCryptoKey} UnwrappedCryptoKey instance + */ + UnwrappedCryptoKey.create = function create(properties) { + return new UnwrappedCryptoKey(properties); + }; + + /** + * Encodes the specified UnwrappedCryptoKey message. Does not implicitly {@link google.privacy.dlp.v2.UnwrappedCryptoKey.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.UnwrappedCryptoKey + * @static + * @param {google.privacy.dlp.v2.IUnwrappedCryptoKey} message UnwrappedCryptoKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnwrappedCryptoKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); + return writer; + }; + + /** + * Encodes the specified UnwrappedCryptoKey message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.UnwrappedCryptoKey.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.UnwrappedCryptoKey + * @static + * @param {google.privacy.dlp.v2.IUnwrappedCryptoKey} message UnwrappedCryptoKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UnwrappedCryptoKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UnwrappedCryptoKey message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.UnwrappedCryptoKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.UnwrappedCryptoKey} UnwrappedCryptoKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnwrappedCryptoKey.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.UnwrappedCryptoKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.key = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UnwrappedCryptoKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.UnwrappedCryptoKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.UnwrappedCryptoKey} UnwrappedCryptoKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UnwrappedCryptoKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UnwrappedCryptoKey message. + * @function verify + * @memberof google.privacy.dlp.v2.UnwrappedCryptoKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UnwrappedCryptoKey.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.key != null && message.hasOwnProperty("key")) + if (!(message.key && typeof message.key.length === "number" || $util.isString(message.key))) + return "key: buffer expected"; + return null; + }; + + /** + * Creates an UnwrappedCryptoKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.UnwrappedCryptoKey + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.UnwrappedCryptoKey} UnwrappedCryptoKey + */ + UnwrappedCryptoKey.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.UnwrappedCryptoKey) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.UnwrappedCryptoKey(); + if (object.key != null) + if (typeof object.key === "string") + $util.base64.decode(object.key, message.key = $util.newBuffer($util.base64.length(object.key)), 0); + else if (object.key.length >= 0) + message.key = object.key; + return message; + }; + + /** + * Creates a plain object from an UnwrappedCryptoKey message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.UnwrappedCryptoKey + * @static + * @param {google.privacy.dlp.v2.UnwrappedCryptoKey} message UnwrappedCryptoKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UnwrappedCryptoKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.key = ""; + else { + object.key = []; + if (options.bytes !== Array) + object.key = $util.newBuffer(object.key); + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; + return object; + }; + + /** + * Converts this UnwrappedCryptoKey to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.UnwrappedCryptoKey + * @instance + * @returns {Object.} JSON object + */ + UnwrappedCryptoKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UnwrappedCryptoKey + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.UnwrappedCryptoKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UnwrappedCryptoKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.UnwrappedCryptoKey"; + }; + + return UnwrappedCryptoKey; + })(); + + v2.KmsWrappedCryptoKey = (function() { + + /** + * Properties of a KmsWrappedCryptoKey. + * @memberof google.privacy.dlp.v2 + * @interface IKmsWrappedCryptoKey + * @property {Uint8Array|null} [wrappedKey] KmsWrappedCryptoKey wrappedKey + * @property {string|null} [cryptoKeyName] KmsWrappedCryptoKey cryptoKeyName + */ + + /** + * Constructs a new KmsWrappedCryptoKey. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a KmsWrappedCryptoKey. + * @implements IKmsWrappedCryptoKey + * @constructor + * @param {google.privacy.dlp.v2.IKmsWrappedCryptoKey=} [properties] Properties to set + */ + function KmsWrappedCryptoKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * KmsWrappedCryptoKey wrappedKey. + * @member {Uint8Array} wrappedKey + * @memberof google.privacy.dlp.v2.KmsWrappedCryptoKey + * @instance + */ + KmsWrappedCryptoKey.prototype.wrappedKey = $util.newBuffer([]); + + /** + * KmsWrappedCryptoKey cryptoKeyName. + * @member {string} cryptoKeyName + * @memberof google.privacy.dlp.v2.KmsWrappedCryptoKey + * @instance + */ + KmsWrappedCryptoKey.prototype.cryptoKeyName = ""; + + /** + * Creates a new KmsWrappedCryptoKey instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.KmsWrappedCryptoKey + * @static + * @param {google.privacy.dlp.v2.IKmsWrappedCryptoKey=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.KmsWrappedCryptoKey} KmsWrappedCryptoKey instance + */ + KmsWrappedCryptoKey.create = function create(properties) { + return new KmsWrappedCryptoKey(properties); + }; + + /** + * Encodes the specified KmsWrappedCryptoKey message. Does not implicitly {@link google.privacy.dlp.v2.KmsWrappedCryptoKey.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.KmsWrappedCryptoKey + * @static + * @param {google.privacy.dlp.v2.IKmsWrappedCryptoKey} message KmsWrappedCryptoKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KmsWrappedCryptoKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.wrappedKey != null && Object.hasOwnProperty.call(message, "wrappedKey")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.wrappedKey); + if (message.cryptoKeyName != null && Object.hasOwnProperty.call(message, "cryptoKeyName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cryptoKeyName); + return writer; + }; + + /** + * Encodes the specified KmsWrappedCryptoKey message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.KmsWrappedCryptoKey.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.KmsWrappedCryptoKey + * @static + * @param {google.privacy.dlp.v2.IKmsWrappedCryptoKey} message KmsWrappedCryptoKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KmsWrappedCryptoKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KmsWrappedCryptoKey message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.KmsWrappedCryptoKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.KmsWrappedCryptoKey} KmsWrappedCryptoKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KmsWrappedCryptoKey.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.KmsWrappedCryptoKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.wrappedKey = reader.bytes(); + break; + } + case 2: { + message.cryptoKeyName = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a KmsWrappedCryptoKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.KmsWrappedCryptoKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.KmsWrappedCryptoKey} KmsWrappedCryptoKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KmsWrappedCryptoKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KmsWrappedCryptoKey message. + * @function verify + * @memberof google.privacy.dlp.v2.KmsWrappedCryptoKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KmsWrappedCryptoKey.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.wrappedKey != null && message.hasOwnProperty("wrappedKey")) + if (!(message.wrappedKey && typeof message.wrappedKey.length === "number" || $util.isString(message.wrappedKey))) + return "wrappedKey: buffer expected"; + if (message.cryptoKeyName != null && message.hasOwnProperty("cryptoKeyName")) + if (!$util.isString(message.cryptoKeyName)) + return "cryptoKeyName: string expected"; + return null; + }; + + /** + * Creates a KmsWrappedCryptoKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.KmsWrappedCryptoKey + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.KmsWrappedCryptoKey} KmsWrappedCryptoKey + */ + KmsWrappedCryptoKey.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.KmsWrappedCryptoKey) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.KmsWrappedCryptoKey(); + if (object.wrappedKey != null) + if (typeof object.wrappedKey === "string") + $util.base64.decode(object.wrappedKey, message.wrappedKey = $util.newBuffer($util.base64.length(object.wrappedKey)), 0); + else if (object.wrappedKey.length >= 0) + message.wrappedKey = object.wrappedKey; + if (object.cryptoKeyName != null) + message.cryptoKeyName = String(object.cryptoKeyName); + return message; + }; + + /** + * Creates a plain object from a KmsWrappedCryptoKey message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.KmsWrappedCryptoKey + * @static + * @param {google.privacy.dlp.v2.KmsWrappedCryptoKey} message KmsWrappedCryptoKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KmsWrappedCryptoKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if (options.bytes === String) + object.wrappedKey = ""; + else { + object.wrappedKey = []; + if (options.bytes !== Array) + object.wrappedKey = $util.newBuffer(object.wrappedKey); + } + object.cryptoKeyName = ""; + } + if (message.wrappedKey != null && message.hasOwnProperty("wrappedKey")) + object.wrappedKey = options.bytes === String ? $util.base64.encode(message.wrappedKey, 0, message.wrappedKey.length) : options.bytes === Array ? Array.prototype.slice.call(message.wrappedKey) : message.wrappedKey; + if (message.cryptoKeyName != null && message.hasOwnProperty("cryptoKeyName")) + object.cryptoKeyName = message.cryptoKeyName; + return object; + }; + + /** + * Converts this KmsWrappedCryptoKey to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.KmsWrappedCryptoKey + * @instance + * @returns {Object.} JSON object + */ + KmsWrappedCryptoKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for KmsWrappedCryptoKey + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.KmsWrappedCryptoKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KmsWrappedCryptoKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.KmsWrappedCryptoKey"; + }; + + return KmsWrappedCryptoKey; + })(); + + v2.DateShiftConfig = (function() { + + /** + * Properties of a DateShiftConfig. + * @memberof google.privacy.dlp.v2 + * @interface IDateShiftConfig + * @property {number|null} [upperBoundDays] DateShiftConfig upperBoundDays + * @property {number|null} [lowerBoundDays] DateShiftConfig lowerBoundDays + * @property {google.privacy.dlp.v2.IFieldId|null} [context] DateShiftConfig context + * @property {google.privacy.dlp.v2.ICryptoKey|null} [cryptoKey] DateShiftConfig cryptoKey + */ + + /** + * Constructs a new DateShiftConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DateShiftConfig. + * @implements IDateShiftConfig + * @constructor + * @param {google.privacy.dlp.v2.IDateShiftConfig=} [properties] Properties to set + */ + function DateShiftConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DateShiftConfig upperBoundDays. + * @member {number} upperBoundDays + * @memberof google.privacy.dlp.v2.DateShiftConfig + * @instance + */ + DateShiftConfig.prototype.upperBoundDays = 0; + + /** + * DateShiftConfig lowerBoundDays. + * @member {number} lowerBoundDays + * @memberof google.privacy.dlp.v2.DateShiftConfig + * @instance + */ + DateShiftConfig.prototype.lowerBoundDays = 0; + + /** + * DateShiftConfig context. + * @member {google.privacy.dlp.v2.IFieldId|null|undefined} context + * @memberof google.privacy.dlp.v2.DateShiftConfig + * @instance + */ + DateShiftConfig.prototype.context = null; + + /** + * DateShiftConfig cryptoKey. + * @member {google.privacy.dlp.v2.ICryptoKey|null|undefined} cryptoKey + * @memberof google.privacy.dlp.v2.DateShiftConfig + * @instance + */ + DateShiftConfig.prototype.cryptoKey = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DateShiftConfig method. + * @member {"cryptoKey"|undefined} method + * @memberof google.privacy.dlp.v2.DateShiftConfig + * @instance + */ + Object.defineProperty(DateShiftConfig.prototype, "method", { + get: $util.oneOfGetter($oneOfFields = ["cryptoKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DateShiftConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DateShiftConfig + * @static + * @param {google.privacy.dlp.v2.IDateShiftConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DateShiftConfig} DateShiftConfig instance + */ + DateShiftConfig.create = function create(properties) { + return new DateShiftConfig(properties); + }; + + /** + * Encodes the specified DateShiftConfig message. Does not implicitly {@link google.privacy.dlp.v2.DateShiftConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DateShiftConfig + * @static + * @param {google.privacy.dlp.v2.IDateShiftConfig} message DateShiftConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DateShiftConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.upperBoundDays != null && Object.hasOwnProperty.call(message, "upperBoundDays")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.upperBoundDays); + if (message.lowerBoundDays != null && Object.hasOwnProperty.call(message, "lowerBoundDays")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.lowerBoundDays); + if (message.context != null && Object.hasOwnProperty.call(message, "context")) + $root.google.privacy.dlp.v2.FieldId.encode(message.context, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.cryptoKey != null && Object.hasOwnProperty.call(message, "cryptoKey")) + $root.google.privacy.dlp.v2.CryptoKey.encode(message.cryptoKey, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DateShiftConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DateShiftConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DateShiftConfig + * @static + * @param {google.privacy.dlp.v2.IDateShiftConfig} message DateShiftConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DateShiftConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DateShiftConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DateShiftConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DateShiftConfig} DateShiftConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DateShiftConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DateShiftConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.upperBoundDays = reader.int32(); + break; + } + case 2: { + message.lowerBoundDays = reader.int32(); + break; + } + case 3: { + message.context = $root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.cryptoKey = $root.google.privacy.dlp.v2.CryptoKey.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DateShiftConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DateShiftConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DateShiftConfig} DateShiftConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DateShiftConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DateShiftConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.DateShiftConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DateShiftConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.upperBoundDays != null && message.hasOwnProperty("upperBoundDays")) + if (!$util.isInteger(message.upperBoundDays)) + return "upperBoundDays: integer expected"; + if (message.lowerBoundDays != null && message.hasOwnProperty("lowerBoundDays")) + if (!$util.isInteger(message.lowerBoundDays)) + return "lowerBoundDays: integer expected"; + if (message.context != null && message.hasOwnProperty("context")) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.context, long + 1); + if (error) + return "context." + error; + } + if (message.cryptoKey != null && message.hasOwnProperty("cryptoKey")) { + properties.method = 1; + { + var error = $root.google.privacy.dlp.v2.CryptoKey.verify(message.cryptoKey, long + 1); + if (error) + return "cryptoKey." + error; + } + } + return null; + }; + + /** + * Creates a DateShiftConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DateShiftConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DateShiftConfig} DateShiftConfig + */ + DateShiftConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DateShiftConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DateShiftConfig(); + if (object.upperBoundDays != null) + message.upperBoundDays = object.upperBoundDays | 0; + if (object.lowerBoundDays != null) + message.lowerBoundDays = object.lowerBoundDays | 0; + if (object.context != null) { + if (typeof object.context !== "object") + throw TypeError(".google.privacy.dlp.v2.DateShiftConfig.context: object expected"); + message.context = $root.google.privacy.dlp.v2.FieldId.fromObject(object.context, long + 1); + } + if (object.cryptoKey != null) { + if (typeof object.cryptoKey !== "object") + throw TypeError(".google.privacy.dlp.v2.DateShiftConfig.cryptoKey: object expected"); + message.cryptoKey = $root.google.privacy.dlp.v2.CryptoKey.fromObject(object.cryptoKey, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DateShiftConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DateShiftConfig + * @static + * @param {google.privacy.dlp.v2.DateShiftConfig} message DateShiftConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DateShiftConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.upperBoundDays = 0; + object.lowerBoundDays = 0; + object.context = null; + } + if (message.upperBoundDays != null && message.hasOwnProperty("upperBoundDays")) + object.upperBoundDays = message.upperBoundDays; + if (message.lowerBoundDays != null && message.hasOwnProperty("lowerBoundDays")) + object.lowerBoundDays = message.lowerBoundDays; + if (message.context != null && message.hasOwnProperty("context")) + object.context = $root.google.privacy.dlp.v2.FieldId.toObject(message.context, options); + if (message.cryptoKey != null && message.hasOwnProperty("cryptoKey")) { + object.cryptoKey = $root.google.privacy.dlp.v2.CryptoKey.toObject(message.cryptoKey, options); + if (options.oneofs) + object.method = "cryptoKey"; + } + return object; + }; + + /** + * Converts this DateShiftConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DateShiftConfig + * @instance + * @returns {Object.} JSON object + */ + DateShiftConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DateShiftConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DateShiftConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DateShiftConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DateShiftConfig"; + }; + + return DateShiftConfig; + })(); + + v2.InfoTypeTransformations = (function() { + + /** + * Properties of an InfoTypeTransformations. + * @memberof google.privacy.dlp.v2 + * @interface IInfoTypeTransformations + * @property {Array.|null} [transformations] InfoTypeTransformations transformations + */ + + /** + * Constructs a new InfoTypeTransformations. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an InfoTypeTransformations. + * @implements IInfoTypeTransformations + * @constructor + * @param {google.privacy.dlp.v2.IInfoTypeTransformations=} [properties] Properties to set + */ + function InfoTypeTransformations(properties) { + this.transformations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * InfoTypeTransformations transformations. + * @member {Array.} transformations + * @memberof google.privacy.dlp.v2.InfoTypeTransformations + * @instance + */ + InfoTypeTransformations.prototype.transformations = $util.emptyArray; + + /** + * Creates a new InfoTypeTransformations instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.InfoTypeTransformations + * @static + * @param {google.privacy.dlp.v2.IInfoTypeTransformations=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.InfoTypeTransformations} InfoTypeTransformations instance + */ + InfoTypeTransformations.create = function create(properties) { + return new InfoTypeTransformations(properties); + }; + + /** + * Encodes the specified InfoTypeTransformations message. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeTransformations.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.InfoTypeTransformations + * @static + * @param {google.privacy.dlp.v2.IInfoTypeTransformations} message InfoTypeTransformations message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfoTypeTransformations.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.transformations != null && message.transformations.length) + for (var i = 0; i < message.transformations.length; ++i) + $root.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.encode(message.transformations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified InfoTypeTransformations message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeTransformations.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.InfoTypeTransformations + * @static + * @param {google.privacy.dlp.v2.IInfoTypeTransformations} message InfoTypeTransformations message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfoTypeTransformations.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InfoTypeTransformations message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.InfoTypeTransformations + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.InfoTypeTransformations} InfoTypeTransformations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfoTypeTransformations.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.InfoTypeTransformations(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.transformations && message.transformations.length)) + message.transformations = []; + message.transformations.push($root.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an InfoTypeTransformations message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.InfoTypeTransformations + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.InfoTypeTransformations} InfoTypeTransformations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfoTypeTransformations.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InfoTypeTransformations message. + * @function verify + * @memberof google.privacy.dlp.v2.InfoTypeTransformations + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InfoTypeTransformations.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.transformations != null && message.hasOwnProperty("transformations")) { + if (!Array.isArray(message.transformations)) + return "transformations: array expected"; + for (var i = 0; i < message.transformations.length; ++i) { + var error = $root.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.verify(message.transformations[i], long + 1); + if (error) + return "transformations." + error; + } + } + return null; + }; + + /** + * Creates an InfoTypeTransformations message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.InfoTypeTransformations + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.InfoTypeTransformations} InfoTypeTransformations + */ + InfoTypeTransformations.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.InfoTypeTransformations) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.InfoTypeTransformations(); + if (object.transformations) { + if (!Array.isArray(object.transformations)) + throw TypeError(".google.privacy.dlp.v2.InfoTypeTransformations.transformations: array expected"); + message.transformations = []; + for (var i = 0; i < object.transformations.length; ++i) { + if (typeof object.transformations[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.InfoTypeTransformations.transformations: object expected"); + message.transformations[i] = $root.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.fromObject(object.transformations[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from an InfoTypeTransformations message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.InfoTypeTransformations + * @static + * @param {google.privacy.dlp.v2.InfoTypeTransformations} message InfoTypeTransformations + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InfoTypeTransformations.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.transformations = []; + if (message.transformations && message.transformations.length) { + object.transformations = []; + for (var j = 0; j < message.transformations.length; ++j) + object.transformations[j] = $root.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.toObject(message.transformations[j], options); + } + return object; + }; + + /** + * Converts this InfoTypeTransformations to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.InfoTypeTransformations + * @instance + * @returns {Object.} JSON object + */ + InfoTypeTransformations.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InfoTypeTransformations + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.InfoTypeTransformations + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InfoTypeTransformations.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.InfoTypeTransformations"; + }; + + InfoTypeTransformations.InfoTypeTransformation = (function() { + + /** + * Properties of an InfoTypeTransformation. + * @memberof google.privacy.dlp.v2.InfoTypeTransformations + * @interface IInfoTypeTransformation + * @property {Array.|null} [infoTypes] InfoTypeTransformation infoTypes + * @property {google.privacy.dlp.v2.IPrimitiveTransformation|null} [primitiveTransformation] InfoTypeTransformation primitiveTransformation + */ + + /** + * Constructs a new InfoTypeTransformation. + * @memberof google.privacy.dlp.v2.InfoTypeTransformations + * @classdesc Represents an InfoTypeTransformation. + * @implements IInfoTypeTransformation + * @constructor + * @param {google.privacy.dlp.v2.InfoTypeTransformations.IInfoTypeTransformation=} [properties] Properties to set + */ + function InfoTypeTransformation(properties) { + this.infoTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * InfoTypeTransformation infoTypes. + * @member {Array.} infoTypes + * @memberof google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation + * @instance + */ + InfoTypeTransformation.prototype.infoTypes = $util.emptyArray; + + /** + * InfoTypeTransformation primitiveTransformation. + * @member {google.privacy.dlp.v2.IPrimitiveTransformation|null|undefined} primitiveTransformation + * @memberof google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation + * @instance + */ + InfoTypeTransformation.prototype.primitiveTransformation = null; + + /** + * Creates a new InfoTypeTransformation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation + * @static + * @param {google.privacy.dlp.v2.InfoTypeTransformations.IInfoTypeTransformation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation} InfoTypeTransformation instance + */ + InfoTypeTransformation.create = function create(properties) { + return new InfoTypeTransformation(properties); + }; + + /** + * Encodes the specified InfoTypeTransformation message. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation + * @static + * @param {google.privacy.dlp.v2.InfoTypeTransformations.IInfoTypeTransformation} message InfoTypeTransformation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfoTypeTransformation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.infoTypes != null && message.infoTypes.length) + for (var i = 0; i < message.infoTypes.length; ++i) + $root.google.privacy.dlp.v2.InfoType.encode(message.infoTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.primitiveTransformation != null && Object.hasOwnProperty.call(message, "primitiveTransformation")) + $root.google.privacy.dlp.v2.PrimitiveTransformation.encode(message.primitiveTransformation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified InfoTypeTransformation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation + * @static + * @param {google.privacy.dlp.v2.InfoTypeTransformations.IInfoTypeTransformation} message InfoTypeTransformation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfoTypeTransformation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InfoTypeTransformation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation} InfoTypeTransformation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfoTypeTransformation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.infoTypes && message.infoTypes.length)) + message.infoTypes = []; + message.infoTypes.push($root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.primitiveTransformation = $root.google.privacy.dlp.v2.PrimitiveTransformation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an InfoTypeTransformation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation} InfoTypeTransformation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfoTypeTransformation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InfoTypeTransformation message. + * @function verify + * @memberof google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InfoTypeTransformation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.infoTypes != null && message.hasOwnProperty("infoTypes")) { + if (!Array.isArray(message.infoTypes)) + return "infoTypes: array expected"; + for (var i = 0; i < message.infoTypes.length; ++i) { + var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infoTypes[i], long + 1); + if (error) + return "infoTypes." + error; + } + } + if (message.primitiveTransformation != null && message.hasOwnProperty("primitiveTransformation")) { + var error = $root.google.privacy.dlp.v2.PrimitiveTransformation.verify(message.primitiveTransformation, long + 1); + if (error) + return "primitiveTransformation." + error; + } + return null; + }; + + /** + * Creates an InfoTypeTransformation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation} InfoTypeTransformation + */ + InfoTypeTransformation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation(); + if (object.infoTypes) { + if (!Array.isArray(object.infoTypes)) + throw TypeError(".google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.infoTypes: array expected"); + message.infoTypes = []; + for (var i = 0; i < object.infoTypes.length; ++i) { + if (typeof object.infoTypes[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.infoTypes: object expected"); + message.infoTypes[i] = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoTypes[i], long + 1); + } + } + if (object.primitiveTransformation != null) { + if (typeof object.primitiveTransformation !== "object") + throw TypeError(".google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation.primitiveTransformation: object expected"); + message.primitiveTransformation = $root.google.privacy.dlp.v2.PrimitiveTransformation.fromObject(object.primitiveTransformation, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an InfoTypeTransformation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation + * @static + * @param {google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation} message InfoTypeTransformation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InfoTypeTransformation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.infoTypes = []; + if (options.defaults) + object.primitiveTransformation = null; + if (message.infoTypes && message.infoTypes.length) { + object.infoTypes = []; + for (var j = 0; j < message.infoTypes.length; ++j) + object.infoTypes[j] = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoTypes[j], options); + } + if (message.primitiveTransformation != null && message.hasOwnProperty("primitiveTransformation")) + object.primitiveTransformation = $root.google.privacy.dlp.v2.PrimitiveTransformation.toObject(message.primitiveTransformation, options); + return object; + }; + + /** + * Converts this InfoTypeTransformation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation + * @instance + * @returns {Object.} JSON object + */ + InfoTypeTransformation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InfoTypeTransformation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InfoTypeTransformation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.InfoTypeTransformations.InfoTypeTransformation"; + }; + + return InfoTypeTransformation; + })(); + + return InfoTypeTransformations; + })(); + + v2.FieldTransformation = (function() { + + /** + * Properties of a FieldTransformation. + * @memberof google.privacy.dlp.v2 + * @interface IFieldTransformation + * @property {Array.|null} [fields] FieldTransformation fields + * @property {google.privacy.dlp.v2.IRecordCondition|null} [condition] FieldTransformation condition + * @property {google.privacy.dlp.v2.IPrimitiveTransformation|null} [primitiveTransformation] FieldTransformation primitiveTransformation + * @property {google.privacy.dlp.v2.IInfoTypeTransformations|null} [infoTypeTransformations] FieldTransformation infoTypeTransformations + */ + + /** + * Constructs a new FieldTransformation. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a FieldTransformation. + * @implements IFieldTransformation + * @constructor + * @param {google.privacy.dlp.v2.IFieldTransformation=} [properties] Properties to set + */ + function FieldTransformation(properties) { + this.fields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldTransformation fields. + * @member {Array.} fields + * @memberof google.privacy.dlp.v2.FieldTransformation + * @instance + */ + FieldTransformation.prototype.fields = $util.emptyArray; + + /** + * FieldTransformation condition. + * @member {google.privacy.dlp.v2.IRecordCondition|null|undefined} condition + * @memberof google.privacy.dlp.v2.FieldTransformation + * @instance + */ + FieldTransformation.prototype.condition = null; + + /** + * FieldTransformation primitiveTransformation. + * @member {google.privacy.dlp.v2.IPrimitiveTransformation|null|undefined} primitiveTransformation + * @memberof google.privacy.dlp.v2.FieldTransformation + * @instance + */ + FieldTransformation.prototype.primitiveTransformation = null; + + /** + * FieldTransformation infoTypeTransformations. + * @member {google.privacy.dlp.v2.IInfoTypeTransformations|null|undefined} infoTypeTransformations + * @memberof google.privacy.dlp.v2.FieldTransformation + * @instance + */ + FieldTransformation.prototype.infoTypeTransformations = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FieldTransformation transformation. + * @member {"primitiveTransformation"|"infoTypeTransformations"|undefined} transformation + * @memberof google.privacy.dlp.v2.FieldTransformation + * @instance + */ + Object.defineProperty(FieldTransformation.prototype, "transformation", { + get: $util.oneOfGetter($oneOfFields = ["primitiveTransformation", "infoTypeTransformations"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FieldTransformation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.FieldTransformation + * @static + * @param {google.privacy.dlp.v2.IFieldTransformation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.FieldTransformation} FieldTransformation instance + */ + FieldTransformation.create = function create(properties) { + return new FieldTransformation(properties); + }; + + /** + * Encodes the specified FieldTransformation message. Does not implicitly {@link google.privacy.dlp.v2.FieldTransformation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.FieldTransformation + * @static + * @param {google.privacy.dlp.v2.IFieldTransformation} message FieldTransformation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldTransformation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fields != null && message.fields.length) + for (var i = 0; i < message.fields.length; ++i) + $root.google.privacy.dlp.v2.FieldId.encode(message.fields[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.privacy.dlp.v2.RecordCondition.encode(message.condition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.primitiveTransformation != null && Object.hasOwnProperty.call(message, "primitiveTransformation")) + $root.google.privacy.dlp.v2.PrimitiveTransformation.encode(message.primitiveTransformation, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.infoTypeTransformations != null && Object.hasOwnProperty.call(message, "infoTypeTransformations")) + $root.google.privacy.dlp.v2.InfoTypeTransformations.encode(message.infoTypeTransformations, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldTransformation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FieldTransformation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.FieldTransformation + * @static + * @param {google.privacy.dlp.v2.IFieldTransformation} message FieldTransformation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldTransformation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldTransformation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.FieldTransformation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.FieldTransformation} FieldTransformation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldTransformation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.FieldTransformation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.fields && message.fields.length)) + message.fields = []; + message.fields.push($root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 3: { + message.condition = $root.google.privacy.dlp.v2.RecordCondition.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.primitiveTransformation = $root.google.privacy.dlp.v2.PrimitiveTransformation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.infoTypeTransformations = $root.google.privacy.dlp.v2.InfoTypeTransformations.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FieldTransformation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.FieldTransformation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.FieldTransformation} FieldTransformation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldTransformation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldTransformation message. + * @function verify + * @memberof google.privacy.dlp.v2.FieldTransformation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldTransformation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.fields != null && message.hasOwnProperty("fields")) { + if (!Array.isArray(message.fields)) + return "fields: array expected"; + for (var i = 0; i < message.fields.length; ++i) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.fields[i], long + 1); + if (error) + return "fields." + error; + } + } + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.privacy.dlp.v2.RecordCondition.verify(message.condition, long + 1); + if (error) + return "condition." + error; + } + if (message.primitiveTransformation != null && message.hasOwnProperty("primitiveTransformation")) { + properties.transformation = 1; + { + var error = $root.google.privacy.dlp.v2.PrimitiveTransformation.verify(message.primitiveTransformation, long + 1); + if (error) + return "primitiveTransformation." + error; + } + } + if (message.infoTypeTransformations != null && message.hasOwnProperty("infoTypeTransformations")) { + if (properties.transformation === 1) + return "transformation: multiple values"; + properties.transformation = 1; + { + var error = $root.google.privacy.dlp.v2.InfoTypeTransformations.verify(message.infoTypeTransformations, long + 1); + if (error) + return "infoTypeTransformations." + error; + } + } + return null; + }; + + /** + * Creates a FieldTransformation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.FieldTransformation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.FieldTransformation} FieldTransformation + */ + FieldTransformation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.FieldTransformation) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.FieldTransformation(); + if (object.fields) { + if (!Array.isArray(object.fields)) + throw TypeError(".google.privacy.dlp.v2.FieldTransformation.fields: array expected"); + message.fields = []; + for (var i = 0; i < object.fields.length; ++i) { + if (typeof object.fields[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.FieldTransformation.fields: object expected"); + message.fields[i] = $root.google.privacy.dlp.v2.FieldId.fromObject(object.fields[i], long + 1); + } + } + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.privacy.dlp.v2.FieldTransformation.condition: object expected"); + message.condition = $root.google.privacy.dlp.v2.RecordCondition.fromObject(object.condition, long + 1); + } + if (object.primitiveTransformation != null) { + if (typeof object.primitiveTransformation !== "object") + throw TypeError(".google.privacy.dlp.v2.FieldTransformation.primitiveTransformation: object expected"); + message.primitiveTransformation = $root.google.privacy.dlp.v2.PrimitiveTransformation.fromObject(object.primitiveTransformation, long + 1); + } + if (object.infoTypeTransformations != null) { + if (typeof object.infoTypeTransformations !== "object") + throw TypeError(".google.privacy.dlp.v2.FieldTransformation.infoTypeTransformations: object expected"); + message.infoTypeTransformations = $root.google.privacy.dlp.v2.InfoTypeTransformations.fromObject(object.infoTypeTransformations, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a FieldTransformation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.FieldTransformation + * @static + * @param {google.privacy.dlp.v2.FieldTransformation} message FieldTransformation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldTransformation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fields = []; + if (options.defaults) + object.condition = null; + if (message.fields && message.fields.length) { + object.fields = []; + for (var j = 0; j < message.fields.length; ++j) + object.fields[j] = $root.google.privacy.dlp.v2.FieldId.toObject(message.fields[j], options); + } + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.privacy.dlp.v2.RecordCondition.toObject(message.condition, options); + if (message.primitiveTransformation != null && message.hasOwnProperty("primitiveTransformation")) { + object.primitiveTransformation = $root.google.privacy.dlp.v2.PrimitiveTransformation.toObject(message.primitiveTransformation, options); + if (options.oneofs) + object.transformation = "primitiveTransformation"; + } + if (message.infoTypeTransformations != null && message.hasOwnProperty("infoTypeTransformations")) { + object.infoTypeTransformations = $root.google.privacy.dlp.v2.InfoTypeTransformations.toObject(message.infoTypeTransformations, options); + if (options.oneofs) + object.transformation = "infoTypeTransformations"; + } + return object; + }; + + /** + * Converts this FieldTransformation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.FieldTransformation + * @instance + * @returns {Object.} JSON object + */ + FieldTransformation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldTransformation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.FieldTransformation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldTransformation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.FieldTransformation"; + }; + + return FieldTransformation; + })(); + + v2.RecordTransformations = (function() { + + /** + * Properties of a RecordTransformations. + * @memberof google.privacy.dlp.v2 + * @interface IRecordTransformations + * @property {Array.|null} [fieldTransformations] RecordTransformations fieldTransformations + * @property {Array.|null} [recordSuppressions] RecordTransformations recordSuppressions + */ + + /** + * Constructs a new RecordTransformations. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a RecordTransformations. + * @implements IRecordTransformations + * @constructor + * @param {google.privacy.dlp.v2.IRecordTransformations=} [properties] Properties to set + */ + function RecordTransformations(properties) { + this.fieldTransformations = []; + this.recordSuppressions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RecordTransformations fieldTransformations. + * @member {Array.} fieldTransformations + * @memberof google.privacy.dlp.v2.RecordTransformations + * @instance + */ + RecordTransformations.prototype.fieldTransformations = $util.emptyArray; + + /** + * RecordTransformations recordSuppressions. + * @member {Array.} recordSuppressions + * @memberof google.privacy.dlp.v2.RecordTransformations + * @instance + */ + RecordTransformations.prototype.recordSuppressions = $util.emptyArray; + + /** + * Creates a new RecordTransformations instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.RecordTransformations + * @static + * @param {google.privacy.dlp.v2.IRecordTransformations=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.RecordTransformations} RecordTransformations instance + */ + RecordTransformations.create = function create(properties) { + return new RecordTransformations(properties); + }; + + /** + * Encodes the specified RecordTransformations message. Does not implicitly {@link google.privacy.dlp.v2.RecordTransformations.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.RecordTransformations + * @static + * @param {google.privacy.dlp.v2.IRecordTransformations} message RecordTransformations message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordTransformations.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldTransformations != null && message.fieldTransformations.length) + for (var i = 0; i < message.fieldTransformations.length; ++i) + $root.google.privacy.dlp.v2.FieldTransformation.encode(message.fieldTransformations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.recordSuppressions != null && message.recordSuppressions.length) + for (var i = 0; i < message.recordSuppressions.length; ++i) + $root.google.privacy.dlp.v2.RecordSuppression.encode(message.recordSuppressions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RecordTransformations message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordTransformations.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.RecordTransformations + * @static + * @param {google.privacy.dlp.v2.IRecordTransformations} message RecordTransformations message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordTransformations.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecordTransformations message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.RecordTransformations + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.RecordTransformations} RecordTransformations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordTransformations.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.RecordTransformations(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.fieldTransformations && message.fieldTransformations.length)) + message.fieldTransformations = []; + message.fieldTransformations.push($root.google.privacy.dlp.v2.FieldTransformation.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + if (!(message.recordSuppressions && message.recordSuppressions.length)) + message.recordSuppressions = []; + message.recordSuppressions.push($root.google.privacy.dlp.v2.RecordSuppression.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RecordTransformations message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.RecordTransformations + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.RecordTransformations} RecordTransformations + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordTransformations.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecordTransformations message. + * @function verify + * @memberof google.privacy.dlp.v2.RecordTransformations + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecordTransformations.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.fieldTransformations != null && message.hasOwnProperty("fieldTransformations")) { + if (!Array.isArray(message.fieldTransformations)) + return "fieldTransformations: array expected"; + for (var i = 0; i < message.fieldTransformations.length; ++i) { + var error = $root.google.privacy.dlp.v2.FieldTransformation.verify(message.fieldTransformations[i], long + 1); + if (error) + return "fieldTransformations." + error; + } + } + if (message.recordSuppressions != null && message.hasOwnProperty("recordSuppressions")) { + if (!Array.isArray(message.recordSuppressions)) + return "recordSuppressions: array expected"; + for (var i = 0; i < message.recordSuppressions.length; ++i) { + var error = $root.google.privacy.dlp.v2.RecordSuppression.verify(message.recordSuppressions[i], long + 1); + if (error) + return "recordSuppressions." + error; + } + } + return null; + }; + + /** + * Creates a RecordTransformations message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.RecordTransformations + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.RecordTransformations} RecordTransformations + */ + RecordTransformations.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.RecordTransformations) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.RecordTransformations(); + if (object.fieldTransformations) { + if (!Array.isArray(object.fieldTransformations)) + throw TypeError(".google.privacy.dlp.v2.RecordTransformations.fieldTransformations: array expected"); + message.fieldTransformations = []; + for (var i = 0; i < object.fieldTransformations.length; ++i) { + if (typeof object.fieldTransformations[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.RecordTransformations.fieldTransformations: object expected"); + message.fieldTransformations[i] = $root.google.privacy.dlp.v2.FieldTransformation.fromObject(object.fieldTransformations[i], long + 1); + } + } + if (object.recordSuppressions) { + if (!Array.isArray(object.recordSuppressions)) + throw TypeError(".google.privacy.dlp.v2.RecordTransformations.recordSuppressions: array expected"); + message.recordSuppressions = []; + for (var i = 0; i < object.recordSuppressions.length; ++i) { + if (typeof object.recordSuppressions[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.RecordTransformations.recordSuppressions: object expected"); + message.recordSuppressions[i] = $root.google.privacy.dlp.v2.RecordSuppression.fromObject(object.recordSuppressions[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a RecordTransformations message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.RecordTransformations + * @static + * @param {google.privacy.dlp.v2.RecordTransformations} message RecordTransformations + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecordTransformations.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.fieldTransformations = []; + object.recordSuppressions = []; + } + if (message.fieldTransformations && message.fieldTransformations.length) { + object.fieldTransformations = []; + for (var j = 0; j < message.fieldTransformations.length; ++j) + object.fieldTransformations[j] = $root.google.privacy.dlp.v2.FieldTransformation.toObject(message.fieldTransformations[j], options); + } + if (message.recordSuppressions && message.recordSuppressions.length) { + object.recordSuppressions = []; + for (var j = 0; j < message.recordSuppressions.length; ++j) + object.recordSuppressions[j] = $root.google.privacy.dlp.v2.RecordSuppression.toObject(message.recordSuppressions[j], options); + } + return object; + }; + + /** + * Converts this RecordTransformations to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.RecordTransformations + * @instance + * @returns {Object.} JSON object + */ + RecordTransformations.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RecordTransformations + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.RecordTransformations + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecordTransformations.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.RecordTransformations"; + }; + + return RecordTransformations; + })(); + + v2.RecordSuppression = (function() { + + /** + * Properties of a RecordSuppression. + * @memberof google.privacy.dlp.v2 + * @interface IRecordSuppression + * @property {google.privacy.dlp.v2.IRecordCondition|null} [condition] RecordSuppression condition + */ + + /** + * Constructs a new RecordSuppression. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a RecordSuppression. + * @implements IRecordSuppression + * @constructor + * @param {google.privacy.dlp.v2.IRecordSuppression=} [properties] Properties to set + */ + function RecordSuppression(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RecordSuppression condition. + * @member {google.privacy.dlp.v2.IRecordCondition|null|undefined} condition + * @memberof google.privacy.dlp.v2.RecordSuppression + * @instance + */ + RecordSuppression.prototype.condition = null; + + /** + * Creates a new RecordSuppression instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.RecordSuppression + * @static + * @param {google.privacy.dlp.v2.IRecordSuppression=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.RecordSuppression} RecordSuppression instance + */ + RecordSuppression.create = function create(properties) { + return new RecordSuppression(properties); + }; + + /** + * Encodes the specified RecordSuppression message. Does not implicitly {@link google.privacy.dlp.v2.RecordSuppression.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.RecordSuppression + * @static + * @param {google.privacy.dlp.v2.IRecordSuppression} message RecordSuppression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordSuppression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + $root.google.privacy.dlp.v2.RecordCondition.encode(message.condition, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RecordSuppression message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordSuppression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.RecordSuppression + * @static + * @param {google.privacy.dlp.v2.IRecordSuppression} message RecordSuppression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordSuppression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecordSuppression message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.RecordSuppression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.RecordSuppression} RecordSuppression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordSuppression.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.RecordSuppression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.condition = $root.google.privacy.dlp.v2.RecordCondition.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RecordSuppression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.RecordSuppression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.RecordSuppression} RecordSuppression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordSuppression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecordSuppression message. + * @function verify + * @memberof google.privacy.dlp.v2.RecordSuppression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecordSuppression.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.condition != null && message.hasOwnProperty("condition")) { + var error = $root.google.privacy.dlp.v2.RecordCondition.verify(message.condition, long + 1); + if (error) + return "condition." + error; + } + return null; + }; + + /** + * Creates a RecordSuppression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.RecordSuppression + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.RecordSuppression} RecordSuppression + */ + RecordSuppression.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.RecordSuppression) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.RecordSuppression(); + if (object.condition != null) { + if (typeof object.condition !== "object") + throw TypeError(".google.privacy.dlp.v2.RecordSuppression.condition: object expected"); + message.condition = $root.google.privacy.dlp.v2.RecordCondition.fromObject(object.condition, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a RecordSuppression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.RecordSuppression + * @static + * @param {google.privacy.dlp.v2.RecordSuppression} message RecordSuppression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecordSuppression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.condition = null; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = $root.google.privacy.dlp.v2.RecordCondition.toObject(message.condition, options); + return object; + }; + + /** + * Converts this RecordSuppression to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.RecordSuppression + * @instance + * @returns {Object.} JSON object + */ + RecordSuppression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RecordSuppression + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.RecordSuppression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecordSuppression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.RecordSuppression"; + }; + + return RecordSuppression; + })(); + + v2.RecordCondition = (function() { + + /** + * Properties of a RecordCondition. + * @memberof google.privacy.dlp.v2 + * @interface IRecordCondition + * @property {google.privacy.dlp.v2.RecordCondition.IExpressions|null} [expressions] RecordCondition expressions + */ + + /** + * Constructs a new RecordCondition. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a RecordCondition. + * @implements IRecordCondition + * @constructor + * @param {google.privacy.dlp.v2.IRecordCondition=} [properties] Properties to set + */ + function RecordCondition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RecordCondition expressions. + * @member {google.privacy.dlp.v2.RecordCondition.IExpressions|null|undefined} expressions + * @memberof google.privacy.dlp.v2.RecordCondition + * @instance + */ + RecordCondition.prototype.expressions = null; + + /** + * Creates a new RecordCondition instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.RecordCondition + * @static + * @param {google.privacy.dlp.v2.IRecordCondition=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.RecordCondition} RecordCondition instance + */ + RecordCondition.create = function create(properties) { + return new RecordCondition(properties); + }; + + /** + * Encodes the specified RecordCondition message. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.RecordCondition + * @static + * @param {google.privacy.dlp.v2.IRecordCondition} message RecordCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordCondition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expressions != null && Object.hasOwnProperty.call(message, "expressions")) + $root.google.privacy.dlp.v2.RecordCondition.Expressions.encode(message.expressions, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RecordCondition message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.RecordCondition + * @static + * @param {google.privacy.dlp.v2.IRecordCondition} message RecordCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordCondition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecordCondition message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.RecordCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.RecordCondition} RecordCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordCondition.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.RecordCondition(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.expressions = $root.google.privacy.dlp.v2.RecordCondition.Expressions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RecordCondition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.RecordCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.RecordCondition} RecordCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordCondition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecordCondition message. + * @function verify + * @memberof google.privacy.dlp.v2.RecordCondition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecordCondition.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.expressions != null && message.hasOwnProperty("expressions")) { + var error = $root.google.privacy.dlp.v2.RecordCondition.Expressions.verify(message.expressions, long + 1); + if (error) + return "expressions." + error; + } + return null; + }; + + /** + * Creates a RecordCondition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.RecordCondition + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.RecordCondition} RecordCondition + */ + RecordCondition.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.RecordCondition) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.RecordCondition(); + if (object.expressions != null) { + if (typeof object.expressions !== "object") + throw TypeError(".google.privacy.dlp.v2.RecordCondition.expressions: object expected"); + message.expressions = $root.google.privacy.dlp.v2.RecordCondition.Expressions.fromObject(object.expressions, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a RecordCondition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.RecordCondition + * @static + * @param {google.privacy.dlp.v2.RecordCondition} message RecordCondition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecordCondition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.expressions = null; + if (message.expressions != null && message.hasOwnProperty("expressions")) + object.expressions = $root.google.privacy.dlp.v2.RecordCondition.Expressions.toObject(message.expressions, options); + return object; + }; + + /** + * Converts this RecordCondition to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.RecordCondition + * @instance + * @returns {Object.} JSON object + */ + RecordCondition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RecordCondition + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.RecordCondition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecordCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.RecordCondition"; + }; + + RecordCondition.Condition = (function() { + + /** + * Properties of a Condition. + * @memberof google.privacy.dlp.v2.RecordCondition + * @interface ICondition + * @property {google.privacy.dlp.v2.IFieldId|null} [field] Condition field + * @property {google.privacy.dlp.v2.RelationalOperator|null} [operator] Condition operator + * @property {google.privacy.dlp.v2.IValue|null} [value] Condition value + */ + + /** + * Constructs a new Condition. + * @memberof google.privacy.dlp.v2.RecordCondition + * @classdesc Represents a Condition. + * @implements ICondition + * @constructor + * @param {google.privacy.dlp.v2.RecordCondition.ICondition=} [properties] Properties to set + */ + function Condition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Condition field. + * @member {google.privacy.dlp.v2.IFieldId|null|undefined} field + * @memberof google.privacy.dlp.v2.RecordCondition.Condition + * @instance + */ + Condition.prototype.field = null; + + /** + * Condition operator. + * @member {google.privacy.dlp.v2.RelationalOperator} operator + * @memberof google.privacy.dlp.v2.RecordCondition.Condition + * @instance + */ + Condition.prototype.operator = 0; + + /** + * Condition value. + * @member {google.privacy.dlp.v2.IValue|null|undefined} value + * @memberof google.privacy.dlp.v2.RecordCondition.Condition + * @instance + */ + Condition.prototype.value = null; + + /** + * Creates a new Condition instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.RecordCondition.Condition + * @static + * @param {google.privacy.dlp.v2.RecordCondition.ICondition=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.RecordCondition.Condition} Condition instance + */ + Condition.create = function create(properties) { + return new Condition(properties); + }; + + /** + * Encodes the specified Condition message. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Condition.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.RecordCondition.Condition + * @static + * @param {google.privacy.dlp.v2.RecordCondition.ICondition} message Condition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Condition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + $root.google.privacy.dlp.v2.FieldId.encode(message.field, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.operator != null && Object.hasOwnProperty.call(message, "operator")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.operator); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.privacy.dlp.v2.Value.encode(message.value, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Condition message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Condition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.RecordCondition.Condition + * @static + * @param {google.privacy.dlp.v2.RecordCondition.ICondition} message Condition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Condition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Condition message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.RecordCondition.Condition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.RecordCondition.Condition} Condition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Condition.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.RecordCondition.Condition(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.field = $root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.operator = reader.int32(); + break; + } + case 4: { + message.value = $root.google.privacy.dlp.v2.Value.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Condition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.RecordCondition.Condition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.RecordCondition.Condition} Condition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Condition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Condition message. + * @function verify + * @memberof google.privacy.dlp.v2.RecordCondition.Condition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Condition.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.field != null && message.hasOwnProperty("field")) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.field, long + 1); + if (error) + return "field." + error; + } + if (message.operator != null && message.hasOwnProperty("operator")) + switch (message.operator) { + default: + return "operator: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.privacy.dlp.v2.Value.verify(message.value, long + 1); + if (error) + return "value." + error; + } + return null; + }; + + /** + * Creates a Condition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.RecordCondition.Condition + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.RecordCondition.Condition} Condition + */ + Condition.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.RecordCondition.Condition) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.RecordCondition.Condition(); + if (object.field != null) { + if (typeof object.field !== "object") + throw TypeError(".google.privacy.dlp.v2.RecordCondition.Condition.field: object expected"); + message.field = $root.google.privacy.dlp.v2.FieldId.fromObject(object.field, long + 1); + } + switch (object.operator) { + default: + if (typeof object.operator === "number") { + message.operator = object.operator; + break; + } + break; + case "RELATIONAL_OPERATOR_UNSPECIFIED": + case 0: + message.operator = 0; + break; + case "EQUAL_TO": + case 1: + message.operator = 1; + break; + case "NOT_EQUAL_TO": + case 2: + message.operator = 2; + break; + case "GREATER_THAN": + case 3: + message.operator = 3; + break; + case "LESS_THAN": + case 4: + message.operator = 4; + break; + case "GREATER_THAN_OR_EQUALS": + case 5: + message.operator = 5; + break; + case "LESS_THAN_OR_EQUALS": + case 6: + message.operator = 6; + break; + case "EXISTS": + case 7: + message.operator = 7; + break; + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.privacy.dlp.v2.RecordCondition.Condition.value: object expected"); + message.value = $root.google.privacy.dlp.v2.Value.fromObject(object.value, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Condition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.RecordCondition.Condition + * @static + * @param {google.privacy.dlp.v2.RecordCondition.Condition} message Condition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Condition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.field = null; + object.operator = options.enums === String ? "RELATIONAL_OPERATOR_UNSPECIFIED" : 0; + object.value = null; + } + if (message.field != null && message.hasOwnProperty("field")) + object.field = $root.google.privacy.dlp.v2.FieldId.toObject(message.field, options); + if (message.operator != null && message.hasOwnProperty("operator")) + object.operator = options.enums === String ? $root.google.privacy.dlp.v2.RelationalOperator[message.operator] === undefined ? message.operator : $root.google.privacy.dlp.v2.RelationalOperator[message.operator] : message.operator; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.privacy.dlp.v2.Value.toObject(message.value, options); + return object; + }; + + /** + * Converts this Condition to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.RecordCondition.Condition + * @instance + * @returns {Object.} JSON object + */ + Condition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Condition + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.RecordCondition.Condition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Condition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.RecordCondition.Condition"; + }; + + return Condition; + })(); + + RecordCondition.Conditions = (function() { + + /** + * Properties of a Conditions. + * @memberof google.privacy.dlp.v2.RecordCondition + * @interface IConditions + * @property {Array.|null} [conditions] Conditions conditions + */ + + /** + * Constructs a new Conditions. + * @memberof google.privacy.dlp.v2.RecordCondition + * @classdesc Represents a Conditions. + * @implements IConditions + * @constructor + * @param {google.privacy.dlp.v2.RecordCondition.IConditions=} [properties] Properties to set + */ + function Conditions(properties) { + this.conditions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Conditions conditions. + * @member {Array.} conditions + * @memberof google.privacy.dlp.v2.RecordCondition.Conditions + * @instance + */ + Conditions.prototype.conditions = $util.emptyArray; + + /** + * Creates a new Conditions instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.RecordCondition.Conditions + * @static + * @param {google.privacy.dlp.v2.RecordCondition.IConditions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.RecordCondition.Conditions} Conditions instance + */ + Conditions.create = function create(properties) { + return new Conditions(properties); + }; + + /** + * Encodes the specified Conditions message. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Conditions.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.RecordCondition.Conditions + * @static + * @param {google.privacy.dlp.v2.RecordCondition.IConditions} message Conditions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Conditions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.conditions != null && message.conditions.length) + for (var i = 0; i < message.conditions.length; ++i) + $root.google.privacy.dlp.v2.RecordCondition.Condition.encode(message.conditions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Conditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Conditions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.RecordCondition.Conditions + * @static + * @param {google.privacy.dlp.v2.RecordCondition.IConditions} message Conditions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Conditions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Conditions message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.RecordCondition.Conditions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.RecordCondition.Conditions} Conditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Conditions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.RecordCondition.Conditions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.conditions && message.conditions.length)) + message.conditions = []; + message.conditions.push($root.google.privacy.dlp.v2.RecordCondition.Condition.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Conditions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.RecordCondition.Conditions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.RecordCondition.Conditions} Conditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Conditions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Conditions message. + * @function verify + * @memberof google.privacy.dlp.v2.RecordCondition.Conditions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Conditions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.conditions != null && message.hasOwnProperty("conditions")) { + if (!Array.isArray(message.conditions)) + return "conditions: array expected"; + for (var i = 0; i < message.conditions.length; ++i) { + var error = $root.google.privacy.dlp.v2.RecordCondition.Condition.verify(message.conditions[i], long + 1); + if (error) + return "conditions." + error; + } + } + return null; + }; + + /** + * Creates a Conditions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.RecordCondition.Conditions + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.RecordCondition.Conditions} Conditions + */ + Conditions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.RecordCondition.Conditions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.RecordCondition.Conditions(); + if (object.conditions) { + if (!Array.isArray(object.conditions)) + throw TypeError(".google.privacy.dlp.v2.RecordCondition.Conditions.conditions: array expected"); + message.conditions = []; + for (var i = 0; i < object.conditions.length; ++i) { + if (typeof object.conditions[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.RecordCondition.Conditions.conditions: object expected"); + message.conditions[i] = $root.google.privacy.dlp.v2.RecordCondition.Condition.fromObject(object.conditions[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a Conditions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.RecordCondition.Conditions + * @static + * @param {google.privacy.dlp.v2.RecordCondition.Conditions} message Conditions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Conditions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.conditions = []; + if (message.conditions && message.conditions.length) { + object.conditions = []; + for (var j = 0; j < message.conditions.length; ++j) + object.conditions[j] = $root.google.privacy.dlp.v2.RecordCondition.Condition.toObject(message.conditions[j], options); + } + return object; + }; + + /** + * Converts this Conditions to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.RecordCondition.Conditions + * @instance + * @returns {Object.} JSON object + */ + Conditions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Conditions + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.RecordCondition.Conditions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Conditions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.RecordCondition.Conditions"; + }; + + return Conditions; + })(); + + RecordCondition.Expressions = (function() { + + /** + * Properties of an Expressions. + * @memberof google.privacy.dlp.v2.RecordCondition + * @interface IExpressions + * @property {google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator|null} [logicalOperator] Expressions logicalOperator + * @property {google.privacy.dlp.v2.RecordCondition.IConditions|null} [conditions] Expressions conditions + */ + + /** + * Constructs a new Expressions. + * @memberof google.privacy.dlp.v2.RecordCondition + * @classdesc Represents an Expressions. + * @implements IExpressions + * @constructor + * @param {google.privacy.dlp.v2.RecordCondition.IExpressions=} [properties] Properties to set + */ + function Expressions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Expressions logicalOperator. + * @member {google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator} logicalOperator + * @memberof google.privacy.dlp.v2.RecordCondition.Expressions + * @instance + */ + Expressions.prototype.logicalOperator = 0; + + /** + * Expressions conditions. + * @member {google.privacy.dlp.v2.RecordCondition.IConditions|null|undefined} conditions + * @memberof google.privacy.dlp.v2.RecordCondition.Expressions + * @instance + */ + Expressions.prototype.conditions = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Expressions type. + * @member {"conditions"|undefined} type + * @memberof google.privacy.dlp.v2.RecordCondition.Expressions + * @instance + */ + Object.defineProperty(Expressions.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["conditions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Expressions instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.RecordCondition.Expressions + * @static + * @param {google.privacy.dlp.v2.RecordCondition.IExpressions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.RecordCondition.Expressions} Expressions instance + */ + Expressions.create = function create(properties) { + return new Expressions(properties); + }; + + /** + * Encodes the specified Expressions message. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Expressions.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.RecordCondition.Expressions + * @static + * @param {google.privacy.dlp.v2.RecordCondition.IExpressions} message Expressions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Expressions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.logicalOperator != null && Object.hasOwnProperty.call(message, "logicalOperator")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logicalOperator); + if (message.conditions != null && Object.hasOwnProperty.call(message, "conditions")) + $root.google.privacy.dlp.v2.RecordCondition.Conditions.encode(message.conditions, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Expressions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordCondition.Expressions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.RecordCondition.Expressions + * @static + * @param {google.privacy.dlp.v2.RecordCondition.IExpressions} message Expressions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Expressions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Expressions message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.RecordCondition.Expressions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.RecordCondition.Expressions} Expressions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Expressions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.RecordCondition.Expressions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.logicalOperator = reader.int32(); + break; + } + case 3: { + message.conditions = $root.google.privacy.dlp.v2.RecordCondition.Conditions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Expressions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.RecordCondition.Expressions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.RecordCondition.Expressions} Expressions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Expressions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Expressions message. + * @function verify + * @memberof google.privacy.dlp.v2.RecordCondition.Expressions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Expressions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.logicalOperator != null && message.hasOwnProperty("logicalOperator")) + switch (message.logicalOperator) { + default: + return "logicalOperator: enum value expected"; + case 0: + case 1: + break; + } + if (message.conditions != null && message.hasOwnProperty("conditions")) { + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.RecordCondition.Conditions.verify(message.conditions, long + 1); + if (error) + return "conditions." + error; + } + } + return null; + }; + + /** + * Creates an Expressions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.RecordCondition.Expressions + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.RecordCondition.Expressions} Expressions + */ + Expressions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.RecordCondition.Expressions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.RecordCondition.Expressions(); + switch (object.logicalOperator) { + default: + if (typeof object.logicalOperator === "number") { + message.logicalOperator = object.logicalOperator; + break; + } + break; + case "LOGICAL_OPERATOR_UNSPECIFIED": + case 0: + message.logicalOperator = 0; + break; + case "AND": + case 1: + message.logicalOperator = 1; + break; + } + if (object.conditions != null) { + if (typeof object.conditions !== "object") + throw TypeError(".google.privacy.dlp.v2.RecordCondition.Expressions.conditions: object expected"); + message.conditions = $root.google.privacy.dlp.v2.RecordCondition.Conditions.fromObject(object.conditions, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an Expressions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.RecordCondition.Expressions + * @static + * @param {google.privacy.dlp.v2.RecordCondition.Expressions} message Expressions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Expressions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.logicalOperator = options.enums === String ? "LOGICAL_OPERATOR_UNSPECIFIED" : 0; + if (message.logicalOperator != null && message.hasOwnProperty("logicalOperator")) + object.logicalOperator = options.enums === String ? $root.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator[message.logicalOperator] === undefined ? message.logicalOperator : $root.google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator[message.logicalOperator] : message.logicalOperator; + if (message.conditions != null && message.hasOwnProperty("conditions")) { + object.conditions = $root.google.privacy.dlp.v2.RecordCondition.Conditions.toObject(message.conditions, options); + if (options.oneofs) + object.type = "conditions"; + } + return object; + }; + + /** + * Converts this Expressions to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.RecordCondition.Expressions + * @instance + * @returns {Object.} JSON object + */ + Expressions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Expressions + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.RecordCondition.Expressions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Expressions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.RecordCondition.Expressions"; + }; + + /** + * LogicalOperator enum. + * @name google.privacy.dlp.v2.RecordCondition.Expressions.LogicalOperator + * @enum {number} + * @property {number} LOGICAL_OPERATOR_UNSPECIFIED=0 LOGICAL_OPERATOR_UNSPECIFIED value + * @property {number} AND=1 AND value + */ + Expressions.LogicalOperator = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOGICAL_OPERATOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "AND"] = 1; + return values; + })(); + + return Expressions; + })(); + + return RecordCondition; + })(); + + v2.TransformationOverview = (function() { + + /** + * Properties of a TransformationOverview. + * @memberof google.privacy.dlp.v2 + * @interface ITransformationOverview + * @property {number|Long|null} [transformedBytes] TransformationOverview transformedBytes + * @property {Array.|null} [transformationSummaries] TransformationOverview transformationSummaries + */ + + /** + * Constructs a new TransformationOverview. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a TransformationOverview. + * @implements ITransformationOverview + * @constructor + * @param {google.privacy.dlp.v2.ITransformationOverview=} [properties] Properties to set + */ + function TransformationOverview(properties) { + this.transformationSummaries = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TransformationOverview transformedBytes. + * @member {number|Long} transformedBytes + * @memberof google.privacy.dlp.v2.TransformationOverview + * @instance + */ + TransformationOverview.prototype.transformedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TransformationOverview transformationSummaries. + * @member {Array.} transformationSummaries + * @memberof google.privacy.dlp.v2.TransformationOverview + * @instance + */ + TransformationOverview.prototype.transformationSummaries = $util.emptyArray; + + /** + * Creates a new TransformationOverview instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.TransformationOverview + * @static + * @param {google.privacy.dlp.v2.ITransformationOverview=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.TransformationOverview} TransformationOverview instance + */ + TransformationOverview.create = function create(properties) { + return new TransformationOverview(properties); + }; + + /** + * Encodes the specified TransformationOverview message. Does not implicitly {@link google.privacy.dlp.v2.TransformationOverview.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.TransformationOverview + * @static + * @param {google.privacy.dlp.v2.ITransformationOverview} message TransformationOverview message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransformationOverview.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.transformedBytes != null && Object.hasOwnProperty.call(message, "transformedBytes")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.transformedBytes); + if (message.transformationSummaries != null && message.transformationSummaries.length) + for (var i = 0; i < message.transformationSummaries.length; ++i) + $root.google.privacy.dlp.v2.TransformationSummary.encode(message.transformationSummaries[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TransformationOverview message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationOverview.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.TransformationOverview + * @static + * @param {google.privacy.dlp.v2.ITransformationOverview} message TransformationOverview message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransformationOverview.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TransformationOverview message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.TransformationOverview + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.TransformationOverview} TransformationOverview + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransformationOverview.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationOverview(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.transformedBytes = reader.int64(); + break; + } + case 3: { + if (!(message.transformationSummaries && message.transformationSummaries.length)) + message.transformationSummaries = []; + message.transformationSummaries.push($root.google.privacy.dlp.v2.TransformationSummary.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TransformationOverview message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.TransformationOverview + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.TransformationOverview} TransformationOverview + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransformationOverview.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TransformationOverview message. + * @function verify + * @memberof google.privacy.dlp.v2.TransformationOverview + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransformationOverview.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.transformedBytes != null && message.hasOwnProperty("transformedBytes")) + if (!$util.isInteger(message.transformedBytes) && !(message.transformedBytes && $util.isInteger(message.transformedBytes.low) && $util.isInteger(message.transformedBytes.high))) + return "transformedBytes: integer|Long expected"; + if (message.transformationSummaries != null && message.hasOwnProperty("transformationSummaries")) { + if (!Array.isArray(message.transformationSummaries)) + return "transformationSummaries: array expected"; + for (var i = 0; i < message.transformationSummaries.length; ++i) { + var error = $root.google.privacy.dlp.v2.TransformationSummary.verify(message.transformationSummaries[i], long + 1); + if (error) + return "transformationSummaries." + error; + } + } + return null; + }; + + /** + * Creates a TransformationOverview message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.TransformationOverview + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.TransformationOverview} TransformationOverview + */ + TransformationOverview.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.TransformationOverview) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.TransformationOverview(); + if (object.transformedBytes != null) + if ($util.Long) + (message.transformedBytes = $util.Long.fromValue(object.transformedBytes)).unsigned = false; + else if (typeof object.transformedBytes === "string") + message.transformedBytes = parseInt(object.transformedBytes, 10); + else if (typeof object.transformedBytes === "number") + message.transformedBytes = object.transformedBytes; + else if (typeof object.transformedBytes === "object") + message.transformedBytes = new $util.LongBits(object.transformedBytes.low >>> 0, object.transformedBytes.high >>> 0).toNumber(); + if (object.transformationSummaries) { + if (!Array.isArray(object.transformationSummaries)) + throw TypeError(".google.privacy.dlp.v2.TransformationOverview.transformationSummaries: array expected"); + message.transformationSummaries = []; + for (var i = 0; i < object.transformationSummaries.length; ++i) { + if (typeof object.transformationSummaries[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.TransformationOverview.transformationSummaries: object expected"); + message.transformationSummaries[i] = $root.google.privacy.dlp.v2.TransformationSummary.fromObject(object.transformationSummaries[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a TransformationOverview message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.TransformationOverview + * @static + * @param {google.privacy.dlp.v2.TransformationOverview} message TransformationOverview + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransformationOverview.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.transformationSummaries = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.transformedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.transformedBytes = options.longs === String ? "0" : 0; + if (message.transformedBytes != null && message.hasOwnProperty("transformedBytes")) + if (typeof message.transformedBytes === "number") + object.transformedBytes = options.longs === String ? String(message.transformedBytes) : message.transformedBytes; + else + object.transformedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.transformedBytes) : options.longs === Number ? new $util.LongBits(message.transformedBytes.low >>> 0, message.transformedBytes.high >>> 0).toNumber() : message.transformedBytes; + if (message.transformationSummaries && message.transformationSummaries.length) { + object.transformationSummaries = []; + for (var j = 0; j < message.transformationSummaries.length; ++j) + object.transformationSummaries[j] = $root.google.privacy.dlp.v2.TransformationSummary.toObject(message.transformationSummaries[j], options); + } + return object; + }; + + /** + * Converts this TransformationOverview to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.TransformationOverview + * @instance + * @returns {Object.} JSON object + */ + TransformationOverview.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TransformationOverview + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.TransformationOverview + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TransformationOverview.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationOverview"; + }; + + return TransformationOverview; + })(); + + v2.TransformationSummary = (function() { + + /** + * Properties of a TransformationSummary. + * @memberof google.privacy.dlp.v2 + * @interface ITransformationSummary + * @property {google.privacy.dlp.v2.IInfoType|null} [infoType] TransformationSummary infoType + * @property {google.privacy.dlp.v2.IFieldId|null} [field] TransformationSummary field + * @property {google.privacy.dlp.v2.IPrimitiveTransformation|null} [transformation] TransformationSummary transformation + * @property {Array.|null} [fieldTransformations] TransformationSummary fieldTransformations + * @property {google.privacy.dlp.v2.IRecordSuppression|null} [recordSuppress] TransformationSummary recordSuppress + * @property {Array.|null} [results] TransformationSummary results + * @property {number|Long|null} [transformedBytes] TransformationSummary transformedBytes + */ + + /** + * Constructs a new TransformationSummary. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a TransformationSummary. + * @implements ITransformationSummary + * @constructor + * @param {google.privacy.dlp.v2.ITransformationSummary=} [properties] Properties to set + */ + function TransformationSummary(properties) { + this.fieldTransformations = []; + this.results = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TransformationSummary infoType. + * @member {google.privacy.dlp.v2.IInfoType|null|undefined} infoType + * @memberof google.privacy.dlp.v2.TransformationSummary + * @instance + */ + TransformationSummary.prototype.infoType = null; + + /** + * TransformationSummary field. + * @member {google.privacy.dlp.v2.IFieldId|null|undefined} field + * @memberof google.privacy.dlp.v2.TransformationSummary + * @instance + */ + TransformationSummary.prototype.field = null; + + /** + * TransformationSummary transformation. + * @member {google.privacy.dlp.v2.IPrimitiveTransformation|null|undefined} transformation + * @memberof google.privacy.dlp.v2.TransformationSummary + * @instance + */ + TransformationSummary.prototype.transformation = null; + + /** + * TransformationSummary fieldTransformations. + * @member {Array.} fieldTransformations + * @memberof google.privacy.dlp.v2.TransformationSummary + * @instance + */ + TransformationSummary.prototype.fieldTransformations = $util.emptyArray; + + /** + * TransformationSummary recordSuppress. + * @member {google.privacy.dlp.v2.IRecordSuppression|null|undefined} recordSuppress + * @memberof google.privacy.dlp.v2.TransformationSummary + * @instance + */ + TransformationSummary.prototype.recordSuppress = null; + + /** + * TransformationSummary results. + * @member {Array.} results + * @memberof google.privacy.dlp.v2.TransformationSummary + * @instance + */ + TransformationSummary.prototype.results = $util.emptyArray; + + /** + * TransformationSummary transformedBytes. + * @member {number|Long} transformedBytes + * @memberof google.privacy.dlp.v2.TransformationSummary + * @instance + */ + TransformationSummary.prototype.transformedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new TransformationSummary instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.TransformationSummary + * @static + * @param {google.privacy.dlp.v2.ITransformationSummary=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.TransformationSummary} TransformationSummary instance + */ + TransformationSummary.create = function create(properties) { + return new TransformationSummary(properties); + }; + + /** + * Encodes the specified TransformationSummary message. Does not implicitly {@link google.privacy.dlp.v2.TransformationSummary.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.TransformationSummary + * @static + * @param {google.privacy.dlp.v2.ITransformationSummary} message TransformationSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransformationSummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.infoType != null && Object.hasOwnProperty.call(message, "infoType")) + $root.google.privacy.dlp.v2.InfoType.encode(message.infoType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + $root.google.privacy.dlp.v2.FieldId.encode(message.field, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.transformation != null && Object.hasOwnProperty.call(message, "transformation")) + $root.google.privacy.dlp.v2.PrimitiveTransformation.encode(message.transformation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.results != null && message.results.length) + for (var i = 0; i < message.results.length; ++i) + $root.google.privacy.dlp.v2.TransformationSummary.SummaryResult.encode(message.results[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.fieldTransformations != null && message.fieldTransformations.length) + for (var i = 0; i < message.fieldTransformations.length; ++i) + $root.google.privacy.dlp.v2.FieldTransformation.encode(message.fieldTransformations[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.recordSuppress != null && Object.hasOwnProperty.call(message, "recordSuppress")) + $root.google.privacy.dlp.v2.RecordSuppression.encode(message.recordSuppress, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.transformedBytes != null && Object.hasOwnProperty.call(message, "transformedBytes")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.transformedBytes); + return writer; + }; + + /** + * Encodes the specified TransformationSummary message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.TransformationSummary + * @static + * @param {google.privacy.dlp.v2.ITransformationSummary} message TransformationSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransformationSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TransformationSummary message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.TransformationSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.TransformationSummary} TransformationSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransformationSummary.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationSummary(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.infoType = $root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.field = $root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.transformation = $root.google.privacy.dlp.v2.PrimitiveTransformation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + if (!(message.fieldTransformations && message.fieldTransformations.length)) + message.fieldTransformations = []; + message.fieldTransformations.push($root.google.privacy.dlp.v2.FieldTransformation.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 6: { + message.recordSuppress = $root.google.privacy.dlp.v2.RecordSuppression.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + if (!(message.results && message.results.length)) + message.results = []; + message.results.push($root.google.privacy.dlp.v2.TransformationSummary.SummaryResult.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 7: { + message.transformedBytes = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TransformationSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.TransformationSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.TransformationSummary} TransformationSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransformationSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TransformationSummary message. + * @function verify + * @memberof google.privacy.dlp.v2.TransformationSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransformationSummary.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.infoType != null && message.hasOwnProperty("infoType")) { + var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infoType, long + 1); + if (error) + return "infoType." + error; + } + if (message.field != null && message.hasOwnProperty("field")) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.field, long + 1); + if (error) + return "field." + error; + } + if (message.transformation != null && message.hasOwnProperty("transformation")) { + var error = $root.google.privacy.dlp.v2.PrimitiveTransformation.verify(message.transformation, long + 1); + if (error) + return "transformation." + error; + } + if (message.fieldTransformations != null && message.hasOwnProperty("fieldTransformations")) { + if (!Array.isArray(message.fieldTransformations)) + return "fieldTransformations: array expected"; + for (var i = 0; i < message.fieldTransformations.length; ++i) { + var error = $root.google.privacy.dlp.v2.FieldTransformation.verify(message.fieldTransformations[i], long + 1); + if (error) + return "fieldTransformations." + error; + } + } + if (message.recordSuppress != null && message.hasOwnProperty("recordSuppress")) { + var error = $root.google.privacy.dlp.v2.RecordSuppression.verify(message.recordSuppress, long + 1); + if (error) + return "recordSuppress." + error; + } + if (message.results != null && message.hasOwnProperty("results")) { + if (!Array.isArray(message.results)) + return "results: array expected"; + for (var i = 0; i < message.results.length; ++i) { + var error = $root.google.privacy.dlp.v2.TransformationSummary.SummaryResult.verify(message.results[i], long + 1); + if (error) + return "results." + error; + } + } + if (message.transformedBytes != null && message.hasOwnProperty("transformedBytes")) + if (!$util.isInteger(message.transformedBytes) && !(message.transformedBytes && $util.isInteger(message.transformedBytes.low) && $util.isInteger(message.transformedBytes.high))) + return "transformedBytes: integer|Long expected"; + return null; + }; + + /** + * Creates a TransformationSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.TransformationSummary + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.TransformationSummary} TransformationSummary + */ + TransformationSummary.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.TransformationSummary) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.TransformationSummary(); + if (object.infoType != null) { + if (typeof object.infoType !== "object") + throw TypeError(".google.privacy.dlp.v2.TransformationSummary.infoType: object expected"); + message.infoType = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoType, long + 1); + } + if (object.field != null) { + if (typeof object.field !== "object") + throw TypeError(".google.privacy.dlp.v2.TransformationSummary.field: object expected"); + message.field = $root.google.privacy.dlp.v2.FieldId.fromObject(object.field, long + 1); + } + if (object.transformation != null) { + if (typeof object.transformation !== "object") + throw TypeError(".google.privacy.dlp.v2.TransformationSummary.transformation: object expected"); + message.transformation = $root.google.privacy.dlp.v2.PrimitiveTransformation.fromObject(object.transformation, long + 1); + } + if (object.fieldTransformations) { + if (!Array.isArray(object.fieldTransformations)) + throw TypeError(".google.privacy.dlp.v2.TransformationSummary.fieldTransformations: array expected"); + message.fieldTransformations = []; + for (var i = 0; i < object.fieldTransformations.length; ++i) { + if (typeof object.fieldTransformations[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.TransformationSummary.fieldTransformations: object expected"); + message.fieldTransformations[i] = $root.google.privacy.dlp.v2.FieldTransformation.fromObject(object.fieldTransformations[i], long + 1); + } + } + if (object.recordSuppress != null) { + if (typeof object.recordSuppress !== "object") + throw TypeError(".google.privacy.dlp.v2.TransformationSummary.recordSuppress: object expected"); + message.recordSuppress = $root.google.privacy.dlp.v2.RecordSuppression.fromObject(object.recordSuppress, long + 1); + } + if (object.results) { + if (!Array.isArray(object.results)) + throw TypeError(".google.privacy.dlp.v2.TransformationSummary.results: array expected"); + message.results = []; + for (var i = 0; i < object.results.length; ++i) { + if (typeof object.results[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.TransformationSummary.results: object expected"); + message.results[i] = $root.google.privacy.dlp.v2.TransformationSummary.SummaryResult.fromObject(object.results[i], long + 1); + } + } + if (object.transformedBytes != null) + if ($util.Long) + (message.transformedBytes = $util.Long.fromValue(object.transformedBytes)).unsigned = false; + else if (typeof object.transformedBytes === "string") + message.transformedBytes = parseInt(object.transformedBytes, 10); + else if (typeof object.transformedBytes === "number") + message.transformedBytes = object.transformedBytes; + else if (typeof object.transformedBytes === "object") + message.transformedBytes = new $util.LongBits(object.transformedBytes.low >>> 0, object.transformedBytes.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a TransformationSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.TransformationSummary + * @static + * @param {google.privacy.dlp.v2.TransformationSummary} message TransformationSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransformationSummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.results = []; + object.fieldTransformations = []; + } + if (options.defaults) { + object.infoType = null; + object.field = null; + object.transformation = null; + object.recordSuppress = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.transformedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.transformedBytes = options.longs === String ? "0" : 0; + } + if (message.infoType != null && message.hasOwnProperty("infoType")) + object.infoType = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoType, options); + if (message.field != null && message.hasOwnProperty("field")) + object.field = $root.google.privacy.dlp.v2.FieldId.toObject(message.field, options); + if (message.transformation != null && message.hasOwnProperty("transformation")) + object.transformation = $root.google.privacy.dlp.v2.PrimitiveTransformation.toObject(message.transformation, options); + if (message.results && message.results.length) { + object.results = []; + for (var j = 0; j < message.results.length; ++j) + object.results[j] = $root.google.privacy.dlp.v2.TransformationSummary.SummaryResult.toObject(message.results[j], options); + } + if (message.fieldTransformations && message.fieldTransformations.length) { + object.fieldTransformations = []; + for (var j = 0; j < message.fieldTransformations.length; ++j) + object.fieldTransformations[j] = $root.google.privacy.dlp.v2.FieldTransformation.toObject(message.fieldTransformations[j], options); + } + if (message.recordSuppress != null && message.hasOwnProperty("recordSuppress")) + object.recordSuppress = $root.google.privacy.dlp.v2.RecordSuppression.toObject(message.recordSuppress, options); + if (message.transformedBytes != null && message.hasOwnProperty("transformedBytes")) + if (typeof message.transformedBytes === "number") + object.transformedBytes = options.longs === String ? String(message.transformedBytes) : message.transformedBytes; + else + object.transformedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.transformedBytes) : options.longs === Number ? new $util.LongBits(message.transformedBytes.low >>> 0, message.transformedBytes.high >>> 0).toNumber() : message.transformedBytes; + return object; + }; + + /** + * Converts this TransformationSummary to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.TransformationSummary + * @instance + * @returns {Object.} JSON object + */ + TransformationSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TransformationSummary + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.TransformationSummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TransformationSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationSummary"; + }; + + /** + * TransformationResultCode enum. + * @name google.privacy.dlp.v2.TransformationSummary.TransformationResultCode + * @enum {number} + * @property {number} TRANSFORMATION_RESULT_CODE_UNSPECIFIED=0 TRANSFORMATION_RESULT_CODE_UNSPECIFIED value + * @property {number} SUCCESS=1 SUCCESS value + * @property {number} ERROR=2 ERROR value + */ + TransformationSummary.TransformationResultCode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TRANSFORMATION_RESULT_CODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SUCCESS"] = 1; + values[valuesById[2] = "ERROR"] = 2; + return values; + })(); + + TransformationSummary.SummaryResult = (function() { + + /** + * Properties of a SummaryResult. + * @memberof google.privacy.dlp.v2.TransformationSummary + * @interface ISummaryResult + * @property {number|Long|null} [count] SummaryResult count + * @property {google.privacy.dlp.v2.TransformationSummary.TransformationResultCode|null} [code] SummaryResult code + * @property {string|null} [details] SummaryResult details + */ + + /** + * Constructs a new SummaryResult. + * @memberof google.privacy.dlp.v2.TransformationSummary + * @classdesc Represents a SummaryResult. + * @implements ISummaryResult + * @constructor + * @param {google.privacy.dlp.v2.TransformationSummary.ISummaryResult=} [properties] Properties to set + */ + function SummaryResult(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SummaryResult count. + * @member {number|Long} count + * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult + * @instance + */ + SummaryResult.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SummaryResult code. + * @member {google.privacy.dlp.v2.TransformationSummary.TransformationResultCode} code + * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult + * @instance + */ + SummaryResult.prototype.code = 0; + + /** + * SummaryResult details. + * @member {string} details + * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult + * @instance + */ + SummaryResult.prototype.details = ""; + + /** + * Creates a new SummaryResult instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult + * @static + * @param {google.privacy.dlp.v2.TransformationSummary.ISummaryResult=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.TransformationSummary.SummaryResult} SummaryResult instance + */ + SummaryResult.create = function create(properties) { + return new SummaryResult(properties); + }; + + /** + * Encodes the specified SummaryResult message. Does not implicitly {@link google.privacy.dlp.v2.TransformationSummary.SummaryResult.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult + * @static + * @param {google.privacy.dlp.v2.TransformationSummary.ISummaryResult} message SummaryResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummaryResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.count); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.code); + if (message.details != null && Object.hasOwnProperty.call(message, "details")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.details); + return writer; + }; + + /** + * Encodes the specified SummaryResult message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationSummary.SummaryResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult + * @static + * @param {google.privacy.dlp.v2.TransformationSummary.ISummaryResult} message SummaryResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SummaryResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SummaryResult message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.TransformationSummary.SummaryResult} SummaryResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummaryResult.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationSummary.SummaryResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.count = reader.int64(); + break; + } + case 2: { + message.code = reader.int32(); + break; + } + case 3: { + message.details = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SummaryResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.TransformationSummary.SummaryResult} SummaryResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SummaryResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SummaryResult message. + * @function verify + * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SummaryResult.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + if (message.code != null && message.hasOwnProperty("code")) + switch (message.code) { + default: + return "code: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.details != null && message.hasOwnProperty("details")) + if (!$util.isString(message.details)) + return "details: string expected"; + return null; + }; + + /** + * Creates a SummaryResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.TransformationSummary.SummaryResult} SummaryResult + */ + SummaryResult.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.TransformationSummary.SummaryResult) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.TransformationSummary.SummaryResult(); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + switch (object.code) { + default: + if (typeof object.code === "number") { + message.code = object.code; + break; + } + break; + case "TRANSFORMATION_RESULT_CODE_UNSPECIFIED": + case 0: + message.code = 0; + break; + case "SUCCESS": + case 1: + message.code = 1; + break; + case "ERROR": + case 2: + message.code = 2; + break; + } + if (object.details != null) + message.details = String(object.details); + return message; + }; + + /** + * Creates a plain object from a SummaryResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult + * @static + * @param {google.privacy.dlp.v2.TransformationSummary.SummaryResult} message SummaryResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SummaryResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + object.code = options.enums === String ? "TRANSFORMATION_RESULT_CODE_UNSPECIFIED" : 0; + object.details = ""; + } + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + if (message.code != null && message.hasOwnProperty("code")) + object.code = options.enums === String ? $root.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode[message.code] === undefined ? message.code : $root.google.privacy.dlp.v2.TransformationSummary.TransformationResultCode[message.code] : message.code; + if (message.details != null && message.hasOwnProperty("details")) + object.details = message.details; + return object; + }; + + /** + * Converts this SummaryResult to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult + * @instance + * @returns {Object.} JSON object + */ + SummaryResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SummaryResult + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.TransformationSummary.SummaryResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SummaryResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationSummary.SummaryResult"; + }; + + return SummaryResult; + })(); + + return TransformationSummary; + })(); + + v2.TransformationDescription = (function() { + + /** + * Properties of a TransformationDescription. + * @memberof google.privacy.dlp.v2 + * @interface ITransformationDescription + * @property {google.privacy.dlp.v2.TransformationType|null} [type] TransformationDescription type + * @property {string|null} [description] TransformationDescription description + * @property {string|null} [condition] TransformationDescription condition + * @property {google.privacy.dlp.v2.IInfoType|null} [infoType] TransformationDescription infoType + */ + + /** + * Constructs a new TransformationDescription. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a TransformationDescription. + * @implements ITransformationDescription + * @constructor + * @param {google.privacy.dlp.v2.ITransformationDescription=} [properties] Properties to set + */ + function TransformationDescription(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TransformationDescription type. + * @member {google.privacy.dlp.v2.TransformationType} type + * @memberof google.privacy.dlp.v2.TransformationDescription + * @instance + */ + TransformationDescription.prototype.type = 0; + + /** + * TransformationDescription description. + * @member {string} description + * @memberof google.privacy.dlp.v2.TransformationDescription + * @instance + */ + TransformationDescription.prototype.description = ""; + + /** + * TransformationDescription condition. + * @member {string} condition + * @memberof google.privacy.dlp.v2.TransformationDescription + * @instance + */ + TransformationDescription.prototype.condition = ""; + + /** + * TransformationDescription infoType. + * @member {google.privacy.dlp.v2.IInfoType|null|undefined} infoType + * @memberof google.privacy.dlp.v2.TransformationDescription + * @instance + */ + TransformationDescription.prototype.infoType = null; + + /** + * Creates a new TransformationDescription instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.TransformationDescription + * @static + * @param {google.privacy.dlp.v2.ITransformationDescription=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.TransformationDescription} TransformationDescription instance + */ + TransformationDescription.create = function create(properties) { + return new TransformationDescription(properties); + }; + + /** + * Encodes the specified TransformationDescription message. Does not implicitly {@link google.privacy.dlp.v2.TransformationDescription.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.TransformationDescription + * @static + * @param {google.privacy.dlp.v2.ITransformationDescription} message TransformationDescription message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransformationDescription.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.condition != null && Object.hasOwnProperty.call(message, "condition")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.condition); + if (message.infoType != null && Object.hasOwnProperty.call(message, "infoType")) + $root.google.privacy.dlp.v2.InfoType.encode(message.infoType, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TransformationDescription message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationDescription.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.TransformationDescription + * @static + * @param {google.privacy.dlp.v2.ITransformationDescription} message TransformationDescription message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransformationDescription.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TransformationDescription message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.TransformationDescription + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.TransformationDescription} TransformationDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransformationDescription.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationDescription(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.int32(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.condition = reader.string(); + break; + } + case 4: { + message.infoType = $root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TransformationDescription message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.TransformationDescription + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.TransformationDescription} TransformationDescription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransformationDescription.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TransformationDescription message. + * @function verify + * @memberof google.privacy.dlp.v2.TransformationDescription + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransformationDescription.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 15: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 12: + case 13: + case 14: + break; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.condition != null && message.hasOwnProperty("condition")) + if (!$util.isString(message.condition)) + return "condition: string expected"; + if (message.infoType != null && message.hasOwnProperty("infoType")) { + var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infoType, long + 1); + if (error) + return "infoType." + error; + } + return null; + }; + + /** + * Creates a TransformationDescription message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.TransformationDescription + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.TransformationDescription} TransformationDescription + */ + TransformationDescription.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.TransformationDescription) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.TransformationDescription(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TRANSFORMATION_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "RECORD_SUPPRESSION": + case 1: + message.type = 1; + break; + case "REPLACE_VALUE": + case 2: + message.type = 2; + break; + case "REPLACE_DICTIONARY": + case 15: + message.type = 15; + break; + case "REDACT": + case 3: + message.type = 3; + break; + case "CHARACTER_MASK": + case 4: + message.type = 4; + break; + case "CRYPTO_REPLACE_FFX_FPE": + case 5: + message.type = 5; + break; + case "FIXED_SIZE_BUCKETING": + case 6: + message.type = 6; + break; + case "BUCKETING": + case 7: + message.type = 7; + break; + case "REPLACE_WITH_INFO_TYPE": + case 8: + message.type = 8; + break; + case "TIME_PART": + case 9: + message.type = 9; + break; + case "CRYPTO_HASH": + case 10: + message.type = 10; + break; + case "DATE_SHIFT": + case 12: + message.type = 12; + break; + case "CRYPTO_DETERMINISTIC_CONFIG": + case 13: + message.type = 13; + break; + case "REDACT_IMAGE": + case 14: + message.type = 14; + break; + } + if (object.description != null) + message.description = String(object.description); + if (object.condition != null) + message.condition = String(object.condition); + if (object.infoType != null) { + if (typeof object.infoType !== "object") + throw TypeError(".google.privacy.dlp.v2.TransformationDescription.infoType: object expected"); + message.infoType = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoType, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a TransformationDescription message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.TransformationDescription + * @static + * @param {google.privacy.dlp.v2.TransformationDescription} message TransformationDescription + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransformationDescription.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = options.enums === String ? "TRANSFORMATION_TYPE_UNSPECIFIED" : 0; + object.description = ""; + object.condition = ""; + object.infoType = null; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.privacy.dlp.v2.TransformationType[message.type] === undefined ? message.type : $root.google.privacy.dlp.v2.TransformationType[message.type] : message.type; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.condition != null && message.hasOwnProperty("condition")) + object.condition = message.condition; + if (message.infoType != null && message.hasOwnProperty("infoType")) + object.infoType = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoType, options); + return object; + }; + + /** + * Converts this TransformationDescription to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.TransformationDescription + * @instance + * @returns {Object.} JSON object + */ + TransformationDescription.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TransformationDescription + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.TransformationDescription + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TransformationDescription.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationDescription"; + }; + + return TransformationDescription; + })(); + + v2.TransformationDetails = (function() { + + /** + * Properties of a TransformationDetails. + * @memberof google.privacy.dlp.v2 + * @interface ITransformationDetails + * @property {string|null} [resourceName] TransformationDetails resourceName + * @property {string|null} [containerName] TransformationDetails containerName + * @property {Array.|null} [transformation] TransformationDetails transformation + * @property {google.privacy.dlp.v2.ITransformationResultStatus|null} [statusDetails] TransformationDetails statusDetails + * @property {number|Long|null} [transformedBytes] TransformationDetails transformedBytes + * @property {google.privacy.dlp.v2.ITransformationLocation|null} [transformationLocation] TransformationDetails transformationLocation + */ + + /** + * Constructs a new TransformationDetails. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a TransformationDetails. + * @implements ITransformationDetails + * @constructor + * @param {google.privacy.dlp.v2.ITransformationDetails=} [properties] Properties to set + */ + function TransformationDetails(properties) { + this.transformation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TransformationDetails resourceName. + * @member {string} resourceName + * @memberof google.privacy.dlp.v2.TransformationDetails + * @instance + */ + TransformationDetails.prototype.resourceName = ""; + + /** + * TransformationDetails containerName. + * @member {string} containerName + * @memberof google.privacy.dlp.v2.TransformationDetails + * @instance + */ + TransformationDetails.prototype.containerName = ""; + + /** + * TransformationDetails transformation. + * @member {Array.} transformation + * @memberof google.privacy.dlp.v2.TransformationDetails + * @instance + */ + TransformationDetails.prototype.transformation = $util.emptyArray; + + /** + * TransformationDetails statusDetails. + * @member {google.privacy.dlp.v2.ITransformationResultStatus|null|undefined} statusDetails + * @memberof google.privacy.dlp.v2.TransformationDetails + * @instance + */ + TransformationDetails.prototype.statusDetails = null; + + /** + * TransformationDetails transformedBytes. + * @member {number|Long} transformedBytes + * @memberof google.privacy.dlp.v2.TransformationDetails + * @instance + */ + TransformationDetails.prototype.transformedBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TransformationDetails transformationLocation. + * @member {google.privacy.dlp.v2.ITransformationLocation|null|undefined} transformationLocation + * @memberof google.privacy.dlp.v2.TransformationDetails + * @instance + */ + TransformationDetails.prototype.transformationLocation = null; + + /** + * Creates a new TransformationDetails instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.TransformationDetails + * @static + * @param {google.privacy.dlp.v2.ITransformationDetails=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.TransformationDetails} TransformationDetails instance + */ + TransformationDetails.create = function create(properties) { + return new TransformationDetails(properties); + }; + + /** + * Encodes the specified TransformationDetails message. Does not implicitly {@link google.privacy.dlp.v2.TransformationDetails.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.TransformationDetails + * @static + * @param {google.privacy.dlp.v2.ITransformationDetails} message TransformationDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransformationDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceName); + if (message.containerName != null && Object.hasOwnProperty.call(message, "containerName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.containerName); + if (message.transformation != null && message.transformation.length) + for (var i = 0; i < message.transformation.length; ++i) + $root.google.privacy.dlp.v2.TransformationDescription.encode(message.transformation[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.statusDetails != null && Object.hasOwnProperty.call(message, "statusDetails")) + $root.google.privacy.dlp.v2.TransformationResultStatus.encode(message.statusDetails, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.transformedBytes != null && Object.hasOwnProperty.call(message, "transformedBytes")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.transformedBytes); + if (message.transformationLocation != null && Object.hasOwnProperty.call(message, "transformationLocation")) + $root.google.privacy.dlp.v2.TransformationLocation.encode(message.transformationLocation, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TransformationDetails message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.TransformationDetails + * @static + * @param {google.privacy.dlp.v2.ITransformationDetails} message TransformationDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransformationDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TransformationDetails message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.TransformationDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.TransformationDetails} TransformationDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransformationDetails.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.resourceName = reader.string(); + break; + } + case 2: { + message.containerName = reader.string(); + break; + } + case 3: { + if (!(message.transformation && message.transformation.length)) + message.transformation = []; + message.transformation.push($root.google.privacy.dlp.v2.TransformationDescription.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 4: { + message.statusDetails = $root.google.privacy.dlp.v2.TransformationResultStatus.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.transformedBytes = reader.int64(); + break; + } + case 6: { + message.transformationLocation = $root.google.privacy.dlp.v2.TransformationLocation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TransformationDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.TransformationDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.TransformationDetails} TransformationDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransformationDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TransformationDetails message. + * @function verify + * @memberof google.privacy.dlp.v2.TransformationDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransformationDetails.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + if (!$util.isString(message.resourceName)) + return "resourceName: string expected"; + if (message.containerName != null && message.hasOwnProperty("containerName")) + if (!$util.isString(message.containerName)) + return "containerName: string expected"; + if (message.transformation != null && message.hasOwnProperty("transformation")) { + if (!Array.isArray(message.transformation)) + return "transformation: array expected"; + for (var i = 0; i < message.transformation.length; ++i) { + var error = $root.google.privacy.dlp.v2.TransformationDescription.verify(message.transformation[i], long + 1); + if (error) + return "transformation." + error; + } + } + if (message.statusDetails != null && message.hasOwnProperty("statusDetails")) { + var error = $root.google.privacy.dlp.v2.TransformationResultStatus.verify(message.statusDetails, long + 1); + if (error) + return "statusDetails." + error; + } + if (message.transformedBytes != null && message.hasOwnProperty("transformedBytes")) + if (!$util.isInteger(message.transformedBytes) && !(message.transformedBytes && $util.isInteger(message.transformedBytes.low) && $util.isInteger(message.transformedBytes.high))) + return "transformedBytes: integer|Long expected"; + if (message.transformationLocation != null && message.hasOwnProperty("transformationLocation")) { + var error = $root.google.privacy.dlp.v2.TransformationLocation.verify(message.transformationLocation, long + 1); + if (error) + return "transformationLocation." + error; + } + return null; + }; + + /** + * Creates a TransformationDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.TransformationDetails + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.TransformationDetails} TransformationDetails + */ + TransformationDetails.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.TransformationDetails) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.TransformationDetails(); + if (object.resourceName != null) + message.resourceName = String(object.resourceName); + if (object.containerName != null) + message.containerName = String(object.containerName); + if (object.transformation) { + if (!Array.isArray(object.transformation)) + throw TypeError(".google.privacy.dlp.v2.TransformationDetails.transformation: array expected"); + message.transformation = []; + for (var i = 0; i < object.transformation.length; ++i) { + if (typeof object.transformation[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.TransformationDetails.transformation: object expected"); + message.transformation[i] = $root.google.privacy.dlp.v2.TransformationDescription.fromObject(object.transformation[i], long + 1); + } + } + if (object.statusDetails != null) { + if (typeof object.statusDetails !== "object") + throw TypeError(".google.privacy.dlp.v2.TransformationDetails.statusDetails: object expected"); + message.statusDetails = $root.google.privacy.dlp.v2.TransformationResultStatus.fromObject(object.statusDetails, long + 1); + } + if (object.transformedBytes != null) + if ($util.Long) + (message.transformedBytes = $util.Long.fromValue(object.transformedBytes)).unsigned = false; + else if (typeof object.transformedBytes === "string") + message.transformedBytes = parseInt(object.transformedBytes, 10); + else if (typeof object.transformedBytes === "number") + message.transformedBytes = object.transformedBytes; + else if (typeof object.transformedBytes === "object") + message.transformedBytes = new $util.LongBits(object.transformedBytes.low >>> 0, object.transformedBytes.high >>> 0).toNumber(); + if (object.transformationLocation != null) { + if (typeof object.transformationLocation !== "object") + throw TypeError(".google.privacy.dlp.v2.TransformationDetails.transformationLocation: object expected"); + message.transformationLocation = $root.google.privacy.dlp.v2.TransformationLocation.fromObject(object.transformationLocation, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a TransformationDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.TransformationDetails + * @static + * @param {google.privacy.dlp.v2.TransformationDetails} message TransformationDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransformationDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.transformation = []; + if (options.defaults) { + object.resourceName = ""; + object.containerName = ""; + object.statusDetails = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.transformedBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.transformedBytes = options.longs === String ? "0" : 0; + object.transformationLocation = null; + } + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + object.resourceName = message.resourceName; + if (message.containerName != null && message.hasOwnProperty("containerName")) + object.containerName = message.containerName; + if (message.transformation && message.transformation.length) { + object.transformation = []; + for (var j = 0; j < message.transformation.length; ++j) + object.transformation[j] = $root.google.privacy.dlp.v2.TransformationDescription.toObject(message.transformation[j], options); + } + if (message.statusDetails != null && message.hasOwnProperty("statusDetails")) + object.statusDetails = $root.google.privacy.dlp.v2.TransformationResultStatus.toObject(message.statusDetails, options); + if (message.transformedBytes != null && message.hasOwnProperty("transformedBytes")) + if (typeof message.transformedBytes === "number") + object.transformedBytes = options.longs === String ? String(message.transformedBytes) : message.transformedBytes; + else + object.transformedBytes = options.longs === String ? $util.Long.prototype.toString.call(message.transformedBytes) : options.longs === Number ? new $util.LongBits(message.transformedBytes.low >>> 0, message.transformedBytes.high >>> 0).toNumber() : message.transformedBytes; + if (message.transformationLocation != null && message.hasOwnProperty("transformationLocation")) + object.transformationLocation = $root.google.privacy.dlp.v2.TransformationLocation.toObject(message.transformationLocation, options); + return object; + }; + + /** + * Converts this TransformationDetails to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.TransformationDetails + * @instance + * @returns {Object.} JSON object + */ + TransformationDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TransformationDetails + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.TransformationDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TransformationDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationDetails"; + }; + + return TransformationDetails; + })(); + + v2.TransformationLocation = (function() { + + /** + * Properties of a TransformationLocation. + * @memberof google.privacy.dlp.v2 + * @interface ITransformationLocation + * @property {string|null} [findingId] TransformationLocation findingId + * @property {google.privacy.dlp.v2.IRecordTransformation|null} [recordTransformation] TransformationLocation recordTransformation + * @property {google.privacy.dlp.v2.TransformationContainerType|null} [containerType] TransformationLocation containerType + */ + + /** + * Constructs a new TransformationLocation. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a TransformationLocation. + * @implements ITransformationLocation + * @constructor + * @param {google.privacy.dlp.v2.ITransformationLocation=} [properties] Properties to set + */ + function TransformationLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TransformationLocation findingId. + * @member {string|null|undefined} findingId + * @memberof google.privacy.dlp.v2.TransformationLocation + * @instance + */ + TransformationLocation.prototype.findingId = null; + + /** + * TransformationLocation recordTransformation. + * @member {google.privacy.dlp.v2.IRecordTransformation|null|undefined} recordTransformation + * @memberof google.privacy.dlp.v2.TransformationLocation + * @instance + */ + TransformationLocation.prototype.recordTransformation = null; + + /** + * TransformationLocation containerType. + * @member {google.privacy.dlp.v2.TransformationContainerType} containerType + * @memberof google.privacy.dlp.v2.TransformationLocation + * @instance + */ + TransformationLocation.prototype.containerType = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TransformationLocation locationType. + * @member {"findingId"|"recordTransformation"|undefined} locationType + * @memberof google.privacy.dlp.v2.TransformationLocation + * @instance + */ + Object.defineProperty(TransformationLocation.prototype, "locationType", { + get: $util.oneOfGetter($oneOfFields = ["findingId", "recordTransformation"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TransformationLocation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.TransformationLocation + * @static + * @param {google.privacy.dlp.v2.ITransformationLocation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.TransformationLocation} TransformationLocation instance + */ + TransformationLocation.create = function create(properties) { + return new TransformationLocation(properties); + }; + + /** + * Encodes the specified TransformationLocation message. Does not implicitly {@link google.privacy.dlp.v2.TransformationLocation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.TransformationLocation + * @static + * @param {google.privacy.dlp.v2.ITransformationLocation} message TransformationLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransformationLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.findingId != null && Object.hasOwnProperty.call(message, "findingId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.findingId); + if (message.recordTransformation != null && Object.hasOwnProperty.call(message, "recordTransformation")) + $root.google.privacy.dlp.v2.RecordTransformation.encode(message.recordTransformation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.containerType != null && Object.hasOwnProperty.call(message, "containerType")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.containerType); + return writer; + }; + + /** + * Encodes the specified TransformationLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.TransformationLocation + * @static + * @param {google.privacy.dlp.v2.ITransformationLocation} message TransformationLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransformationLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TransformationLocation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.TransformationLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.TransformationLocation} TransformationLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransformationLocation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.findingId = reader.string(); + break; + } + case 2: { + message.recordTransformation = $root.google.privacy.dlp.v2.RecordTransformation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.containerType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TransformationLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.TransformationLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.TransformationLocation} TransformationLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransformationLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TransformationLocation message. + * @function verify + * @memberof google.privacy.dlp.v2.TransformationLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransformationLocation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.findingId != null && message.hasOwnProperty("findingId")) { + properties.locationType = 1; + if (!$util.isString(message.findingId)) + return "findingId: string expected"; + } + if (message.recordTransformation != null && message.hasOwnProperty("recordTransformation")) { + if (properties.locationType === 1) + return "locationType: multiple values"; + properties.locationType = 1; + { + var error = $root.google.privacy.dlp.v2.RecordTransformation.verify(message.recordTransformation, long + 1); + if (error) + return "recordTransformation." + error; + } + } + if (message.containerType != null && message.hasOwnProperty("containerType")) + switch (message.containerType) { + default: + return "containerType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a TransformationLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.TransformationLocation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.TransformationLocation} TransformationLocation + */ + TransformationLocation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.TransformationLocation) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.TransformationLocation(); + if (object.findingId != null) + message.findingId = String(object.findingId); + if (object.recordTransformation != null) { + if (typeof object.recordTransformation !== "object") + throw TypeError(".google.privacy.dlp.v2.TransformationLocation.recordTransformation: object expected"); + message.recordTransformation = $root.google.privacy.dlp.v2.RecordTransformation.fromObject(object.recordTransformation, long + 1); + } + switch (object.containerType) { + default: + if (typeof object.containerType === "number") { + message.containerType = object.containerType; + break; + } + break; + case "TRANSFORM_UNKNOWN_CONTAINER": + case 0: + message.containerType = 0; + break; + case "TRANSFORM_BODY": + case 1: + message.containerType = 1; + break; + case "TRANSFORM_METADATA": + case 2: + message.containerType = 2; + break; + case "TRANSFORM_TABLE": + case 3: + message.containerType = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a TransformationLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.TransformationLocation + * @static + * @param {google.privacy.dlp.v2.TransformationLocation} message TransformationLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransformationLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.containerType = options.enums === String ? "TRANSFORM_UNKNOWN_CONTAINER" : 0; + if (message.findingId != null && message.hasOwnProperty("findingId")) { + object.findingId = message.findingId; + if (options.oneofs) + object.locationType = "findingId"; + } + if (message.recordTransformation != null && message.hasOwnProperty("recordTransformation")) { + object.recordTransformation = $root.google.privacy.dlp.v2.RecordTransformation.toObject(message.recordTransformation, options); + if (options.oneofs) + object.locationType = "recordTransformation"; + } + if (message.containerType != null && message.hasOwnProperty("containerType")) + object.containerType = options.enums === String ? $root.google.privacy.dlp.v2.TransformationContainerType[message.containerType] === undefined ? message.containerType : $root.google.privacy.dlp.v2.TransformationContainerType[message.containerType] : message.containerType; + return object; + }; + + /** + * Converts this TransformationLocation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.TransformationLocation + * @instance + * @returns {Object.} JSON object + */ + TransformationLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TransformationLocation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.TransformationLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TransformationLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationLocation"; + }; + + return TransformationLocation; + })(); + + v2.RecordTransformation = (function() { + + /** + * Properties of a RecordTransformation. + * @memberof google.privacy.dlp.v2 + * @interface IRecordTransformation + * @property {google.privacy.dlp.v2.IFieldId|null} [fieldId] RecordTransformation fieldId + * @property {google.protobuf.ITimestamp|null} [containerTimestamp] RecordTransformation containerTimestamp + * @property {string|null} [containerVersion] RecordTransformation containerVersion + */ + + /** + * Constructs a new RecordTransformation. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a RecordTransformation. + * @implements IRecordTransformation + * @constructor + * @param {google.privacy.dlp.v2.IRecordTransformation=} [properties] Properties to set + */ + function RecordTransformation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RecordTransformation fieldId. + * @member {google.privacy.dlp.v2.IFieldId|null|undefined} fieldId + * @memberof google.privacy.dlp.v2.RecordTransformation + * @instance + */ + RecordTransformation.prototype.fieldId = null; + + /** + * RecordTransformation containerTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} containerTimestamp + * @memberof google.privacy.dlp.v2.RecordTransformation + * @instance + */ + RecordTransformation.prototype.containerTimestamp = null; + + /** + * RecordTransformation containerVersion. + * @member {string} containerVersion + * @memberof google.privacy.dlp.v2.RecordTransformation + * @instance + */ + RecordTransformation.prototype.containerVersion = ""; + + /** + * Creates a new RecordTransformation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.RecordTransformation + * @static + * @param {google.privacy.dlp.v2.IRecordTransformation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.RecordTransformation} RecordTransformation instance + */ + RecordTransformation.create = function create(properties) { + return new RecordTransformation(properties); + }; + + /** + * Encodes the specified RecordTransformation message. Does not implicitly {@link google.privacy.dlp.v2.RecordTransformation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.RecordTransformation + * @static + * @param {google.privacy.dlp.v2.IRecordTransformation} message RecordTransformation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordTransformation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldId != null && Object.hasOwnProperty.call(message, "fieldId")) + $root.google.privacy.dlp.v2.FieldId.encode(message.fieldId, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.containerTimestamp != null && Object.hasOwnProperty.call(message, "containerTimestamp")) + $root.google.protobuf.Timestamp.encode(message.containerTimestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.containerVersion != null && Object.hasOwnProperty.call(message, "containerVersion")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.containerVersion); + return writer; + }; + + /** + * Encodes the specified RecordTransformation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordTransformation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.RecordTransformation + * @static + * @param {google.privacy.dlp.v2.IRecordTransformation} message RecordTransformation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordTransformation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecordTransformation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.RecordTransformation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.RecordTransformation} RecordTransformation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordTransformation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.RecordTransformation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldId = $root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.containerTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.containerVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RecordTransformation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.RecordTransformation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.RecordTransformation} RecordTransformation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordTransformation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecordTransformation message. + * @function verify + * @memberof google.privacy.dlp.v2.RecordTransformation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecordTransformation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.fieldId != null && message.hasOwnProperty("fieldId")) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.fieldId, long + 1); + if (error) + return "fieldId." + error; + } + if (message.containerTimestamp != null && message.hasOwnProperty("containerTimestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.containerTimestamp, long + 1); + if (error) + return "containerTimestamp." + error; + } + if (message.containerVersion != null && message.hasOwnProperty("containerVersion")) + if (!$util.isString(message.containerVersion)) + return "containerVersion: string expected"; + return null; + }; + + /** + * Creates a RecordTransformation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.RecordTransformation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.RecordTransformation} RecordTransformation + */ + RecordTransformation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.RecordTransformation) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.RecordTransformation(); + if (object.fieldId != null) { + if (typeof object.fieldId !== "object") + throw TypeError(".google.privacy.dlp.v2.RecordTransformation.fieldId: object expected"); + message.fieldId = $root.google.privacy.dlp.v2.FieldId.fromObject(object.fieldId, long + 1); + } + if (object.containerTimestamp != null) { + if (typeof object.containerTimestamp !== "object") + throw TypeError(".google.privacy.dlp.v2.RecordTransformation.containerTimestamp: object expected"); + message.containerTimestamp = $root.google.protobuf.Timestamp.fromObject(object.containerTimestamp, long + 1); + } + if (object.containerVersion != null) + message.containerVersion = String(object.containerVersion); + return message; + }; + + /** + * Creates a plain object from a RecordTransformation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.RecordTransformation + * @static + * @param {google.privacy.dlp.v2.RecordTransformation} message RecordTransformation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecordTransformation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldId = null; + object.containerTimestamp = null; + object.containerVersion = ""; + } + if (message.fieldId != null && message.hasOwnProperty("fieldId")) + object.fieldId = $root.google.privacy.dlp.v2.FieldId.toObject(message.fieldId, options); + if (message.containerTimestamp != null && message.hasOwnProperty("containerTimestamp")) + object.containerTimestamp = $root.google.protobuf.Timestamp.toObject(message.containerTimestamp, options); + if (message.containerVersion != null && message.hasOwnProperty("containerVersion")) + object.containerVersion = message.containerVersion; + return object; + }; + + /** + * Converts this RecordTransformation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.RecordTransformation + * @instance + * @returns {Object.} JSON object + */ + RecordTransformation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RecordTransformation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.RecordTransformation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecordTransformation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.RecordTransformation"; + }; + + return RecordTransformation; + })(); + + v2.TransformationResultStatus = (function() { + + /** + * Properties of a TransformationResultStatus. + * @memberof google.privacy.dlp.v2 + * @interface ITransformationResultStatus + * @property {google.privacy.dlp.v2.TransformationResultStatusType|null} [resultStatusType] TransformationResultStatus resultStatusType + * @property {google.rpc.IStatus|null} [details] TransformationResultStatus details + */ + + /** + * Constructs a new TransformationResultStatus. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a TransformationResultStatus. + * @implements ITransformationResultStatus + * @constructor + * @param {google.privacy.dlp.v2.ITransformationResultStatus=} [properties] Properties to set + */ + function TransformationResultStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TransformationResultStatus resultStatusType. + * @member {google.privacy.dlp.v2.TransformationResultStatusType} resultStatusType + * @memberof google.privacy.dlp.v2.TransformationResultStatus + * @instance + */ + TransformationResultStatus.prototype.resultStatusType = 0; + + /** + * TransformationResultStatus details. + * @member {google.rpc.IStatus|null|undefined} details + * @memberof google.privacy.dlp.v2.TransformationResultStatus + * @instance + */ + TransformationResultStatus.prototype.details = null; + + /** + * Creates a new TransformationResultStatus instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.TransformationResultStatus + * @static + * @param {google.privacy.dlp.v2.ITransformationResultStatus=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.TransformationResultStatus} TransformationResultStatus instance + */ + TransformationResultStatus.create = function create(properties) { + return new TransformationResultStatus(properties); + }; + + /** + * Encodes the specified TransformationResultStatus message. Does not implicitly {@link google.privacy.dlp.v2.TransformationResultStatus.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.TransformationResultStatus + * @static + * @param {google.privacy.dlp.v2.ITransformationResultStatus} message TransformationResultStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransformationResultStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resultStatusType != null && Object.hasOwnProperty.call(message, "resultStatusType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.resultStatusType); + if (message.details != null && Object.hasOwnProperty.call(message, "details")) + $root.google.rpc.Status.encode(message.details, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TransformationResultStatus message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationResultStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.TransformationResultStatus + * @static + * @param {google.privacy.dlp.v2.ITransformationResultStatus} message TransformationResultStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransformationResultStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TransformationResultStatus message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.TransformationResultStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.TransformationResultStatus} TransformationResultStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransformationResultStatus.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationResultStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.resultStatusType = reader.int32(); + break; + } + case 2: { + message.details = $root.google.rpc.Status.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TransformationResultStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.TransformationResultStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.TransformationResultStatus} TransformationResultStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransformationResultStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TransformationResultStatus message. + * @function verify + * @memberof google.privacy.dlp.v2.TransformationResultStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransformationResultStatus.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.resultStatusType != null && message.hasOwnProperty("resultStatusType")) + switch (message.resultStatusType) { + default: + return "resultStatusType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.details != null && message.hasOwnProperty("details")) { + var error = $root.google.rpc.Status.verify(message.details, long + 1); + if (error) + return "details." + error; + } + return null; + }; + + /** + * Creates a TransformationResultStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.TransformationResultStatus + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.TransformationResultStatus} TransformationResultStatus + */ + TransformationResultStatus.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.TransformationResultStatus) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.TransformationResultStatus(); + switch (object.resultStatusType) { + default: + if (typeof object.resultStatusType === "number") { + message.resultStatusType = object.resultStatusType; + break; + } + break; + case "STATE_TYPE_UNSPECIFIED": + case 0: + message.resultStatusType = 0; + break; + case "INVALID_TRANSFORM": + case 1: + message.resultStatusType = 1; + break; + case "BIGQUERY_MAX_ROW_SIZE_EXCEEDED": + case 2: + message.resultStatusType = 2; + break; + case "METADATA_UNRETRIEVABLE": + case 3: + message.resultStatusType = 3; + break; + case "SUCCESS": + case 4: + message.resultStatusType = 4; + break; + } + if (object.details != null) { + if (typeof object.details !== "object") + throw TypeError(".google.privacy.dlp.v2.TransformationResultStatus.details: object expected"); + message.details = $root.google.rpc.Status.fromObject(object.details, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a TransformationResultStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.TransformationResultStatus + * @static + * @param {google.privacy.dlp.v2.TransformationResultStatus} message TransformationResultStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransformationResultStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resultStatusType = options.enums === String ? "STATE_TYPE_UNSPECIFIED" : 0; + object.details = null; + } + if (message.resultStatusType != null && message.hasOwnProperty("resultStatusType")) + object.resultStatusType = options.enums === String ? $root.google.privacy.dlp.v2.TransformationResultStatusType[message.resultStatusType] === undefined ? message.resultStatusType : $root.google.privacy.dlp.v2.TransformationResultStatusType[message.resultStatusType] : message.resultStatusType; + if (message.details != null && message.hasOwnProperty("details")) + object.details = $root.google.rpc.Status.toObject(message.details, options); + return object; + }; + + /** + * Converts this TransformationResultStatus to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.TransformationResultStatus + * @instance + * @returns {Object.} JSON object + */ + TransformationResultStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TransformationResultStatus + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.TransformationResultStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TransformationResultStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationResultStatus"; + }; + + return TransformationResultStatus; + })(); + + /** + * TransformationResultStatusType enum. + * @name google.privacy.dlp.v2.TransformationResultStatusType + * @enum {number} + * @property {number} STATE_TYPE_UNSPECIFIED=0 STATE_TYPE_UNSPECIFIED value + * @property {number} INVALID_TRANSFORM=1 INVALID_TRANSFORM value + * @property {number} BIGQUERY_MAX_ROW_SIZE_EXCEEDED=2 BIGQUERY_MAX_ROW_SIZE_EXCEEDED value + * @property {number} METADATA_UNRETRIEVABLE=3 METADATA_UNRETRIEVABLE value + * @property {number} SUCCESS=4 SUCCESS value + */ + v2.TransformationResultStatusType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INVALID_TRANSFORM"] = 1; + values[valuesById[2] = "BIGQUERY_MAX_ROW_SIZE_EXCEEDED"] = 2; + values[valuesById[3] = "METADATA_UNRETRIEVABLE"] = 3; + values[valuesById[4] = "SUCCESS"] = 4; + return values; + })(); + + /** + * TransformationContainerType enum. + * @name google.privacy.dlp.v2.TransformationContainerType + * @enum {number} + * @property {number} TRANSFORM_UNKNOWN_CONTAINER=0 TRANSFORM_UNKNOWN_CONTAINER value + * @property {number} TRANSFORM_BODY=1 TRANSFORM_BODY value + * @property {number} TRANSFORM_METADATA=2 TRANSFORM_METADATA value + * @property {number} TRANSFORM_TABLE=3 TRANSFORM_TABLE value + */ + v2.TransformationContainerType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TRANSFORM_UNKNOWN_CONTAINER"] = 0; + values[valuesById[1] = "TRANSFORM_BODY"] = 1; + values[valuesById[2] = "TRANSFORM_METADATA"] = 2; + values[valuesById[3] = "TRANSFORM_TABLE"] = 3; + return values; + })(); + + /** + * TransformationType enum. + * @name google.privacy.dlp.v2.TransformationType + * @enum {number} + * @property {number} TRANSFORMATION_TYPE_UNSPECIFIED=0 TRANSFORMATION_TYPE_UNSPECIFIED value + * @property {number} RECORD_SUPPRESSION=1 RECORD_SUPPRESSION value + * @property {number} REPLACE_VALUE=2 REPLACE_VALUE value + * @property {number} REPLACE_DICTIONARY=15 REPLACE_DICTIONARY value + * @property {number} REDACT=3 REDACT value + * @property {number} CHARACTER_MASK=4 CHARACTER_MASK value + * @property {number} CRYPTO_REPLACE_FFX_FPE=5 CRYPTO_REPLACE_FFX_FPE value + * @property {number} FIXED_SIZE_BUCKETING=6 FIXED_SIZE_BUCKETING value + * @property {number} BUCKETING=7 BUCKETING value + * @property {number} REPLACE_WITH_INFO_TYPE=8 REPLACE_WITH_INFO_TYPE value + * @property {number} TIME_PART=9 TIME_PART value + * @property {number} CRYPTO_HASH=10 CRYPTO_HASH value + * @property {number} DATE_SHIFT=12 DATE_SHIFT value + * @property {number} CRYPTO_DETERMINISTIC_CONFIG=13 CRYPTO_DETERMINISTIC_CONFIG value + * @property {number} REDACT_IMAGE=14 REDACT_IMAGE value + */ + v2.TransformationType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TRANSFORMATION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RECORD_SUPPRESSION"] = 1; + values[valuesById[2] = "REPLACE_VALUE"] = 2; + values[valuesById[15] = "REPLACE_DICTIONARY"] = 15; + values[valuesById[3] = "REDACT"] = 3; + values[valuesById[4] = "CHARACTER_MASK"] = 4; + values[valuesById[5] = "CRYPTO_REPLACE_FFX_FPE"] = 5; + values[valuesById[6] = "FIXED_SIZE_BUCKETING"] = 6; + values[valuesById[7] = "BUCKETING"] = 7; + values[valuesById[8] = "REPLACE_WITH_INFO_TYPE"] = 8; + values[valuesById[9] = "TIME_PART"] = 9; + values[valuesById[10] = "CRYPTO_HASH"] = 10; + values[valuesById[12] = "DATE_SHIFT"] = 12; + values[valuesById[13] = "CRYPTO_DETERMINISTIC_CONFIG"] = 13; + values[valuesById[14] = "REDACT_IMAGE"] = 14; + return values; + })(); + + v2.TransformationDetailsStorageConfig = (function() { + + /** + * Properties of a TransformationDetailsStorageConfig. + * @memberof google.privacy.dlp.v2 + * @interface ITransformationDetailsStorageConfig + * @property {google.privacy.dlp.v2.IBigQueryTable|null} [table] TransformationDetailsStorageConfig table + */ + + /** + * Constructs a new TransformationDetailsStorageConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a TransformationDetailsStorageConfig. + * @implements ITransformationDetailsStorageConfig + * @constructor + * @param {google.privacy.dlp.v2.ITransformationDetailsStorageConfig=} [properties] Properties to set + */ + function TransformationDetailsStorageConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TransformationDetailsStorageConfig table. + * @member {google.privacy.dlp.v2.IBigQueryTable|null|undefined} table + * @memberof google.privacy.dlp.v2.TransformationDetailsStorageConfig + * @instance + */ + TransformationDetailsStorageConfig.prototype.table = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TransformationDetailsStorageConfig type. + * @member {"table"|undefined} type + * @memberof google.privacy.dlp.v2.TransformationDetailsStorageConfig + * @instance + */ + Object.defineProperty(TransformationDetailsStorageConfig.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["table"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TransformationDetailsStorageConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.TransformationDetailsStorageConfig + * @static + * @param {google.privacy.dlp.v2.ITransformationDetailsStorageConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.TransformationDetailsStorageConfig} TransformationDetailsStorageConfig instance + */ + TransformationDetailsStorageConfig.create = function create(properties) { + return new TransformationDetailsStorageConfig(properties); + }; + + /** + * Encodes the specified TransformationDetailsStorageConfig message. Does not implicitly {@link google.privacy.dlp.v2.TransformationDetailsStorageConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.TransformationDetailsStorageConfig + * @static + * @param {google.privacy.dlp.v2.ITransformationDetailsStorageConfig} message TransformationDetailsStorageConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransformationDetailsStorageConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + $root.google.privacy.dlp.v2.BigQueryTable.encode(message.table, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TransformationDetailsStorageConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationDetailsStorageConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.TransformationDetailsStorageConfig + * @static + * @param {google.privacy.dlp.v2.ITransformationDetailsStorageConfig} message TransformationDetailsStorageConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransformationDetailsStorageConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TransformationDetailsStorageConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.TransformationDetailsStorageConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.TransformationDetailsStorageConfig} TransformationDetailsStorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransformationDetailsStorageConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationDetailsStorageConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.table = $root.google.privacy.dlp.v2.BigQueryTable.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TransformationDetailsStorageConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.TransformationDetailsStorageConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.TransformationDetailsStorageConfig} TransformationDetailsStorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransformationDetailsStorageConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TransformationDetailsStorageConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.TransformationDetailsStorageConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransformationDetailsStorageConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.table != null && message.hasOwnProperty("table")) { + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.BigQueryTable.verify(message.table, long + 1); + if (error) + return "table." + error; + } + } + return null; + }; + + /** + * Creates a TransformationDetailsStorageConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.TransformationDetailsStorageConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.TransformationDetailsStorageConfig} TransformationDetailsStorageConfig + */ + TransformationDetailsStorageConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.TransformationDetailsStorageConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.TransformationDetailsStorageConfig(); + if (object.table != null) { + if (typeof object.table !== "object") + throw TypeError(".google.privacy.dlp.v2.TransformationDetailsStorageConfig.table: object expected"); + message.table = $root.google.privacy.dlp.v2.BigQueryTable.fromObject(object.table, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a TransformationDetailsStorageConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.TransformationDetailsStorageConfig + * @static + * @param {google.privacy.dlp.v2.TransformationDetailsStorageConfig} message TransformationDetailsStorageConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransformationDetailsStorageConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.table != null && message.hasOwnProperty("table")) { + object.table = $root.google.privacy.dlp.v2.BigQueryTable.toObject(message.table, options); + if (options.oneofs) + object.type = "table"; + } + return object; + }; + + /** + * Converts this TransformationDetailsStorageConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.TransformationDetailsStorageConfig + * @instance + * @returns {Object.} JSON object + */ + TransformationDetailsStorageConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TransformationDetailsStorageConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.TransformationDetailsStorageConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TransformationDetailsStorageConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationDetailsStorageConfig"; + }; + + return TransformationDetailsStorageConfig; + })(); + + v2.Schedule = (function() { + + /** + * Properties of a Schedule. + * @memberof google.privacy.dlp.v2 + * @interface ISchedule + * @property {google.protobuf.IDuration|null} [recurrencePeriodDuration] Schedule recurrencePeriodDuration + */ + + /** + * Constructs a new Schedule. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a Schedule. + * @implements ISchedule + * @constructor + * @param {google.privacy.dlp.v2.ISchedule=} [properties] Properties to set + */ + function Schedule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Schedule recurrencePeriodDuration. + * @member {google.protobuf.IDuration|null|undefined} recurrencePeriodDuration + * @memberof google.privacy.dlp.v2.Schedule + * @instance + */ + Schedule.prototype.recurrencePeriodDuration = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Schedule option. + * @member {"recurrencePeriodDuration"|undefined} option + * @memberof google.privacy.dlp.v2.Schedule + * @instance + */ + Object.defineProperty(Schedule.prototype, "option", { + get: $util.oneOfGetter($oneOfFields = ["recurrencePeriodDuration"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Schedule instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Schedule + * @static + * @param {google.privacy.dlp.v2.ISchedule=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Schedule} Schedule instance + */ + Schedule.create = function create(properties) { + return new Schedule(properties); + }; + + /** + * Encodes the specified Schedule message. Does not implicitly {@link google.privacy.dlp.v2.Schedule.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Schedule + * @static + * @param {google.privacy.dlp.v2.ISchedule} message Schedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Schedule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.recurrencePeriodDuration != null && Object.hasOwnProperty.call(message, "recurrencePeriodDuration")) + $root.google.protobuf.Duration.encode(message.recurrencePeriodDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Schedule message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Schedule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Schedule + * @static + * @param {google.privacy.dlp.v2.ISchedule} message Schedule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Schedule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Schedule message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Schedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Schedule} Schedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Schedule.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Schedule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.recurrencePeriodDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Schedule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Schedule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Schedule} Schedule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Schedule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Schedule message. + * @function verify + * @memberof google.privacy.dlp.v2.Schedule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Schedule.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.recurrencePeriodDuration != null && message.hasOwnProperty("recurrencePeriodDuration")) { + properties.option = 1; + { + var error = $root.google.protobuf.Duration.verify(message.recurrencePeriodDuration, long + 1); + if (error) + return "recurrencePeriodDuration." + error; + } + } + return null; + }; + + /** + * Creates a Schedule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Schedule + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Schedule} Schedule + */ + Schedule.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Schedule) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.Schedule(); + if (object.recurrencePeriodDuration != null) { + if (typeof object.recurrencePeriodDuration !== "object") + throw TypeError(".google.privacy.dlp.v2.Schedule.recurrencePeriodDuration: object expected"); + message.recurrencePeriodDuration = $root.google.protobuf.Duration.fromObject(object.recurrencePeriodDuration, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Schedule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Schedule + * @static + * @param {google.privacy.dlp.v2.Schedule} message Schedule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Schedule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.recurrencePeriodDuration != null && message.hasOwnProperty("recurrencePeriodDuration")) { + object.recurrencePeriodDuration = $root.google.protobuf.Duration.toObject(message.recurrencePeriodDuration, options); + if (options.oneofs) + object.option = "recurrencePeriodDuration"; + } + return object; + }; + + /** + * Converts this Schedule to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Schedule + * @instance + * @returns {Object.} JSON object + */ + Schedule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Schedule + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Schedule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Schedule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Schedule"; + }; + + return Schedule; + })(); + + v2.Manual = (function() { + + /** + * Properties of a Manual. + * @memberof google.privacy.dlp.v2 + * @interface IManual + */ + + /** + * Constructs a new Manual. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a Manual. + * @implements IManual + * @constructor + * @param {google.privacy.dlp.v2.IManual=} [properties] Properties to set + */ + function Manual(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Manual instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Manual + * @static + * @param {google.privacy.dlp.v2.IManual=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Manual} Manual instance + */ + Manual.create = function create(properties) { + return new Manual(properties); + }; + + /** + * Encodes the specified Manual message. Does not implicitly {@link google.privacy.dlp.v2.Manual.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Manual + * @static + * @param {google.privacy.dlp.v2.IManual} message Manual message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Manual.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Manual message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Manual.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Manual + * @static + * @param {google.privacy.dlp.v2.IManual} message Manual message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Manual.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Manual message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Manual + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Manual} Manual + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Manual.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Manual(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Manual message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Manual + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Manual} Manual + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Manual.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Manual message. + * @function verify + * @memberof google.privacy.dlp.v2.Manual + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Manual.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a Manual message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Manual + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Manual} Manual + */ + Manual.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Manual) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.Manual(); + }; + + /** + * Creates a plain object from a Manual message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Manual + * @static + * @param {google.privacy.dlp.v2.Manual} message Manual + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Manual.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Manual to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Manual + * @instance + * @returns {Object.} JSON object + */ + Manual.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Manual + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Manual + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Manual.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Manual"; + }; + + return Manual; + })(); + + v2.InspectTemplate = (function() { + + /** + * Properties of an InspectTemplate. + * @memberof google.privacy.dlp.v2 + * @interface IInspectTemplate + * @property {string|null} [name] InspectTemplate name + * @property {string|null} [displayName] InspectTemplate displayName + * @property {string|null} [description] InspectTemplate description + * @property {google.protobuf.ITimestamp|null} [createTime] InspectTemplate createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] InspectTemplate updateTime + * @property {google.privacy.dlp.v2.IInspectConfig|null} [inspectConfig] InspectTemplate inspectConfig + */ + + /** + * Constructs a new InspectTemplate. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an InspectTemplate. + * @implements IInspectTemplate + * @constructor + * @param {google.privacy.dlp.v2.IInspectTemplate=} [properties] Properties to set + */ + function InspectTemplate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * InspectTemplate name. + * @member {string} name + * @memberof google.privacy.dlp.v2.InspectTemplate + * @instance + */ + InspectTemplate.prototype.name = ""; + + /** + * InspectTemplate displayName. + * @member {string} displayName + * @memberof google.privacy.dlp.v2.InspectTemplate + * @instance + */ + InspectTemplate.prototype.displayName = ""; + + /** + * InspectTemplate description. + * @member {string} description + * @memberof google.privacy.dlp.v2.InspectTemplate + * @instance + */ + InspectTemplate.prototype.description = ""; + + /** + * InspectTemplate createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.privacy.dlp.v2.InspectTemplate + * @instance + */ + InspectTemplate.prototype.createTime = null; + + /** + * InspectTemplate updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.privacy.dlp.v2.InspectTemplate + * @instance + */ + InspectTemplate.prototype.updateTime = null; + + /** + * InspectTemplate inspectConfig. + * @member {google.privacy.dlp.v2.IInspectConfig|null|undefined} inspectConfig + * @memberof google.privacy.dlp.v2.InspectTemplate + * @instance + */ + InspectTemplate.prototype.inspectConfig = null; + + /** + * Creates a new InspectTemplate instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.InspectTemplate + * @static + * @param {google.privacy.dlp.v2.IInspectTemplate=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.InspectTemplate} InspectTemplate instance + */ + InspectTemplate.create = function create(properties) { + return new InspectTemplate(properties); + }; + + /** + * Encodes the specified InspectTemplate message. Does not implicitly {@link google.privacy.dlp.v2.InspectTemplate.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.InspectTemplate + * @static + * @param {google.privacy.dlp.v2.IInspectTemplate} message InspectTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InspectTemplate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.inspectConfig != null && Object.hasOwnProperty.call(message, "inspectConfig")) + $root.google.privacy.dlp.v2.InspectConfig.encode(message.inspectConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified InspectTemplate message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectTemplate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.InspectTemplate + * @static + * @param {google.privacy.dlp.v2.IInspectTemplate} message InspectTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InspectTemplate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InspectTemplate message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.InspectTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.InspectTemplate} InspectTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InspectTemplate.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.InspectTemplate(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an InspectTemplate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.InspectTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.InspectTemplate} InspectTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InspectTemplate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InspectTemplate message. + * @function verify + * @memberof google.privacy.dlp.v2.InspectTemplate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InspectTemplate.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime, long + 1); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime, long + 1); + if (error) + return "updateTime." + error; + } + if (message.inspectConfig != null && message.hasOwnProperty("inspectConfig")) { + var error = $root.google.privacy.dlp.v2.InspectConfig.verify(message.inspectConfig, long + 1); + if (error) + return "inspectConfig." + error; + } + return null; + }; + + /** + * Creates an InspectTemplate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.InspectTemplate + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.InspectTemplate} InspectTemplate + */ + InspectTemplate.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.InspectTemplate) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.InspectTemplate(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectTemplate.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime, long + 1); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectTemplate.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime, long + 1); + } + if (object.inspectConfig != null) { + if (typeof object.inspectConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectTemplate.inspectConfig: object expected"); + message.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.fromObject(object.inspectConfig, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an InspectTemplate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.InspectTemplate + * @static + * @param {google.privacy.dlp.v2.InspectTemplate} message InspectTemplate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InspectTemplate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.inspectConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.inspectConfig != null && message.hasOwnProperty("inspectConfig")) + object.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.toObject(message.inspectConfig, options); + return object; + }; + + /** + * Converts this InspectTemplate to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.InspectTemplate + * @instance + * @returns {Object.} JSON object + */ + InspectTemplate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InspectTemplate + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.InspectTemplate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InspectTemplate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.InspectTemplate"; + }; + + return InspectTemplate; + })(); + + v2.DeidentifyTemplate = (function() { + + /** + * Properties of a DeidentifyTemplate. + * @memberof google.privacy.dlp.v2 + * @interface IDeidentifyTemplate + * @property {string|null} [name] DeidentifyTemplate name + * @property {string|null} [displayName] DeidentifyTemplate displayName + * @property {string|null} [description] DeidentifyTemplate description + * @property {google.protobuf.ITimestamp|null} [createTime] DeidentifyTemplate createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] DeidentifyTemplate updateTime + * @property {google.privacy.dlp.v2.IDeidentifyConfig|null} [deidentifyConfig] DeidentifyTemplate deidentifyConfig + */ + + /** + * Constructs a new DeidentifyTemplate. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DeidentifyTemplate. + * @implements IDeidentifyTemplate + * @constructor + * @param {google.privacy.dlp.v2.IDeidentifyTemplate=} [properties] Properties to set + */ + function DeidentifyTemplate(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeidentifyTemplate name. + * @member {string} name + * @memberof google.privacy.dlp.v2.DeidentifyTemplate + * @instance + */ + DeidentifyTemplate.prototype.name = ""; + + /** + * DeidentifyTemplate displayName. + * @member {string} displayName + * @memberof google.privacy.dlp.v2.DeidentifyTemplate + * @instance + */ + DeidentifyTemplate.prototype.displayName = ""; + + /** + * DeidentifyTemplate description. + * @member {string} description + * @memberof google.privacy.dlp.v2.DeidentifyTemplate + * @instance + */ + DeidentifyTemplate.prototype.description = ""; + + /** + * DeidentifyTemplate createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.privacy.dlp.v2.DeidentifyTemplate + * @instance + */ + DeidentifyTemplate.prototype.createTime = null; + + /** + * DeidentifyTemplate updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.privacy.dlp.v2.DeidentifyTemplate + * @instance + */ + DeidentifyTemplate.prototype.updateTime = null; + + /** + * DeidentifyTemplate deidentifyConfig. + * @member {google.privacy.dlp.v2.IDeidentifyConfig|null|undefined} deidentifyConfig + * @memberof google.privacy.dlp.v2.DeidentifyTemplate + * @instance + */ + DeidentifyTemplate.prototype.deidentifyConfig = null; + + /** + * Creates a new DeidentifyTemplate instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DeidentifyTemplate + * @static + * @param {google.privacy.dlp.v2.IDeidentifyTemplate=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DeidentifyTemplate} DeidentifyTemplate instance + */ + DeidentifyTemplate.create = function create(properties) { + return new DeidentifyTemplate(properties); + }; + + /** + * Encodes the specified DeidentifyTemplate message. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyTemplate.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DeidentifyTemplate + * @static + * @param {google.privacy.dlp.v2.IDeidentifyTemplate} message DeidentifyTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeidentifyTemplate.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.deidentifyConfig != null && Object.hasOwnProperty.call(message, "deidentifyConfig")) + $root.google.privacy.dlp.v2.DeidentifyConfig.encode(message.deidentifyConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DeidentifyTemplate message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeidentifyTemplate.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DeidentifyTemplate + * @static + * @param {google.privacy.dlp.v2.IDeidentifyTemplate} message DeidentifyTemplate message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeidentifyTemplate.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeidentifyTemplate message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DeidentifyTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DeidentifyTemplate} DeidentifyTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeidentifyTemplate.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DeidentifyTemplate(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.deidentifyConfig = $root.google.privacy.dlp.v2.DeidentifyConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeidentifyTemplate message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DeidentifyTemplate + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DeidentifyTemplate} DeidentifyTemplate + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeidentifyTemplate.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeidentifyTemplate message. + * @function verify + * @memberof google.privacy.dlp.v2.DeidentifyTemplate + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeidentifyTemplate.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime, long + 1); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime, long + 1); + if (error) + return "updateTime." + error; + } + if (message.deidentifyConfig != null && message.hasOwnProperty("deidentifyConfig")) { + var error = $root.google.privacy.dlp.v2.DeidentifyConfig.verify(message.deidentifyConfig, long + 1); + if (error) + return "deidentifyConfig." + error; + } + return null; + }; + + /** + * Creates a DeidentifyTemplate message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DeidentifyTemplate + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DeidentifyTemplate} DeidentifyTemplate + */ + DeidentifyTemplate.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DeidentifyTemplate) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DeidentifyTemplate(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.privacy.dlp.v2.DeidentifyTemplate.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime, long + 1); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.privacy.dlp.v2.DeidentifyTemplate.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime, long + 1); + } + if (object.deidentifyConfig != null) { + if (typeof object.deidentifyConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.DeidentifyTemplate.deidentifyConfig: object expected"); + message.deidentifyConfig = $root.google.privacy.dlp.v2.DeidentifyConfig.fromObject(object.deidentifyConfig, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DeidentifyTemplate message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DeidentifyTemplate + * @static + * @param {google.privacy.dlp.v2.DeidentifyTemplate} message DeidentifyTemplate + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeidentifyTemplate.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.deidentifyConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.deidentifyConfig != null && message.hasOwnProperty("deidentifyConfig")) + object.deidentifyConfig = $root.google.privacy.dlp.v2.DeidentifyConfig.toObject(message.deidentifyConfig, options); + return object; + }; + + /** + * Converts this DeidentifyTemplate to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DeidentifyTemplate + * @instance + * @returns {Object.} JSON object + */ + DeidentifyTemplate.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeidentifyTemplate + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DeidentifyTemplate + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeidentifyTemplate.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DeidentifyTemplate"; + }; + + return DeidentifyTemplate; + })(); + + v2.Error = (function() { + + /** + * Properties of an Error. + * @memberof google.privacy.dlp.v2 + * @interface IError + * @property {google.rpc.IStatus|null} [details] Error details + * @property {Array.|null} [timestamps] Error timestamps + * @property {google.privacy.dlp.v2.Error.ErrorExtraInfo|null} [extraInfo] Error extraInfo + */ + + /** + * Constructs a new Error. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an Error. + * @implements IError + * @constructor + * @param {google.privacy.dlp.v2.IError=} [properties] Properties to set + */ + function Error(properties) { + this.timestamps = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Error details. + * @member {google.rpc.IStatus|null|undefined} details + * @memberof google.privacy.dlp.v2.Error + * @instance + */ + Error.prototype.details = null; + + /** + * Error timestamps. + * @member {Array.} timestamps + * @memberof google.privacy.dlp.v2.Error + * @instance + */ + Error.prototype.timestamps = $util.emptyArray; + + /** + * Error extraInfo. + * @member {google.privacy.dlp.v2.Error.ErrorExtraInfo} extraInfo + * @memberof google.privacy.dlp.v2.Error + * @instance + */ + Error.prototype.extraInfo = 0; + + /** + * Creates a new Error instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Error + * @static + * @param {google.privacy.dlp.v2.IError=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Error} Error instance + */ + Error.create = function create(properties) { + return new Error(properties); + }; + + /** + * Encodes the specified Error message. Does not implicitly {@link google.privacy.dlp.v2.Error.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Error + * @static + * @param {google.privacy.dlp.v2.IError} message Error message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Error.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.details != null && Object.hasOwnProperty.call(message, "details")) + $root.google.rpc.Status.encode(message.details, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.timestamps != null && message.timestamps.length) + for (var i = 0; i < message.timestamps.length; ++i) + $root.google.protobuf.Timestamp.encode(message.timestamps[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.extraInfo != null && Object.hasOwnProperty.call(message, "extraInfo")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.extraInfo); + return writer; + }; + + /** + * Encodes the specified Error message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Error.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Error + * @static + * @param {google.privacy.dlp.v2.IError} message Error message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Error.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Error message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Error + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Error} Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Error.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Error(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.details = $root.google.rpc.Status.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + if (!(message.timestamps && message.timestamps.length)) + message.timestamps = []; + message.timestamps.push($root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 4: { + message.extraInfo = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Error message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Error + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Error} Error + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Error.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Error message. + * @function verify + * @memberof google.privacy.dlp.v2.Error + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Error.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.details != null && message.hasOwnProperty("details")) { + var error = $root.google.rpc.Status.verify(message.details, long + 1); + if (error) + return "details." + error; + } + if (message.timestamps != null && message.hasOwnProperty("timestamps")) { + if (!Array.isArray(message.timestamps)) + return "timestamps: array expected"; + for (var i = 0; i < message.timestamps.length; ++i) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamps[i], long + 1); + if (error) + return "timestamps." + error; + } + } + if (message.extraInfo != null && message.hasOwnProperty("extraInfo")) + switch (message.extraInfo) { + default: + return "extraInfo: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Error message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Error + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Error} Error + */ + Error.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Error) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.Error(); + if (object.details != null) { + if (typeof object.details !== "object") + throw TypeError(".google.privacy.dlp.v2.Error.details: object expected"); + message.details = $root.google.rpc.Status.fromObject(object.details, long + 1); + } + if (object.timestamps) { + if (!Array.isArray(object.timestamps)) + throw TypeError(".google.privacy.dlp.v2.Error.timestamps: array expected"); + message.timestamps = []; + for (var i = 0; i < object.timestamps.length; ++i) { + if (typeof object.timestamps[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.Error.timestamps: object expected"); + message.timestamps[i] = $root.google.protobuf.Timestamp.fromObject(object.timestamps[i], long + 1); + } + } + switch (object.extraInfo) { + default: + if (typeof object.extraInfo === "number") { + message.extraInfo = object.extraInfo; + break; + } + break; + case "ERROR_INFO_UNSPECIFIED": + case 0: + message.extraInfo = 0; + break; + case "IMAGE_SCAN_UNAVAILABLE_IN_REGION": + case 1: + message.extraInfo = 1; + break; + case "FILE_STORE_CLUSTER_UNSUPPORTED": + case 2: + message.extraInfo = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Error message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Error + * @static + * @param {google.privacy.dlp.v2.Error} message Error + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Error.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.timestamps = []; + if (options.defaults) { + object.details = null; + object.extraInfo = options.enums === String ? "ERROR_INFO_UNSPECIFIED" : 0; + } + if (message.details != null && message.hasOwnProperty("details")) + object.details = $root.google.rpc.Status.toObject(message.details, options); + if (message.timestamps && message.timestamps.length) { + object.timestamps = []; + for (var j = 0; j < message.timestamps.length; ++j) + object.timestamps[j] = $root.google.protobuf.Timestamp.toObject(message.timestamps[j], options); + } + if (message.extraInfo != null && message.hasOwnProperty("extraInfo")) + object.extraInfo = options.enums === String ? $root.google.privacy.dlp.v2.Error.ErrorExtraInfo[message.extraInfo] === undefined ? message.extraInfo : $root.google.privacy.dlp.v2.Error.ErrorExtraInfo[message.extraInfo] : message.extraInfo; + return object; + }; + + /** + * Converts this Error to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Error + * @instance + * @returns {Object.} JSON object + */ + Error.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Error + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Error + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Error.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Error"; + }; + + /** + * ErrorExtraInfo enum. + * @name google.privacy.dlp.v2.Error.ErrorExtraInfo + * @enum {number} + * @property {number} ERROR_INFO_UNSPECIFIED=0 ERROR_INFO_UNSPECIFIED value + * @property {number} IMAGE_SCAN_UNAVAILABLE_IN_REGION=1 IMAGE_SCAN_UNAVAILABLE_IN_REGION value + * @property {number} FILE_STORE_CLUSTER_UNSUPPORTED=2 FILE_STORE_CLUSTER_UNSUPPORTED value + */ + Error.ErrorExtraInfo = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ERROR_INFO_UNSPECIFIED"] = 0; + values[valuesById[1] = "IMAGE_SCAN_UNAVAILABLE_IN_REGION"] = 1; + values[valuesById[2] = "FILE_STORE_CLUSTER_UNSUPPORTED"] = 2; + return values; + })(); + + return Error; + })(); + + v2.JobTrigger = (function() { + + /** + * Properties of a JobTrigger. + * @memberof google.privacy.dlp.v2 + * @interface IJobTrigger + * @property {string|null} [name] JobTrigger name + * @property {string|null} [displayName] JobTrigger displayName + * @property {string|null} [description] JobTrigger description + * @property {google.privacy.dlp.v2.IInspectJobConfig|null} [inspectJob] JobTrigger inspectJob + * @property {Array.|null} [triggers] JobTrigger triggers + * @property {Array.|null} [errors] JobTrigger errors + * @property {google.protobuf.ITimestamp|null} [createTime] JobTrigger createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] JobTrigger updateTime + * @property {google.protobuf.ITimestamp|null} [lastRunTime] JobTrigger lastRunTime + * @property {google.privacy.dlp.v2.JobTrigger.Status|null} [status] JobTrigger status + */ + + /** + * Constructs a new JobTrigger. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a JobTrigger. + * @implements IJobTrigger + * @constructor + * @param {google.privacy.dlp.v2.IJobTrigger=} [properties] Properties to set + */ + function JobTrigger(properties) { + this.triggers = []; + this.errors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * JobTrigger name. + * @member {string} name + * @memberof google.privacy.dlp.v2.JobTrigger + * @instance + */ + JobTrigger.prototype.name = ""; + + /** + * JobTrigger displayName. + * @member {string} displayName + * @memberof google.privacy.dlp.v2.JobTrigger + * @instance + */ + JobTrigger.prototype.displayName = ""; + + /** + * JobTrigger description. + * @member {string} description + * @memberof google.privacy.dlp.v2.JobTrigger + * @instance + */ + JobTrigger.prototype.description = ""; + + /** + * JobTrigger inspectJob. + * @member {google.privacy.dlp.v2.IInspectJobConfig|null|undefined} inspectJob + * @memberof google.privacy.dlp.v2.JobTrigger + * @instance + */ + JobTrigger.prototype.inspectJob = null; + + /** + * JobTrigger triggers. + * @member {Array.} triggers + * @memberof google.privacy.dlp.v2.JobTrigger + * @instance + */ + JobTrigger.prototype.triggers = $util.emptyArray; + + /** + * JobTrigger errors. + * @member {Array.} errors + * @memberof google.privacy.dlp.v2.JobTrigger + * @instance + */ + JobTrigger.prototype.errors = $util.emptyArray; + + /** + * JobTrigger createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.privacy.dlp.v2.JobTrigger + * @instance + */ + JobTrigger.prototype.createTime = null; + + /** + * JobTrigger updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.privacy.dlp.v2.JobTrigger + * @instance + */ + JobTrigger.prototype.updateTime = null; + + /** + * JobTrigger lastRunTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastRunTime + * @memberof google.privacy.dlp.v2.JobTrigger + * @instance + */ + JobTrigger.prototype.lastRunTime = null; + + /** + * JobTrigger status. + * @member {google.privacy.dlp.v2.JobTrigger.Status} status + * @memberof google.privacy.dlp.v2.JobTrigger + * @instance + */ + JobTrigger.prototype.status = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * JobTrigger job. + * @member {"inspectJob"|undefined} job + * @memberof google.privacy.dlp.v2.JobTrigger + * @instance + */ + Object.defineProperty(JobTrigger.prototype, "job", { + get: $util.oneOfGetter($oneOfFields = ["inspectJob"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new JobTrigger instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.JobTrigger + * @static + * @param {google.privacy.dlp.v2.IJobTrigger=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.JobTrigger} JobTrigger instance + */ + JobTrigger.create = function create(properties) { + return new JobTrigger(properties); + }; + + /** + * Encodes the specified JobTrigger message. Does not implicitly {@link google.privacy.dlp.v2.JobTrigger.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.JobTrigger + * @static + * @param {google.privacy.dlp.v2.IJobTrigger} message JobTrigger message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobTrigger.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.inspectJob != null && Object.hasOwnProperty.call(message, "inspectJob")) + $root.google.privacy.dlp.v2.InspectJobConfig.encode(message.inspectJob, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.triggers != null && message.triggers.length) + for (var i = 0; i < message.triggers.length; ++i) + $root.google.privacy.dlp.v2.JobTrigger.Trigger.encode(message.triggers[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.privacy.dlp.v2.Error.encode(message.errors[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.lastRunTime != null && Object.hasOwnProperty.call(message, "lastRunTime")) + $root.google.protobuf.Timestamp.encode(message.lastRunTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.status); + return writer; + }; + + /** + * Encodes the specified JobTrigger message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.JobTrigger.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.JobTrigger + * @static + * @param {google.privacy.dlp.v2.IJobTrigger} message JobTrigger message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobTrigger.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JobTrigger message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.JobTrigger + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.JobTrigger} JobTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobTrigger.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.JobTrigger(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 4: { + message.inspectJob = $root.google.privacy.dlp.v2.InspectJobConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + if (!(message.triggers && message.triggers.length)) + message.triggers = []; + message.triggers.push($root.google.privacy.dlp.v2.JobTrigger.Trigger.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 6: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.privacy.dlp.v2.Error.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 7: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 8: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 9: { + message.lastRunTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 10: { + message.status = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a JobTrigger message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.JobTrigger + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.JobTrigger} JobTrigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobTrigger.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JobTrigger message. + * @function verify + * @memberof google.privacy.dlp.v2.JobTrigger + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JobTrigger.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.inspectJob != null && message.hasOwnProperty("inspectJob")) { + properties.job = 1; + { + var error = $root.google.privacy.dlp.v2.InspectJobConfig.verify(message.inspectJob, long + 1); + if (error) + return "inspectJob." + error; + } + } + if (message.triggers != null && message.hasOwnProperty("triggers")) { + if (!Array.isArray(message.triggers)) + return "triggers: array expected"; + for (var i = 0; i < message.triggers.length; ++i) { + var error = $root.google.privacy.dlp.v2.JobTrigger.Trigger.verify(message.triggers[i], long + 1); + if (error) + return "triggers." + error; + } + } + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.privacy.dlp.v2.Error.verify(message.errors[i], long + 1); + if (error) + return "errors." + error; + } + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime, long + 1); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime, long + 1); + if (error) + return "updateTime." + error; + } + if (message.lastRunTime != null && message.hasOwnProperty("lastRunTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastRunTime, long + 1); + if (error) + return "lastRunTime." + error; + } + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a JobTrigger message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.JobTrigger + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.JobTrigger} JobTrigger + */ + JobTrigger.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.JobTrigger) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.JobTrigger(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.inspectJob != null) { + if (typeof object.inspectJob !== "object") + throw TypeError(".google.privacy.dlp.v2.JobTrigger.inspectJob: object expected"); + message.inspectJob = $root.google.privacy.dlp.v2.InspectJobConfig.fromObject(object.inspectJob, long + 1); + } + if (object.triggers) { + if (!Array.isArray(object.triggers)) + throw TypeError(".google.privacy.dlp.v2.JobTrigger.triggers: array expected"); + message.triggers = []; + for (var i = 0; i < object.triggers.length; ++i) { + if (typeof object.triggers[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.JobTrigger.triggers: object expected"); + message.triggers[i] = $root.google.privacy.dlp.v2.JobTrigger.Trigger.fromObject(object.triggers[i], long + 1); + } + } + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.privacy.dlp.v2.JobTrigger.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.JobTrigger.errors: object expected"); + message.errors[i] = $root.google.privacy.dlp.v2.Error.fromObject(object.errors[i], long + 1); + } + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.privacy.dlp.v2.JobTrigger.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime, long + 1); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.privacy.dlp.v2.JobTrigger.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime, long + 1); + } + if (object.lastRunTime != null) { + if (typeof object.lastRunTime !== "object") + throw TypeError(".google.privacy.dlp.v2.JobTrigger.lastRunTime: object expected"); + message.lastRunTime = $root.google.protobuf.Timestamp.fromObject(object.lastRunTime, long + 1); + } + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "HEALTHY": + case 1: + message.status = 1; + break; + case "PAUSED": + case 2: + message.status = 2; + break; + case "CANCELLED": + case 3: + message.status = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a JobTrigger message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.JobTrigger + * @static + * @param {google.privacy.dlp.v2.JobTrigger} message JobTrigger + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JobTrigger.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.triggers = []; + object.errors = []; + } + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.description = ""; + object.createTime = null; + object.updateTime = null; + object.lastRunTime = null; + object.status = options.enums === String ? "STATUS_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.inspectJob != null && message.hasOwnProperty("inspectJob")) { + object.inspectJob = $root.google.privacy.dlp.v2.InspectJobConfig.toObject(message.inspectJob, options); + if (options.oneofs) + object.job = "inspectJob"; + } + if (message.triggers && message.triggers.length) { + object.triggers = []; + for (var j = 0; j < message.triggers.length; ++j) + object.triggers[j] = $root.google.privacy.dlp.v2.JobTrigger.Trigger.toObject(message.triggers[j], options); + } + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.privacy.dlp.v2.Error.toObject(message.errors[j], options); + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.lastRunTime != null && message.hasOwnProperty("lastRunTime")) + object.lastRunTime = $root.google.protobuf.Timestamp.toObject(message.lastRunTime, options); + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.privacy.dlp.v2.JobTrigger.Status[message.status] === undefined ? message.status : $root.google.privacy.dlp.v2.JobTrigger.Status[message.status] : message.status; + return object; + }; + + /** + * Converts this JobTrigger to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.JobTrigger + * @instance + * @returns {Object.} JSON object + */ + JobTrigger.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JobTrigger + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.JobTrigger + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JobTrigger.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.JobTrigger"; + }; + + JobTrigger.Trigger = (function() { + + /** + * Properties of a Trigger. + * @memberof google.privacy.dlp.v2.JobTrigger + * @interface ITrigger + * @property {google.privacy.dlp.v2.ISchedule|null} [schedule] Trigger schedule + * @property {google.privacy.dlp.v2.IManual|null} [manual] Trigger manual + */ + + /** + * Constructs a new Trigger. + * @memberof google.privacy.dlp.v2.JobTrigger + * @classdesc Represents a Trigger. + * @implements ITrigger + * @constructor + * @param {google.privacy.dlp.v2.JobTrigger.ITrigger=} [properties] Properties to set + */ + function Trigger(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Trigger schedule. + * @member {google.privacy.dlp.v2.ISchedule|null|undefined} schedule + * @memberof google.privacy.dlp.v2.JobTrigger.Trigger + * @instance + */ + Trigger.prototype.schedule = null; + + /** + * Trigger manual. + * @member {google.privacy.dlp.v2.IManual|null|undefined} manual + * @memberof google.privacy.dlp.v2.JobTrigger.Trigger + * @instance + */ + Trigger.prototype.manual = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Trigger trigger. + * @member {"schedule"|"manual"|undefined} trigger + * @memberof google.privacy.dlp.v2.JobTrigger.Trigger + * @instance + */ + Object.defineProperty(Trigger.prototype, "trigger", { + get: $util.oneOfGetter($oneOfFields = ["schedule", "manual"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Trigger instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.JobTrigger.Trigger + * @static + * @param {google.privacy.dlp.v2.JobTrigger.ITrigger=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.JobTrigger.Trigger} Trigger instance + */ + Trigger.create = function create(properties) { + return new Trigger(properties); + }; + + /** + * Encodes the specified Trigger message. Does not implicitly {@link google.privacy.dlp.v2.JobTrigger.Trigger.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.JobTrigger.Trigger + * @static + * @param {google.privacy.dlp.v2.JobTrigger.ITrigger} message Trigger message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Trigger.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.schedule != null && Object.hasOwnProperty.call(message, "schedule")) + $root.google.privacy.dlp.v2.Schedule.encode(message.schedule, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.manual != null && Object.hasOwnProperty.call(message, "manual")) + $root.google.privacy.dlp.v2.Manual.encode(message.manual, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Trigger message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.JobTrigger.Trigger.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.JobTrigger.Trigger + * @static + * @param {google.privacy.dlp.v2.JobTrigger.ITrigger} message Trigger message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Trigger.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Trigger message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.JobTrigger.Trigger + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.JobTrigger.Trigger} Trigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Trigger.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.JobTrigger.Trigger(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.schedule = $root.google.privacy.dlp.v2.Schedule.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.manual = $root.google.privacy.dlp.v2.Manual.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Trigger message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.JobTrigger.Trigger + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.JobTrigger.Trigger} Trigger + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Trigger.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Trigger message. + * @function verify + * @memberof google.privacy.dlp.v2.JobTrigger.Trigger + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Trigger.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.schedule != null && message.hasOwnProperty("schedule")) { + properties.trigger = 1; + { + var error = $root.google.privacy.dlp.v2.Schedule.verify(message.schedule, long + 1); + if (error) + return "schedule." + error; + } + } + if (message.manual != null && message.hasOwnProperty("manual")) { + if (properties.trigger === 1) + return "trigger: multiple values"; + properties.trigger = 1; + { + var error = $root.google.privacy.dlp.v2.Manual.verify(message.manual, long + 1); + if (error) + return "manual." + error; + } + } + return null; + }; + + /** + * Creates a Trigger message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.JobTrigger.Trigger + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.JobTrigger.Trigger} Trigger + */ + Trigger.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.JobTrigger.Trigger) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.JobTrigger.Trigger(); + if (object.schedule != null) { + if (typeof object.schedule !== "object") + throw TypeError(".google.privacy.dlp.v2.JobTrigger.Trigger.schedule: object expected"); + message.schedule = $root.google.privacy.dlp.v2.Schedule.fromObject(object.schedule, long + 1); + } + if (object.manual != null) { + if (typeof object.manual !== "object") + throw TypeError(".google.privacy.dlp.v2.JobTrigger.Trigger.manual: object expected"); + message.manual = $root.google.privacy.dlp.v2.Manual.fromObject(object.manual, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Trigger message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.JobTrigger.Trigger + * @static + * @param {google.privacy.dlp.v2.JobTrigger.Trigger} message Trigger + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Trigger.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.schedule != null && message.hasOwnProperty("schedule")) { + object.schedule = $root.google.privacy.dlp.v2.Schedule.toObject(message.schedule, options); + if (options.oneofs) + object.trigger = "schedule"; + } + if (message.manual != null && message.hasOwnProperty("manual")) { + object.manual = $root.google.privacy.dlp.v2.Manual.toObject(message.manual, options); + if (options.oneofs) + object.trigger = "manual"; + } + return object; + }; + + /** + * Converts this Trigger to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.JobTrigger.Trigger + * @instance + * @returns {Object.} JSON object + */ + Trigger.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Trigger + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.JobTrigger.Trigger + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Trigger.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.JobTrigger.Trigger"; + }; + + return Trigger; + })(); + + /** + * Status enum. + * @name google.privacy.dlp.v2.JobTrigger.Status + * @enum {number} + * @property {number} STATUS_UNSPECIFIED=0 STATUS_UNSPECIFIED value + * @property {number} HEALTHY=1 HEALTHY value + * @property {number} PAUSED=2 PAUSED value + * @property {number} CANCELLED=3 CANCELLED value + */ + JobTrigger.Status = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "HEALTHY"] = 1; + values[valuesById[2] = "PAUSED"] = 2; + values[valuesById[3] = "CANCELLED"] = 3; + return values; + })(); + + return JobTrigger; + })(); + + v2.Action = (function() { + + /** + * Properties of an Action. + * @memberof google.privacy.dlp.v2 + * @interface IAction + * @property {google.privacy.dlp.v2.Action.ISaveFindings|null} [saveFindings] Action saveFindings + * @property {google.privacy.dlp.v2.Action.IPublishToPubSub|null} [pubSub] Action pubSub + * @property {google.privacy.dlp.v2.Action.IPublishSummaryToCscc|null} [publishSummaryToCscc] Action publishSummaryToCscc + * @property {google.privacy.dlp.v2.Action.IPublishFindingsToCloudDataCatalog|null} [publishFindingsToCloudDataCatalog] Action publishFindingsToCloudDataCatalog + * @property {google.privacy.dlp.v2.Action.IPublishFindingsToDataplexCatalog|null} [publishFindingsToDataplexCatalog] Action publishFindingsToDataplexCatalog + * @property {google.privacy.dlp.v2.Action.IDeidentify|null} [deidentify] Action deidentify + * @property {google.privacy.dlp.v2.Action.IJobNotificationEmails|null} [jobNotificationEmails] Action jobNotificationEmails + * @property {google.privacy.dlp.v2.Action.IPublishToStackdriver|null} [publishToStackdriver] Action publishToStackdriver + */ + + /** + * Constructs a new Action. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an Action. + * @implements IAction + * @constructor + * @param {google.privacy.dlp.v2.IAction=} [properties] Properties to set + */ + function Action(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Action saveFindings. + * @member {google.privacy.dlp.v2.Action.ISaveFindings|null|undefined} saveFindings + * @memberof google.privacy.dlp.v2.Action + * @instance + */ + Action.prototype.saveFindings = null; + + /** + * Action pubSub. + * @member {google.privacy.dlp.v2.Action.IPublishToPubSub|null|undefined} pubSub + * @memberof google.privacy.dlp.v2.Action + * @instance + */ + Action.prototype.pubSub = null; + + /** + * Action publishSummaryToCscc. + * @member {google.privacy.dlp.v2.Action.IPublishSummaryToCscc|null|undefined} publishSummaryToCscc + * @memberof google.privacy.dlp.v2.Action + * @instance + */ + Action.prototype.publishSummaryToCscc = null; + + /** + * Action publishFindingsToCloudDataCatalog. + * @member {google.privacy.dlp.v2.Action.IPublishFindingsToCloudDataCatalog|null|undefined} publishFindingsToCloudDataCatalog + * @memberof google.privacy.dlp.v2.Action + * @instance + */ + Action.prototype.publishFindingsToCloudDataCatalog = null; + + /** + * Action publishFindingsToDataplexCatalog. + * @member {google.privacy.dlp.v2.Action.IPublishFindingsToDataplexCatalog|null|undefined} publishFindingsToDataplexCatalog + * @memberof google.privacy.dlp.v2.Action + * @instance + */ + Action.prototype.publishFindingsToDataplexCatalog = null; + + /** + * Action deidentify. + * @member {google.privacy.dlp.v2.Action.IDeidentify|null|undefined} deidentify + * @memberof google.privacy.dlp.v2.Action + * @instance + */ + Action.prototype.deidentify = null; + + /** + * Action jobNotificationEmails. + * @member {google.privacy.dlp.v2.Action.IJobNotificationEmails|null|undefined} jobNotificationEmails + * @memberof google.privacy.dlp.v2.Action + * @instance + */ + Action.prototype.jobNotificationEmails = null; + + /** + * Action publishToStackdriver. + * @member {google.privacy.dlp.v2.Action.IPublishToStackdriver|null|undefined} publishToStackdriver + * @memberof google.privacy.dlp.v2.Action + * @instance + */ + Action.prototype.publishToStackdriver = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Action action. + * @member {"saveFindings"|"pubSub"|"publishSummaryToCscc"|"publishFindingsToCloudDataCatalog"|"publishFindingsToDataplexCatalog"|"deidentify"|"jobNotificationEmails"|"publishToStackdriver"|undefined} action + * @memberof google.privacy.dlp.v2.Action + * @instance + */ + Object.defineProperty(Action.prototype, "action", { + get: $util.oneOfGetter($oneOfFields = ["saveFindings", "pubSub", "publishSummaryToCscc", "publishFindingsToCloudDataCatalog", "publishFindingsToDataplexCatalog", "deidentify", "jobNotificationEmails", "publishToStackdriver"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Action instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Action + * @static + * @param {google.privacy.dlp.v2.IAction=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Action} Action instance + */ + Action.create = function create(properties) { + return new Action(properties); + }; + + /** + * Encodes the specified Action message. Does not implicitly {@link google.privacy.dlp.v2.Action.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Action + * @static + * @param {google.privacy.dlp.v2.IAction} message Action message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Action.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.saveFindings != null && Object.hasOwnProperty.call(message, "saveFindings")) + $root.google.privacy.dlp.v2.Action.SaveFindings.encode(message.saveFindings, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pubSub != null && Object.hasOwnProperty.call(message, "pubSub")) + $root.google.privacy.dlp.v2.Action.PublishToPubSub.encode(message.pubSub, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.publishSummaryToCscc != null && Object.hasOwnProperty.call(message, "publishSummaryToCscc")) + $root.google.privacy.dlp.v2.Action.PublishSummaryToCscc.encode(message.publishSummaryToCscc, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.publishFindingsToCloudDataCatalog != null && Object.hasOwnProperty.call(message, "publishFindingsToCloudDataCatalog")) + $root.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.encode(message.publishFindingsToCloudDataCatalog, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.deidentify != null && Object.hasOwnProperty.call(message, "deidentify")) + $root.google.privacy.dlp.v2.Action.Deidentify.encode(message.deidentify, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.jobNotificationEmails != null && Object.hasOwnProperty.call(message, "jobNotificationEmails")) + $root.google.privacy.dlp.v2.Action.JobNotificationEmails.encode(message.jobNotificationEmails, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.publishToStackdriver != null && Object.hasOwnProperty.call(message, "publishToStackdriver")) + $root.google.privacy.dlp.v2.Action.PublishToStackdriver.encode(message.publishToStackdriver, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publishFindingsToDataplexCatalog != null && Object.hasOwnProperty.call(message, "publishFindingsToDataplexCatalog")) + $root.google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog.encode(message.publishFindingsToDataplexCatalog, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Action message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Action.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Action + * @static + * @param {google.privacy.dlp.v2.IAction} message Action message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Action.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Action message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Action + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Action} Action + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Action.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Action(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.saveFindings = $root.google.privacy.dlp.v2.Action.SaveFindings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.pubSub = $root.google.privacy.dlp.v2.Action.PublishToPubSub.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.publishSummaryToCscc = $root.google.privacy.dlp.v2.Action.PublishSummaryToCscc.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.publishFindingsToCloudDataCatalog = $root.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 10: { + message.publishFindingsToDataplexCatalog = $root.google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 7: { + message.deidentify = $root.google.privacy.dlp.v2.Action.Deidentify.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 8: { + message.jobNotificationEmails = $root.google.privacy.dlp.v2.Action.JobNotificationEmails.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 9: { + message.publishToStackdriver = $root.google.privacy.dlp.v2.Action.PublishToStackdriver.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Action message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Action + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Action} Action + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Action.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Action message. + * @function verify + * @memberof google.privacy.dlp.v2.Action + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Action.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.saveFindings != null && message.hasOwnProperty("saveFindings")) { + properties.action = 1; + { + var error = $root.google.privacy.dlp.v2.Action.SaveFindings.verify(message.saveFindings, long + 1); + if (error) + return "saveFindings." + error; + } + } + if (message.pubSub != null && message.hasOwnProperty("pubSub")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.privacy.dlp.v2.Action.PublishToPubSub.verify(message.pubSub, long + 1); + if (error) + return "pubSub." + error; + } + } + if (message.publishSummaryToCscc != null && message.hasOwnProperty("publishSummaryToCscc")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.privacy.dlp.v2.Action.PublishSummaryToCscc.verify(message.publishSummaryToCscc, long + 1); + if (error) + return "publishSummaryToCscc." + error; + } + } + if (message.publishFindingsToCloudDataCatalog != null && message.hasOwnProperty("publishFindingsToCloudDataCatalog")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.verify(message.publishFindingsToCloudDataCatalog, long + 1); + if (error) + return "publishFindingsToCloudDataCatalog." + error; + } + } + if (message.publishFindingsToDataplexCatalog != null && message.hasOwnProperty("publishFindingsToDataplexCatalog")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog.verify(message.publishFindingsToDataplexCatalog, long + 1); + if (error) + return "publishFindingsToDataplexCatalog." + error; + } + } + if (message.deidentify != null && message.hasOwnProperty("deidentify")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.privacy.dlp.v2.Action.Deidentify.verify(message.deidentify, long + 1); + if (error) + return "deidentify." + error; + } + } + if (message.jobNotificationEmails != null && message.hasOwnProperty("jobNotificationEmails")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.privacy.dlp.v2.Action.JobNotificationEmails.verify(message.jobNotificationEmails, long + 1); + if (error) + return "jobNotificationEmails." + error; + } + } + if (message.publishToStackdriver != null && message.hasOwnProperty("publishToStackdriver")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.privacy.dlp.v2.Action.PublishToStackdriver.verify(message.publishToStackdriver, long + 1); + if (error) + return "publishToStackdriver." + error; + } + } + return null; + }; + + /** + * Creates an Action message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Action + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Action} Action + */ + Action.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Action) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.Action(); + if (object.saveFindings != null) { + if (typeof object.saveFindings !== "object") + throw TypeError(".google.privacy.dlp.v2.Action.saveFindings: object expected"); + message.saveFindings = $root.google.privacy.dlp.v2.Action.SaveFindings.fromObject(object.saveFindings, long + 1); + } + if (object.pubSub != null) { + if (typeof object.pubSub !== "object") + throw TypeError(".google.privacy.dlp.v2.Action.pubSub: object expected"); + message.pubSub = $root.google.privacy.dlp.v2.Action.PublishToPubSub.fromObject(object.pubSub, long + 1); + } + if (object.publishSummaryToCscc != null) { + if (typeof object.publishSummaryToCscc !== "object") + throw TypeError(".google.privacy.dlp.v2.Action.publishSummaryToCscc: object expected"); + message.publishSummaryToCscc = $root.google.privacy.dlp.v2.Action.PublishSummaryToCscc.fromObject(object.publishSummaryToCscc, long + 1); + } + if (object.publishFindingsToCloudDataCatalog != null) { + if (typeof object.publishFindingsToCloudDataCatalog !== "object") + throw TypeError(".google.privacy.dlp.v2.Action.publishFindingsToCloudDataCatalog: object expected"); + message.publishFindingsToCloudDataCatalog = $root.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.fromObject(object.publishFindingsToCloudDataCatalog, long + 1); + } + if (object.publishFindingsToDataplexCatalog != null) { + if (typeof object.publishFindingsToDataplexCatalog !== "object") + throw TypeError(".google.privacy.dlp.v2.Action.publishFindingsToDataplexCatalog: object expected"); + message.publishFindingsToDataplexCatalog = $root.google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog.fromObject(object.publishFindingsToDataplexCatalog, long + 1); + } + if (object.deidentify != null) { + if (typeof object.deidentify !== "object") + throw TypeError(".google.privacy.dlp.v2.Action.deidentify: object expected"); + message.deidentify = $root.google.privacy.dlp.v2.Action.Deidentify.fromObject(object.deidentify, long + 1); + } + if (object.jobNotificationEmails != null) { + if (typeof object.jobNotificationEmails !== "object") + throw TypeError(".google.privacy.dlp.v2.Action.jobNotificationEmails: object expected"); + message.jobNotificationEmails = $root.google.privacy.dlp.v2.Action.JobNotificationEmails.fromObject(object.jobNotificationEmails, long + 1); + } + if (object.publishToStackdriver != null) { + if (typeof object.publishToStackdriver !== "object") + throw TypeError(".google.privacy.dlp.v2.Action.publishToStackdriver: object expected"); + message.publishToStackdriver = $root.google.privacy.dlp.v2.Action.PublishToStackdriver.fromObject(object.publishToStackdriver, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an Action message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Action + * @static + * @param {google.privacy.dlp.v2.Action} message Action + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Action.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.saveFindings != null && message.hasOwnProperty("saveFindings")) { + object.saveFindings = $root.google.privacy.dlp.v2.Action.SaveFindings.toObject(message.saveFindings, options); + if (options.oneofs) + object.action = "saveFindings"; + } + if (message.pubSub != null && message.hasOwnProperty("pubSub")) { + object.pubSub = $root.google.privacy.dlp.v2.Action.PublishToPubSub.toObject(message.pubSub, options); + if (options.oneofs) + object.action = "pubSub"; + } + if (message.publishSummaryToCscc != null && message.hasOwnProperty("publishSummaryToCscc")) { + object.publishSummaryToCscc = $root.google.privacy.dlp.v2.Action.PublishSummaryToCscc.toObject(message.publishSummaryToCscc, options); + if (options.oneofs) + object.action = "publishSummaryToCscc"; + } + if (message.publishFindingsToCloudDataCatalog != null && message.hasOwnProperty("publishFindingsToCloudDataCatalog")) { + object.publishFindingsToCloudDataCatalog = $root.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.toObject(message.publishFindingsToCloudDataCatalog, options); + if (options.oneofs) + object.action = "publishFindingsToCloudDataCatalog"; + } + if (message.deidentify != null && message.hasOwnProperty("deidentify")) { + object.deidentify = $root.google.privacy.dlp.v2.Action.Deidentify.toObject(message.deidentify, options); + if (options.oneofs) + object.action = "deidentify"; + } + if (message.jobNotificationEmails != null && message.hasOwnProperty("jobNotificationEmails")) { + object.jobNotificationEmails = $root.google.privacy.dlp.v2.Action.JobNotificationEmails.toObject(message.jobNotificationEmails, options); + if (options.oneofs) + object.action = "jobNotificationEmails"; + } + if (message.publishToStackdriver != null && message.hasOwnProperty("publishToStackdriver")) { + object.publishToStackdriver = $root.google.privacy.dlp.v2.Action.PublishToStackdriver.toObject(message.publishToStackdriver, options); + if (options.oneofs) + object.action = "publishToStackdriver"; + } + if (message.publishFindingsToDataplexCatalog != null && message.hasOwnProperty("publishFindingsToDataplexCatalog")) { + object.publishFindingsToDataplexCatalog = $root.google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog.toObject(message.publishFindingsToDataplexCatalog, options); + if (options.oneofs) + object.action = "publishFindingsToDataplexCatalog"; + } + return object; + }; + + /** + * Converts this Action to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Action + * @instance + * @returns {Object.} JSON object + */ + Action.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Action + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Action + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Action.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Action"; + }; + + Action.SaveFindings = (function() { + + /** + * Properties of a SaveFindings. + * @memberof google.privacy.dlp.v2.Action + * @interface ISaveFindings + * @property {google.privacy.dlp.v2.IOutputStorageConfig|null} [outputConfig] SaveFindings outputConfig + */ + + /** + * Constructs a new SaveFindings. + * @memberof google.privacy.dlp.v2.Action + * @classdesc Represents a SaveFindings. + * @implements ISaveFindings + * @constructor + * @param {google.privacy.dlp.v2.Action.ISaveFindings=} [properties] Properties to set + */ + function SaveFindings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveFindings outputConfig. + * @member {google.privacy.dlp.v2.IOutputStorageConfig|null|undefined} outputConfig + * @memberof google.privacy.dlp.v2.Action.SaveFindings + * @instance + */ + SaveFindings.prototype.outputConfig = null; + + /** + * Creates a new SaveFindings instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Action.SaveFindings + * @static + * @param {google.privacy.dlp.v2.Action.ISaveFindings=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Action.SaveFindings} SaveFindings instance + */ + SaveFindings.create = function create(properties) { + return new SaveFindings(properties); + }; + + /** + * Encodes the specified SaveFindings message. Does not implicitly {@link google.privacy.dlp.v2.Action.SaveFindings.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Action.SaveFindings + * @static + * @param {google.privacy.dlp.v2.Action.ISaveFindings} message SaveFindings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveFindings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig")) + $root.google.privacy.dlp.v2.OutputStorageConfig.encode(message.outputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SaveFindings message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Action.SaveFindings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Action.SaveFindings + * @static + * @param {google.privacy.dlp.v2.Action.ISaveFindings} message SaveFindings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveFindings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveFindings message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Action.SaveFindings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Action.SaveFindings} SaveFindings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveFindings.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Action.SaveFindings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.outputConfig = $root.google.privacy.dlp.v2.OutputStorageConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SaveFindings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Action.SaveFindings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Action.SaveFindings} SaveFindings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveFindings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveFindings message. + * @function verify + * @memberof google.privacy.dlp.v2.Action.SaveFindings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveFindings.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) { + var error = $root.google.privacy.dlp.v2.OutputStorageConfig.verify(message.outputConfig, long + 1); + if (error) + return "outputConfig." + error; + } + return null; + }; + + /** + * Creates a SaveFindings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Action.SaveFindings + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Action.SaveFindings} SaveFindings + */ + SaveFindings.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Action.SaveFindings) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.Action.SaveFindings(); + if (object.outputConfig != null) { + if (typeof object.outputConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.Action.SaveFindings.outputConfig: object expected"); + message.outputConfig = $root.google.privacy.dlp.v2.OutputStorageConfig.fromObject(object.outputConfig, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a SaveFindings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Action.SaveFindings + * @static + * @param {google.privacy.dlp.v2.Action.SaveFindings} message SaveFindings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveFindings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.outputConfig = null; + if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) + object.outputConfig = $root.google.privacy.dlp.v2.OutputStorageConfig.toObject(message.outputConfig, options); + return object; + }; + + /** + * Converts this SaveFindings to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Action.SaveFindings + * @instance + * @returns {Object.} JSON object + */ + SaveFindings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveFindings + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Action.SaveFindings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveFindings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Action.SaveFindings"; + }; + + return SaveFindings; + })(); + + Action.PublishToPubSub = (function() { + + /** + * Properties of a PublishToPubSub. + * @memberof google.privacy.dlp.v2.Action + * @interface IPublishToPubSub + * @property {string|null} [topic] PublishToPubSub topic + */ + + /** + * Constructs a new PublishToPubSub. + * @memberof google.privacy.dlp.v2.Action + * @classdesc Represents a PublishToPubSub. + * @implements IPublishToPubSub + * @constructor + * @param {google.privacy.dlp.v2.Action.IPublishToPubSub=} [properties] Properties to set + */ + function PublishToPubSub(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * PublishToPubSub topic. + * @member {string} topic + * @memberof google.privacy.dlp.v2.Action.PublishToPubSub + * @instance + */ + PublishToPubSub.prototype.topic = ""; + + /** + * Creates a new PublishToPubSub instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Action.PublishToPubSub + * @static + * @param {google.privacy.dlp.v2.Action.IPublishToPubSub=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Action.PublishToPubSub} PublishToPubSub instance + */ + PublishToPubSub.create = function create(properties) { + return new PublishToPubSub(properties); + }; + + /** + * Encodes the specified PublishToPubSub message. Does not implicitly {@link google.privacy.dlp.v2.Action.PublishToPubSub.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Action.PublishToPubSub + * @static + * @param {google.privacy.dlp.v2.Action.IPublishToPubSub} message PublishToPubSub message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishToPubSub.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); + return writer; + }; + + /** + * Encodes the specified PublishToPubSub message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Action.PublishToPubSub.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Action.PublishToPubSub + * @static + * @param {google.privacy.dlp.v2.Action.IPublishToPubSub} message PublishToPubSub message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishToPubSub.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublishToPubSub message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Action.PublishToPubSub + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Action.PublishToPubSub} PublishToPubSub + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishToPubSub.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Action.PublishToPubSub(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.topic = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PublishToPubSub message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Action.PublishToPubSub + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Action.PublishToPubSub} PublishToPubSub + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishToPubSub.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublishToPubSub message. + * @function verify + * @memberof google.privacy.dlp.v2.Action.PublishToPubSub + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublishToPubSub.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.topic != null && message.hasOwnProperty("topic")) + if (!$util.isString(message.topic)) + return "topic: string expected"; + return null; + }; + + /** + * Creates a PublishToPubSub message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Action.PublishToPubSub + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Action.PublishToPubSub} PublishToPubSub + */ + PublishToPubSub.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Action.PublishToPubSub) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.Action.PublishToPubSub(); + if (object.topic != null) + message.topic = String(object.topic); + return message; + }; + + /** + * Creates a plain object from a PublishToPubSub message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Action.PublishToPubSub + * @static + * @param {google.privacy.dlp.v2.Action.PublishToPubSub} message PublishToPubSub + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublishToPubSub.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.topic = ""; + if (message.topic != null && message.hasOwnProperty("topic")) + object.topic = message.topic; + return object; + }; + + /** + * Converts this PublishToPubSub to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Action.PublishToPubSub + * @instance + * @returns {Object.} JSON object + */ + PublishToPubSub.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PublishToPubSub + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Action.PublishToPubSub + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublishToPubSub.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Action.PublishToPubSub"; + }; + + return PublishToPubSub; + })(); + + Action.PublishSummaryToCscc = (function() { + + /** + * Properties of a PublishSummaryToCscc. + * @memberof google.privacy.dlp.v2.Action + * @interface IPublishSummaryToCscc + */ + + /** + * Constructs a new PublishSummaryToCscc. + * @memberof google.privacy.dlp.v2.Action + * @classdesc Represents a PublishSummaryToCscc. + * @implements IPublishSummaryToCscc + * @constructor + * @param {google.privacy.dlp.v2.Action.IPublishSummaryToCscc=} [properties] Properties to set + */ + function PublishSummaryToCscc(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new PublishSummaryToCscc instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Action.PublishSummaryToCscc + * @static + * @param {google.privacy.dlp.v2.Action.IPublishSummaryToCscc=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Action.PublishSummaryToCscc} PublishSummaryToCscc instance + */ + PublishSummaryToCscc.create = function create(properties) { + return new PublishSummaryToCscc(properties); + }; + + /** + * Encodes the specified PublishSummaryToCscc message. Does not implicitly {@link google.privacy.dlp.v2.Action.PublishSummaryToCscc.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Action.PublishSummaryToCscc + * @static + * @param {google.privacy.dlp.v2.Action.IPublishSummaryToCscc} message PublishSummaryToCscc message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishSummaryToCscc.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified PublishSummaryToCscc message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Action.PublishSummaryToCscc.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Action.PublishSummaryToCscc + * @static + * @param {google.privacy.dlp.v2.Action.IPublishSummaryToCscc} message PublishSummaryToCscc message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishSummaryToCscc.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublishSummaryToCscc message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Action.PublishSummaryToCscc + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Action.PublishSummaryToCscc} PublishSummaryToCscc + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishSummaryToCscc.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Action.PublishSummaryToCscc(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PublishSummaryToCscc message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Action.PublishSummaryToCscc + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Action.PublishSummaryToCscc} PublishSummaryToCscc + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishSummaryToCscc.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublishSummaryToCscc message. + * @function verify + * @memberof google.privacy.dlp.v2.Action.PublishSummaryToCscc + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublishSummaryToCscc.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a PublishSummaryToCscc message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Action.PublishSummaryToCscc + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Action.PublishSummaryToCscc} PublishSummaryToCscc + */ + PublishSummaryToCscc.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Action.PublishSummaryToCscc) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.Action.PublishSummaryToCscc(); + }; + + /** + * Creates a plain object from a PublishSummaryToCscc message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Action.PublishSummaryToCscc + * @static + * @param {google.privacy.dlp.v2.Action.PublishSummaryToCscc} message PublishSummaryToCscc + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublishSummaryToCscc.toObject = function toObject() { + return {}; + }; + + /** + * Converts this PublishSummaryToCscc to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Action.PublishSummaryToCscc + * @instance + * @returns {Object.} JSON object + */ + PublishSummaryToCscc.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PublishSummaryToCscc + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Action.PublishSummaryToCscc + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublishSummaryToCscc.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Action.PublishSummaryToCscc"; + }; + + return PublishSummaryToCscc; + })(); + + Action.PublishFindingsToCloudDataCatalog = (function() { + + /** + * Properties of a PublishFindingsToCloudDataCatalog. + * @memberof google.privacy.dlp.v2.Action + * @interface IPublishFindingsToCloudDataCatalog + */ + + /** + * Constructs a new PublishFindingsToCloudDataCatalog. + * @memberof google.privacy.dlp.v2.Action + * @classdesc Represents a PublishFindingsToCloudDataCatalog. + * @implements IPublishFindingsToCloudDataCatalog + * @constructor + * @param {google.privacy.dlp.v2.Action.IPublishFindingsToCloudDataCatalog=} [properties] Properties to set + */ + function PublishFindingsToCloudDataCatalog(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new PublishFindingsToCloudDataCatalog instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog + * @static + * @param {google.privacy.dlp.v2.Action.IPublishFindingsToCloudDataCatalog=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog} PublishFindingsToCloudDataCatalog instance + */ + PublishFindingsToCloudDataCatalog.create = function create(properties) { + return new PublishFindingsToCloudDataCatalog(properties); + }; + + /** + * Encodes the specified PublishFindingsToCloudDataCatalog message. Does not implicitly {@link google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog + * @static + * @param {google.privacy.dlp.v2.Action.IPublishFindingsToCloudDataCatalog} message PublishFindingsToCloudDataCatalog message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishFindingsToCloudDataCatalog.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified PublishFindingsToCloudDataCatalog message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog + * @static + * @param {google.privacy.dlp.v2.Action.IPublishFindingsToCloudDataCatalog} message PublishFindingsToCloudDataCatalog message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishFindingsToCloudDataCatalog.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublishFindingsToCloudDataCatalog message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog} PublishFindingsToCloudDataCatalog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishFindingsToCloudDataCatalog.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PublishFindingsToCloudDataCatalog message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog} PublishFindingsToCloudDataCatalog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishFindingsToCloudDataCatalog.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublishFindingsToCloudDataCatalog message. + * @function verify + * @memberof google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublishFindingsToCloudDataCatalog.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a PublishFindingsToCloudDataCatalog message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog} PublishFindingsToCloudDataCatalog + */ + PublishFindingsToCloudDataCatalog.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog(); + }; + + /** + * Creates a plain object from a PublishFindingsToCloudDataCatalog message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog + * @static + * @param {google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog} message PublishFindingsToCloudDataCatalog + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublishFindingsToCloudDataCatalog.toObject = function toObject() { + return {}; + }; + + /** + * Converts this PublishFindingsToCloudDataCatalog to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog + * @instance + * @returns {Object.} JSON object + */ + PublishFindingsToCloudDataCatalog.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PublishFindingsToCloudDataCatalog + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublishFindingsToCloudDataCatalog.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Action.PublishFindingsToCloudDataCatalog"; + }; + + return PublishFindingsToCloudDataCatalog; + })(); + + Action.PublishFindingsToDataplexCatalog = (function() { + + /** + * Properties of a PublishFindingsToDataplexCatalog. + * @memberof google.privacy.dlp.v2.Action + * @interface IPublishFindingsToDataplexCatalog + */ + + /** + * Constructs a new PublishFindingsToDataplexCatalog. + * @memberof google.privacy.dlp.v2.Action + * @classdesc Represents a PublishFindingsToDataplexCatalog. + * @implements IPublishFindingsToDataplexCatalog + * @constructor + * @param {google.privacy.dlp.v2.Action.IPublishFindingsToDataplexCatalog=} [properties] Properties to set + */ + function PublishFindingsToDataplexCatalog(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new PublishFindingsToDataplexCatalog instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog + * @static + * @param {google.privacy.dlp.v2.Action.IPublishFindingsToDataplexCatalog=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog} PublishFindingsToDataplexCatalog instance + */ + PublishFindingsToDataplexCatalog.create = function create(properties) { + return new PublishFindingsToDataplexCatalog(properties); + }; + + /** + * Encodes the specified PublishFindingsToDataplexCatalog message. Does not implicitly {@link google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog + * @static + * @param {google.privacy.dlp.v2.Action.IPublishFindingsToDataplexCatalog} message PublishFindingsToDataplexCatalog message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishFindingsToDataplexCatalog.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified PublishFindingsToDataplexCatalog message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog + * @static + * @param {google.privacy.dlp.v2.Action.IPublishFindingsToDataplexCatalog} message PublishFindingsToDataplexCatalog message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishFindingsToDataplexCatalog.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublishFindingsToDataplexCatalog message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog} PublishFindingsToDataplexCatalog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishFindingsToDataplexCatalog.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PublishFindingsToDataplexCatalog message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog} PublishFindingsToDataplexCatalog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishFindingsToDataplexCatalog.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublishFindingsToDataplexCatalog message. + * @function verify + * @memberof google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublishFindingsToDataplexCatalog.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a PublishFindingsToDataplexCatalog message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog} PublishFindingsToDataplexCatalog + */ + PublishFindingsToDataplexCatalog.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog(); + }; + + /** + * Creates a plain object from a PublishFindingsToDataplexCatalog message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog + * @static + * @param {google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog} message PublishFindingsToDataplexCatalog + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublishFindingsToDataplexCatalog.toObject = function toObject() { + return {}; + }; + + /** + * Converts this PublishFindingsToDataplexCatalog to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog + * @instance + * @returns {Object.} JSON object + */ + PublishFindingsToDataplexCatalog.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PublishFindingsToDataplexCatalog + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublishFindingsToDataplexCatalog.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Action.PublishFindingsToDataplexCatalog"; + }; + + return PublishFindingsToDataplexCatalog; + })(); + + Action.Deidentify = (function() { + + /** + * Properties of a Deidentify. + * @memberof google.privacy.dlp.v2.Action + * @interface IDeidentify + * @property {google.privacy.dlp.v2.ITransformationConfig|null} [transformationConfig] Deidentify transformationConfig + * @property {google.privacy.dlp.v2.ITransformationDetailsStorageConfig|null} [transformationDetailsStorageConfig] Deidentify transformationDetailsStorageConfig + * @property {string|null} [cloudStorageOutput] Deidentify cloudStorageOutput + * @property {Array.|null} [fileTypesToTransform] Deidentify fileTypesToTransform + */ + + /** + * Constructs a new Deidentify. + * @memberof google.privacy.dlp.v2.Action + * @classdesc Represents a Deidentify. + * @implements IDeidentify + * @constructor + * @param {google.privacy.dlp.v2.Action.IDeidentify=} [properties] Properties to set + */ + function Deidentify(properties) { + this.fileTypesToTransform = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Deidentify transformationConfig. + * @member {google.privacy.dlp.v2.ITransformationConfig|null|undefined} transformationConfig + * @memberof google.privacy.dlp.v2.Action.Deidentify + * @instance + */ + Deidentify.prototype.transformationConfig = null; + + /** + * Deidentify transformationDetailsStorageConfig. + * @member {google.privacy.dlp.v2.ITransformationDetailsStorageConfig|null|undefined} transformationDetailsStorageConfig + * @memberof google.privacy.dlp.v2.Action.Deidentify + * @instance + */ + Deidentify.prototype.transformationDetailsStorageConfig = null; + + /** + * Deidentify cloudStorageOutput. + * @member {string|null|undefined} cloudStorageOutput + * @memberof google.privacy.dlp.v2.Action.Deidentify + * @instance + */ + Deidentify.prototype.cloudStorageOutput = null; + + /** + * Deidentify fileTypesToTransform. + * @member {Array.} fileTypesToTransform + * @memberof google.privacy.dlp.v2.Action.Deidentify + * @instance + */ + Deidentify.prototype.fileTypesToTransform = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Deidentify output. + * @member {"cloudStorageOutput"|undefined} output + * @memberof google.privacy.dlp.v2.Action.Deidentify + * @instance + */ + Object.defineProperty(Deidentify.prototype, "output", { + get: $util.oneOfGetter($oneOfFields = ["cloudStorageOutput"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Deidentify instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Action.Deidentify + * @static + * @param {google.privacy.dlp.v2.Action.IDeidentify=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Action.Deidentify} Deidentify instance + */ + Deidentify.create = function create(properties) { + return new Deidentify(properties); + }; + + /** + * Encodes the specified Deidentify message. Does not implicitly {@link google.privacy.dlp.v2.Action.Deidentify.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Action.Deidentify + * @static + * @param {google.privacy.dlp.v2.Action.IDeidentify} message Deidentify message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deidentify.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.transformationDetailsStorageConfig != null && Object.hasOwnProperty.call(message, "transformationDetailsStorageConfig")) + $root.google.privacy.dlp.v2.TransformationDetailsStorageConfig.encode(message.transformationDetailsStorageConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.transformationConfig != null && Object.hasOwnProperty.call(message, "transformationConfig")) + $root.google.privacy.dlp.v2.TransformationConfig.encode(message.transformationConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.fileTypesToTransform != null && message.fileTypesToTransform.length) { + writer.uint32(/* id 8, wireType 2 =*/66).fork(); + for (var i = 0; i < message.fileTypesToTransform.length; ++i) + writer.int32(message.fileTypesToTransform[i]); + writer.ldelim(); + } + if (message.cloudStorageOutput != null && Object.hasOwnProperty.call(message, "cloudStorageOutput")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.cloudStorageOutput); + return writer; + }; + + /** + * Encodes the specified Deidentify message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Action.Deidentify.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Action.Deidentify + * @static + * @param {google.privacy.dlp.v2.Action.IDeidentify} message Deidentify message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Deidentify.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Deidentify message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Action.Deidentify + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Action.Deidentify} Deidentify + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Deidentify.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Action.Deidentify(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 7: { + message.transformationConfig = $root.google.privacy.dlp.v2.TransformationConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.transformationDetailsStorageConfig = $root.google.privacy.dlp.v2.TransformationDetailsStorageConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 9: { + message.cloudStorageOutput = reader.string(); + break; + } + case 8: { + if (!(message.fileTypesToTransform && message.fileTypesToTransform.length)) + message.fileTypesToTransform = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.fileTypesToTransform.push(reader.int32()); + } else + message.fileTypesToTransform.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Deidentify message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Action.Deidentify + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Action.Deidentify} Deidentify + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Deidentify.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Deidentify message. + * @function verify + * @memberof google.privacy.dlp.v2.Action.Deidentify + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Deidentify.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.transformationConfig != null && message.hasOwnProperty("transformationConfig")) { + var error = $root.google.privacy.dlp.v2.TransformationConfig.verify(message.transformationConfig, long + 1); + if (error) + return "transformationConfig." + error; + } + if (message.transformationDetailsStorageConfig != null && message.hasOwnProperty("transformationDetailsStorageConfig")) { + var error = $root.google.privacy.dlp.v2.TransformationDetailsStorageConfig.verify(message.transformationDetailsStorageConfig, long + 1); + if (error) + return "transformationDetailsStorageConfig." + error; + } + if (message.cloudStorageOutput != null && message.hasOwnProperty("cloudStorageOutput")) { + properties.output = 1; + if (!$util.isString(message.cloudStorageOutput)) + return "cloudStorageOutput: string expected"; + } + if (message.fileTypesToTransform != null && message.hasOwnProperty("fileTypesToTransform")) { + if (!Array.isArray(message.fileTypesToTransform)) + return "fileTypesToTransform: array expected"; + for (var i = 0; i < message.fileTypesToTransform.length; ++i) + switch (message.fileTypesToTransform[i]) { + default: + return "fileTypesToTransform: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 5: + case 6: + case 7: + case 8: + case 9: + case 11: + case 12: + break; + } + } + return null; + }; + + /** + * Creates a Deidentify message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Action.Deidentify + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Action.Deidentify} Deidentify + */ + Deidentify.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Action.Deidentify) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.Action.Deidentify(); + if (object.transformationConfig != null) { + if (typeof object.transformationConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.Action.Deidentify.transformationConfig: object expected"); + message.transformationConfig = $root.google.privacy.dlp.v2.TransformationConfig.fromObject(object.transformationConfig, long + 1); + } + if (object.transformationDetailsStorageConfig != null) { + if (typeof object.transformationDetailsStorageConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.Action.Deidentify.transformationDetailsStorageConfig: object expected"); + message.transformationDetailsStorageConfig = $root.google.privacy.dlp.v2.TransformationDetailsStorageConfig.fromObject(object.transformationDetailsStorageConfig, long + 1); + } + if (object.cloudStorageOutput != null) + message.cloudStorageOutput = String(object.cloudStorageOutput); + if (object.fileTypesToTransform) { + if (!Array.isArray(object.fileTypesToTransform)) + throw TypeError(".google.privacy.dlp.v2.Action.Deidentify.fileTypesToTransform: array expected"); + message.fileTypesToTransform = []; + for (var i = 0; i < object.fileTypesToTransform.length; ++i) + switch (object.fileTypesToTransform[i]) { + default: + if (typeof object.fileTypesToTransform[i] === "number") { + message.fileTypesToTransform[i] = object.fileTypesToTransform[i]; + break; + } + case "FILE_TYPE_UNSPECIFIED": + case 0: + message.fileTypesToTransform[i] = 0; + break; + case "BINARY_FILE": + case 1: + message.fileTypesToTransform[i] = 1; + break; + case "TEXT_FILE": + case 2: + message.fileTypesToTransform[i] = 2; + break; + case "IMAGE": + case 3: + message.fileTypesToTransform[i] = 3; + break; + case "WORD": + case 5: + message.fileTypesToTransform[i] = 5; + break; + case "PDF": + case 6: + message.fileTypesToTransform[i] = 6; + break; + case "AVRO": + case 7: + message.fileTypesToTransform[i] = 7; + break; + case "CSV": + case 8: + message.fileTypesToTransform[i] = 8; + break; + case "TSV": + case 9: + message.fileTypesToTransform[i] = 9; + break; + case "POWERPOINT": + case 11: + message.fileTypesToTransform[i] = 11; + break; + case "EXCEL": + case 12: + message.fileTypesToTransform[i] = 12; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a Deidentify message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Action.Deidentify + * @static + * @param {google.privacy.dlp.v2.Action.Deidentify} message Deidentify + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Deidentify.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fileTypesToTransform = []; + if (options.defaults) { + object.transformationDetailsStorageConfig = null; + object.transformationConfig = null; + } + if (message.transformationDetailsStorageConfig != null && message.hasOwnProperty("transformationDetailsStorageConfig")) + object.transformationDetailsStorageConfig = $root.google.privacy.dlp.v2.TransformationDetailsStorageConfig.toObject(message.transformationDetailsStorageConfig, options); + if (message.transformationConfig != null && message.hasOwnProperty("transformationConfig")) + object.transformationConfig = $root.google.privacy.dlp.v2.TransformationConfig.toObject(message.transformationConfig, options); + if (message.fileTypesToTransform && message.fileTypesToTransform.length) { + object.fileTypesToTransform = []; + for (var j = 0; j < message.fileTypesToTransform.length; ++j) + object.fileTypesToTransform[j] = options.enums === String ? $root.google.privacy.dlp.v2.FileType[message.fileTypesToTransform[j]] === undefined ? message.fileTypesToTransform[j] : $root.google.privacy.dlp.v2.FileType[message.fileTypesToTransform[j]] : message.fileTypesToTransform[j]; + } + if (message.cloudStorageOutput != null && message.hasOwnProperty("cloudStorageOutput")) { + object.cloudStorageOutput = message.cloudStorageOutput; + if (options.oneofs) + object.output = "cloudStorageOutput"; + } + return object; + }; + + /** + * Converts this Deidentify to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Action.Deidentify + * @instance + * @returns {Object.} JSON object + */ + Deidentify.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Deidentify + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Action.Deidentify + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Deidentify.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Action.Deidentify"; + }; + + return Deidentify; + })(); + + Action.JobNotificationEmails = (function() { + + /** + * Properties of a JobNotificationEmails. + * @memberof google.privacy.dlp.v2.Action + * @interface IJobNotificationEmails + */ + + /** + * Constructs a new JobNotificationEmails. + * @memberof google.privacy.dlp.v2.Action + * @classdesc Represents a JobNotificationEmails. + * @implements IJobNotificationEmails + * @constructor + * @param {google.privacy.dlp.v2.Action.IJobNotificationEmails=} [properties] Properties to set + */ + function JobNotificationEmails(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new JobNotificationEmails instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Action.JobNotificationEmails + * @static + * @param {google.privacy.dlp.v2.Action.IJobNotificationEmails=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Action.JobNotificationEmails} JobNotificationEmails instance + */ + JobNotificationEmails.create = function create(properties) { + return new JobNotificationEmails(properties); + }; + + /** + * Encodes the specified JobNotificationEmails message. Does not implicitly {@link google.privacy.dlp.v2.Action.JobNotificationEmails.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Action.JobNotificationEmails + * @static + * @param {google.privacy.dlp.v2.Action.IJobNotificationEmails} message JobNotificationEmails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobNotificationEmails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified JobNotificationEmails message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Action.JobNotificationEmails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Action.JobNotificationEmails + * @static + * @param {google.privacy.dlp.v2.Action.IJobNotificationEmails} message JobNotificationEmails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JobNotificationEmails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JobNotificationEmails message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Action.JobNotificationEmails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Action.JobNotificationEmails} JobNotificationEmails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobNotificationEmails.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Action.JobNotificationEmails(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a JobNotificationEmails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Action.JobNotificationEmails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Action.JobNotificationEmails} JobNotificationEmails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JobNotificationEmails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JobNotificationEmails message. + * @function verify + * @memberof google.privacy.dlp.v2.Action.JobNotificationEmails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JobNotificationEmails.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a JobNotificationEmails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Action.JobNotificationEmails + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Action.JobNotificationEmails} JobNotificationEmails + */ + JobNotificationEmails.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Action.JobNotificationEmails) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.Action.JobNotificationEmails(); + }; + + /** + * Creates a plain object from a JobNotificationEmails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Action.JobNotificationEmails + * @static + * @param {google.privacy.dlp.v2.Action.JobNotificationEmails} message JobNotificationEmails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JobNotificationEmails.toObject = function toObject() { + return {}; + }; + + /** + * Converts this JobNotificationEmails to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Action.JobNotificationEmails + * @instance + * @returns {Object.} JSON object + */ + JobNotificationEmails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JobNotificationEmails + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Action.JobNotificationEmails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JobNotificationEmails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Action.JobNotificationEmails"; + }; + + return JobNotificationEmails; + })(); + + Action.PublishToStackdriver = (function() { + + /** + * Properties of a PublishToStackdriver. + * @memberof google.privacy.dlp.v2.Action + * @interface IPublishToStackdriver + */ + + /** + * Constructs a new PublishToStackdriver. + * @memberof google.privacy.dlp.v2.Action + * @classdesc Represents a PublishToStackdriver. + * @implements IPublishToStackdriver + * @constructor + * @param {google.privacy.dlp.v2.Action.IPublishToStackdriver=} [properties] Properties to set + */ + function PublishToStackdriver(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new PublishToStackdriver instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Action.PublishToStackdriver + * @static + * @param {google.privacy.dlp.v2.Action.IPublishToStackdriver=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Action.PublishToStackdriver} PublishToStackdriver instance + */ + PublishToStackdriver.create = function create(properties) { + return new PublishToStackdriver(properties); + }; + + /** + * Encodes the specified PublishToStackdriver message. Does not implicitly {@link google.privacy.dlp.v2.Action.PublishToStackdriver.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Action.PublishToStackdriver + * @static + * @param {google.privacy.dlp.v2.Action.IPublishToStackdriver} message PublishToStackdriver message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishToStackdriver.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified PublishToStackdriver message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Action.PublishToStackdriver.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Action.PublishToStackdriver + * @static + * @param {google.privacy.dlp.v2.Action.IPublishToStackdriver} message PublishToStackdriver message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishToStackdriver.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublishToStackdriver message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Action.PublishToStackdriver + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Action.PublishToStackdriver} PublishToStackdriver + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishToStackdriver.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Action.PublishToStackdriver(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PublishToStackdriver message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Action.PublishToStackdriver + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Action.PublishToStackdriver} PublishToStackdriver + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishToStackdriver.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublishToStackdriver message. + * @function verify + * @memberof google.privacy.dlp.v2.Action.PublishToStackdriver + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublishToStackdriver.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a PublishToStackdriver message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Action.PublishToStackdriver + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Action.PublishToStackdriver} PublishToStackdriver + */ + PublishToStackdriver.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Action.PublishToStackdriver) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.Action.PublishToStackdriver(); + }; + + /** + * Creates a plain object from a PublishToStackdriver message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Action.PublishToStackdriver + * @static + * @param {google.privacy.dlp.v2.Action.PublishToStackdriver} message PublishToStackdriver + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublishToStackdriver.toObject = function toObject() { + return {}; + }; + + /** + * Converts this PublishToStackdriver to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Action.PublishToStackdriver + * @instance + * @returns {Object.} JSON object + */ + PublishToStackdriver.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PublishToStackdriver + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Action.PublishToStackdriver + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublishToStackdriver.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Action.PublishToStackdriver"; + }; + + return PublishToStackdriver; + })(); + + return Action; + })(); + + v2.TransformationConfig = (function() { + + /** + * Properties of a TransformationConfig. + * @memberof google.privacy.dlp.v2 + * @interface ITransformationConfig + * @property {string|null} [deidentifyTemplate] TransformationConfig deidentifyTemplate + * @property {string|null} [structuredDeidentifyTemplate] TransformationConfig structuredDeidentifyTemplate + * @property {string|null} [imageRedactTemplate] TransformationConfig imageRedactTemplate + */ + + /** + * Constructs a new TransformationConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a TransformationConfig. + * @implements ITransformationConfig + * @constructor + * @param {google.privacy.dlp.v2.ITransformationConfig=} [properties] Properties to set + */ + function TransformationConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TransformationConfig deidentifyTemplate. + * @member {string} deidentifyTemplate + * @memberof google.privacy.dlp.v2.TransformationConfig + * @instance + */ + TransformationConfig.prototype.deidentifyTemplate = ""; + + /** + * TransformationConfig structuredDeidentifyTemplate. + * @member {string} structuredDeidentifyTemplate + * @memberof google.privacy.dlp.v2.TransformationConfig + * @instance + */ + TransformationConfig.prototype.structuredDeidentifyTemplate = ""; + + /** + * TransformationConfig imageRedactTemplate. + * @member {string} imageRedactTemplate + * @memberof google.privacy.dlp.v2.TransformationConfig + * @instance + */ + TransformationConfig.prototype.imageRedactTemplate = ""; + + /** + * Creates a new TransformationConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.TransformationConfig + * @static + * @param {google.privacy.dlp.v2.ITransformationConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.TransformationConfig} TransformationConfig instance + */ + TransformationConfig.create = function create(properties) { + return new TransformationConfig(properties); + }; + + /** + * Encodes the specified TransformationConfig message. Does not implicitly {@link google.privacy.dlp.v2.TransformationConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.TransformationConfig + * @static + * @param {google.privacy.dlp.v2.ITransformationConfig} message TransformationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransformationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deidentifyTemplate != null && Object.hasOwnProperty.call(message, "deidentifyTemplate")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.deidentifyTemplate); + if (message.structuredDeidentifyTemplate != null && Object.hasOwnProperty.call(message, "structuredDeidentifyTemplate")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.structuredDeidentifyTemplate); + if (message.imageRedactTemplate != null && Object.hasOwnProperty.call(message, "imageRedactTemplate")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.imageRedactTemplate); + return writer; + }; + + /** + * Encodes the specified TransformationConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TransformationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.TransformationConfig + * @static + * @param {google.privacy.dlp.v2.ITransformationConfig} message TransformationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TransformationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TransformationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.TransformationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.TransformationConfig} TransformationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransformationConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TransformationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.deidentifyTemplate = reader.string(); + break; + } + case 2: { + message.structuredDeidentifyTemplate = reader.string(); + break; + } + case 4: { + message.imageRedactTemplate = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TransformationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.TransformationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.TransformationConfig} TransformationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TransformationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TransformationConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.TransformationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TransformationConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) + if (!$util.isString(message.deidentifyTemplate)) + return "deidentifyTemplate: string expected"; + if (message.structuredDeidentifyTemplate != null && message.hasOwnProperty("structuredDeidentifyTemplate")) + if (!$util.isString(message.structuredDeidentifyTemplate)) + return "structuredDeidentifyTemplate: string expected"; + if (message.imageRedactTemplate != null && message.hasOwnProperty("imageRedactTemplate")) + if (!$util.isString(message.imageRedactTemplate)) + return "imageRedactTemplate: string expected"; + return null; + }; + + /** + * Creates a TransformationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.TransformationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.TransformationConfig} TransformationConfig + */ + TransformationConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.TransformationConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.TransformationConfig(); + if (object.deidentifyTemplate != null) + message.deidentifyTemplate = String(object.deidentifyTemplate); + if (object.structuredDeidentifyTemplate != null) + message.structuredDeidentifyTemplate = String(object.structuredDeidentifyTemplate); + if (object.imageRedactTemplate != null) + message.imageRedactTemplate = String(object.imageRedactTemplate); + return message; + }; + + /** + * Creates a plain object from a TransformationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.TransformationConfig + * @static + * @param {google.privacy.dlp.v2.TransformationConfig} message TransformationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TransformationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.deidentifyTemplate = ""; + object.structuredDeidentifyTemplate = ""; + object.imageRedactTemplate = ""; + } + if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) + object.deidentifyTemplate = message.deidentifyTemplate; + if (message.structuredDeidentifyTemplate != null && message.hasOwnProperty("structuredDeidentifyTemplate")) + object.structuredDeidentifyTemplate = message.structuredDeidentifyTemplate; + if (message.imageRedactTemplate != null && message.hasOwnProperty("imageRedactTemplate")) + object.imageRedactTemplate = message.imageRedactTemplate; + return object; + }; + + /** + * Converts this TransformationConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.TransformationConfig + * @instance + * @returns {Object.} JSON object + */ + TransformationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TransformationConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.TransformationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TransformationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.TransformationConfig"; + }; + + return TransformationConfig; + })(); + + v2.CreateInspectTemplateRequest = (function() { + + /** + * Properties of a CreateInspectTemplateRequest. + * @memberof google.privacy.dlp.v2 + * @interface ICreateInspectTemplateRequest + * @property {string|null} [parent] CreateInspectTemplateRequest parent + * @property {google.privacy.dlp.v2.IInspectTemplate|null} [inspectTemplate] CreateInspectTemplateRequest inspectTemplate + * @property {string|null} [templateId] CreateInspectTemplateRequest templateId + * @property {string|null} [locationId] CreateInspectTemplateRequest locationId + */ + + /** + * Constructs a new CreateInspectTemplateRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CreateInspectTemplateRequest. + * @implements ICreateInspectTemplateRequest + * @constructor + * @param {google.privacy.dlp.v2.ICreateInspectTemplateRequest=} [properties] Properties to set + */ + function CreateInspectTemplateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateInspectTemplateRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @instance + */ + CreateInspectTemplateRequest.prototype.parent = ""; + + /** + * CreateInspectTemplateRequest inspectTemplate. + * @member {google.privacy.dlp.v2.IInspectTemplate|null|undefined} inspectTemplate + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @instance + */ + CreateInspectTemplateRequest.prototype.inspectTemplate = null; + + /** + * CreateInspectTemplateRequest templateId. + * @member {string} templateId + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @instance + */ + CreateInspectTemplateRequest.prototype.templateId = ""; + + /** + * CreateInspectTemplateRequest locationId. + * @member {string} locationId + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @instance + */ + CreateInspectTemplateRequest.prototype.locationId = ""; + + /** + * Creates a new CreateInspectTemplateRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.ICreateInspectTemplateRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CreateInspectTemplateRequest} CreateInspectTemplateRequest instance + */ + CreateInspectTemplateRequest.create = function create(properties) { + return new CreateInspectTemplateRequest(properties); + }; + + /** + * Encodes the specified CreateInspectTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.CreateInspectTemplateRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.ICreateInspectTemplateRequest} message CreateInspectTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateInspectTemplateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.inspectTemplate != null && Object.hasOwnProperty.call(message, "inspectTemplate")) + $root.google.privacy.dlp.v2.InspectTemplate.encode(message.inspectTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.templateId != null && Object.hasOwnProperty.call(message, "templateId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.templateId); + if (message.locationId != null && Object.hasOwnProperty.call(message, "locationId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.locationId); + return writer; + }; + + /** + * Encodes the specified CreateInspectTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CreateInspectTemplateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.ICreateInspectTemplateRequest} message CreateInspectTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateInspectTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateInspectTemplateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CreateInspectTemplateRequest} CreateInspectTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateInspectTemplateRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CreateInspectTemplateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.inspectTemplate = $root.google.privacy.dlp.v2.InspectTemplate.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.templateId = reader.string(); + break; + } + case 4: { + message.locationId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CreateInspectTemplateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CreateInspectTemplateRequest} CreateInspectTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateInspectTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateInspectTemplateRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateInspectTemplateRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) { + var error = $root.google.privacy.dlp.v2.InspectTemplate.verify(message.inspectTemplate, long + 1); + if (error) + return "inspectTemplate." + error; + } + if (message.templateId != null && message.hasOwnProperty("templateId")) + if (!$util.isString(message.templateId)) + return "templateId: string expected"; + if (message.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; + return null; + }; + + /** + * Creates a CreateInspectTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CreateInspectTemplateRequest} CreateInspectTemplateRequest + */ + CreateInspectTemplateRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CreateInspectTemplateRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CreateInspectTemplateRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.inspectTemplate != null) { + if (typeof object.inspectTemplate !== "object") + throw TypeError(".google.privacy.dlp.v2.CreateInspectTemplateRequest.inspectTemplate: object expected"); + message.inspectTemplate = $root.google.privacy.dlp.v2.InspectTemplate.fromObject(object.inspectTemplate, long + 1); + } + if (object.templateId != null) + message.templateId = String(object.templateId); + if (object.locationId != null) + message.locationId = String(object.locationId); + return message; + }; + + /** + * Creates a plain object from a CreateInspectTemplateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.CreateInspectTemplateRequest} message CreateInspectTemplateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateInspectTemplateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.inspectTemplate = null; + object.templateId = ""; + object.locationId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) + object.inspectTemplate = $root.google.privacy.dlp.v2.InspectTemplate.toObject(message.inspectTemplate, options); + if (message.templateId != null && message.hasOwnProperty("templateId")) + object.templateId = message.templateId; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; + return object; + }; + + /** + * Converts this CreateInspectTemplateRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @instance + * @returns {Object.} JSON object + */ + CreateInspectTemplateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateInspectTemplateRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CreateInspectTemplateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateInspectTemplateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CreateInspectTemplateRequest"; + }; + + return CreateInspectTemplateRequest; + })(); + + v2.UpdateInspectTemplateRequest = (function() { + + /** + * Properties of an UpdateInspectTemplateRequest. + * @memberof google.privacy.dlp.v2 + * @interface IUpdateInspectTemplateRequest + * @property {string|null} [name] UpdateInspectTemplateRequest name + * @property {google.privacy.dlp.v2.IInspectTemplate|null} [inspectTemplate] UpdateInspectTemplateRequest inspectTemplate + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateInspectTemplateRequest updateMask + */ + + /** + * Constructs a new UpdateInspectTemplateRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an UpdateInspectTemplateRequest. + * @implements IUpdateInspectTemplateRequest + * @constructor + * @param {google.privacy.dlp.v2.IUpdateInspectTemplateRequest=} [properties] Properties to set + */ + function UpdateInspectTemplateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateInspectTemplateRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @instance + */ + UpdateInspectTemplateRequest.prototype.name = ""; + + /** + * UpdateInspectTemplateRequest inspectTemplate. + * @member {google.privacy.dlp.v2.IInspectTemplate|null|undefined} inspectTemplate + * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @instance + */ + UpdateInspectTemplateRequest.prototype.inspectTemplate = null; + + /** + * UpdateInspectTemplateRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @instance + */ + UpdateInspectTemplateRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateInspectTemplateRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.IUpdateInspectTemplateRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.UpdateInspectTemplateRequest} UpdateInspectTemplateRequest instance + */ + UpdateInspectTemplateRequest.create = function create(properties) { + return new UpdateInspectTemplateRequest(properties); + }; + + /** + * Encodes the specified UpdateInspectTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.UpdateInspectTemplateRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.IUpdateInspectTemplateRequest} message UpdateInspectTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateInspectTemplateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inspectTemplate != null && Object.hasOwnProperty.call(message, "inspectTemplate")) + $root.google.privacy.dlp.v2.InspectTemplate.encode(message.inspectTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateInspectTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.UpdateInspectTemplateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.IUpdateInspectTemplateRequest} message UpdateInspectTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateInspectTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateInspectTemplateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.UpdateInspectTemplateRequest} UpdateInspectTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateInspectTemplateRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.UpdateInspectTemplateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inspectTemplate = $root.google.privacy.dlp.v2.InspectTemplate.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateInspectTemplateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.UpdateInspectTemplateRequest} UpdateInspectTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateInspectTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateInspectTemplateRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateInspectTemplateRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) { + var error = $root.google.privacy.dlp.v2.InspectTemplate.verify(message.inspectTemplate, long + 1); + if (error) + return "inspectTemplate." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateInspectTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.UpdateInspectTemplateRequest} UpdateInspectTemplateRequest + */ + UpdateInspectTemplateRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.UpdateInspectTemplateRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.UpdateInspectTemplateRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.inspectTemplate != null) { + if (typeof object.inspectTemplate !== "object") + throw TypeError(".google.privacy.dlp.v2.UpdateInspectTemplateRequest.inspectTemplate: object expected"); + message.inspectTemplate = $root.google.privacy.dlp.v2.InspectTemplate.fromObject(object.inspectTemplate, long + 1); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.privacy.dlp.v2.UpdateInspectTemplateRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an UpdateInspectTemplateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.UpdateInspectTemplateRequest} message UpdateInspectTemplateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateInspectTemplateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inspectTemplate = null; + object.updateMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inspectTemplate != null && message.hasOwnProperty("inspectTemplate")) + object.inspectTemplate = $root.google.privacy.dlp.v2.InspectTemplate.toObject(message.inspectTemplate, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateInspectTemplateRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateInspectTemplateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateInspectTemplateRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.UpdateInspectTemplateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateInspectTemplateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.UpdateInspectTemplateRequest"; + }; + + return UpdateInspectTemplateRequest; + })(); + + v2.GetInspectTemplateRequest = (function() { + + /** + * Properties of a GetInspectTemplateRequest. + * @memberof google.privacy.dlp.v2 + * @interface IGetInspectTemplateRequest + * @property {string|null} [name] GetInspectTemplateRequest name + */ + + /** + * Constructs a new GetInspectTemplateRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a GetInspectTemplateRequest. + * @implements IGetInspectTemplateRequest + * @constructor + * @param {google.privacy.dlp.v2.IGetInspectTemplateRequest=} [properties] Properties to set + */ + function GetInspectTemplateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetInspectTemplateRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @instance + */ + GetInspectTemplateRequest.prototype.name = ""; + + /** + * Creates a new GetInspectTemplateRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.IGetInspectTemplateRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.GetInspectTemplateRequest} GetInspectTemplateRequest instance + */ + GetInspectTemplateRequest.create = function create(properties) { + return new GetInspectTemplateRequest(properties); + }; + + /** + * Encodes the specified GetInspectTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetInspectTemplateRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.IGetInspectTemplateRequest} message GetInspectTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetInspectTemplateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetInspectTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetInspectTemplateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.IGetInspectTemplateRequest} message GetInspectTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetInspectTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetInspectTemplateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.GetInspectTemplateRequest} GetInspectTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetInspectTemplateRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.GetInspectTemplateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetInspectTemplateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.GetInspectTemplateRequest} GetInspectTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetInspectTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetInspectTemplateRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetInspectTemplateRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetInspectTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.GetInspectTemplateRequest} GetInspectTemplateRequest + */ + GetInspectTemplateRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.GetInspectTemplateRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.GetInspectTemplateRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetInspectTemplateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.GetInspectTemplateRequest} message GetInspectTemplateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetInspectTemplateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetInspectTemplateRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @instance + * @returns {Object.} JSON object + */ + GetInspectTemplateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetInspectTemplateRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.GetInspectTemplateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetInspectTemplateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.GetInspectTemplateRequest"; + }; + + return GetInspectTemplateRequest; + })(); + + v2.ListInspectTemplatesRequest = (function() { + + /** + * Properties of a ListInspectTemplatesRequest. + * @memberof google.privacy.dlp.v2 + * @interface IListInspectTemplatesRequest + * @property {string|null} [parent] ListInspectTemplatesRequest parent + * @property {string|null} [pageToken] ListInspectTemplatesRequest pageToken + * @property {number|null} [pageSize] ListInspectTemplatesRequest pageSize + * @property {string|null} [orderBy] ListInspectTemplatesRequest orderBy + * @property {string|null} [locationId] ListInspectTemplatesRequest locationId + */ + + /** + * Constructs a new ListInspectTemplatesRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListInspectTemplatesRequest. + * @implements IListInspectTemplatesRequest + * @constructor + * @param {google.privacy.dlp.v2.IListInspectTemplatesRequest=} [properties] Properties to set + */ + function ListInspectTemplatesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListInspectTemplatesRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @instance + */ + ListInspectTemplatesRequest.prototype.parent = ""; + + /** + * ListInspectTemplatesRequest pageToken. + * @member {string} pageToken + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @instance + */ + ListInspectTemplatesRequest.prototype.pageToken = ""; + + /** + * ListInspectTemplatesRequest pageSize. + * @member {number} pageSize + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @instance + */ + ListInspectTemplatesRequest.prototype.pageSize = 0; + + /** + * ListInspectTemplatesRequest orderBy. + * @member {string} orderBy + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @instance + */ + ListInspectTemplatesRequest.prototype.orderBy = ""; + + /** + * ListInspectTemplatesRequest locationId. + * @member {string} locationId + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @instance + */ + ListInspectTemplatesRequest.prototype.locationId = ""; + + /** + * Creates a new ListInspectTemplatesRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @static + * @param {google.privacy.dlp.v2.IListInspectTemplatesRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListInspectTemplatesRequest} ListInspectTemplatesRequest instance + */ + ListInspectTemplatesRequest.create = function create(properties) { + return new ListInspectTemplatesRequest(properties); + }; + + /** + * Encodes the specified ListInspectTemplatesRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListInspectTemplatesRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @static + * @param {google.privacy.dlp.v2.IListInspectTemplatesRequest} message ListInspectTemplatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInspectTemplatesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.locationId != null && Object.hasOwnProperty.call(message, "locationId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.locationId); + return writer; + }; + + /** + * Encodes the specified ListInspectTemplatesRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListInspectTemplatesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @static + * @param {google.privacy.dlp.v2.IListInspectTemplatesRequest} message ListInspectTemplatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInspectTemplatesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListInspectTemplatesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ListInspectTemplatesRequest} ListInspectTemplatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInspectTemplatesRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListInspectTemplatesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.locationId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListInspectTemplatesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListInspectTemplatesRequest} ListInspectTemplatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInspectTemplatesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListInspectTemplatesRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListInspectTemplatesRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; + return null; + }; + + /** + * Creates a ListInspectTemplatesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListInspectTemplatesRequest} ListInspectTemplatesRequest + */ + ListInspectTemplatesRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ListInspectTemplatesRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ListInspectTemplatesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.locationId != null) + message.locationId = String(object.locationId); + return message; + }; + + /** + * Creates a plain object from a ListInspectTemplatesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @static + * @param {google.privacy.dlp.v2.ListInspectTemplatesRequest} message ListInspectTemplatesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListInspectTemplatesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + object.orderBy = ""; + object.locationId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; + return object; + }; + + /** + * Converts this ListInspectTemplatesRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @instance + * @returns {Object.} JSON object + */ + ListInspectTemplatesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListInspectTemplatesRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ListInspectTemplatesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListInspectTemplatesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ListInspectTemplatesRequest"; + }; + + return ListInspectTemplatesRequest; + })(); + + v2.ListInspectTemplatesResponse = (function() { + + /** + * Properties of a ListInspectTemplatesResponse. + * @memberof google.privacy.dlp.v2 + * @interface IListInspectTemplatesResponse + * @property {Array.|null} [inspectTemplates] ListInspectTemplatesResponse inspectTemplates + * @property {string|null} [nextPageToken] ListInspectTemplatesResponse nextPageToken + */ + + /** + * Constructs a new ListInspectTemplatesResponse. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListInspectTemplatesResponse. + * @implements IListInspectTemplatesResponse + * @constructor + * @param {google.privacy.dlp.v2.IListInspectTemplatesResponse=} [properties] Properties to set + */ + function ListInspectTemplatesResponse(properties) { + this.inspectTemplates = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListInspectTemplatesResponse inspectTemplates. + * @member {Array.} inspectTemplates + * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @instance + */ + ListInspectTemplatesResponse.prototype.inspectTemplates = $util.emptyArray; + + /** + * ListInspectTemplatesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @instance + */ + ListInspectTemplatesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListInspectTemplatesResponse instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @static + * @param {google.privacy.dlp.v2.IListInspectTemplatesResponse=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListInspectTemplatesResponse} ListInspectTemplatesResponse instance + */ + ListInspectTemplatesResponse.create = function create(properties) { + return new ListInspectTemplatesResponse(properties); + }; + + /** + * Encodes the specified ListInspectTemplatesResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListInspectTemplatesResponse.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @static + * @param {google.privacy.dlp.v2.IListInspectTemplatesResponse} message ListInspectTemplatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInspectTemplatesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inspectTemplates != null && message.inspectTemplates.length) + for (var i = 0; i < message.inspectTemplates.length; ++i) + $root.google.privacy.dlp.v2.InspectTemplate.encode(message.inspectTemplates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListInspectTemplatesResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListInspectTemplatesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @static + * @param {google.privacy.dlp.v2.IListInspectTemplatesResponse} message ListInspectTemplatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListInspectTemplatesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListInspectTemplatesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ListInspectTemplatesResponse} ListInspectTemplatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInspectTemplatesResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListInspectTemplatesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.inspectTemplates && message.inspectTemplates.length)) + message.inspectTemplates = []; + message.inspectTemplates.push($root.google.privacy.dlp.v2.InspectTemplate.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListInspectTemplatesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListInspectTemplatesResponse} ListInspectTemplatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListInspectTemplatesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListInspectTemplatesResponse message. + * @function verify + * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListInspectTemplatesResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.inspectTemplates != null && message.hasOwnProperty("inspectTemplates")) { + if (!Array.isArray(message.inspectTemplates)) + return "inspectTemplates: array expected"; + for (var i = 0; i < message.inspectTemplates.length; ++i) { + var error = $root.google.privacy.dlp.v2.InspectTemplate.verify(message.inspectTemplates[i], long + 1); + if (error) + return "inspectTemplates." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListInspectTemplatesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListInspectTemplatesResponse} ListInspectTemplatesResponse + */ + ListInspectTemplatesResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ListInspectTemplatesResponse) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ListInspectTemplatesResponse(); + if (object.inspectTemplates) { + if (!Array.isArray(object.inspectTemplates)) + throw TypeError(".google.privacy.dlp.v2.ListInspectTemplatesResponse.inspectTemplates: array expected"); + message.inspectTemplates = []; + for (var i = 0; i < object.inspectTemplates.length; ++i) { + if (typeof object.inspectTemplates[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.ListInspectTemplatesResponse.inspectTemplates: object expected"); + message.inspectTemplates[i] = $root.google.privacy.dlp.v2.InspectTemplate.fromObject(object.inspectTemplates[i], long + 1); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListInspectTemplatesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @static + * @param {google.privacy.dlp.v2.ListInspectTemplatesResponse} message ListInspectTemplatesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListInspectTemplatesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.inspectTemplates = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.inspectTemplates && message.inspectTemplates.length) { + object.inspectTemplates = []; + for (var j = 0; j < message.inspectTemplates.length; ++j) + object.inspectTemplates[j] = $root.google.privacy.dlp.v2.InspectTemplate.toObject(message.inspectTemplates[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListInspectTemplatesResponse to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @instance + * @returns {Object.} JSON object + */ + ListInspectTemplatesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListInspectTemplatesResponse + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ListInspectTemplatesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListInspectTemplatesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ListInspectTemplatesResponse"; + }; + + return ListInspectTemplatesResponse; + })(); + + v2.DeleteInspectTemplateRequest = (function() { + + /** + * Properties of a DeleteInspectTemplateRequest. + * @memberof google.privacy.dlp.v2 + * @interface IDeleteInspectTemplateRequest + * @property {string|null} [name] DeleteInspectTemplateRequest name + */ + + /** + * Constructs a new DeleteInspectTemplateRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DeleteInspectTemplateRequest. + * @implements IDeleteInspectTemplateRequest + * @constructor + * @param {google.privacy.dlp.v2.IDeleteInspectTemplateRequest=} [properties] Properties to set + */ + function DeleteInspectTemplateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteInspectTemplateRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest + * @instance + */ + DeleteInspectTemplateRequest.prototype.name = ""; + + /** + * Creates a new DeleteInspectTemplateRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteInspectTemplateRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DeleteInspectTemplateRequest} DeleteInspectTemplateRequest instance + */ + DeleteInspectTemplateRequest.create = function create(properties) { + return new DeleteInspectTemplateRequest(properties); + }; + + /** + * Encodes the specified DeleteInspectTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteInspectTemplateRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteInspectTemplateRequest} message DeleteInspectTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteInspectTemplateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteInspectTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteInspectTemplateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteInspectTemplateRequest} message DeleteInspectTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteInspectTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteInspectTemplateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DeleteInspectTemplateRequest} DeleteInspectTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteInspectTemplateRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DeleteInspectTemplateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteInspectTemplateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DeleteInspectTemplateRequest} DeleteInspectTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteInspectTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteInspectTemplateRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteInspectTemplateRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteInspectTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DeleteInspectTemplateRequest} DeleteInspectTemplateRequest + */ + DeleteInspectTemplateRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DeleteInspectTemplateRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DeleteInspectTemplateRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteInspectTemplateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest + * @static + * @param {google.privacy.dlp.v2.DeleteInspectTemplateRequest} message DeleteInspectTemplateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteInspectTemplateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteInspectTemplateRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteInspectTemplateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteInspectTemplateRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DeleteInspectTemplateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteInspectTemplateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DeleteInspectTemplateRequest"; + }; + + return DeleteInspectTemplateRequest; + })(); + + v2.CreateJobTriggerRequest = (function() { + + /** + * Properties of a CreateJobTriggerRequest. + * @memberof google.privacy.dlp.v2 + * @interface ICreateJobTriggerRequest + * @property {string|null} [parent] CreateJobTriggerRequest parent + * @property {google.privacy.dlp.v2.IJobTrigger|null} [jobTrigger] CreateJobTriggerRequest jobTrigger + * @property {string|null} [triggerId] CreateJobTriggerRequest triggerId + * @property {string|null} [locationId] CreateJobTriggerRequest locationId + */ + + /** + * Constructs a new CreateJobTriggerRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CreateJobTriggerRequest. + * @implements ICreateJobTriggerRequest + * @constructor + * @param {google.privacy.dlp.v2.ICreateJobTriggerRequest=} [properties] Properties to set + */ + function CreateJobTriggerRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateJobTriggerRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @instance + */ + CreateJobTriggerRequest.prototype.parent = ""; + + /** + * CreateJobTriggerRequest jobTrigger. + * @member {google.privacy.dlp.v2.IJobTrigger|null|undefined} jobTrigger + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @instance + */ + CreateJobTriggerRequest.prototype.jobTrigger = null; + + /** + * CreateJobTriggerRequest triggerId. + * @member {string} triggerId + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @instance + */ + CreateJobTriggerRequest.prototype.triggerId = ""; + + /** + * CreateJobTriggerRequest locationId. + * @member {string} locationId + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @instance + */ + CreateJobTriggerRequest.prototype.locationId = ""; + + /** + * Creates a new CreateJobTriggerRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @static + * @param {google.privacy.dlp.v2.ICreateJobTriggerRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CreateJobTriggerRequest} CreateJobTriggerRequest instance + */ + CreateJobTriggerRequest.create = function create(properties) { + return new CreateJobTriggerRequest(properties); + }; + + /** + * Encodes the specified CreateJobTriggerRequest message. Does not implicitly {@link google.privacy.dlp.v2.CreateJobTriggerRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @static + * @param {google.privacy.dlp.v2.ICreateJobTriggerRequest} message CreateJobTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateJobTriggerRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.jobTrigger != null && Object.hasOwnProperty.call(message, "jobTrigger")) + $root.google.privacy.dlp.v2.JobTrigger.encode(message.jobTrigger, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.triggerId != null && Object.hasOwnProperty.call(message, "triggerId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.triggerId); + if (message.locationId != null && Object.hasOwnProperty.call(message, "locationId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.locationId); + return writer; + }; + + /** + * Encodes the specified CreateJobTriggerRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CreateJobTriggerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @static + * @param {google.privacy.dlp.v2.ICreateJobTriggerRequest} message CreateJobTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateJobTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateJobTriggerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CreateJobTriggerRequest} CreateJobTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateJobTriggerRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CreateJobTriggerRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.jobTrigger = $root.google.privacy.dlp.v2.JobTrigger.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.triggerId = reader.string(); + break; + } + case 4: { + message.locationId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CreateJobTriggerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CreateJobTriggerRequest} CreateJobTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateJobTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateJobTriggerRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateJobTriggerRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.jobTrigger != null && message.hasOwnProperty("jobTrigger")) { + var error = $root.google.privacy.dlp.v2.JobTrigger.verify(message.jobTrigger, long + 1); + if (error) + return "jobTrigger." + error; + } + if (message.triggerId != null && message.hasOwnProperty("triggerId")) + if (!$util.isString(message.triggerId)) + return "triggerId: string expected"; + if (message.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; + return null; + }; + + /** + * Creates a CreateJobTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CreateJobTriggerRequest} CreateJobTriggerRequest + */ + CreateJobTriggerRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CreateJobTriggerRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CreateJobTriggerRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.jobTrigger != null) { + if (typeof object.jobTrigger !== "object") + throw TypeError(".google.privacy.dlp.v2.CreateJobTriggerRequest.jobTrigger: object expected"); + message.jobTrigger = $root.google.privacy.dlp.v2.JobTrigger.fromObject(object.jobTrigger, long + 1); + } + if (object.triggerId != null) + message.triggerId = String(object.triggerId); + if (object.locationId != null) + message.locationId = String(object.locationId); + return message; + }; + + /** + * Creates a plain object from a CreateJobTriggerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @static + * @param {google.privacy.dlp.v2.CreateJobTriggerRequest} message CreateJobTriggerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateJobTriggerRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.jobTrigger = null; + object.triggerId = ""; + object.locationId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.jobTrigger != null && message.hasOwnProperty("jobTrigger")) + object.jobTrigger = $root.google.privacy.dlp.v2.JobTrigger.toObject(message.jobTrigger, options); + if (message.triggerId != null && message.hasOwnProperty("triggerId")) + object.triggerId = message.triggerId; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; + return object; + }; + + /** + * Converts this CreateJobTriggerRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @instance + * @returns {Object.} JSON object + */ + CreateJobTriggerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateJobTriggerRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CreateJobTriggerRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateJobTriggerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CreateJobTriggerRequest"; + }; + + return CreateJobTriggerRequest; + })(); + + v2.ActivateJobTriggerRequest = (function() { + + /** + * Properties of an ActivateJobTriggerRequest. + * @memberof google.privacy.dlp.v2 + * @interface IActivateJobTriggerRequest + * @property {string|null} [name] ActivateJobTriggerRequest name + */ + + /** + * Constructs a new ActivateJobTriggerRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an ActivateJobTriggerRequest. + * @implements IActivateJobTriggerRequest + * @constructor + * @param {google.privacy.dlp.v2.IActivateJobTriggerRequest=} [properties] Properties to set + */ + function ActivateJobTriggerRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ActivateJobTriggerRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest + * @instance + */ + ActivateJobTriggerRequest.prototype.name = ""; + + /** + * Creates a new ActivateJobTriggerRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest + * @static + * @param {google.privacy.dlp.v2.IActivateJobTriggerRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ActivateJobTriggerRequest} ActivateJobTriggerRequest instance + */ + ActivateJobTriggerRequest.create = function create(properties) { + return new ActivateJobTriggerRequest(properties); + }; + + /** + * Encodes the specified ActivateJobTriggerRequest message. Does not implicitly {@link google.privacy.dlp.v2.ActivateJobTriggerRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest + * @static + * @param {google.privacy.dlp.v2.IActivateJobTriggerRequest} message ActivateJobTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActivateJobTriggerRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified ActivateJobTriggerRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ActivateJobTriggerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest + * @static + * @param {google.privacy.dlp.v2.IActivateJobTriggerRequest} message ActivateJobTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ActivateJobTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ActivateJobTriggerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ActivateJobTriggerRequest} ActivateJobTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActivateJobTriggerRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ActivateJobTriggerRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an ActivateJobTriggerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ActivateJobTriggerRequest} ActivateJobTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ActivateJobTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ActivateJobTriggerRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ActivateJobTriggerRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates an ActivateJobTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ActivateJobTriggerRequest} ActivateJobTriggerRequest + */ + ActivateJobTriggerRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ActivateJobTriggerRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ActivateJobTriggerRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from an ActivateJobTriggerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest + * @static + * @param {google.privacy.dlp.v2.ActivateJobTriggerRequest} message ActivateJobTriggerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ActivateJobTriggerRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this ActivateJobTriggerRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest + * @instance + * @returns {Object.} JSON object + */ + ActivateJobTriggerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ActivateJobTriggerRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ActivateJobTriggerRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ActivateJobTriggerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ActivateJobTriggerRequest"; + }; + + return ActivateJobTriggerRequest; + })(); + + v2.UpdateJobTriggerRequest = (function() { + + /** + * Properties of an UpdateJobTriggerRequest. + * @memberof google.privacy.dlp.v2 + * @interface IUpdateJobTriggerRequest + * @property {string|null} [name] UpdateJobTriggerRequest name + * @property {google.privacy.dlp.v2.IJobTrigger|null} [jobTrigger] UpdateJobTriggerRequest jobTrigger + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateJobTriggerRequest updateMask + */ + + /** + * Constructs a new UpdateJobTriggerRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an UpdateJobTriggerRequest. + * @implements IUpdateJobTriggerRequest + * @constructor + * @param {google.privacy.dlp.v2.IUpdateJobTriggerRequest=} [properties] Properties to set + */ + function UpdateJobTriggerRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateJobTriggerRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest + * @instance + */ + UpdateJobTriggerRequest.prototype.name = ""; + + /** + * UpdateJobTriggerRequest jobTrigger. + * @member {google.privacy.dlp.v2.IJobTrigger|null|undefined} jobTrigger + * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest + * @instance + */ + UpdateJobTriggerRequest.prototype.jobTrigger = null; + + /** + * UpdateJobTriggerRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest + * @instance + */ + UpdateJobTriggerRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateJobTriggerRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest + * @static + * @param {google.privacy.dlp.v2.IUpdateJobTriggerRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.UpdateJobTriggerRequest} UpdateJobTriggerRequest instance + */ + UpdateJobTriggerRequest.create = function create(properties) { + return new UpdateJobTriggerRequest(properties); + }; + + /** + * Encodes the specified UpdateJobTriggerRequest message. Does not implicitly {@link google.privacy.dlp.v2.UpdateJobTriggerRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest + * @static + * @param {google.privacy.dlp.v2.IUpdateJobTriggerRequest} message UpdateJobTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateJobTriggerRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.jobTrigger != null && Object.hasOwnProperty.call(message, "jobTrigger")) + $root.google.privacy.dlp.v2.JobTrigger.encode(message.jobTrigger, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateJobTriggerRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.UpdateJobTriggerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest + * @static + * @param {google.privacy.dlp.v2.IUpdateJobTriggerRequest} message UpdateJobTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateJobTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateJobTriggerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.UpdateJobTriggerRequest} UpdateJobTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateJobTriggerRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.UpdateJobTriggerRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.jobTrigger = $root.google.privacy.dlp.v2.JobTrigger.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateJobTriggerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.UpdateJobTriggerRequest} UpdateJobTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateJobTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateJobTriggerRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateJobTriggerRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.jobTrigger != null && message.hasOwnProperty("jobTrigger")) { + var error = $root.google.privacy.dlp.v2.JobTrigger.verify(message.jobTrigger, long + 1); + if (error) + return "jobTrigger." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateJobTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.UpdateJobTriggerRequest} UpdateJobTriggerRequest + */ + UpdateJobTriggerRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.UpdateJobTriggerRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.UpdateJobTriggerRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.jobTrigger != null) { + if (typeof object.jobTrigger !== "object") + throw TypeError(".google.privacy.dlp.v2.UpdateJobTriggerRequest.jobTrigger: object expected"); + message.jobTrigger = $root.google.privacy.dlp.v2.JobTrigger.fromObject(object.jobTrigger, long + 1); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.privacy.dlp.v2.UpdateJobTriggerRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an UpdateJobTriggerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest + * @static + * @param {google.privacy.dlp.v2.UpdateJobTriggerRequest} message UpdateJobTriggerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateJobTriggerRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.jobTrigger = null; + object.updateMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.jobTrigger != null && message.hasOwnProperty("jobTrigger")) + object.jobTrigger = $root.google.privacy.dlp.v2.JobTrigger.toObject(message.jobTrigger, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateJobTriggerRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateJobTriggerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateJobTriggerRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.UpdateJobTriggerRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateJobTriggerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.UpdateJobTriggerRequest"; + }; + + return UpdateJobTriggerRequest; + })(); + + v2.GetJobTriggerRequest = (function() { + + /** + * Properties of a GetJobTriggerRequest. + * @memberof google.privacy.dlp.v2 + * @interface IGetJobTriggerRequest + * @property {string|null} [name] GetJobTriggerRequest name + */ + + /** + * Constructs a new GetJobTriggerRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a GetJobTriggerRequest. + * @implements IGetJobTriggerRequest + * @constructor + * @param {google.privacy.dlp.v2.IGetJobTriggerRequest=} [properties] Properties to set + */ + function GetJobTriggerRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetJobTriggerRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.GetJobTriggerRequest + * @instance + */ + GetJobTriggerRequest.prototype.name = ""; + + /** + * Creates a new GetJobTriggerRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.GetJobTriggerRequest + * @static + * @param {google.privacy.dlp.v2.IGetJobTriggerRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.GetJobTriggerRequest} GetJobTriggerRequest instance + */ + GetJobTriggerRequest.create = function create(properties) { + return new GetJobTriggerRequest(properties); + }; + + /** + * Encodes the specified GetJobTriggerRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetJobTriggerRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.GetJobTriggerRequest + * @static + * @param {google.privacy.dlp.v2.IGetJobTriggerRequest} message GetJobTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJobTriggerRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetJobTriggerRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetJobTriggerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.GetJobTriggerRequest + * @static + * @param {google.privacy.dlp.v2.IGetJobTriggerRequest} message GetJobTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetJobTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetJobTriggerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.GetJobTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.GetJobTriggerRequest} GetJobTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJobTriggerRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.GetJobTriggerRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetJobTriggerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.GetJobTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.GetJobTriggerRequest} GetJobTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetJobTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetJobTriggerRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.GetJobTriggerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetJobTriggerRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetJobTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.GetJobTriggerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.GetJobTriggerRequest} GetJobTriggerRequest + */ + GetJobTriggerRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.GetJobTriggerRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.GetJobTriggerRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetJobTriggerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.GetJobTriggerRequest + * @static + * @param {google.privacy.dlp.v2.GetJobTriggerRequest} message GetJobTriggerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetJobTriggerRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetJobTriggerRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.GetJobTriggerRequest + * @instance + * @returns {Object.} JSON object + */ + GetJobTriggerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetJobTriggerRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.GetJobTriggerRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetJobTriggerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.GetJobTriggerRequest"; + }; + + return GetJobTriggerRequest; + })(); + + v2.CreateDiscoveryConfigRequest = (function() { + + /** + * Properties of a CreateDiscoveryConfigRequest. + * @memberof google.privacy.dlp.v2 + * @interface ICreateDiscoveryConfigRequest + * @property {string|null} [parent] CreateDiscoveryConfigRequest parent + * @property {google.privacy.dlp.v2.IDiscoveryConfig|null} [discoveryConfig] CreateDiscoveryConfigRequest discoveryConfig + * @property {string|null} [configId] CreateDiscoveryConfigRequest configId + */ + + /** + * Constructs a new CreateDiscoveryConfigRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CreateDiscoveryConfigRequest. + * @implements ICreateDiscoveryConfigRequest + * @constructor + * @param {google.privacy.dlp.v2.ICreateDiscoveryConfigRequest=} [properties] Properties to set + */ + function CreateDiscoveryConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateDiscoveryConfigRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.CreateDiscoveryConfigRequest + * @instance + */ + CreateDiscoveryConfigRequest.prototype.parent = ""; + + /** + * CreateDiscoveryConfigRequest discoveryConfig. + * @member {google.privacy.dlp.v2.IDiscoveryConfig|null|undefined} discoveryConfig + * @memberof google.privacy.dlp.v2.CreateDiscoveryConfigRequest + * @instance + */ + CreateDiscoveryConfigRequest.prototype.discoveryConfig = null; + + /** + * CreateDiscoveryConfigRequest configId. + * @member {string} configId + * @memberof google.privacy.dlp.v2.CreateDiscoveryConfigRequest + * @instance + */ + CreateDiscoveryConfigRequest.prototype.configId = ""; + + /** + * Creates a new CreateDiscoveryConfigRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CreateDiscoveryConfigRequest + * @static + * @param {google.privacy.dlp.v2.ICreateDiscoveryConfigRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CreateDiscoveryConfigRequest} CreateDiscoveryConfigRequest instance + */ + CreateDiscoveryConfigRequest.create = function create(properties) { + return new CreateDiscoveryConfigRequest(properties); + }; + + /** + * Encodes the specified CreateDiscoveryConfigRequest message. Does not implicitly {@link google.privacy.dlp.v2.CreateDiscoveryConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CreateDiscoveryConfigRequest + * @static + * @param {google.privacy.dlp.v2.ICreateDiscoveryConfigRequest} message CreateDiscoveryConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDiscoveryConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.discoveryConfig != null && Object.hasOwnProperty.call(message, "discoveryConfig")) + $root.google.privacy.dlp.v2.DiscoveryConfig.encode(message.discoveryConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.configId != null && Object.hasOwnProperty.call(message, "configId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.configId); + return writer; + }; + + /** + * Encodes the specified CreateDiscoveryConfigRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CreateDiscoveryConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CreateDiscoveryConfigRequest + * @static + * @param {google.privacy.dlp.v2.ICreateDiscoveryConfigRequest} message CreateDiscoveryConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDiscoveryConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateDiscoveryConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CreateDiscoveryConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CreateDiscoveryConfigRequest} CreateDiscoveryConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDiscoveryConfigRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CreateDiscoveryConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.discoveryConfig = $root.google.privacy.dlp.v2.DiscoveryConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.configId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CreateDiscoveryConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CreateDiscoveryConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CreateDiscoveryConfigRequest} CreateDiscoveryConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDiscoveryConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateDiscoveryConfigRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.CreateDiscoveryConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateDiscoveryConfigRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.discoveryConfig != null && message.hasOwnProperty("discoveryConfig")) { + var error = $root.google.privacy.dlp.v2.DiscoveryConfig.verify(message.discoveryConfig, long + 1); + if (error) + return "discoveryConfig." + error; + } + if (message.configId != null && message.hasOwnProperty("configId")) + if (!$util.isString(message.configId)) + return "configId: string expected"; + return null; + }; + + /** + * Creates a CreateDiscoveryConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CreateDiscoveryConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CreateDiscoveryConfigRequest} CreateDiscoveryConfigRequest + */ + CreateDiscoveryConfigRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CreateDiscoveryConfigRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CreateDiscoveryConfigRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.discoveryConfig != null) { + if (typeof object.discoveryConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.CreateDiscoveryConfigRequest.discoveryConfig: object expected"); + message.discoveryConfig = $root.google.privacy.dlp.v2.DiscoveryConfig.fromObject(object.discoveryConfig, long + 1); + } + if (object.configId != null) + message.configId = String(object.configId); + return message; + }; + + /** + * Creates a plain object from a CreateDiscoveryConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CreateDiscoveryConfigRequest + * @static + * @param {google.privacy.dlp.v2.CreateDiscoveryConfigRequest} message CreateDiscoveryConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDiscoveryConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.discoveryConfig = null; + object.configId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.discoveryConfig != null && message.hasOwnProperty("discoveryConfig")) + object.discoveryConfig = $root.google.privacy.dlp.v2.DiscoveryConfig.toObject(message.discoveryConfig, options); + if (message.configId != null && message.hasOwnProperty("configId")) + object.configId = message.configId; + return object; + }; + + /** + * Converts this CreateDiscoveryConfigRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CreateDiscoveryConfigRequest + * @instance + * @returns {Object.} JSON object + */ + CreateDiscoveryConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateDiscoveryConfigRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CreateDiscoveryConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDiscoveryConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CreateDiscoveryConfigRequest"; + }; + + return CreateDiscoveryConfigRequest; + })(); + + v2.UpdateDiscoveryConfigRequest = (function() { + + /** + * Properties of an UpdateDiscoveryConfigRequest. + * @memberof google.privacy.dlp.v2 + * @interface IUpdateDiscoveryConfigRequest + * @property {string|null} [name] UpdateDiscoveryConfigRequest name + * @property {google.privacy.dlp.v2.IDiscoveryConfig|null} [discoveryConfig] UpdateDiscoveryConfigRequest discoveryConfig + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDiscoveryConfigRequest updateMask + */ + + /** + * Constructs a new UpdateDiscoveryConfigRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an UpdateDiscoveryConfigRequest. + * @implements IUpdateDiscoveryConfigRequest + * @constructor + * @param {google.privacy.dlp.v2.IUpdateDiscoveryConfigRequest=} [properties] Properties to set + */ + function UpdateDiscoveryConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateDiscoveryConfigRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.UpdateDiscoveryConfigRequest + * @instance + */ + UpdateDiscoveryConfigRequest.prototype.name = ""; + + /** + * UpdateDiscoveryConfigRequest discoveryConfig. + * @member {google.privacy.dlp.v2.IDiscoveryConfig|null|undefined} discoveryConfig + * @memberof google.privacy.dlp.v2.UpdateDiscoveryConfigRequest + * @instance + */ + UpdateDiscoveryConfigRequest.prototype.discoveryConfig = null; + + /** + * UpdateDiscoveryConfigRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.privacy.dlp.v2.UpdateDiscoveryConfigRequest + * @instance + */ + UpdateDiscoveryConfigRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateDiscoveryConfigRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.UpdateDiscoveryConfigRequest + * @static + * @param {google.privacy.dlp.v2.IUpdateDiscoveryConfigRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.UpdateDiscoveryConfigRequest} UpdateDiscoveryConfigRequest instance + */ + UpdateDiscoveryConfigRequest.create = function create(properties) { + return new UpdateDiscoveryConfigRequest(properties); + }; + + /** + * Encodes the specified UpdateDiscoveryConfigRequest message. Does not implicitly {@link google.privacy.dlp.v2.UpdateDiscoveryConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.UpdateDiscoveryConfigRequest + * @static + * @param {google.privacy.dlp.v2.IUpdateDiscoveryConfigRequest} message UpdateDiscoveryConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDiscoveryConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.discoveryConfig != null && Object.hasOwnProperty.call(message, "discoveryConfig")) + $root.google.privacy.dlp.v2.DiscoveryConfig.encode(message.discoveryConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateDiscoveryConfigRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.UpdateDiscoveryConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.UpdateDiscoveryConfigRequest + * @static + * @param {google.privacy.dlp.v2.IUpdateDiscoveryConfigRequest} message UpdateDiscoveryConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDiscoveryConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDiscoveryConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.UpdateDiscoveryConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.UpdateDiscoveryConfigRequest} UpdateDiscoveryConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDiscoveryConfigRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.UpdateDiscoveryConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.discoveryConfig = $root.google.privacy.dlp.v2.DiscoveryConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateDiscoveryConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.UpdateDiscoveryConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.UpdateDiscoveryConfigRequest} UpdateDiscoveryConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDiscoveryConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDiscoveryConfigRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.UpdateDiscoveryConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDiscoveryConfigRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.discoveryConfig != null && message.hasOwnProperty("discoveryConfig")) { + var error = $root.google.privacy.dlp.v2.DiscoveryConfig.verify(message.discoveryConfig, long + 1); + if (error) + return "discoveryConfig." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateDiscoveryConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.UpdateDiscoveryConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.UpdateDiscoveryConfigRequest} UpdateDiscoveryConfigRequest + */ + UpdateDiscoveryConfigRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.UpdateDiscoveryConfigRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.UpdateDiscoveryConfigRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.discoveryConfig != null) { + if (typeof object.discoveryConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.UpdateDiscoveryConfigRequest.discoveryConfig: object expected"); + message.discoveryConfig = $root.google.privacy.dlp.v2.DiscoveryConfig.fromObject(object.discoveryConfig, long + 1); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.privacy.dlp.v2.UpdateDiscoveryConfigRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an UpdateDiscoveryConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.UpdateDiscoveryConfigRequest + * @static + * @param {google.privacy.dlp.v2.UpdateDiscoveryConfigRequest} message UpdateDiscoveryConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDiscoveryConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.discoveryConfig = null; + object.updateMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.discoveryConfig != null && message.hasOwnProperty("discoveryConfig")) + object.discoveryConfig = $root.google.privacy.dlp.v2.DiscoveryConfig.toObject(message.discoveryConfig, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateDiscoveryConfigRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.UpdateDiscoveryConfigRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDiscoveryConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateDiscoveryConfigRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.UpdateDiscoveryConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDiscoveryConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.UpdateDiscoveryConfigRequest"; + }; + + return UpdateDiscoveryConfigRequest; + })(); + + v2.GetDiscoveryConfigRequest = (function() { + + /** + * Properties of a GetDiscoveryConfigRequest. + * @memberof google.privacy.dlp.v2 + * @interface IGetDiscoveryConfigRequest + * @property {string|null} [name] GetDiscoveryConfigRequest name + */ + + /** + * Constructs a new GetDiscoveryConfigRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a GetDiscoveryConfigRequest. + * @implements IGetDiscoveryConfigRequest + * @constructor + * @param {google.privacy.dlp.v2.IGetDiscoveryConfigRequest=} [properties] Properties to set + */ + function GetDiscoveryConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDiscoveryConfigRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.GetDiscoveryConfigRequest + * @instance + */ + GetDiscoveryConfigRequest.prototype.name = ""; + + /** + * Creates a new GetDiscoveryConfigRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.GetDiscoveryConfigRequest + * @static + * @param {google.privacy.dlp.v2.IGetDiscoveryConfigRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.GetDiscoveryConfigRequest} GetDiscoveryConfigRequest instance + */ + GetDiscoveryConfigRequest.create = function create(properties) { + return new GetDiscoveryConfigRequest(properties); + }; + + /** + * Encodes the specified GetDiscoveryConfigRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetDiscoveryConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.GetDiscoveryConfigRequest + * @static + * @param {google.privacy.dlp.v2.IGetDiscoveryConfigRequest} message GetDiscoveryConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDiscoveryConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetDiscoveryConfigRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetDiscoveryConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.GetDiscoveryConfigRequest + * @static + * @param {google.privacy.dlp.v2.IGetDiscoveryConfigRequest} message GetDiscoveryConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDiscoveryConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDiscoveryConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.GetDiscoveryConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.GetDiscoveryConfigRequest} GetDiscoveryConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDiscoveryConfigRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.GetDiscoveryConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetDiscoveryConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.GetDiscoveryConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.GetDiscoveryConfigRequest} GetDiscoveryConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDiscoveryConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDiscoveryConfigRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.GetDiscoveryConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDiscoveryConfigRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetDiscoveryConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.GetDiscoveryConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.GetDiscoveryConfigRequest} GetDiscoveryConfigRequest + */ + GetDiscoveryConfigRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.GetDiscoveryConfigRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.GetDiscoveryConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDiscoveryConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.GetDiscoveryConfigRequest + * @static + * @param {google.privacy.dlp.v2.GetDiscoveryConfigRequest} message GetDiscoveryConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDiscoveryConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetDiscoveryConfigRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.GetDiscoveryConfigRequest + * @instance + * @returns {Object.} JSON object + */ + GetDiscoveryConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDiscoveryConfigRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.GetDiscoveryConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDiscoveryConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.GetDiscoveryConfigRequest"; + }; + + return GetDiscoveryConfigRequest; + })(); + + v2.ListDiscoveryConfigsRequest = (function() { + + /** + * Properties of a ListDiscoveryConfigsRequest. + * @memberof google.privacy.dlp.v2 + * @interface IListDiscoveryConfigsRequest + * @property {string|null} [parent] ListDiscoveryConfigsRequest parent + * @property {string|null} [pageToken] ListDiscoveryConfigsRequest pageToken + * @property {number|null} [pageSize] ListDiscoveryConfigsRequest pageSize + * @property {string|null} [orderBy] ListDiscoveryConfigsRequest orderBy + */ + + /** + * Constructs a new ListDiscoveryConfigsRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListDiscoveryConfigsRequest. + * @implements IListDiscoveryConfigsRequest + * @constructor + * @param {google.privacy.dlp.v2.IListDiscoveryConfigsRequest=} [properties] Properties to set + */ + function ListDiscoveryConfigsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDiscoveryConfigsRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsRequest + * @instance + */ + ListDiscoveryConfigsRequest.prototype.parent = ""; + + /** + * ListDiscoveryConfigsRequest pageToken. + * @member {string} pageToken + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsRequest + * @instance + */ + ListDiscoveryConfigsRequest.prototype.pageToken = ""; + + /** + * ListDiscoveryConfigsRequest pageSize. + * @member {number} pageSize + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsRequest + * @instance + */ + ListDiscoveryConfigsRequest.prototype.pageSize = 0; + + /** + * ListDiscoveryConfigsRequest orderBy. + * @member {string} orderBy + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsRequest + * @instance + */ + ListDiscoveryConfigsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListDiscoveryConfigsRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsRequest + * @static + * @param {google.privacy.dlp.v2.IListDiscoveryConfigsRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListDiscoveryConfigsRequest} ListDiscoveryConfigsRequest instance + */ + ListDiscoveryConfigsRequest.create = function create(properties) { + return new ListDiscoveryConfigsRequest(properties); + }; + + /** + * Encodes the specified ListDiscoveryConfigsRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListDiscoveryConfigsRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsRequest + * @static + * @param {google.privacy.dlp.v2.IListDiscoveryConfigsRequest} message ListDiscoveryConfigsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDiscoveryConfigsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListDiscoveryConfigsRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListDiscoveryConfigsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsRequest + * @static + * @param {google.privacy.dlp.v2.IListDiscoveryConfigsRequest} message ListDiscoveryConfigsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDiscoveryConfigsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDiscoveryConfigsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ListDiscoveryConfigsRequest} ListDiscoveryConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDiscoveryConfigsRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListDiscoveryConfigsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListDiscoveryConfigsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListDiscoveryConfigsRequest} ListDiscoveryConfigsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDiscoveryConfigsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDiscoveryConfigsRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDiscoveryConfigsRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListDiscoveryConfigsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListDiscoveryConfigsRequest} ListDiscoveryConfigsRequest + */ + ListDiscoveryConfigsRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ListDiscoveryConfigsRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ListDiscoveryConfigsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListDiscoveryConfigsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsRequest + * @static + * @param {google.privacy.dlp.v2.ListDiscoveryConfigsRequest} message ListDiscoveryConfigsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDiscoveryConfigsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListDiscoveryConfigsRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsRequest + * @instance + * @returns {Object.} JSON object + */ + ListDiscoveryConfigsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDiscoveryConfigsRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDiscoveryConfigsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ListDiscoveryConfigsRequest"; + }; + + return ListDiscoveryConfigsRequest; + })(); + + v2.ListDiscoveryConfigsResponse = (function() { + + /** + * Properties of a ListDiscoveryConfigsResponse. + * @memberof google.privacy.dlp.v2 + * @interface IListDiscoveryConfigsResponse + * @property {Array.|null} [discoveryConfigs] ListDiscoveryConfigsResponse discoveryConfigs + * @property {string|null} [nextPageToken] ListDiscoveryConfigsResponse nextPageToken + */ + + /** + * Constructs a new ListDiscoveryConfigsResponse. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListDiscoveryConfigsResponse. + * @implements IListDiscoveryConfigsResponse + * @constructor + * @param {google.privacy.dlp.v2.IListDiscoveryConfigsResponse=} [properties] Properties to set + */ + function ListDiscoveryConfigsResponse(properties) { + this.discoveryConfigs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDiscoveryConfigsResponse discoveryConfigs. + * @member {Array.} discoveryConfigs + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsResponse + * @instance + */ + ListDiscoveryConfigsResponse.prototype.discoveryConfigs = $util.emptyArray; + + /** + * ListDiscoveryConfigsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsResponse + * @instance + */ + ListDiscoveryConfigsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListDiscoveryConfigsResponse instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsResponse + * @static + * @param {google.privacy.dlp.v2.IListDiscoveryConfigsResponse=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListDiscoveryConfigsResponse} ListDiscoveryConfigsResponse instance + */ + ListDiscoveryConfigsResponse.create = function create(properties) { + return new ListDiscoveryConfigsResponse(properties); + }; + + /** + * Encodes the specified ListDiscoveryConfigsResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListDiscoveryConfigsResponse.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsResponse + * @static + * @param {google.privacy.dlp.v2.IListDiscoveryConfigsResponse} message ListDiscoveryConfigsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDiscoveryConfigsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.discoveryConfigs != null && message.discoveryConfigs.length) + for (var i = 0; i < message.discoveryConfigs.length; ++i) + $root.google.privacy.dlp.v2.DiscoveryConfig.encode(message.discoveryConfigs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListDiscoveryConfigsResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListDiscoveryConfigsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsResponse + * @static + * @param {google.privacy.dlp.v2.IListDiscoveryConfigsResponse} message ListDiscoveryConfigsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDiscoveryConfigsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDiscoveryConfigsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ListDiscoveryConfigsResponse} ListDiscoveryConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDiscoveryConfigsResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListDiscoveryConfigsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.discoveryConfigs && message.discoveryConfigs.length)) + message.discoveryConfigs = []; + message.discoveryConfigs.push($root.google.privacy.dlp.v2.DiscoveryConfig.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListDiscoveryConfigsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListDiscoveryConfigsResponse} ListDiscoveryConfigsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDiscoveryConfigsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDiscoveryConfigsResponse message. + * @function verify + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDiscoveryConfigsResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.discoveryConfigs != null && message.hasOwnProperty("discoveryConfigs")) { + if (!Array.isArray(message.discoveryConfigs)) + return "discoveryConfigs: array expected"; + for (var i = 0; i < message.discoveryConfigs.length; ++i) { + var error = $root.google.privacy.dlp.v2.DiscoveryConfig.verify(message.discoveryConfigs[i], long + 1); + if (error) + return "discoveryConfigs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListDiscoveryConfigsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListDiscoveryConfigsResponse} ListDiscoveryConfigsResponse + */ + ListDiscoveryConfigsResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ListDiscoveryConfigsResponse) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ListDiscoveryConfigsResponse(); + if (object.discoveryConfigs) { + if (!Array.isArray(object.discoveryConfigs)) + throw TypeError(".google.privacy.dlp.v2.ListDiscoveryConfigsResponse.discoveryConfigs: array expected"); + message.discoveryConfigs = []; + for (var i = 0; i < object.discoveryConfigs.length; ++i) { + if (typeof object.discoveryConfigs[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.ListDiscoveryConfigsResponse.discoveryConfigs: object expected"); + message.discoveryConfigs[i] = $root.google.privacy.dlp.v2.DiscoveryConfig.fromObject(object.discoveryConfigs[i], long + 1); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListDiscoveryConfigsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsResponse + * @static + * @param {google.privacy.dlp.v2.ListDiscoveryConfigsResponse} message ListDiscoveryConfigsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDiscoveryConfigsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.discoveryConfigs = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.discoveryConfigs && message.discoveryConfigs.length) { + object.discoveryConfigs = []; + for (var j = 0; j < message.discoveryConfigs.length; ++j) + object.discoveryConfigs[j] = $root.google.privacy.dlp.v2.DiscoveryConfig.toObject(message.discoveryConfigs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListDiscoveryConfigsResponse to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsResponse + * @instance + * @returns {Object.} JSON object + */ + ListDiscoveryConfigsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDiscoveryConfigsResponse + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ListDiscoveryConfigsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDiscoveryConfigsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ListDiscoveryConfigsResponse"; + }; + + return ListDiscoveryConfigsResponse; + })(); + + v2.DeleteDiscoveryConfigRequest = (function() { + + /** + * Properties of a DeleteDiscoveryConfigRequest. + * @memberof google.privacy.dlp.v2 + * @interface IDeleteDiscoveryConfigRequest + * @property {string|null} [name] DeleteDiscoveryConfigRequest name + */ + + /** + * Constructs a new DeleteDiscoveryConfigRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DeleteDiscoveryConfigRequest. + * @implements IDeleteDiscoveryConfigRequest + * @constructor + * @param {google.privacy.dlp.v2.IDeleteDiscoveryConfigRequest=} [properties] Properties to set + */ + function DeleteDiscoveryConfigRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteDiscoveryConfigRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.DeleteDiscoveryConfigRequest + * @instance + */ + DeleteDiscoveryConfigRequest.prototype.name = ""; + + /** + * Creates a new DeleteDiscoveryConfigRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DeleteDiscoveryConfigRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteDiscoveryConfigRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DeleteDiscoveryConfigRequest} DeleteDiscoveryConfigRequest instance + */ + DeleteDiscoveryConfigRequest.create = function create(properties) { + return new DeleteDiscoveryConfigRequest(properties); + }; + + /** + * Encodes the specified DeleteDiscoveryConfigRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteDiscoveryConfigRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DeleteDiscoveryConfigRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteDiscoveryConfigRequest} message DeleteDiscoveryConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDiscoveryConfigRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteDiscoveryConfigRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteDiscoveryConfigRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DeleteDiscoveryConfigRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteDiscoveryConfigRequest} message DeleteDiscoveryConfigRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDiscoveryConfigRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteDiscoveryConfigRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DeleteDiscoveryConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DeleteDiscoveryConfigRequest} DeleteDiscoveryConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDiscoveryConfigRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DeleteDiscoveryConfigRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteDiscoveryConfigRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DeleteDiscoveryConfigRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DeleteDiscoveryConfigRequest} DeleteDiscoveryConfigRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDiscoveryConfigRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteDiscoveryConfigRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.DeleteDiscoveryConfigRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteDiscoveryConfigRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteDiscoveryConfigRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DeleteDiscoveryConfigRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DeleteDiscoveryConfigRequest} DeleteDiscoveryConfigRequest + */ + DeleteDiscoveryConfigRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DeleteDiscoveryConfigRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DeleteDiscoveryConfigRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteDiscoveryConfigRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DeleteDiscoveryConfigRequest + * @static + * @param {google.privacy.dlp.v2.DeleteDiscoveryConfigRequest} message DeleteDiscoveryConfigRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteDiscoveryConfigRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteDiscoveryConfigRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DeleteDiscoveryConfigRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteDiscoveryConfigRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteDiscoveryConfigRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DeleteDiscoveryConfigRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteDiscoveryConfigRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DeleteDiscoveryConfigRequest"; + }; + + return DeleteDiscoveryConfigRequest; + })(); + + v2.CreateDlpJobRequest = (function() { + + /** + * Properties of a CreateDlpJobRequest. + * @memberof google.privacy.dlp.v2 + * @interface ICreateDlpJobRequest + * @property {string|null} [parent] CreateDlpJobRequest parent + * @property {google.privacy.dlp.v2.IInspectJobConfig|null} [inspectJob] CreateDlpJobRequest inspectJob + * @property {google.privacy.dlp.v2.IRiskAnalysisJobConfig|null} [riskJob] CreateDlpJobRequest riskJob + * @property {string|null} [jobId] CreateDlpJobRequest jobId + * @property {string|null} [locationId] CreateDlpJobRequest locationId + */ + + /** + * Constructs a new CreateDlpJobRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CreateDlpJobRequest. + * @implements ICreateDlpJobRequest + * @constructor + * @param {google.privacy.dlp.v2.ICreateDlpJobRequest=} [properties] Properties to set + */ + function CreateDlpJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateDlpJobRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @instance + */ + CreateDlpJobRequest.prototype.parent = ""; + + /** + * CreateDlpJobRequest inspectJob. + * @member {google.privacy.dlp.v2.IInspectJobConfig|null|undefined} inspectJob + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @instance + */ + CreateDlpJobRequest.prototype.inspectJob = null; + + /** + * CreateDlpJobRequest riskJob. + * @member {google.privacy.dlp.v2.IRiskAnalysisJobConfig|null|undefined} riskJob + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @instance + */ + CreateDlpJobRequest.prototype.riskJob = null; + + /** + * CreateDlpJobRequest jobId. + * @member {string} jobId + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @instance + */ + CreateDlpJobRequest.prototype.jobId = ""; + + /** + * CreateDlpJobRequest locationId. + * @member {string} locationId + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @instance + */ + CreateDlpJobRequest.prototype.locationId = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CreateDlpJobRequest job. + * @member {"inspectJob"|"riskJob"|undefined} job + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @instance + */ + Object.defineProperty(CreateDlpJobRequest.prototype, "job", { + get: $util.oneOfGetter($oneOfFields = ["inspectJob", "riskJob"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CreateDlpJobRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.ICreateDlpJobRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CreateDlpJobRequest} CreateDlpJobRequest instance + */ + CreateDlpJobRequest.create = function create(properties) { + return new CreateDlpJobRequest(properties); + }; + + /** + * Encodes the specified CreateDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.CreateDlpJobRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.ICreateDlpJobRequest} message CreateDlpJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDlpJobRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.inspectJob != null && Object.hasOwnProperty.call(message, "inspectJob")) + $root.google.privacy.dlp.v2.InspectJobConfig.encode(message.inspectJob, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.riskJob != null && Object.hasOwnProperty.call(message, "riskJob")) + $root.google.privacy.dlp.v2.RiskAnalysisJobConfig.encode(message.riskJob, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.jobId != null && Object.hasOwnProperty.call(message, "jobId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.jobId); + if (message.locationId != null && Object.hasOwnProperty.call(message, "locationId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.locationId); + return writer; + }; + + /** + * Encodes the specified CreateDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CreateDlpJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.ICreateDlpJobRequest} message CreateDlpJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDlpJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateDlpJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CreateDlpJobRequest} CreateDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDlpJobRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CreateDlpJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.inspectJob = $root.google.privacy.dlp.v2.InspectJobConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.riskJob = $root.google.privacy.dlp.v2.RiskAnalysisJobConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.jobId = reader.string(); + break; + } + case 5: { + message.locationId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CreateDlpJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CreateDlpJobRequest} CreateDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDlpJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateDlpJobRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateDlpJobRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.inspectJob != null && message.hasOwnProperty("inspectJob")) { + properties.job = 1; + { + var error = $root.google.privacy.dlp.v2.InspectJobConfig.verify(message.inspectJob, long + 1); + if (error) + return "inspectJob." + error; + } + } + if (message.riskJob != null && message.hasOwnProperty("riskJob")) { + if (properties.job === 1) + return "job: multiple values"; + properties.job = 1; + { + var error = $root.google.privacy.dlp.v2.RiskAnalysisJobConfig.verify(message.riskJob, long + 1); + if (error) + return "riskJob." + error; + } + } + if (message.jobId != null && message.hasOwnProperty("jobId")) + if (!$util.isString(message.jobId)) + return "jobId: string expected"; + if (message.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; + return null; + }; + + /** + * Creates a CreateDlpJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CreateDlpJobRequest} CreateDlpJobRequest + */ + CreateDlpJobRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CreateDlpJobRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CreateDlpJobRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.inspectJob != null) { + if (typeof object.inspectJob !== "object") + throw TypeError(".google.privacy.dlp.v2.CreateDlpJobRequest.inspectJob: object expected"); + message.inspectJob = $root.google.privacy.dlp.v2.InspectJobConfig.fromObject(object.inspectJob, long + 1); + } + if (object.riskJob != null) { + if (typeof object.riskJob !== "object") + throw TypeError(".google.privacy.dlp.v2.CreateDlpJobRequest.riskJob: object expected"); + message.riskJob = $root.google.privacy.dlp.v2.RiskAnalysisJobConfig.fromObject(object.riskJob, long + 1); + } + if (object.jobId != null) + message.jobId = String(object.jobId); + if (object.locationId != null) + message.locationId = String(object.locationId); + return message; + }; + + /** + * Creates a plain object from a CreateDlpJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.CreateDlpJobRequest} message CreateDlpJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDlpJobRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.jobId = ""; + object.locationId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.inspectJob != null && message.hasOwnProperty("inspectJob")) { + object.inspectJob = $root.google.privacy.dlp.v2.InspectJobConfig.toObject(message.inspectJob, options); + if (options.oneofs) + object.job = "inspectJob"; + } + if (message.riskJob != null && message.hasOwnProperty("riskJob")) { + object.riskJob = $root.google.privacy.dlp.v2.RiskAnalysisJobConfig.toObject(message.riskJob, options); + if (options.oneofs) + object.job = "riskJob"; + } + if (message.jobId != null && message.hasOwnProperty("jobId")) + object.jobId = message.jobId; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; + return object; + }; + + /** + * Converts this CreateDlpJobRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @instance + * @returns {Object.} JSON object + */ + CreateDlpJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateDlpJobRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CreateDlpJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDlpJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CreateDlpJobRequest"; + }; + + return CreateDlpJobRequest; + })(); + + v2.ListJobTriggersRequest = (function() { + + /** + * Properties of a ListJobTriggersRequest. + * @memberof google.privacy.dlp.v2 + * @interface IListJobTriggersRequest + * @property {string|null} [parent] ListJobTriggersRequest parent + * @property {string|null} [pageToken] ListJobTriggersRequest pageToken + * @property {number|null} [pageSize] ListJobTriggersRequest pageSize + * @property {string|null} [orderBy] ListJobTriggersRequest orderBy + * @property {string|null} [filter] ListJobTriggersRequest filter + * @property {google.privacy.dlp.v2.DlpJobType|null} [type] ListJobTriggersRequest type + * @property {string|null} [locationId] ListJobTriggersRequest locationId + */ + + /** + * Constructs a new ListJobTriggersRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListJobTriggersRequest. + * @implements IListJobTriggersRequest + * @constructor + * @param {google.privacy.dlp.v2.IListJobTriggersRequest=} [properties] Properties to set + */ + function ListJobTriggersRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListJobTriggersRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @instance + */ + ListJobTriggersRequest.prototype.parent = ""; + + /** + * ListJobTriggersRequest pageToken. + * @member {string} pageToken + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @instance + */ + ListJobTriggersRequest.prototype.pageToken = ""; + + /** + * ListJobTriggersRequest pageSize. + * @member {number} pageSize + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @instance + */ + ListJobTriggersRequest.prototype.pageSize = 0; + + /** + * ListJobTriggersRequest orderBy. + * @member {string} orderBy + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @instance + */ + ListJobTriggersRequest.prototype.orderBy = ""; + + /** + * ListJobTriggersRequest filter. + * @member {string} filter + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @instance + */ + ListJobTriggersRequest.prototype.filter = ""; + + /** + * ListJobTriggersRequest type. + * @member {google.privacy.dlp.v2.DlpJobType} type + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @instance + */ + ListJobTriggersRequest.prototype.type = 0; + + /** + * ListJobTriggersRequest locationId. + * @member {string} locationId + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @instance + */ + ListJobTriggersRequest.prototype.locationId = ""; + + /** + * Creates a new ListJobTriggersRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @static + * @param {google.privacy.dlp.v2.IListJobTriggersRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListJobTriggersRequest} ListJobTriggersRequest instance + */ + ListJobTriggersRequest.create = function create(properties) { + return new ListJobTriggersRequest(properties); + }; + + /** + * Encodes the specified ListJobTriggersRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListJobTriggersRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @static + * @param {google.privacy.dlp.v2.IListJobTriggersRequest} message ListJobTriggersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobTriggersRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.type); + if (message.locationId != null && Object.hasOwnProperty.call(message, "locationId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.locationId); + return writer; + }; + + /** + * Encodes the specified ListJobTriggersRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListJobTriggersRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @static + * @param {google.privacy.dlp.v2.IListJobTriggersRequest} message ListJobTriggersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobTriggersRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListJobTriggersRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ListJobTriggersRequest} ListJobTriggersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobTriggersRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListJobTriggersRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + case 6: { + message.type = reader.int32(); + break; + } + case 7: { + message.locationId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListJobTriggersRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListJobTriggersRequest} ListJobTriggersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobTriggersRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListJobTriggersRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListJobTriggersRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; + return null; + }; + + /** + * Creates a ListJobTriggersRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListJobTriggersRequest} ListJobTriggersRequest + */ + ListJobTriggersRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ListJobTriggersRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ListJobTriggersRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "DLP_JOB_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "INSPECT_JOB": + case 1: + message.type = 1; + break; + case "RISK_ANALYSIS_JOB": + case 2: + message.type = 2; + break; + } + if (object.locationId != null) + message.locationId = String(object.locationId); + return message; + }; + + /** + * Creates a plain object from a ListJobTriggersRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @static + * @param {google.privacy.dlp.v2.ListJobTriggersRequest} message ListJobTriggersRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListJobTriggersRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + object.orderBy = ""; + object.filter = ""; + object.type = options.enums === String ? "DLP_JOB_TYPE_UNSPECIFIED" : 0; + object.locationId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.privacy.dlp.v2.DlpJobType[message.type] === undefined ? message.type : $root.google.privacy.dlp.v2.DlpJobType[message.type] : message.type; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; + return object; + }; + + /** + * Converts this ListJobTriggersRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @instance + * @returns {Object.} JSON object + */ + ListJobTriggersRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListJobTriggersRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ListJobTriggersRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListJobTriggersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ListJobTriggersRequest"; + }; + + return ListJobTriggersRequest; + })(); + + v2.ListJobTriggersResponse = (function() { + + /** + * Properties of a ListJobTriggersResponse. + * @memberof google.privacy.dlp.v2 + * @interface IListJobTriggersResponse + * @property {Array.|null} [jobTriggers] ListJobTriggersResponse jobTriggers + * @property {string|null} [nextPageToken] ListJobTriggersResponse nextPageToken + */ + + /** + * Constructs a new ListJobTriggersResponse. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListJobTriggersResponse. + * @implements IListJobTriggersResponse + * @constructor + * @param {google.privacy.dlp.v2.IListJobTriggersResponse=} [properties] Properties to set + */ + function ListJobTriggersResponse(properties) { + this.jobTriggers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListJobTriggersResponse jobTriggers. + * @member {Array.} jobTriggers + * @memberof google.privacy.dlp.v2.ListJobTriggersResponse + * @instance + */ + ListJobTriggersResponse.prototype.jobTriggers = $util.emptyArray; + + /** + * ListJobTriggersResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.privacy.dlp.v2.ListJobTriggersResponse + * @instance + */ + ListJobTriggersResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListJobTriggersResponse instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListJobTriggersResponse + * @static + * @param {google.privacy.dlp.v2.IListJobTriggersResponse=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListJobTriggersResponse} ListJobTriggersResponse instance + */ + ListJobTriggersResponse.create = function create(properties) { + return new ListJobTriggersResponse(properties); + }; + + /** + * Encodes the specified ListJobTriggersResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListJobTriggersResponse.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListJobTriggersResponse + * @static + * @param {google.privacy.dlp.v2.IListJobTriggersResponse} message ListJobTriggersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobTriggersResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.jobTriggers != null && message.jobTriggers.length) + for (var i = 0; i < message.jobTriggers.length; ++i) + $root.google.privacy.dlp.v2.JobTrigger.encode(message.jobTriggers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListJobTriggersResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListJobTriggersResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListJobTriggersResponse + * @static + * @param {google.privacy.dlp.v2.IListJobTriggersResponse} message ListJobTriggersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListJobTriggersResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListJobTriggersResponse message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListJobTriggersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ListJobTriggersResponse} ListJobTriggersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobTriggersResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListJobTriggersResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.jobTriggers && message.jobTriggers.length)) + message.jobTriggers = []; + message.jobTriggers.push($root.google.privacy.dlp.v2.JobTrigger.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListJobTriggersResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListJobTriggersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListJobTriggersResponse} ListJobTriggersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListJobTriggersResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListJobTriggersResponse message. + * @function verify + * @memberof google.privacy.dlp.v2.ListJobTriggersResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListJobTriggersResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.jobTriggers != null && message.hasOwnProperty("jobTriggers")) { + if (!Array.isArray(message.jobTriggers)) + return "jobTriggers: array expected"; + for (var i = 0; i < message.jobTriggers.length; ++i) { + var error = $root.google.privacy.dlp.v2.JobTrigger.verify(message.jobTriggers[i], long + 1); + if (error) + return "jobTriggers." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListJobTriggersResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListJobTriggersResponse + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListJobTriggersResponse} ListJobTriggersResponse + */ + ListJobTriggersResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ListJobTriggersResponse) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ListJobTriggersResponse(); + if (object.jobTriggers) { + if (!Array.isArray(object.jobTriggers)) + throw TypeError(".google.privacy.dlp.v2.ListJobTriggersResponse.jobTriggers: array expected"); + message.jobTriggers = []; + for (var i = 0; i < object.jobTriggers.length; ++i) { + if (typeof object.jobTriggers[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.ListJobTriggersResponse.jobTriggers: object expected"); + message.jobTriggers[i] = $root.google.privacy.dlp.v2.JobTrigger.fromObject(object.jobTriggers[i], long + 1); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListJobTriggersResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListJobTriggersResponse + * @static + * @param {google.privacy.dlp.v2.ListJobTriggersResponse} message ListJobTriggersResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListJobTriggersResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.jobTriggers = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.jobTriggers && message.jobTriggers.length) { + object.jobTriggers = []; + for (var j = 0; j < message.jobTriggers.length; ++j) + object.jobTriggers[j] = $root.google.privacy.dlp.v2.JobTrigger.toObject(message.jobTriggers[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListJobTriggersResponse to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListJobTriggersResponse + * @instance + * @returns {Object.} JSON object + */ + ListJobTriggersResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListJobTriggersResponse + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ListJobTriggersResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListJobTriggersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ListJobTriggersResponse"; + }; + + return ListJobTriggersResponse; + })(); + + v2.DeleteJobTriggerRequest = (function() { + + /** + * Properties of a DeleteJobTriggerRequest. + * @memberof google.privacy.dlp.v2 + * @interface IDeleteJobTriggerRequest + * @property {string|null} [name] DeleteJobTriggerRequest name + */ + + /** + * Constructs a new DeleteJobTriggerRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DeleteJobTriggerRequest. + * @implements IDeleteJobTriggerRequest + * @constructor + * @param {google.privacy.dlp.v2.IDeleteJobTriggerRequest=} [properties] Properties to set + */ + function DeleteJobTriggerRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteJobTriggerRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest + * @instance + */ + DeleteJobTriggerRequest.prototype.name = ""; + + /** + * Creates a new DeleteJobTriggerRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteJobTriggerRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DeleteJobTriggerRequest} DeleteJobTriggerRequest instance + */ + DeleteJobTriggerRequest.create = function create(properties) { + return new DeleteJobTriggerRequest(properties); + }; + + /** + * Encodes the specified DeleteJobTriggerRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteJobTriggerRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteJobTriggerRequest} message DeleteJobTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteJobTriggerRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteJobTriggerRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteJobTriggerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteJobTriggerRequest} message DeleteJobTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteJobTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteJobTriggerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DeleteJobTriggerRequest} DeleteJobTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteJobTriggerRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DeleteJobTriggerRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteJobTriggerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DeleteJobTriggerRequest} DeleteJobTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteJobTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteJobTriggerRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteJobTriggerRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteJobTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DeleteJobTriggerRequest} DeleteJobTriggerRequest + */ + DeleteJobTriggerRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DeleteJobTriggerRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DeleteJobTriggerRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteJobTriggerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest + * @static + * @param {google.privacy.dlp.v2.DeleteJobTriggerRequest} message DeleteJobTriggerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteJobTriggerRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteJobTriggerRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteJobTriggerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteJobTriggerRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DeleteJobTriggerRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteJobTriggerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DeleteJobTriggerRequest"; + }; + + return DeleteJobTriggerRequest; + })(); + + v2.InspectJobConfig = (function() { + + /** + * Properties of an InspectJobConfig. + * @memberof google.privacy.dlp.v2 + * @interface IInspectJobConfig + * @property {google.privacy.dlp.v2.IStorageConfig|null} [storageConfig] InspectJobConfig storageConfig + * @property {google.privacy.dlp.v2.IInspectConfig|null} [inspectConfig] InspectJobConfig inspectConfig + * @property {string|null} [inspectTemplateName] InspectJobConfig inspectTemplateName + * @property {Array.|null} [actions] InspectJobConfig actions + */ + + /** + * Constructs a new InspectJobConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an InspectJobConfig. + * @implements IInspectJobConfig + * @constructor + * @param {google.privacy.dlp.v2.IInspectJobConfig=} [properties] Properties to set + */ + function InspectJobConfig(properties) { + this.actions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * InspectJobConfig storageConfig. + * @member {google.privacy.dlp.v2.IStorageConfig|null|undefined} storageConfig + * @memberof google.privacy.dlp.v2.InspectJobConfig + * @instance + */ + InspectJobConfig.prototype.storageConfig = null; + + /** + * InspectJobConfig inspectConfig. + * @member {google.privacy.dlp.v2.IInspectConfig|null|undefined} inspectConfig + * @memberof google.privacy.dlp.v2.InspectJobConfig + * @instance + */ + InspectJobConfig.prototype.inspectConfig = null; + + /** + * InspectJobConfig inspectTemplateName. + * @member {string} inspectTemplateName + * @memberof google.privacy.dlp.v2.InspectJobConfig + * @instance + */ + InspectJobConfig.prototype.inspectTemplateName = ""; + + /** + * InspectJobConfig actions. + * @member {Array.} actions + * @memberof google.privacy.dlp.v2.InspectJobConfig + * @instance + */ + InspectJobConfig.prototype.actions = $util.emptyArray; + + /** + * Creates a new InspectJobConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.InspectJobConfig + * @static + * @param {google.privacy.dlp.v2.IInspectJobConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.InspectJobConfig} InspectJobConfig instance + */ + InspectJobConfig.create = function create(properties) { + return new InspectJobConfig(properties); + }; + + /** + * Encodes the specified InspectJobConfig message. Does not implicitly {@link google.privacy.dlp.v2.InspectJobConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.InspectJobConfig + * @static + * @param {google.privacy.dlp.v2.IInspectJobConfig} message InspectJobConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InspectJobConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.storageConfig != null && Object.hasOwnProperty.call(message, "storageConfig")) + $root.google.privacy.dlp.v2.StorageConfig.encode(message.storageConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.inspectConfig != null && Object.hasOwnProperty.call(message, "inspectConfig")) + $root.google.privacy.dlp.v2.InspectConfig.encode(message.inspectConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.inspectTemplateName != null && Object.hasOwnProperty.call(message, "inspectTemplateName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.inspectTemplateName); + if (message.actions != null && message.actions.length) + for (var i = 0; i < message.actions.length; ++i) + $root.google.privacy.dlp.v2.Action.encode(message.actions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified InspectJobConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InspectJobConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.InspectJobConfig + * @static + * @param {google.privacy.dlp.v2.IInspectJobConfig} message InspectJobConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InspectJobConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InspectJobConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.InspectJobConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.InspectJobConfig} InspectJobConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InspectJobConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.InspectJobConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.storageConfig = $root.google.privacy.dlp.v2.StorageConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.inspectTemplateName = reader.string(); + break; + } + case 4: { + if (!(message.actions && message.actions.length)) + message.actions = []; + message.actions.push($root.google.privacy.dlp.v2.Action.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an InspectJobConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.InspectJobConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.InspectJobConfig} InspectJobConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InspectJobConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InspectJobConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.InspectJobConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InspectJobConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.storageConfig != null && message.hasOwnProperty("storageConfig")) { + var error = $root.google.privacy.dlp.v2.StorageConfig.verify(message.storageConfig, long + 1); + if (error) + return "storageConfig." + error; + } + if (message.inspectConfig != null && message.hasOwnProperty("inspectConfig")) { + var error = $root.google.privacy.dlp.v2.InspectConfig.verify(message.inspectConfig, long + 1); + if (error) + return "inspectConfig." + error; + } + if (message.inspectTemplateName != null && message.hasOwnProperty("inspectTemplateName")) + if (!$util.isString(message.inspectTemplateName)) + return "inspectTemplateName: string expected"; + if (message.actions != null && message.hasOwnProperty("actions")) { + if (!Array.isArray(message.actions)) + return "actions: array expected"; + for (var i = 0; i < message.actions.length; ++i) { + var error = $root.google.privacy.dlp.v2.Action.verify(message.actions[i], long + 1); + if (error) + return "actions." + error; + } + } + return null; + }; + + /** + * Creates an InspectJobConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.InspectJobConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.InspectJobConfig} InspectJobConfig + */ + InspectJobConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.InspectJobConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.InspectJobConfig(); + if (object.storageConfig != null) { + if (typeof object.storageConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectJobConfig.storageConfig: object expected"); + message.storageConfig = $root.google.privacy.dlp.v2.StorageConfig.fromObject(object.storageConfig, long + 1); + } + if (object.inspectConfig != null) { + if (typeof object.inspectConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectJobConfig.inspectConfig: object expected"); + message.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.fromObject(object.inspectConfig, long + 1); + } + if (object.inspectTemplateName != null) + message.inspectTemplateName = String(object.inspectTemplateName); + if (object.actions) { + if (!Array.isArray(object.actions)) + throw TypeError(".google.privacy.dlp.v2.InspectJobConfig.actions: array expected"); + message.actions = []; + for (var i = 0; i < object.actions.length; ++i) { + if (typeof object.actions[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.InspectJobConfig.actions: object expected"); + message.actions[i] = $root.google.privacy.dlp.v2.Action.fromObject(object.actions[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from an InspectJobConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.InspectJobConfig + * @static + * @param {google.privacy.dlp.v2.InspectJobConfig} message InspectJobConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InspectJobConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.actions = []; + if (options.defaults) { + object.storageConfig = null; + object.inspectConfig = null; + object.inspectTemplateName = ""; + } + if (message.storageConfig != null && message.hasOwnProperty("storageConfig")) + object.storageConfig = $root.google.privacy.dlp.v2.StorageConfig.toObject(message.storageConfig, options); + if (message.inspectConfig != null && message.hasOwnProperty("inspectConfig")) + object.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.toObject(message.inspectConfig, options); + if (message.inspectTemplateName != null && message.hasOwnProperty("inspectTemplateName")) + object.inspectTemplateName = message.inspectTemplateName; + if (message.actions && message.actions.length) { + object.actions = []; + for (var j = 0; j < message.actions.length; ++j) + object.actions[j] = $root.google.privacy.dlp.v2.Action.toObject(message.actions[j], options); + } + return object; + }; + + /** + * Converts this InspectJobConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.InspectJobConfig + * @instance + * @returns {Object.} JSON object + */ + InspectJobConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InspectJobConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.InspectJobConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InspectJobConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.InspectJobConfig"; + }; + + return InspectJobConfig; + })(); + + /** + * ProfileGeneration enum. + * @name google.privacy.dlp.v2.ProfileGeneration + * @enum {number} + * @property {number} PROFILE_GENERATION_UNSPECIFIED=0 PROFILE_GENERATION_UNSPECIFIED value + * @property {number} PROFILE_GENERATION_NEW=1 PROFILE_GENERATION_NEW value + * @property {number} PROFILE_GENERATION_UPDATE=2 PROFILE_GENERATION_UPDATE value + */ + v2.ProfileGeneration = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROFILE_GENERATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROFILE_GENERATION_NEW"] = 1; + values[valuesById[2] = "PROFILE_GENERATION_UPDATE"] = 2; + return values; + })(); + + v2.DataProfileAction = (function() { + + /** + * Properties of a DataProfileAction. + * @memberof google.privacy.dlp.v2 + * @interface IDataProfileAction + * @property {google.privacy.dlp.v2.DataProfileAction.IExport|null} [exportData] DataProfileAction exportData + * @property {google.privacy.dlp.v2.DataProfileAction.IPubSubNotification|null} [pubSubNotification] DataProfileAction pubSubNotification + * @property {google.privacy.dlp.v2.DataProfileAction.IPublishToChronicle|null} [publishToChronicle] DataProfileAction publishToChronicle + * @property {google.privacy.dlp.v2.DataProfileAction.IPublishToSecurityCommandCenter|null} [publishToScc] DataProfileAction publishToScc + * @property {google.privacy.dlp.v2.DataProfileAction.ITagResources|null} [tagResources] DataProfileAction tagResources + * @property {google.privacy.dlp.v2.DataProfileAction.IPublishToDataplexCatalog|null} [publishToDataplexCatalog] DataProfileAction publishToDataplexCatalog + */ + + /** + * Constructs a new DataProfileAction. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DataProfileAction. + * @implements IDataProfileAction + * @constructor + * @param {google.privacy.dlp.v2.IDataProfileAction=} [properties] Properties to set + */ + function DataProfileAction(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataProfileAction exportData. + * @member {google.privacy.dlp.v2.DataProfileAction.IExport|null|undefined} exportData + * @memberof google.privacy.dlp.v2.DataProfileAction + * @instance + */ + DataProfileAction.prototype.exportData = null; + + /** + * DataProfileAction pubSubNotification. + * @member {google.privacy.dlp.v2.DataProfileAction.IPubSubNotification|null|undefined} pubSubNotification + * @memberof google.privacy.dlp.v2.DataProfileAction + * @instance + */ + DataProfileAction.prototype.pubSubNotification = null; + + /** + * DataProfileAction publishToChronicle. + * @member {google.privacy.dlp.v2.DataProfileAction.IPublishToChronicle|null|undefined} publishToChronicle + * @memberof google.privacy.dlp.v2.DataProfileAction + * @instance + */ + DataProfileAction.prototype.publishToChronicle = null; + + /** + * DataProfileAction publishToScc. + * @member {google.privacy.dlp.v2.DataProfileAction.IPublishToSecurityCommandCenter|null|undefined} publishToScc + * @memberof google.privacy.dlp.v2.DataProfileAction + * @instance + */ + DataProfileAction.prototype.publishToScc = null; + + /** + * DataProfileAction tagResources. + * @member {google.privacy.dlp.v2.DataProfileAction.ITagResources|null|undefined} tagResources + * @memberof google.privacy.dlp.v2.DataProfileAction + * @instance + */ + DataProfileAction.prototype.tagResources = null; + + /** + * DataProfileAction publishToDataplexCatalog. + * @member {google.privacy.dlp.v2.DataProfileAction.IPublishToDataplexCatalog|null|undefined} publishToDataplexCatalog + * @memberof google.privacy.dlp.v2.DataProfileAction + * @instance + */ + DataProfileAction.prototype.publishToDataplexCatalog = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataProfileAction action. + * @member {"exportData"|"pubSubNotification"|"publishToChronicle"|"publishToScc"|"tagResources"|"publishToDataplexCatalog"|undefined} action + * @memberof google.privacy.dlp.v2.DataProfileAction + * @instance + */ + Object.defineProperty(DataProfileAction.prototype, "action", { + get: $util.oneOfGetter($oneOfFields = ["exportData", "pubSubNotification", "publishToChronicle", "publishToScc", "tagResources", "publishToDataplexCatalog"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataProfileAction instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfileAction + * @static + * @param {google.privacy.dlp.v2.IDataProfileAction=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfileAction} DataProfileAction instance + */ + DataProfileAction.create = function create(properties) { + return new DataProfileAction(properties); + }; + + /** + * Encodes the specified DataProfileAction message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfileAction + * @static + * @param {google.privacy.dlp.v2.IDataProfileAction} message DataProfileAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileAction.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.exportData != null && Object.hasOwnProperty.call(message, "exportData")) + $root.google.privacy.dlp.v2.DataProfileAction.Export.encode(message.exportData, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pubSubNotification != null && Object.hasOwnProperty.call(message, "pubSubNotification")) + $root.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.encode(message.pubSubNotification, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.publishToChronicle != null && Object.hasOwnProperty.call(message, "publishToChronicle")) + $root.google.privacy.dlp.v2.DataProfileAction.PublishToChronicle.encode(message.publishToChronicle, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.publishToScc != null && Object.hasOwnProperty.call(message, "publishToScc")) + $root.google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter.encode(message.publishToScc, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.tagResources != null && Object.hasOwnProperty.call(message, "tagResources")) + $root.google.privacy.dlp.v2.DataProfileAction.TagResources.encode(message.tagResources, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.publishToDataplexCatalog != null && Object.hasOwnProperty.call(message, "publishToDataplexCatalog")) + $root.google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog.encode(message.publishToDataplexCatalog, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataProfileAction message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction + * @static + * @param {google.privacy.dlp.v2.IDataProfileAction} message DataProfileAction message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileAction.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataProfileAction message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfileAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfileAction} DataProfileAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileAction.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileAction(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.exportData = $root.google.privacy.dlp.v2.DataProfileAction.Export.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.pubSubNotification = $root.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.publishToChronicle = $root.google.privacy.dlp.v2.DataProfileAction.PublishToChronicle.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.publishToScc = $root.google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 8: { + message.tagResources = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 9: { + message.publishToDataplexCatalog = $root.google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DataProfileAction message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfileAction} DataProfileAction + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileAction.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataProfileAction message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfileAction + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataProfileAction.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.exportData != null && message.hasOwnProperty("exportData")) { + properties.action = 1; + { + var error = $root.google.privacy.dlp.v2.DataProfileAction.Export.verify(message.exportData, long + 1); + if (error) + return "exportData." + error; + } + } + if (message.pubSubNotification != null && message.hasOwnProperty("pubSubNotification")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.verify(message.pubSubNotification, long + 1); + if (error) + return "pubSubNotification." + error; + } + } + if (message.publishToChronicle != null && message.hasOwnProperty("publishToChronicle")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.privacy.dlp.v2.DataProfileAction.PublishToChronicle.verify(message.publishToChronicle, long + 1); + if (error) + return "publishToChronicle." + error; + } + } + if (message.publishToScc != null && message.hasOwnProperty("publishToScc")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter.verify(message.publishToScc, long + 1); + if (error) + return "publishToScc." + error; + } + } + if (message.tagResources != null && message.hasOwnProperty("tagResources")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.verify(message.tagResources, long + 1); + if (error) + return "tagResources." + error; + } + } + if (message.publishToDataplexCatalog != null && message.hasOwnProperty("publishToDataplexCatalog")) { + if (properties.action === 1) + return "action: multiple values"; + properties.action = 1; + { + var error = $root.google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog.verify(message.publishToDataplexCatalog, long + 1); + if (error) + return "publishToDataplexCatalog." + error; + } + } + return null; + }; + + /** + * Creates a DataProfileAction message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfileAction + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfileAction} DataProfileAction + */ + DataProfileAction.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfileAction) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DataProfileAction(); + if (object.exportData != null) { + if (typeof object.exportData !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileAction.exportData: object expected"); + message.exportData = $root.google.privacy.dlp.v2.DataProfileAction.Export.fromObject(object.exportData, long + 1); + } + if (object.pubSubNotification != null) { + if (typeof object.pubSubNotification !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileAction.pubSubNotification: object expected"); + message.pubSubNotification = $root.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.fromObject(object.pubSubNotification, long + 1); + } + if (object.publishToChronicle != null) { + if (typeof object.publishToChronicle !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileAction.publishToChronicle: object expected"); + message.publishToChronicle = $root.google.privacy.dlp.v2.DataProfileAction.PublishToChronicle.fromObject(object.publishToChronicle, long + 1); + } + if (object.publishToScc != null) { + if (typeof object.publishToScc !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileAction.publishToScc: object expected"); + message.publishToScc = $root.google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter.fromObject(object.publishToScc, long + 1); + } + if (object.tagResources != null) { + if (typeof object.tagResources !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileAction.tagResources: object expected"); + message.tagResources = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.fromObject(object.tagResources, long + 1); + } + if (object.publishToDataplexCatalog != null) { + if (typeof object.publishToDataplexCatalog !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileAction.publishToDataplexCatalog: object expected"); + message.publishToDataplexCatalog = $root.google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog.fromObject(object.publishToDataplexCatalog, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DataProfileAction message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfileAction + * @static + * @param {google.privacy.dlp.v2.DataProfileAction} message DataProfileAction + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataProfileAction.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.exportData != null && message.hasOwnProperty("exportData")) { + object.exportData = $root.google.privacy.dlp.v2.DataProfileAction.Export.toObject(message.exportData, options); + if (options.oneofs) + object.action = "exportData"; + } + if (message.pubSubNotification != null && message.hasOwnProperty("pubSubNotification")) { + object.pubSubNotification = $root.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.toObject(message.pubSubNotification, options); + if (options.oneofs) + object.action = "pubSubNotification"; + } + if (message.publishToChronicle != null && message.hasOwnProperty("publishToChronicle")) { + object.publishToChronicle = $root.google.privacy.dlp.v2.DataProfileAction.PublishToChronicle.toObject(message.publishToChronicle, options); + if (options.oneofs) + object.action = "publishToChronicle"; + } + if (message.publishToScc != null && message.hasOwnProperty("publishToScc")) { + object.publishToScc = $root.google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter.toObject(message.publishToScc, options); + if (options.oneofs) + object.action = "publishToScc"; + } + if (message.tagResources != null && message.hasOwnProperty("tagResources")) { + object.tagResources = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.toObject(message.tagResources, options); + if (options.oneofs) + object.action = "tagResources"; + } + if (message.publishToDataplexCatalog != null && message.hasOwnProperty("publishToDataplexCatalog")) { + object.publishToDataplexCatalog = $root.google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog.toObject(message.publishToDataplexCatalog, options); + if (options.oneofs) + object.action = "publishToDataplexCatalog"; + } + return object; + }; + + /** + * Converts this DataProfileAction to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfileAction + * @instance + * @returns {Object.} JSON object + */ + DataProfileAction.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataProfileAction + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfileAction + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataProfileAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileAction"; + }; + + DataProfileAction.Export = (function() { + + /** + * Properties of an Export. + * @memberof google.privacy.dlp.v2.DataProfileAction + * @interface IExport + * @property {google.privacy.dlp.v2.IBigQueryTable|null} [profileTable] Export profileTable + * @property {google.privacy.dlp.v2.IBigQueryTable|null} [sampleFindingsTable] Export sampleFindingsTable + */ + + /** + * Constructs a new Export. + * @memberof google.privacy.dlp.v2.DataProfileAction + * @classdesc Represents an Export. + * @implements IExport + * @constructor + * @param {google.privacy.dlp.v2.DataProfileAction.IExport=} [properties] Properties to set + */ + function Export(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Export profileTable. + * @member {google.privacy.dlp.v2.IBigQueryTable|null|undefined} profileTable + * @memberof google.privacy.dlp.v2.DataProfileAction.Export + * @instance + */ + Export.prototype.profileTable = null; + + /** + * Export sampleFindingsTable. + * @member {google.privacy.dlp.v2.IBigQueryTable|null|undefined} sampleFindingsTable + * @memberof google.privacy.dlp.v2.DataProfileAction.Export + * @instance + */ + Export.prototype.sampleFindingsTable = null; + + /** + * Creates a new Export instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfileAction.Export + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.IExport=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfileAction.Export} Export instance + */ + Export.create = function create(properties) { + return new Export(properties); + }; + + /** + * Encodes the specified Export message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.Export.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfileAction.Export + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.IExport} message Export message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Export.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.profileTable != null && Object.hasOwnProperty.call(message, "profileTable")) + $root.google.privacy.dlp.v2.BigQueryTable.encode(message.profileTable, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.sampleFindingsTable != null && Object.hasOwnProperty.call(message, "sampleFindingsTable")) + $root.google.privacy.dlp.v2.BigQueryTable.encode(message.sampleFindingsTable, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Export message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.Export.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction.Export + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.IExport} message Export message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Export.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Export message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfileAction.Export + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfileAction.Export} Export + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Export.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileAction.Export(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.profileTable = $root.google.privacy.dlp.v2.BigQueryTable.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.sampleFindingsTable = $root.google.privacy.dlp.v2.BigQueryTable.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Export message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction.Export + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfileAction.Export} Export + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Export.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Export message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfileAction.Export + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Export.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.profileTable != null && message.hasOwnProperty("profileTable")) { + var error = $root.google.privacy.dlp.v2.BigQueryTable.verify(message.profileTable, long + 1); + if (error) + return "profileTable." + error; + } + if (message.sampleFindingsTable != null && message.hasOwnProperty("sampleFindingsTable")) { + var error = $root.google.privacy.dlp.v2.BigQueryTable.verify(message.sampleFindingsTable, long + 1); + if (error) + return "sampleFindingsTable." + error; + } + return null; + }; + + /** + * Creates an Export message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfileAction.Export + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfileAction.Export} Export + */ + Export.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfileAction.Export) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DataProfileAction.Export(); + if (object.profileTable != null) { + if (typeof object.profileTable !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileAction.Export.profileTable: object expected"); + message.profileTable = $root.google.privacy.dlp.v2.BigQueryTable.fromObject(object.profileTable, long + 1); + } + if (object.sampleFindingsTable != null) { + if (typeof object.sampleFindingsTable !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileAction.Export.sampleFindingsTable: object expected"); + message.sampleFindingsTable = $root.google.privacy.dlp.v2.BigQueryTable.fromObject(object.sampleFindingsTable, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an Export message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfileAction.Export + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.Export} message Export + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Export.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.profileTable = null; + object.sampleFindingsTable = null; + } + if (message.profileTable != null && message.hasOwnProperty("profileTable")) + object.profileTable = $root.google.privacy.dlp.v2.BigQueryTable.toObject(message.profileTable, options); + if (message.sampleFindingsTable != null && message.hasOwnProperty("sampleFindingsTable")) + object.sampleFindingsTable = $root.google.privacy.dlp.v2.BigQueryTable.toObject(message.sampleFindingsTable, options); + return object; + }; + + /** + * Converts this Export to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfileAction.Export + * @instance + * @returns {Object.} JSON object + */ + Export.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Export + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfileAction.Export + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Export.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileAction.Export"; + }; + + return Export; + })(); + + DataProfileAction.PubSubNotification = (function() { + + /** + * Properties of a PubSubNotification. + * @memberof google.privacy.dlp.v2.DataProfileAction + * @interface IPubSubNotification + * @property {string|null} [topic] PubSubNotification topic + * @property {google.privacy.dlp.v2.DataProfileAction.EventType|null} [event] PubSubNotification event + * @property {google.privacy.dlp.v2.IDataProfilePubSubCondition|null} [pubsubCondition] PubSubNotification pubsubCondition + * @property {google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel|null} [detailOfMessage] PubSubNotification detailOfMessage + */ + + /** + * Constructs a new PubSubNotification. + * @memberof google.privacy.dlp.v2.DataProfileAction + * @classdesc Represents a PubSubNotification. + * @implements IPubSubNotification + * @constructor + * @param {google.privacy.dlp.v2.DataProfileAction.IPubSubNotification=} [properties] Properties to set + */ + function PubSubNotification(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * PubSubNotification topic. + * @member {string} topic + * @memberof google.privacy.dlp.v2.DataProfileAction.PubSubNotification + * @instance + */ + PubSubNotification.prototype.topic = ""; + + /** + * PubSubNotification event. + * @member {google.privacy.dlp.v2.DataProfileAction.EventType} event + * @memberof google.privacy.dlp.v2.DataProfileAction.PubSubNotification + * @instance + */ + PubSubNotification.prototype.event = 0; + + /** + * PubSubNotification pubsubCondition. + * @member {google.privacy.dlp.v2.IDataProfilePubSubCondition|null|undefined} pubsubCondition + * @memberof google.privacy.dlp.v2.DataProfileAction.PubSubNotification + * @instance + */ + PubSubNotification.prototype.pubsubCondition = null; + + /** + * PubSubNotification detailOfMessage. + * @member {google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel} detailOfMessage + * @memberof google.privacy.dlp.v2.DataProfileAction.PubSubNotification + * @instance + */ + PubSubNotification.prototype.detailOfMessage = 0; + + /** + * Creates a new PubSubNotification instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfileAction.PubSubNotification + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.IPubSubNotification=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfileAction.PubSubNotification} PubSubNotification instance + */ + PubSubNotification.create = function create(properties) { + return new PubSubNotification(properties); + }; + + /** + * Encodes the specified PubSubNotification message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PubSubNotification.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfileAction.PubSubNotification + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.IPubSubNotification} message PubSubNotification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubSubNotification.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.topic != null && Object.hasOwnProperty.call(message, "topic")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.topic); + if (message.event != null && Object.hasOwnProperty.call(message, "event")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.event); + if (message.pubsubCondition != null && Object.hasOwnProperty.call(message, "pubsubCondition")) + $root.google.privacy.dlp.v2.DataProfilePubSubCondition.encode(message.pubsubCondition, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.detailOfMessage != null && Object.hasOwnProperty.call(message, "detailOfMessage")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.detailOfMessage); + return writer; + }; + + /** + * Encodes the specified PubSubNotification message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PubSubNotification.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction.PubSubNotification + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.IPubSubNotification} message PubSubNotification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubSubNotification.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PubSubNotification message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfileAction.PubSubNotification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfileAction.PubSubNotification} PubSubNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubSubNotification.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileAction.PubSubNotification(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.topic = reader.string(); + break; + } + case 2: { + message.event = reader.int32(); + break; + } + case 3: { + message.pubsubCondition = $root.google.privacy.dlp.v2.DataProfilePubSubCondition.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.detailOfMessage = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PubSubNotification message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction.PubSubNotification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfileAction.PubSubNotification} PubSubNotification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubSubNotification.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PubSubNotification message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfileAction.PubSubNotification + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PubSubNotification.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.topic != null && message.hasOwnProperty("topic")) + if (!$util.isString(message.topic)) + return "topic: string expected"; + if (message.event != null && message.hasOwnProperty("event")) + switch (message.event) { + default: + return "event: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.pubsubCondition != null && message.hasOwnProperty("pubsubCondition")) { + var error = $root.google.privacy.dlp.v2.DataProfilePubSubCondition.verify(message.pubsubCondition, long + 1); + if (error) + return "pubsubCondition." + error; + } + if (message.detailOfMessage != null && message.hasOwnProperty("detailOfMessage")) + switch (message.detailOfMessage) { + default: + return "detailOfMessage: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + return null; + }; + + /** + * Creates a PubSubNotification message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfileAction.PubSubNotification + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfileAction.PubSubNotification} PubSubNotification + */ + PubSubNotification.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfileAction.PubSubNotification) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DataProfileAction.PubSubNotification(); + if (object.topic != null) + message.topic = String(object.topic); + switch (object.event) { + default: + if (typeof object.event === "number") { + message.event = object.event; + break; + } + break; + case "EVENT_TYPE_UNSPECIFIED": + case 0: + message.event = 0; + break; + case "NEW_PROFILE": + case 1: + message.event = 1; + break; + case "CHANGED_PROFILE": + case 2: + message.event = 2; + break; + case "SCORE_INCREASED": + case 3: + message.event = 3; + break; + case "ERROR_CHANGED": + case 4: + message.event = 4; + break; + } + if (object.pubsubCondition != null) { + if (typeof object.pubsubCondition !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileAction.PubSubNotification.pubsubCondition: object expected"); + message.pubsubCondition = $root.google.privacy.dlp.v2.DataProfilePubSubCondition.fromObject(object.pubsubCondition, long + 1); + } + switch (object.detailOfMessage) { + default: + if (typeof object.detailOfMessage === "number") { + message.detailOfMessage = object.detailOfMessage; + break; + } + break; + case "DETAIL_LEVEL_UNSPECIFIED": + case 0: + message.detailOfMessage = 0; + break; + case "TABLE_PROFILE": + case 1: + message.detailOfMessage = 1; + break; + case "RESOURCE_NAME": + case 2: + message.detailOfMessage = 2; + break; + case "FILE_STORE_PROFILE": + case 3: + message.detailOfMessage = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a PubSubNotification message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfileAction.PubSubNotification + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.PubSubNotification} message PubSubNotification + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PubSubNotification.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.topic = ""; + object.event = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; + object.pubsubCondition = null; + object.detailOfMessage = options.enums === String ? "DETAIL_LEVEL_UNSPECIFIED" : 0; + } + if (message.topic != null && message.hasOwnProperty("topic")) + object.topic = message.topic; + if (message.event != null && message.hasOwnProperty("event")) + object.event = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileAction.EventType[message.event] === undefined ? message.event : $root.google.privacy.dlp.v2.DataProfileAction.EventType[message.event] : message.event; + if (message.pubsubCondition != null && message.hasOwnProperty("pubsubCondition")) + object.pubsubCondition = $root.google.privacy.dlp.v2.DataProfilePubSubCondition.toObject(message.pubsubCondition, options); + if (message.detailOfMessage != null && message.hasOwnProperty("detailOfMessage")) + object.detailOfMessage = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel[message.detailOfMessage] === undefined ? message.detailOfMessage : $root.google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel[message.detailOfMessage] : message.detailOfMessage; + return object; + }; + + /** + * Converts this PubSubNotification to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfileAction.PubSubNotification + * @instance + * @returns {Object.} JSON object + */ + PubSubNotification.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PubSubNotification + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfileAction.PubSubNotification + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PubSubNotification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileAction.PubSubNotification"; + }; + + /** + * DetailLevel enum. + * @name google.privacy.dlp.v2.DataProfileAction.PubSubNotification.DetailLevel + * @enum {number} + * @property {number} DETAIL_LEVEL_UNSPECIFIED=0 DETAIL_LEVEL_UNSPECIFIED value + * @property {number} TABLE_PROFILE=1 TABLE_PROFILE value + * @property {number} RESOURCE_NAME=2 RESOURCE_NAME value + * @property {number} FILE_STORE_PROFILE=3 FILE_STORE_PROFILE value + */ + PubSubNotification.DetailLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DETAIL_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLE_PROFILE"] = 1; + values[valuesById[2] = "RESOURCE_NAME"] = 2; + values[valuesById[3] = "FILE_STORE_PROFILE"] = 3; + return values; + })(); + + return PubSubNotification; + })(); + + /** + * EventType enum. + * @name google.privacy.dlp.v2.DataProfileAction.EventType + * @enum {number} + * @property {number} EVENT_TYPE_UNSPECIFIED=0 EVENT_TYPE_UNSPECIFIED value + * @property {number} NEW_PROFILE=1 NEW_PROFILE value + * @property {number} CHANGED_PROFILE=2 CHANGED_PROFILE value + * @property {number} SCORE_INCREASED=3 SCORE_INCREASED value + * @property {number} ERROR_CHANGED=4 ERROR_CHANGED value + */ + DataProfileAction.EventType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVENT_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NEW_PROFILE"] = 1; + values[valuesById[2] = "CHANGED_PROFILE"] = 2; + values[valuesById[3] = "SCORE_INCREASED"] = 3; + values[valuesById[4] = "ERROR_CHANGED"] = 4; + return values; + })(); + + DataProfileAction.PublishToChronicle = (function() { + + /** + * Properties of a PublishToChronicle. + * @memberof google.privacy.dlp.v2.DataProfileAction + * @interface IPublishToChronicle + */ + + /** + * Constructs a new PublishToChronicle. + * @memberof google.privacy.dlp.v2.DataProfileAction + * @classdesc Represents a PublishToChronicle. + * @implements IPublishToChronicle + * @constructor + * @param {google.privacy.dlp.v2.DataProfileAction.IPublishToChronicle=} [properties] Properties to set + */ + function PublishToChronicle(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new PublishToChronicle instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToChronicle + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.IPublishToChronicle=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfileAction.PublishToChronicle} PublishToChronicle instance + */ + PublishToChronicle.create = function create(properties) { + return new PublishToChronicle(properties); + }; + + /** + * Encodes the specified PublishToChronicle message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PublishToChronicle.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToChronicle + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.IPublishToChronicle} message PublishToChronicle message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishToChronicle.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified PublishToChronicle message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PublishToChronicle.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToChronicle + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.IPublishToChronicle} message PublishToChronicle message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishToChronicle.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublishToChronicle message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToChronicle + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfileAction.PublishToChronicle} PublishToChronicle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishToChronicle.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileAction.PublishToChronicle(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PublishToChronicle message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToChronicle + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfileAction.PublishToChronicle} PublishToChronicle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishToChronicle.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublishToChronicle message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToChronicle + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublishToChronicle.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a PublishToChronicle message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToChronicle + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfileAction.PublishToChronicle} PublishToChronicle + */ + PublishToChronicle.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfileAction.PublishToChronicle) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.DataProfileAction.PublishToChronicle(); + }; + + /** + * Creates a plain object from a PublishToChronicle message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToChronicle + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.PublishToChronicle} message PublishToChronicle + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublishToChronicle.toObject = function toObject() { + return {}; + }; + + /** + * Converts this PublishToChronicle to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToChronicle + * @instance + * @returns {Object.} JSON object + */ + PublishToChronicle.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PublishToChronicle + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToChronicle + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublishToChronicle.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileAction.PublishToChronicle"; + }; + + return PublishToChronicle; + })(); + + DataProfileAction.PublishToSecurityCommandCenter = (function() { + + /** + * Properties of a PublishToSecurityCommandCenter. + * @memberof google.privacy.dlp.v2.DataProfileAction + * @interface IPublishToSecurityCommandCenter + */ + + /** + * Constructs a new PublishToSecurityCommandCenter. + * @memberof google.privacy.dlp.v2.DataProfileAction + * @classdesc Represents a PublishToSecurityCommandCenter. + * @implements IPublishToSecurityCommandCenter + * @constructor + * @param {google.privacy.dlp.v2.DataProfileAction.IPublishToSecurityCommandCenter=} [properties] Properties to set + */ + function PublishToSecurityCommandCenter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new PublishToSecurityCommandCenter instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.IPublishToSecurityCommandCenter=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter} PublishToSecurityCommandCenter instance + */ + PublishToSecurityCommandCenter.create = function create(properties) { + return new PublishToSecurityCommandCenter(properties); + }; + + /** + * Encodes the specified PublishToSecurityCommandCenter message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.IPublishToSecurityCommandCenter} message PublishToSecurityCommandCenter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishToSecurityCommandCenter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified PublishToSecurityCommandCenter message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.IPublishToSecurityCommandCenter} message PublishToSecurityCommandCenter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishToSecurityCommandCenter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublishToSecurityCommandCenter message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter} PublishToSecurityCommandCenter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishToSecurityCommandCenter.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PublishToSecurityCommandCenter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter} PublishToSecurityCommandCenter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishToSecurityCommandCenter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublishToSecurityCommandCenter message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublishToSecurityCommandCenter.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a PublishToSecurityCommandCenter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter} PublishToSecurityCommandCenter + */ + PublishToSecurityCommandCenter.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter(); + }; + + /** + * Creates a plain object from a PublishToSecurityCommandCenter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter} message PublishToSecurityCommandCenter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublishToSecurityCommandCenter.toObject = function toObject() { + return {}; + }; + + /** + * Converts this PublishToSecurityCommandCenter to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter + * @instance + * @returns {Object.} JSON object + */ + PublishToSecurityCommandCenter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PublishToSecurityCommandCenter + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublishToSecurityCommandCenter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileAction.PublishToSecurityCommandCenter"; + }; + + return PublishToSecurityCommandCenter; + })(); + + DataProfileAction.PublishToDataplexCatalog = (function() { + + /** + * Properties of a PublishToDataplexCatalog. + * @memberof google.privacy.dlp.v2.DataProfileAction + * @interface IPublishToDataplexCatalog + * @property {boolean|null} [lowerDataRiskToLow] PublishToDataplexCatalog lowerDataRiskToLow + */ + + /** + * Constructs a new PublishToDataplexCatalog. + * @memberof google.privacy.dlp.v2.DataProfileAction + * @classdesc Represents a PublishToDataplexCatalog. + * @implements IPublishToDataplexCatalog + * @constructor + * @param {google.privacy.dlp.v2.DataProfileAction.IPublishToDataplexCatalog=} [properties] Properties to set + */ + function PublishToDataplexCatalog(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * PublishToDataplexCatalog lowerDataRiskToLow. + * @member {boolean} lowerDataRiskToLow + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog + * @instance + */ + PublishToDataplexCatalog.prototype.lowerDataRiskToLow = false; + + /** + * Creates a new PublishToDataplexCatalog instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.IPublishToDataplexCatalog=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog} PublishToDataplexCatalog instance + */ + PublishToDataplexCatalog.create = function create(properties) { + return new PublishToDataplexCatalog(properties); + }; + + /** + * Encodes the specified PublishToDataplexCatalog message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.IPublishToDataplexCatalog} message PublishToDataplexCatalog message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishToDataplexCatalog.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lowerDataRiskToLow != null && Object.hasOwnProperty.call(message, "lowerDataRiskToLow")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.lowerDataRiskToLow); + return writer; + }; + + /** + * Encodes the specified PublishToDataplexCatalog message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.IPublishToDataplexCatalog} message PublishToDataplexCatalog message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PublishToDataplexCatalog.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PublishToDataplexCatalog message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog} PublishToDataplexCatalog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishToDataplexCatalog.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.lowerDataRiskToLow = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PublishToDataplexCatalog message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog} PublishToDataplexCatalog + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PublishToDataplexCatalog.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PublishToDataplexCatalog message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PublishToDataplexCatalog.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.lowerDataRiskToLow != null && message.hasOwnProperty("lowerDataRiskToLow")) + if (typeof message.lowerDataRiskToLow !== "boolean") + return "lowerDataRiskToLow: boolean expected"; + return null; + }; + + /** + * Creates a PublishToDataplexCatalog message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog} PublishToDataplexCatalog + */ + PublishToDataplexCatalog.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog(); + if (object.lowerDataRiskToLow != null) + message.lowerDataRiskToLow = Boolean(object.lowerDataRiskToLow); + return message; + }; + + /** + * Creates a plain object from a PublishToDataplexCatalog message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog} message PublishToDataplexCatalog + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PublishToDataplexCatalog.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.lowerDataRiskToLow = false; + if (message.lowerDataRiskToLow != null && message.hasOwnProperty("lowerDataRiskToLow")) + object.lowerDataRiskToLow = message.lowerDataRiskToLow; + return object; + }; + + /** + * Converts this PublishToDataplexCatalog to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog + * @instance + * @returns {Object.} JSON object + */ + PublishToDataplexCatalog.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PublishToDataplexCatalog + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PublishToDataplexCatalog.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileAction.PublishToDataplexCatalog"; + }; + + return PublishToDataplexCatalog; + })(); + + DataProfileAction.TagResources = (function() { + + /** + * Properties of a TagResources. + * @memberof google.privacy.dlp.v2.DataProfileAction + * @interface ITagResources + * @property {Array.|null} [tagConditions] TagResources tagConditions + * @property {Array.|null} [profileGenerationsToTag] TagResources profileGenerationsToTag + * @property {boolean|null} [lowerDataRiskToLow] TagResources lowerDataRiskToLow + */ + + /** + * Constructs a new TagResources. + * @memberof google.privacy.dlp.v2.DataProfileAction + * @classdesc Represents a TagResources. + * @implements ITagResources + * @constructor + * @param {google.privacy.dlp.v2.DataProfileAction.ITagResources=} [properties] Properties to set + */ + function TagResources(properties) { + this.tagConditions = []; + this.profileGenerationsToTag = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TagResources tagConditions. + * @member {Array.} tagConditions + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @instance + */ + TagResources.prototype.tagConditions = $util.emptyArray; + + /** + * TagResources profileGenerationsToTag. + * @member {Array.} profileGenerationsToTag + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @instance + */ + TagResources.prototype.profileGenerationsToTag = $util.emptyArray; + + /** + * TagResources lowerDataRiskToLow. + * @member {boolean} lowerDataRiskToLow + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @instance + */ + TagResources.prototype.lowerDataRiskToLow = false; + + /** + * Creates a new TagResources instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.ITagResources=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources} TagResources instance + */ + TagResources.create = function create(properties) { + return new TagResources(properties); + }; + + /** + * Encodes the specified TagResources message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.ITagResources} message TagResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TagResources.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tagConditions != null && message.tagConditions.length) + for (var i = 0; i < message.tagConditions.length; ++i) + $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.encode(message.tagConditions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.profileGenerationsToTag != null && message.profileGenerationsToTag.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.profileGenerationsToTag.length; ++i) + writer.int32(message.profileGenerationsToTag[i]); + writer.ldelim(); + } + if (message.lowerDataRiskToLow != null && Object.hasOwnProperty.call(message, "lowerDataRiskToLow")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.lowerDataRiskToLow); + return writer; + }; + + /** + * Encodes the specified TagResources message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.ITagResources} message TagResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TagResources.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TagResources message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources} TagResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TagResources.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileAction.TagResources(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.tagConditions && message.tagConditions.length)) + message.tagConditions = []; + message.tagConditions.push($root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + if (!(message.profileGenerationsToTag && message.profileGenerationsToTag.length)) + message.profileGenerationsToTag = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.profileGenerationsToTag.push(reader.int32()); + } else + message.profileGenerationsToTag.push(reader.int32()); + break; + } + case 3: { + message.lowerDataRiskToLow = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TagResources message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources} TagResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TagResources.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TagResources message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TagResources.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.tagConditions != null && message.hasOwnProperty("tagConditions")) { + if (!Array.isArray(message.tagConditions)) + return "tagConditions: array expected"; + for (var i = 0; i < message.tagConditions.length; ++i) { + var error = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.verify(message.tagConditions[i], long + 1); + if (error) + return "tagConditions." + error; + } + } + if (message.profileGenerationsToTag != null && message.hasOwnProperty("profileGenerationsToTag")) { + if (!Array.isArray(message.profileGenerationsToTag)) + return "profileGenerationsToTag: array expected"; + for (var i = 0; i < message.profileGenerationsToTag.length; ++i) + switch (message.profileGenerationsToTag[i]) { + default: + return "profileGenerationsToTag: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.lowerDataRiskToLow != null && message.hasOwnProperty("lowerDataRiskToLow")) + if (typeof message.lowerDataRiskToLow !== "boolean") + return "lowerDataRiskToLow: boolean expected"; + return null; + }; + + /** + * Creates a TagResources message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources} TagResources + */ + TagResources.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfileAction.TagResources) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DataProfileAction.TagResources(); + if (object.tagConditions) { + if (!Array.isArray(object.tagConditions)) + throw TypeError(".google.privacy.dlp.v2.DataProfileAction.TagResources.tagConditions: array expected"); + message.tagConditions = []; + for (var i = 0; i < object.tagConditions.length; ++i) { + if (typeof object.tagConditions[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileAction.TagResources.tagConditions: object expected"); + message.tagConditions[i] = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.fromObject(object.tagConditions[i], long + 1); + } + } + if (object.profileGenerationsToTag) { + if (!Array.isArray(object.profileGenerationsToTag)) + throw TypeError(".google.privacy.dlp.v2.DataProfileAction.TagResources.profileGenerationsToTag: array expected"); + message.profileGenerationsToTag = []; + for (var i = 0; i < object.profileGenerationsToTag.length; ++i) + switch (object.profileGenerationsToTag[i]) { + default: + if (typeof object.profileGenerationsToTag[i] === "number") { + message.profileGenerationsToTag[i] = object.profileGenerationsToTag[i]; + break; + } + case "PROFILE_GENERATION_UNSPECIFIED": + case 0: + message.profileGenerationsToTag[i] = 0; + break; + case "PROFILE_GENERATION_NEW": + case 1: + message.profileGenerationsToTag[i] = 1; + break; + case "PROFILE_GENERATION_UPDATE": + case 2: + message.profileGenerationsToTag[i] = 2; + break; + } + } + if (object.lowerDataRiskToLow != null) + message.lowerDataRiskToLow = Boolean(object.lowerDataRiskToLow); + return message; + }; + + /** + * Creates a plain object from a TagResources message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.TagResources} message TagResources + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TagResources.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.tagConditions = []; + object.profileGenerationsToTag = []; + } + if (options.defaults) + object.lowerDataRiskToLow = false; + if (message.tagConditions && message.tagConditions.length) { + object.tagConditions = []; + for (var j = 0; j < message.tagConditions.length; ++j) + object.tagConditions[j] = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.toObject(message.tagConditions[j], options); + } + if (message.profileGenerationsToTag && message.profileGenerationsToTag.length) { + object.profileGenerationsToTag = []; + for (var j = 0; j < message.profileGenerationsToTag.length; ++j) + object.profileGenerationsToTag[j] = options.enums === String ? $root.google.privacy.dlp.v2.ProfileGeneration[message.profileGenerationsToTag[j]] === undefined ? message.profileGenerationsToTag[j] : $root.google.privacy.dlp.v2.ProfileGeneration[message.profileGenerationsToTag[j]] : message.profileGenerationsToTag[j]; + } + if (message.lowerDataRiskToLow != null && message.hasOwnProperty("lowerDataRiskToLow")) + object.lowerDataRiskToLow = message.lowerDataRiskToLow; + return object; + }; + + /** + * Converts this TagResources to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @instance + * @returns {Object.} JSON object + */ + TagResources.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TagResources + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TagResources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileAction.TagResources"; + }; + + TagResources.TagCondition = (function() { + + /** + * Properties of a TagCondition. + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @interface ITagCondition + * @property {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue|null} [tag] TagCondition tag + * @property {google.privacy.dlp.v2.ISensitivityScore|null} [sensitivityScore] TagCondition sensitivityScore + */ + + /** + * Constructs a new TagCondition. + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @classdesc Represents a TagCondition. + * @implements ITagCondition + * @constructor + * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagCondition=} [properties] Properties to set + */ + function TagCondition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TagCondition tag. + * @member {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue|null|undefined} tag + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @instance + */ + TagCondition.prototype.tag = null; + + /** + * TagCondition sensitivityScore. + * @member {google.privacy.dlp.v2.ISensitivityScore|null|undefined} sensitivityScore + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @instance + */ + TagCondition.prototype.sensitivityScore = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TagCondition type. + * @member {"sensitivityScore"|undefined} type + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @instance + */ + Object.defineProperty(TagCondition.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["sensitivityScore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TagCondition instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagCondition=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition} TagCondition instance + */ + TagCondition.create = function create(properties) { + return new TagCondition(properties); + }; + + /** + * Encodes the specified TagCondition message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagCondition} message TagCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TagCondition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tag != null && Object.hasOwnProperty.call(message, "tag")) + $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.encode(message.tag, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.sensitivityScore != null && Object.hasOwnProperty.call(message, "sensitivityScore")) + $root.google.privacy.dlp.v2.SensitivityScore.encode(message.sensitivityScore, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TagCondition message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagCondition} message TagCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TagCondition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TagCondition message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition} TagCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TagCondition.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tag = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TagCondition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition} TagCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TagCondition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TagCondition message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TagCondition.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.tag != null && message.hasOwnProperty("tag")) { + var error = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.verify(message.tag, long + 1); + if (error) + return "tag." + error; + } + if (message.sensitivityScore != null && message.hasOwnProperty("sensitivityScore")) { + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.SensitivityScore.verify(message.sensitivityScore, long + 1); + if (error) + return "sensitivityScore." + error; + } + } + return null; + }; + + /** + * Creates a TagCondition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition} TagCondition + */ + TagCondition.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition(); + if (object.tag != null) { + if (typeof object.tag !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.tag: object expected"); + message.tag = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.fromObject(object.tag, long + 1); + } + if (object.sensitivityScore != null) { + if (typeof object.sensitivityScore !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition.sensitivityScore: object expected"); + message.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.fromObject(object.sensitivityScore, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a TagCondition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition} message TagCondition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TagCondition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.tag = null; + if (message.tag != null && message.hasOwnProperty("tag")) + object.tag = $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.toObject(message.tag, options); + if (message.sensitivityScore != null && message.hasOwnProperty("sensitivityScore")) { + object.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.toObject(message.sensitivityScore, options); + if (options.oneofs) + object.type = "sensitivityScore"; + } + return object; + }; + + /** + * Converts this TagCondition to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @instance + * @returns {Object.} JSON object + */ + TagCondition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TagCondition + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TagCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileAction.TagResources.TagCondition"; + }; + + return TagCondition; + })(); + + TagResources.TagValue = (function() { + + /** + * Properties of a TagValue. + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @interface ITagValue + * @property {string|null} [namespacedValue] TagValue namespacedValue + */ + + /** + * Constructs a new TagValue. + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources + * @classdesc Represents a TagValue. + * @implements ITagValue + * @constructor + * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue=} [properties] Properties to set + */ + function TagValue(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TagValue namespacedValue. + * @member {string|null|undefined} namespacedValue + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue + * @instance + */ + TagValue.prototype.namespacedValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TagValue format. + * @member {"namespacedValue"|undefined} format + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue + * @instance + */ + Object.defineProperty(TagValue.prototype, "format", { + get: $util.oneOfGetter($oneOfFields = ["namespacedValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TagValue instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue} TagValue instance + */ + TagValue.create = function create(properties) { + return new TagValue(properties); + }; + + /** + * Encodes the specified TagValue message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue} message TagValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TagValue.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.namespacedValue != null && Object.hasOwnProperty.call(message, "namespacedValue")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namespacedValue); + return writer; + }; + + /** + * Encodes the specified TagValue message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.ITagValue} message TagValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TagValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TagValue message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue} TagValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TagValue.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.namespacedValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TagValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue} TagValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TagValue.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TagValue message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TagValue.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.namespacedValue != null && message.hasOwnProperty("namespacedValue")) { + properties.format = 1; + if (!$util.isString(message.namespacedValue)) + return "namespacedValue: string expected"; + } + return null; + }; + + /** + * Creates a TagValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue} TagValue + */ + TagValue.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue(); + if (object.namespacedValue != null) + message.namespacedValue = String(object.namespacedValue); + return message; + }; + + /** + * Creates a plain object from a TagValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue + * @static + * @param {google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue} message TagValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TagValue.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.namespacedValue != null && message.hasOwnProperty("namespacedValue")) { + object.namespacedValue = message.namespacedValue; + if (options.oneofs) + object.format = "namespacedValue"; + } + return object; + }; + + /** + * Converts this TagValue to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue + * @instance + * @returns {Object.} JSON object + */ + TagValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TagValue + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TagValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileAction.TagResources.TagValue"; + }; + + return TagValue; + })(); + + return TagResources; + })(); + + return DataProfileAction; + })(); + + v2.DataProfileFinding = (function() { + + /** + * Properties of a DataProfileFinding. + * @memberof google.privacy.dlp.v2 + * @interface IDataProfileFinding + * @property {string|null} [quote] DataProfileFinding quote + * @property {google.privacy.dlp.v2.IInfoType|null} [infotype] DataProfileFinding infotype + * @property {google.privacy.dlp.v2.IQuoteInfo|null} [quoteInfo] DataProfileFinding quoteInfo + * @property {string|null} [dataProfileResourceName] DataProfileFinding dataProfileResourceName + * @property {string|null} [findingId] DataProfileFinding findingId + * @property {google.protobuf.ITimestamp|null} [timestamp] DataProfileFinding timestamp + * @property {google.privacy.dlp.v2.IDataProfileFindingLocation|null} [location] DataProfileFinding location + * @property {google.privacy.dlp.v2.ResourceVisibility|null} [resourceVisibility] DataProfileFinding resourceVisibility + * @property {string|null} [fullResourceName] DataProfileFinding fullResourceName + * @property {google.privacy.dlp.v2.IDataSourceType|null} [dataSourceType] DataProfileFinding dataSourceType + */ + + /** + * Constructs a new DataProfileFinding. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DataProfileFinding. + * @implements IDataProfileFinding + * @constructor + * @param {google.privacy.dlp.v2.IDataProfileFinding=} [properties] Properties to set + */ + function DataProfileFinding(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataProfileFinding quote. + * @member {string} quote + * @memberof google.privacy.dlp.v2.DataProfileFinding + * @instance + */ + DataProfileFinding.prototype.quote = ""; + + /** + * DataProfileFinding infotype. + * @member {google.privacy.dlp.v2.IInfoType|null|undefined} infotype + * @memberof google.privacy.dlp.v2.DataProfileFinding + * @instance + */ + DataProfileFinding.prototype.infotype = null; + + /** + * DataProfileFinding quoteInfo. + * @member {google.privacy.dlp.v2.IQuoteInfo|null|undefined} quoteInfo + * @memberof google.privacy.dlp.v2.DataProfileFinding + * @instance + */ + DataProfileFinding.prototype.quoteInfo = null; + + /** + * DataProfileFinding dataProfileResourceName. + * @member {string} dataProfileResourceName + * @memberof google.privacy.dlp.v2.DataProfileFinding + * @instance + */ + DataProfileFinding.prototype.dataProfileResourceName = ""; + + /** + * DataProfileFinding findingId. + * @member {string} findingId + * @memberof google.privacy.dlp.v2.DataProfileFinding + * @instance + */ + DataProfileFinding.prototype.findingId = ""; + + /** + * DataProfileFinding timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof google.privacy.dlp.v2.DataProfileFinding + * @instance + */ + DataProfileFinding.prototype.timestamp = null; + + /** + * DataProfileFinding location. + * @member {google.privacy.dlp.v2.IDataProfileFindingLocation|null|undefined} location + * @memberof google.privacy.dlp.v2.DataProfileFinding + * @instance + */ + DataProfileFinding.prototype.location = null; + + /** + * DataProfileFinding resourceVisibility. + * @member {google.privacy.dlp.v2.ResourceVisibility} resourceVisibility + * @memberof google.privacy.dlp.v2.DataProfileFinding + * @instance + */ + DataProfileFinding.prototype.resourceVisibility = 0; + + /** + * DataProfileFinding fullResourceName. + * @member {string} fullResourceName + * @memberof google.privacy.dlp.v2.DataProfileFinding + * @instance + */ + DataProfileFinding.prototype.fullResourceName = ""; + + /** + * DataProfileFinding dataSourceType. + * @member {google.privacy.dlp.v2.IDataSourceType|null|undefined} dataSourceType + * @memberof google.privacy.dlp.v2.DataProfileFinding + * @instance + */ + DataProfileFinding.prototype.dataSourceType = null; + + /** + * Creates a new DataProfileFinding instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfileFinding + * @static + * @param {google.privacy.dlp.v2.IDataProfileFinding=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfileFinding} DataProfileFinding instance + */ + DataProfileFinding.create = function create(properties) { + return new DataProfileFinding(properties); + }; + + /** + * Encodes the specified DataProfileFinding message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileFinding.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfileFinding + * @static + * @param {google.privacy.dlp.v2.IDataProfileFinding} message DataProfileFinding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileFinding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.quote != null && Object.hasOwnProperty.call(message, "quote")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.quote); + if (message.infotype != null && Object.hasOwnProperty.call(message, "infotype")) + $root.google.privacy.dlp.v2.InfoType.encode(message.infotype, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.quoteInfo != null && Object.hasOwnProperty.call(message, "quoteInfo")) + $root.google.privacy.dlp.v2.QuoteInfo.encode(message.quoteInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dataProfileResourceName != null && Object.hasOwnProperty.call(message, "dataProfileResourceName")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.dataProfileResourceName); + if (message.findingId != null && Object.hasOwnProperty.call(message, "findingId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.findingId); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + $root.google.privacy.dlp.v2.DataProfileFindingLocation.encode(message.location, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.resourceVisibility != null && Object.hasOwnProperty.call(message, "resourceVisibility")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.resourceVisibility); + if (message.fullResourceName != null && Object.hasOwnProperty.call(message, "fullResourceName")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.fullResourceName); + if (message.dataSourceType != null && Object.hasOwnProperty.call(message, "dataSourceType")) + $root.google.privacy.dlp.v2.DataSourceType.encode(message.dataSourceType, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataProfileFinding message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileFinding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileFinding + * @static + * @param {google.privacy.dlp.v2.IDataProfileFinding} message DataProfileFinding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileFinding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataProfileFinding message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfileFinding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfileFinding} DataProfileFinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileFinding.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileFinding(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.quote = reader.string(); + break; + } + case 2: { + message.infotype = $root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.quoteInfo = $root.google.privacy.dlp.v2.QuoteInfo.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.dataProfileResourceName = reader.string(); + break; + } + case 5: { + message.findingId = reader.string(); + break; + } + case 6: { + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 7: { + message.location = $root.google.privacy.dlp.v2.DataProfileFindingLocation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 8: { + message.resourceVisibility = reader.int32(); + break; + } + case 9: { + message.fullResourceName = reader.string(); + break; + } + case 10: { + message.dataSourceType = $root.google.privacy.dlp.v2.DataSourceType.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DataProfileFinding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileFinding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfileFinding} DataProfileFinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileFinding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataProfileFinding message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfileFinding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataProfileFinding.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.quote != null && message.hasOwnProperty("quote")) + if (!$util.isString(message.quote)) + return "quote: string expected"; + if (message.infotype != null && message.hasOwnProperty("infotype")) { + var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infotype, long + 1); + if (error) + return "infotype." + error; + } + if (message.quoteInfo != null && message.hasOwnProperty("quoteInfo")) { + var error = $root.google.privacy.dlp.v2.QuoteInfo.verify(message.quoteInfo, long + 1); + if (error) + return "quoteInfo." + error; + } + if (message.dataProfileResourceName != null && message.hasOwnProperty("dataProfileResourceName")) + if (!$util.isString(message.dataProfileResourceName)) + return "dataProfileResourceName: string expected"; + if (message.findingId != null && message.hasOwnProperty("findingId")) + if (!$util.isString(message.findingId)) + return "findingId: string expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp, long + 1); + if (error) + return "timestamp." + error; + } + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.google.privacy.dlp.v2.DataProfileFindingLocation.verify(message.location, long + 1); + if (error) + return "location." + error; + } + if (message.resourceVisibility != null && message.hasOwnProperty("resourceVisibility")) + switch (message.resourceVisibility) { + default: + return "resourceVisibility: enum value expected"; + case 0: + case 10: + case 15: + case 20: + break; + } + if (message.fullResourceName != null && message.hasOwnProperty("fullResourceName")) + if (!$util.isString(message.fullResourceName)) + return "fullResourceName: string expected"; + if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) { + var error = $root.google.privacy.dlp.v2.DataSourceType.verify(message.dataSourceType, long + 1); + if (error) + return "dataSourceType." + error; + } + return null; + }; + + /** + * Creates a DataProfileFinding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfileFinding + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfileFinding} DataProfileFinding + */ + DataProfileFinding.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfileFinding) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DataProfileFinding(); + if (object.quote != null) + message.quote = String(object.quote); + if (object.infotype != null) { + if (typeof object.infotype !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileFinding.infotype: object expected"); + message.infotype = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infotype, long + 1); + } + if (object.quoteInfo != null) { + if (typeof object.quoteInfo !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileFinding.quoteInfo: object expected"); + message.quoteInfo = $root.google.privacy.dlp.v2.QuoteInfo.fromObject(object.quoteInfo, long + 1); + } + if (object.dataProfileResourceName != null) + message.dataProfileResourceName = String(object.dataProfileResourceName); + if (object.findingId != null) + message.findingId = String(object.findingId); + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileFinding.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp, long + 1); + } + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileFinding.location: object expected"); + message.location = $root.google.privacy.dlp.v2.DataProfileFindingLocation.fromObject(object.location, long + 1); + } + switch (object.resourceVisibility) { + default: + if (typeof object.resourceVisibility === "number") { + message.resourceVisibility = object.resourceVisibility; + break; + } + break; + case "RESOURCE_VISIBILITY_UNSPECIFIED": + case 0: + message.resourceVisibility = 0; + break; + case "RESOURCE_VISIBILITY_PUBLIC": + case 10: + message.resourceVisibility = 10; + break; + case "RESOURCE_VISIBILITY_INCONCLUSIVE": + case 15: + message.resourceVisibility = 15; + break; + case "RESOURCE_VISIBILITY_RESTRICTED": + case 20: + message.resourceVisibility = 20; + break; + } + if (object.fullResourceName != null) + message.fullResourceName = String(object.fullResourceName); + if (object.dataSourceType != null) { + if (typeof object.dataSourceType !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileFinding.dataSourceType: object expected"); + message.dataSourceType = $root.google.privacy.dlp.v2.DataSourceType.fromObject(object.dataSourceType, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DataProfileFinding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfileFinding + * @static + * @param {google.privacy.dlp.v2.DataProfileFinding} message DataProfileFinding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataProfileFinding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.quote = ""; + object.infotype = null; + object.quoteInfo = null; + object.dataProfileResourceName = ""; + object.findingId = ""; + object.timestamp = null; + object.location = null; + object.resourceVisibility = options.enums === String ? "RESOURCE_VISIBILITY_UNSPECIFIED" : 0; + object.fullResourceName = ""; + object.dataSourceType = null; + } + if (message.quote != null && message.hasOwnProperty("quote")) + object.quote = message.quote; + if (message.infotype != null && message.hasOwnProperty("infotype")) + object.infotype = $root.google.privacy.dlp.v2.InfoType.toObject(message.infotype, options); + if (message.quoteInfo != null && message.hasOwnProperty("quoteInfo")) + object.quoteInfo = $root.google.privacy.dlp.v2.QuoteInfo.toObject(message.quoteInfo, options); + if (message.dataProfileResourceName != null && message.hasOwnProperty("dataProfileResourceName")) + object.dataProfileResourceName = message.dataProfileResourceName; + if (message.findingId != null && message.hasOwnProperty("findingId")) + object.findingId = message.findingId; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.google.privacy.dlp.v2.DataProfileFindingLocation.toObject(message.location, options); + if (message.resourceVisibility != null && message.hasOwnProperty("resourceVisibility")) + object.resourceVisibility = options.enums === String ? $root.google.privacy.dlp.v2.ResourceVisibility[message.resourceVisibility] === undefined ? message.resourceVisibility : $root.google.privacy.dlp.v2.ResourceVisibility[message.resourceVisibility] : message.resourceVisibility; + if (message.fullResourceName != null && message.hasOwnProperty("fullResourceName")) + object.fullResourceName = message.fullResourceName; + if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) + object.dataSourceType = $root.google.privacy.dlp.v2.DataSourceType.toObject(message.dataSourceType, options); + return object; + }; + + /** + * Converts this DataProfileFinding to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfileFinding + * @instance + * @returns {Object.} JSON object + */ + DataProfileFinding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataProfileFinding + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfileFinding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataProfileFinding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileFinding"; + }; + + return DataProfileFinding; + })(); + + v2.DataProfileFindingLocation = (function() { + + /** + * Properties of a DataProfileFindingLocation. + * @memberof google.privacy.dlp.v2 + * @interface IDataProfileFindingLocation + * @property {string|null} [containerName] DataProfileFindingLocation containerName + * @property {google.privacy.dlp.v2.IDataProfileFindingRecordLocation|null} [dataProfileFindingRecordLocation] DataProfileFindingLocation dataProfileFindingRecordLocation + */ + + /** + * Constructs a new DataProfileFindingLocation. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DataProfileFindingLocation. + * @implements IDataProfileFindingLocation + * @constructor + * @param {google.privacy.dlp.v2.IDataProfileFindingLocation=} [properties] Properties to set + */ + function DataProfileFindingLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataProfileFindingLocation containerName. + * @member {string} containerName + * @memberof google.privacy.dlp.v2.DataProfileFindingLocation + * @instance + */ + DataProfileFindingLocation.prototype.containerName = ""; + + /** + * DataProfileFindingLocation dataProfileFindingRecordLocation. + * @member {google.privacy.dlp.v2.IDataProfileFindingRecordLocation|null|undefined} dataProfileFindingRecordLocation + * @memberof google.privacy.dlp.v2.DataProfileFindingLocation + * @instance + */ + DataProfileFindingLocation.prototype.dataProfileFindingRecordLocation = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataProfileFindingLocation locationExtraDetails. + * @member {"dataProfileFindingRecordLocation"|undefined} locationExtraDetails + * @memberof google.privacy.dlp.v2.DataProfileFindingLocation + * @instance + */ + Object.defineProperty(DataProfileFindingLocation.prototype, "locationExtraDetails", { + get: $util.oneOfGetter($oneOfFields = ["dataProfileFindingRecordLocation"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataProfileFindingLocation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfileFindingLocation + * @static + * @param {google.privacy.dlp.v2.IDataProfileFindingLocation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfileFindingLocation} DataProfileFindingLocation instance + */ + DataProfileFindingLocation.create = function create(properties) { + return new DataProfileFindingLocation(properties); + }; + + /** + * Encodes the specified DataProfileFindingLocation message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileFindingLocation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfileFindingLocation + * @static + * @param {google.privacy.dlp.v2.IDataProfileFindingLocation} message DataProfileFindingLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileFindingLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.containerName != null && Object.hasOwnProperty.call(message, "containerName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.containerName); + if (message.dataProfileFindingRecordLocation != null && Object.hasOwnProperty.call(message, "dataProfileFindingRecordLocation")) + $root.google.privacy.dlp.v2.DataProfileFindingRecordLocation.encode(message.dataProfileFindingRecordLocation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataProfileFindingLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileFindingLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileFindingLocation + * @static + * @param {google.privacy.dlp.v2.IDataProfileFindingLocation} message DataProfileFindingLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileFindingLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataProfileFindingLocation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfileFindingLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfileFindingLocation} DataProfileFindingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileFindingLocation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileFindingLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.containerName = reader.string(); + break; + } + case 2: { + message.dataProfileFindingRecordLocation = $root.google.privacy.dlp.v2.DataProfileFindingRecordLocation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DataProfileFindingLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileFindingLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfileFindingLocation} DataProfileFindingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileFindingLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataProfileFindingLocation message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfileFindingLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataProfileFindingLocation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.containerName != null && message.hasOwnProperty("containerName")) + if (!$util.isString(message.containerName)) + return "containerName: string expected"; + if (message.dataProfileFindingRecordLocation != null && message.hasOwnProperty("dataProfileFindingRecordLocation")) { + properties.locationExtraDetails = 1; + { + var error = $root.google.privacy.dlp.v2.DataProfileFindingRecordLocation.verify(message.dataProfileFindingRecordLocation, long + 1); + if (error) + return "dataProfileFindingRecordLocation." + error; + } + } + return null; + }; + + /** + * Creates a DataProfileFindingLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfileFindingLocation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfileFindingLocation} DataProfileFindingLocation + */ + DataProfileFindingLocation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfileFindingLocation) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DataProfileFindingLocation(); + if (object.containerName != null) + message.containerName = String(object.containerName); + if (object.dataProfileFindingRecordLocation != null) { + if (typeof object.dataProfileFindingRecordLocation !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileFindingLocation.dataProfileFindingRecordLocation: object expected"); + message.dataProfileFindingRecordLocation = $root.google.privacy.dlp.v2.DataProfileFindingRecordLocation.fromObject(object.dataProfileFindingRecordLocation, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DataProfileFindingLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfileFindingLocation + * @static + * @param {google.privacy.dlp.v2.DataProfileFindingLocation} message DataProfileFindingLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataProfileFindingLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.containerName = ""; + if (message.containerName != null && message.hasOwnProperty("containerName")) + object.containerName = message.containerName; + if (message.dataProfileFindingRecordLocation != null && message.hasOwnProperty("dataProfileFindingRecordLocation")) { + object.dataProfileFindingRecordLocation = $root.google.privacy.dlp.v2.DataProfileFindingRecordLocation.toObject(message.dataProfileFindingRecordLocation, options); + if (options.oneofs) + object.locationExtraDetails = "dataProfileFindingRecordLocation"; + } + return object; + }; + + /** + * Converts this DataProfileFindingLocation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfileFindingLocation + * @instance + * @returns {Object.} JSON object + */ + DataProfileFindingLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataProfileFindingLocation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfileFindingLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataProfileFindingLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileFindingLocation"; + }; + + return DataProfileFindingLocation; + })(); + + v2.DataProfileFindingRecordLocation = (function() { + + /** + * Properties of a DataProfileFindingRecordLocation. + * @memberof google.privacy.dlp.v2 + * @interface IDataProfileFindingRecordLocation + * @property {google.privacy.dlp.v2.IFieldId|null} [field] DataProfileFindingRecordLocation field + */ + + /** + * Constructs a new DataProfileFindingRecordLocation. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DataProfileFindingRecordLocation. + * @implements IDataProfileFindingRecordLocation + * @constructor + * @param {google.privacy.dlp.v2.IDataProfileFindingRecordLocation=} [properties] Properties to set + */ + function DataProfileFindingRecordLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataProfileFindingRecordLocation field. + * @member {google.privacy.dlp.v2.IFieldId|null|undefined} field + * @memberof google.privacy.dlp.v2.DataProfileFindingRecordLocation + * @instance + */ + DataProfileFindingRecordLocation.prototype.field = null; + + /** + * Creates a new DataProfileFindingRecordLocation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfileFindingRecordLocation + * @static + * @param {google.privacy.dlp.v2.IDataProfileFindingRecordLocation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfileFindingRecordLocation} DataProfileFindingRecordLocation instance + */ + DataProfileFindingRecordLocation.create = function create(properties) { + return new DataProfileFindingRecordLocation(properties); + }; + + /** + * Encodes the specified DataProfileFindingRecordLocation message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileFindingRecordLocation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfileFindingRecordLocation + * @static + * @param {google.privacy.dlp.v2.IDataProfileFindingRecordLocation} message DataProfileFindingRecordLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileFindingRecordLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + $root.google.privacy.dlp.v2.FieldId.encode(message.field, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataProfileFindingRecordLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileFindingRecordLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileFindingRecordLocation + * @static + * @param {google.privacy.dlp.v2.IDataProfileFindingRecordLocation} message DataProfileFindingRecordLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileFindingRecordLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataProfileFindingRecordLocation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfileFindingRecordLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfileFindingRecordLocation} DataProfileFindingRecordLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileFindingRecordLocation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileFindingRecordLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.field = $root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DataProfileFindingRecordLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileFindingRecordLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfileFindingRecordLocation} DataProfileFindingRecordLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileFindingRecordLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataProfileFindingRecordLocation message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfileFindingRecordLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataProfileFindingRecordLocation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.field != null && message.hasOwnProperty("field")) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.field, long + 1); + if (error) + return "field." + error; + } + return null; + }; + + /** + * Creates a DataProfileFindingRecordLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfileFindingRecordLocation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfileFindingRecordLocation} DataProfileFindingRecordLocation + */ + DataProfileFindingRecordLocation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfileFindingRecordLocation) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DataProfileFindingRecordLocation(); + if (object.field != null) { + if (typeof object.field !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileFindingRecordLocation.field: object expected"); + message.field = $root.google.privacy.dlp.v2.FieldId.fromObject(object.field, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DataProfileFindingRecordLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfileFindingRecordLocation + * @static + * @param {google.privacy.dlp.v2.DataProfileFindingRecordLocation} message DataProfileFindingRecordLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataProfileFindingRecordLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.field = null; + if (message.field != null && message.hasOwnProperty("field")) + object.field = $root.google.privacy.dlp.v2.FieldId.toObject(message.field, options); + return object; + }; + + /** + * Converts this DataProfileFindingRecordLocation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfileFindingRecordLocation + * @instance + * @returns {Object.} JSON object + */ + DataProfileFindingRecordLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataProfileFindingRecordLocation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfileFindingRecordLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataProfileFindingRecordLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileFindingRecordLocation"; + }; + + return DataProfileFindingRecordLocation; + })(); + + v2.DataProfileJobConfig = (function() { + + /** + * Properties of a DataProfileJobConfig. + * @memberof google.privacy.dlp.v2 + * @interface IDataProfileJobConfig + * @property {google.privacy.dlp.v2.IDataProfileLocation|null} [location] DataProfileJobConfig location + * @property {string|null} [projectId] DataProfileJobConfig projectId + * @property {google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation|null} [otherCloudStartingLocation] DataProfileJobConfig otherCloudStartingLocation + * @property {Array.|null} [inspectTemplates] DataProfileJobConfig inspectTemplates + * @property {Array.|null} [dataProfileActions] DataProfileJobConfig dataProfileActions + */ + + /** + * Constructs a new DataProfileJobConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DataProfileJobConfig. + * @implements IDataProfileJobConfig + * @constructor + * @param {google.privacy.dlp.v2.IDataProfileJobConfig=} [properties] Properties to set + */ + function DataProfileJobConfig(properties) { + this.inspectTemplates = []; + this.dataProfileActions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataProfileJobConfig location. + * @member {google.privacy.dlp.v2.IDataProfileLocation|null|undefined} location + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @instance + */ + DataProfileJobConfig.prototype.location = null; + + /** + * DataProfileJobConfig projectId. + * @member {string} projectId + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @instance + */ + DataProfileJobConfig.prototype.projectId = ""; + + /** + * DataProfileJobConfig otherCloudStartingLocation. + * @member {google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation|null|undefined} otherCloudStartingLocation + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @instance + */ + DataProfileJobConfig.prototype.otherCloudStartingLocation = null; + + /** + * DataProfileJobConfig inspectTemplates. + * @member {Array.} inspectTemplates + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @instance + */ + DataProfileJobConfig.prototype.inspectTemplates = $util.emptyArray; + + /** + * DataProfileJobConfig dataProfileActions. + * @member {Array.} dataProfileActions + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @instance + */ + DataProfileJobConfig.prototype.dataProfileActions = $util.emptyArray; + + /** + * Creates a new DataProfileJobConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @static + * @param {google.privacy.dlp.v2.IDataProfileJobConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfileJobConfig} DataProfileJobConfig instance + */ + DataProfileJobConfig.create = function create(properties) { + return new DataProfileJobConfig(properties); + }; + + /** + * Encodes the specified DataProfileJobConfig message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileJobConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @static + * @param {google.privacy.dlp.v2.IDataProfileJobConfig} message DataProfileJobConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileJobConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + $root.google.privacy.dlp.v2.DataProfileLocation.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.projectId); + if (message.dataProfileActions != null && message.dataProfileActions.length) + for (var i = 0; i < message.dataProfileActions.length; ++i) + $root.google.privacy.dlp.v2.DataProfileAction.encode(message.dataProfileActions[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.inspectTemplates != null && message.inspectTemplates.length) + for (var i = 0; i < message.inspectTemplates.length; ++i) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.inspectTemplates[i]); + if (message.otherCloudStartingLocation != null && Object.hasOwnProperty.call(message, "otherCloudStartingLocation")) + $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.encode(message.otherCloudStartingLocation, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataProfileJobConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileJobConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @static + * @param {google.privacy.dlp.v2.IDataProfileJobConfig} message DataProfileJobConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileJobConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataProfileJobConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfileJobConfig} DataProfileJobConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileJobConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileJobConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.location = $root.google.privacy.dlp.v2.DataProfileLocation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.projectId = reader.string(); + break; + } + case 8: { + message.otherCloudStartingLocation = $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 7: { + if (!(message.inspectTemplates && message.inspectTemplates.length)) + message.inspectTemplates = []; + message.inspectTemplates.push(reader.string()); + break; + } + case 6: { + if (!(message.dataProfileActions && message.dataProfileActions.length)) + message.dataProfileActions = []; + message.dataProfileActions.push($root.google.privacy.dlp.v2.DataProfileAction.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DataProfileJobConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfileJobConfig} DataProfileJobConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileJobConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataProfileJobConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataProfileJobConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.google.privacy.dlp.v2.DataProfileLocation.verify(message.location, long + 1); + if (error) + return "location." + error; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.otherCloudStartingLocation != null && message.hasOwnProperty("otherCloudStartingLocation")) { + var error = $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.verify(message.otherCloudStartingLocation, long + 1); + if (error) + return "otherCloudStartingLocation." + error; + } + if (message.inspectTemplates != null && message.hasOwnProperty("inspectTemplates")) { + if (!Array.isArray(message.inspectTemplates)) + return "inspectTemplates: array expected"; + for (var i = 0; i < message.inspectTemplates.length; ++i) + if (!$util.isString(message.inspectTemplates[i])) + return "inspectTemplates: string[] expected"; + } + if (message.dataProfileActions != null && message.hasOwnProperty("dataProfileActions")) { + if (!Array.isArray(message.dataProfileActions)) + return "dataProfileActions: array expected"; + for (var i = 0; i < message.dataProfileActions.length; ++i) { + var error = $root.google.privacy.dlp.v2.DataProfileAction.verify(message.dataProfileActions[i], long + 1); + if (error) + return "dataProfileActions." + error; + } + } + return null; + }; + + /** + * Creates a DataProfileJobConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfileJobConfig} DataProfileJobConfig + */ + DataProfileJobConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfileJobConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DataProfileJobConfig(); + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileJobConfig.location: object expected"); + message.location = $root.google.privacy.dlp.v2.DataProfileLocation.fromObject(object.location, long + 1); + } + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.otherCloudStartingLocation != null) { + if (typeof object.otherCloudStartingLocation !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileJobConfig.otherCloudStartingLocation: object expected"); + message.otherCloudStartingLocation = $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.fromObject(object.otherCloudStartingLocation, long + 1); + } + if (object.inspectTemplates) { + if (!Array.isArray(object.inspectTemplates)) + throw TypeError(".google.privacy.dlp.v2.DataProfileJobConfig.inspectTemplates: array expected"); + message.inspectTemplates = []; + for (var i = 0; i < object.inspectTemplates.length; ++i) + message.inspectTemplates[i] = String(object.inspectTemplates[i]); + } + if (object.dataProfileActions) { + if (!Array.isArray(object.dataProfileActions)) + throw TypeError(".google.privacy.dlp.v2.DataProfileJobConfig.dataProfileActions: array expected"); + message.dataProfileActions = []; + for (var i = 0; i < object.dataProfileActions.length; ++i) { + if (typeof object.dataProfileActions[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileJobConfig.dataProfileActions: object expected"); + message.dataProfileActions[i] = $root.google.privacy.dlp.v2.DataProfileAction.fromObject(object.dataProfileActions[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a DataProfileJobConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @static + * @param {google.privacy.dlp.v2.DataProfileJobConfig} message DataProfileJobConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataProfileJobConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dataProfileActions = []; + object.inspectTemplates = []; + } + if (options.defaults) { + object.location = null; + object.projectId = ""; + object.otherCloudStartingLocation = null; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.google.privacy.dlp.v2.DataProfileLocation.toObject(message.location, options); + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.dataProfileActions && message.dataProfileActions.length) { + object.dataProfileActions = []; + for (var j = 0; j < message.dataProfileActions.length; ++j) + object.dataProfileActions[j] = $root.google.privacy.dlp.v2.DataProfileAction.toObject(message.dataProfileActions[j], options); + } + if (message.inspectTemplates && message.inspectTemplates.length) { + object.inspectTemplates = []; + for (var j = 0; j < message.inspectTemplates.length; ++j) + object.inspectTemplates[j] = message.inspectTemplates[j]; + } + if (message.otherCloudStartingLocation != null && message.hasOwnProperty("otherCloudStartingLocation")) + object.otherCloudStartingLocation = $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.toObject(message.otherCloudStartingLocation, options); + return object; + }; + + /** + * Converts this DataProfileJobConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @instance + * @returns {Object.} JSON object + */ + DataProfileJobConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataProfileJobConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfileJobConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataProfileJobConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileJobConfig"; + }; + + return DataProfileJobConfig; + })(); + + v2.BigQueryRegex = (function() { + + /** + * Properties of a BigQueryRegex. + * @memberof google.privacy.dlp.v2 + * @interface IBigQueryRegex + * @property {string|null} [projectIdRegex] BigQueryRegex projectIdRegex + * @property {string|null} [datasetIdRegex] BigQueryRegex datasetIdRegex + * @property {string|null} [tableIdRegex] BigQueryRegex tableIdRegex + */ + + /** + * Constructs a new BigQueryRegex. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a BigQueryRegex. + * @implements IBigQueryRegex + * @constructor + * @param {google.privacy.dlp.v2.IBigQueryRegex=} [properties] Properties to set + */ + function BigQueryRegex(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryRegex projectIdRegex. + * @member {string} projectIdRegex + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @instance + */ + BigQueryRegex.prototype.projectIdRegex = ""; + + /** + * BigQueryRegex datasetIdRegex. + * @member {string} datasetIdRegex + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @instance + */ + BigQueryRegex.prototype.datasetIdRegex = ""; + + /** + * BigQueryRegex tableIdRegex. + * @member {string} tableIdRegex + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @instance + */ + BigQueryRegex.prototype.tableIdRegex = ""; + + /** + * Creates a new BigQueryRegex instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @static + * @param {google.privacy.dlp.v2.IBigQueryRegex=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.BigQueryRegex} BigQueryRegex instance + */ + BigQueryRegex.create = function create(properties) { + return new BigQueryRegex(properties); + }; + + /** + * Encodes the specified BigQueryRegex message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryRegex.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @static + * @param {google.privacy.dlp.v2.IBigQueryRegex} message BigQueryRegex message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryRegex.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectIdRegex != null && Object.hasOwnProperty.call(message, "projectIdRegex")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectIdRegex); + if (message.datasetIdRegex != null && Object.hasOwnProperty.call(message, "datasetIdRegex")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.datasetIdRegex); + if (message.tableIdRegex != null && Object.hasOwnProperty.call(message, "tableIdRegex")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tableIdRegex); + return writer; + }; + + /** + * Encodes the specified BigQueryRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryRegex.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @static + * @param {google.privacy.dlp.v2.IBigQueryRegex} message BigQueryRegex message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryRegex.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryRegex message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.BigQueryRegex} BigQueryRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryRegex.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.BigQueryRegex(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.projectIdRegex = reader.string(); + break; + } + case 2: { + message.datasetIdRegex = reader.string(); + break; + } + case 3: { + message.tableIdRegex = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryRegex message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.BigQueryRegex} BigQueryRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryRegex.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryRegex message. + * @function verify + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryRegex.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.projectIdRegex != null && message.hasOwnProperty("projectIdRegex")) + if (!$util.isString(message.projectIdRegex)) + return "projectIdRegex: string expected"; + if (message.datasetIdRegex != null && message.hasOwnProperty("datasetIdRegex")) + if (!$util.isString(message.datasetIdRegex)) + return "datasetIdRegex: string expected"; + if (message.tableIdRegex != null && message.hasOwnProperty("tableIdRegex")) + if (!$util.isString(message.tableIdRegex)) + return "tableIdRegex: string expected"; + return null; + }; + + /** + * Creates a BigQueryRegex message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.BigQueryRegex} BigQueryRegex + */ + BigQueryRegex.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.BigQueryRegex) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.BigQueryRegex(); + if (object.projectIdRegex != null) + message.projectIdRegex = String(object.projectIdRegex); + if (object.datasetIdRegex != null) + message.datasetIdRegex = String(object.datasetIdRegex); + if (object.tableIdRegex != null) + message.tableIdRegex = String(object.tableIdRegex); + return message; + }; + + /** + * Creates a plain object from a BigQueryRegex message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @static + * @param {google.privacy.dlp.v2.BigQueryRegex} message BigQueryRegex + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryRegex.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectIdRegex = ""; + object.datasetIdRegex = ""; + object.tableIdRegex = ""; + } + if (message.projectIdRegex != null && message.hasOwnProperty("projectIdRegex")) + object.projectIdRegex = message.projectIdRegex; + if (message.datasetIdRegex != null && message.hasOwnProperty("datasetIdRegex")) + object.datasetIdRegex = message.datasetIdRegex; + if (message.tableIdRegex != null && message.hasOwnProperty("tableIdRegex")) + object.tableIdRegex = message.tableIdRegex; + return object; + }; + + /** + * Converts this BigQueryRegex to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @instance + * @returns {Object.} JSON object + */ + BigQueryRegex.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryRegex + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.BigQueryRegex + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryRegex.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.BigQueryRegex"; + }; + + return BigQueryRegex; + })(); + + v2.BigQueryRegexes = (function() { + + /** + * Properties of a BigQueryRegexes. + * @memberof google.privacy.dlp.v2 + * @interface IBigQueryRegexes + * @property {Array.|null} [patterns] BigQueryRegexes patterns + */ + + /** + * Constructs a new BigQueryRegexes. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a BigQueryRegexes. + * @implements IBigQueryRegexes + * @constructor + * @param {google.privacy.dlp.v2.IBigQueryRegexes=} [properties] Properties to set + */ + function BigQueryRegexes(properties) { + this.patterns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryRegexes patterns. + * @member {Array.} patterns + * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @instance + */ + BigQueryRegexes.prototype.patterns = $util.emptyArray; + + /** + * Creates a new BigQueryRegexes instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @static + * @param {google.privacy.dlp.v2.IBigQueryRegexes=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.BigQueryRegexes} BigQueryRegexes instance + */ + BigQueryRegexes.create = function create(properties) { + return new BigQueryRegexes(properties); + }; + + /** + * Encodes the specified BigQueryRegexes message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryRegexes.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @static + * @param {google.privacy.dlp.v2.IBigQueryRegexes} message BigQueryRegexes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryRegexes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.patterns != null && message.patterns.length) + for (var i = 0; i < message.patterns.length; ++i) + $root.google.privacy.dlp.v2.BigQueryRegex.encode(message.patterns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BigQueryRegexes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryRegexes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @static + * @param {google.privacy.dlp.v2.IBigQueryRegexes} message BigQueryRegexes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryRegexes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryRegexes message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.BigQueryRegexes} BigQueryRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryRegexes.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.BigQueryRegexes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.patterns && message.patterns.length)) + message.patterns = []; + message.patterns.push($root.google.privacy.dlp.v2.BigQueryRegex.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryRegexes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.BigQueryRegexes} BigQueryRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryRegexes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryRegexes message. + * @function verify + * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryRegexes.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.patterns != null && message.hasOwnProperty("patterns")) { + if (!Array.isArray(message.patterns)) + return "patterns: array expected"; + for (var i = 0; i < message.patterns.length; ++i) { + var error = $root.google.privacy.dlp.v2.BigQueryRegex.verify(message.patterns[i], long + 1); + if (error) + return "patterns." + error; + } + } + return null; + }; + + /** + * Creates a BigQueryRegexes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.BigQueryRegexes} BigQueryRegexes + */ + BigQueryRegexes.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.BigQueryRegexes) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.BigQueryRegexes(); + if (object.patterns) { + if (!Array.isArray(object.patterns)) + throw TypeError(".google.privacy.dlp.v2.BigQueryRegexes.patterns: array expected"); + message.patterns = []; + for (var i = 0; i < object.patterns.length; ++i) { + if (typeof object.patterns[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.BigQueryRegexes.patterns: object expected"); + message.patterns[i] = $root.google.privacy.dlp.v2.BigQueryRegex.fromObject(object.patterns[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a BigQueryRegexes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @static + * @param {google.privacy.dlp.v2.BigQueryRegexes} message BigQueryRegexes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryRegexes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.patterns = []; + if (message.patterns && message.patterns.length) { + object.patterns = []; + for (var j = 0; j < message.patterns.length; ++j) + object.patterns[j] = $root.google.privacy.dlp.v2.BigQueryRegex.toObject(message.patterns[j], options); + } + return object; + }; + + /** + * Converts this BigQueryRegexes to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @instance + * @returns {Object.} JSON object + */ + BigQueryRegexes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryRegexes + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.BigQueryRegexes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryRegexes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.BigQueryRegexes"; + }; + + return BigQueryRegexes; + })(); + + v2.BigQueryTableTypes = (function() { + + /** + * Properties of a BigQueryTableTypes. + * @memberof google.privacy.dlp.v2 + * @interface IBigQueryTableTypes + * @property {Array.|null} [types] BigQueryTableTypes types + */ + + /** + * Constructs a new BigQueryTableTypes. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a BigQueryTableTypes. + * @implements IBigQueryTableTypes + * @constructor + * @param {google.privacy.dlp.v2.IBigQueryTableTypes=} [properties] Properties to set + */ + function BigQueryTableTypes(properties) { + this.types = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryTableTypes types. + * @member {Array.} types + * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @instance + */ + BigQueryTableTypes.prototype.types = $util.emptyArray; + + /** + * Creates a new BigQueryTableTypes instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @static + * @param {google.privacy.dlp.v2.IBigQueryTableTypes=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.BigQueryTableTypes} BigQueryTableTypes instance + */ + BigQueryTableTypes.create = function create(properties) { + return new BigQueryTableTypes(properties); + }; + + /** + * Encodes the specified BigQueryTableTypes message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryTableTypes.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @static + * @param {google.privacy.dlp.v2.IBigQueryTableTypes} message BigQueryTableTypes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryTableTypes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.types != null && message.types.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.types.length; ++i) + writer.int32(message.types[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified BigQueryTableTypes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryTableTypes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @static + * @param {google.privacy.dlp.v2.IBigQueryTableTypes} message BigQueryTableTypes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryTableTypes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryTableTypes message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.BigQueryTableTypes} BigQueryTableTypes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryTableTypes.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.BigQueryTableTypes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.types && message.types.length)) + message.types = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.types.push(reader.int32()); + } else + message.types.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryTableTypes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.BigQueryTableTypes} BigQueryTableTypes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryTableTypes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryTableTypes message. + * @function verify + * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryTableTypes.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.types != null && message.hasOwnProperty("types")) { + if (!Array.isArray(message.types)) + return "types: array expected"; + for (var i = 0; i < message.types.length; ++i) + switch (message.types[i]) { + default: + return "types: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + return null; + }; + + /** + * Creates a BigQueryTableTypes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.BigQueryTableTypes} BigQueryTableTypes + */ + BigQueryTableTypes.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.BigQueryTableTypes) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.BigQueryTableTypes(); + if (object.types) { + if (!Array.isArray(object.types)) + throw TypeError(".google.privacy.dlp.v2.BigQueryTableTypes.types: array expected"); + message.types = []; + for (var i = 0; i < object.types.length; ++i) + switch (object.types[i]) { + default: + if (typeof object.types[i] === "number") { + message.types[i] = object.types[i]; + break; + } + case "BIG_QUERY_TABLE_TYPE_UNSPECIFIED": + case 0: + message.types[i] = 0; + break; + case "BIG_QUERY_TABLE_TYPE_TABLE": + case 1: + message.types[i] = 1; + break; + case "BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE": + case 2: + message.types[i] = 2; + break; + case "BIG_QUERY_TABLE_TYPE_SNAPSHOT": + case 3: + message.types[i] = 3; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a BigQueryTableTypes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @static + * @param {google.privacy.dlp.v2.BigQueryTableTypes} message BigQueryTableTypes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryTableTypes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.types = []; + if (message.types && message.types.length) { + object.types = []; + for (var j = 0; j < message.types.length; ++j) + object.types[j] = options.enums === String ? $root.google.privacy.dlp.v2.BigQueryTableType[message.types[j]] === undefined ? message.types[j] : $root.google.privacy.dlp.v2.BigQueryTableType[message.types[j]] : message.types[j]; + } + return object; + }; + + /** + * Converts this BigQueryTableTypes to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @instance + * @returns {Object.} JSON object + */ + BigQueryTableTypes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryTableTypes + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.BigQueryTableTypes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryTableTypes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.BigQueryTableTypes"; + }; + + return BigQueryTableTypes; + })(); + + /** + * BigQueryTableTypeCollection enum. + * @name google.privacy.dlp.v2.BigQueryTableTypeCollection + * @enum {number} + * @property {number} BIG_QUERY_COLLECTION_UNSPECIFIED=0 BIG_QUERY_COLLECTION_UNSPECIFIED value + * @property {number} BIG_QUERY_COLLECTION_ALL_TYPES=1 BIG_QUERY_COLLECTION_ALL_TYPES value + * @property {number} BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES=2 BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES value + */ + v2.BigQueryTableTypeCollection = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BIG_QUERY_COLLECTION_UNSPECIFIED"] = 0; + values[valuesById[1] = "BIG_QUERY_COLLECTION_ALL_TYPES"] = 1; + values[valuesById[2] = "BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES"] = 2; + return values; + })(); + + /** + * BigQueryTableType enum. + * @name google.privacy.dlp.v2.BigQueryTableType + * @enum {number} + * @property {number} BIG_QUERY_TABLE_TYPE_UNSPECIFIED=0 BIG_QUERY_TABLE_TYPE_UNSPECIFIED value + * @property {number} BIG_QUERY_TABLE_TYPE_TABLE=1 BIG_QUERY_TABLE_TYPE_TABLE value + * @property {number} BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE=2 BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE value + * @property {number} BIG_QUERY_TABLE_TYPE_SNAPSHOT=3 BIG_QUERY_TABLE_TYPE_SNAPSHOT value + */ + v2.BigQueryTableType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BIG_QUERY_TABLE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BIG_QUERY_TABLE_TYPE_TABLE"] = 1; + values[valuesById[2] = "BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE"] = 2; + values[valuesById[3] = "BIG_QUERY_TABLE_TYPE_SNAPSHOT"] = 3; + return values; + })(); + + /** + * DataProfileUpdateFrequency enum. + * @name google.privacy.dlp.v2.DataProfileUpdateFrequency + * @enum {number} + * @property {number} UPDATE_FREQUENCY_UNSPECIFIED=0 UPDATE_FREQUENCY_UNSPECIFIED value + * @property {number} UPDATE_FREQUENCY_NEVER=1 UPDATE_FREQUENCY_NEVER value + * @property {number} UPDATE_FREQUENCY_DAILY=2 UPDATE_FREQUENCY_DAILY value + * @property {number} UPDATE_FREQUENCY_MONTHLY=4 UPDATE_FREQUENCY_MONTHLY value + */ + v2.DataProfileUpdateFrequency = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UPDATE_FREQUENCY_UNSPECIFIED"] = 0; + values[valuesById[1] = "UPDATE_FREQUENCY_NEVER"] = 1; + values[valuesById[2] = "UPDATE_FREQUENCY_DAILY"] = 2; + values[valuesById[4] = "UPDATE_FREQUENCY_MONTHLY"] = 4; + return values; + })(); + + v2.Disabled = (function() { + + /** + * Properties of a Disabled. + * @memberof google.privacy.dlp.v2 + * @interface IDisabled + */ + + /** + * Constructs a new Disabled. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a Disabled. + * @implements IDisabled + * @constructor + * @param {google.privacy.dlp.v2.IDisabled=} [properties] Properties to set + */ + function Disabled(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Disabled instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Disabled + * @static + * @param {google.privacy.dlp.v2.IDisabled=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Disabled} Disabled instance + */ + Disabled.create = function create(properties) { + return new Disabled(properties); + }; + + /** + * Encodes the specified Disabled message. Does not implicitly {@link google.privacy.dlp.v2.Disabled.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Disabled + * @static + * @param {google.privacy.dlp.v2.IDisabled} message Disabled message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Disabled.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Disabled message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Disabled.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Disabled + * @static + * @param {google.privacy.dlp.v2.IDisabled} message Disabled message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Disabled.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Disabled message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Disabled + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Disabled} Disabled + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Disabled.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Disabled(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Disabled message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Disabled + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Disabled} Disabled + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Disabled.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Disabled message. + * @function verify + * @memberof google.privacy.dlp.v2.Disabled + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Disabled.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a Disabled message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Disabled + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Disabled} Disabled + */ + Disabled.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Disabled) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.Disabled(); + }; + + /** + * Creates a plain object from a Disabled message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Disabled + * @static + * @param {google.privacy.dlp.v2.Disabled} message Disabled + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Disabled.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Disabled to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Disabled + * @instance + * @returns {Object.} JSON object + */ + Disabled.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Disabled + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Disabled + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Disabled.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Disabled"; + }; + + return Disabled; + })(); + + v2.DataProfileLocation = (function() { + + /** + * Properties of a DataProfileLocation. + * @memberof google.privacy.dlp.v2 + * @interface IDataProfileLocation + * @property {number|Long|null} [organizationId] DataProfileLocation organizationId + * @property {number|Long|null} [folderId] DataProfileLocation folderId + */ + + /** + * Constructs a new DataProfileLocation. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DataProfileLocation. + * @implements IDataProfileLocation + * @constructor + * @param {google.privacy.dlp.v2.IDataProfileLocation=} [properties] Properties to set + */ + function DataProfileLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataProfileLocation organizationId. + * @member {number|Long|null|undefined} organizationId + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @instance + */ + DataProfileLocation.prototype.organizationId = null; + + /** + * DataProfileLocation folderId. + * @member {number|Long|null|undefined} folderId + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @instance + */ + DataProfileLocation.prototype.folderId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DataProfileLocation location. + * @member {"organizationId"|"folderId"|undefined} location + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @instance + */ + Object.defineProperty(DataProfileLocation.prototype, "location", { + get: $util.oneOfGetter($oneOfFields = ["organizationId", "folderId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DataProfileLocation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @static + * @param {google.privacy.dlp.v2.IDataProfileLocation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfileLocation} DataProfileLocation instance + */ + DataProfileLocation.create = function create(properties) { + return new DataProfileLocation(properties); + }; + + /** + * Encodes the specified DataProfileLocation message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileLocation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @static + * @param {google.privacy.dlp.v2.IDataProfileLocation} message DataProfileLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.organizationId != null && Object.hasOwnProperty.call(message, "organizationId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.organizationId); + if (message.folderId != null && Object.hasOwnProperty.call(message, "folderId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.folderId); + return writer; + }; + + /** + * Encodes the specified DataProfileLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @static + * @param {google.privacy.dlp.v2.IDataProfileLocation} message DataProfileLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataProfileLocation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfileLocation} DataProfileLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileLocation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.organizationId = reader.int64(); + break; + } + case 2: { + message.folderId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DataProfileLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfileLocation} DataProfileLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataProfileLocation message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataProfileLocation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.organizationId != null && message.hasOwnProperty("organizationId")) { + properties.location = 1; + if (!$util.isInteger(message.organizationId) && !(message.organizationId && $util.isInteger(message.organizationId.low) && $util.isInteger(message.organizationId.high))) + return "organizationId: integer|Long expected"; + } + if (message.folderId != null && message.hasOwnProperty("folderId")) { + if (properties.location === 1) + return "location: multiple values"; + properties.location = 1; + if (!$util.isInteger(message.folderId) && !(message.folderId && $util.isInteger(message.folderId.low) && $util.isInteger(message.folderId.high))) + return "folderId: integer|Long expected"; + } + return null; + }; + + /** + * Creates a DataProfileLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfileLocation} DataProfileLocation + */ + DataProfileLocation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfileLocation) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DataProfileLocation(); + if (object.organizationId != null) + if ($util.Long) + (message.organizationId = $util.Long.fromValue(object.organizationId)).unsigned = false; + else if (typeof object.organizationId === "string") + message.organizationId = parseInt(object.organizationId, 10); + else if (typeof object.organizationId === "number") + message.organizationId = object.organizationId; + else if (typeof object.organizationId === "object") + message.organizationId = new $util.LongBits(object.organizationId.low >>> 0, object.organizationId.high >>> 0).toNumber(); + if (object.folderId != null) + if ($util.Long) + (message.folderId = $util.Long.fromValue(object.folderId)).unsigned = false; + else if (typeof object.folderId === "string") + message.folderId = parseInt(object.folderId, 10); + else if (typeof object.folderId === "number") + message.folderId = object.folderId; + else if (typeof object.folderId === "object") + message.folderId = new $util.LongBits(object.folderId.low >>> 0, object.folderId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a DataProfileLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @static + * @param {google.privacy.dlp.v2.DataProfileLocation} message DataProfileLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataProfileLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.organizationId != null && message.hasOwnProperty("organizationId")) { + if (typeof message.organizationId === "number") + object.organizationId = options.longs === String ? String(message.organizationId) : message.organizationId; + else + object.organizationId = options.longs === String ? $util.Long.prototype.toString.call(message.organizationId) : options.longs === Number ? new $util.LongBits(message.organizationId.low >>> 0, message.organizationId.high >>> 0).toNumber() : message.organizationId; + if (options.oneofs) + object.location = "organizationId"; + } + if (message.folderId != null && message.hasOwnProperty("folderId")) { + if (typeof message.folderId === "number") + object.folderId = options.longs === String ? String(message.folderId) : message.folderId; + else + object.folderId = options.longs === String ? $util.Long.prototype.toString.call(message.folderId) : options.longs === Number ? new $util.LongBits(message.folderId.low >>> 0, message.folderId.high >>> 0).toNumber() : message.folderId; + if (options.oneofs) + object.location = "folderId"; + } + return object; + }; + + /** + * Converts this DataProfileLocation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @instance + * @returns {Object.} JSON object + */ + DataProfileLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataProfileLocation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfileLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataProfileLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileLocation"; + }; + + return DataProfileLocation; + })(); + + v2.DiscoveryConfig = (function() { + + /** + * Properties of a DiscoveryConfig. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoveryConfig + * @property {string|null} [name] DiscoveryConfig name + * @property {string|null} [displayName] DiscoveryConfig displayName + * @property {google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig|null} [orgConfig] DiscoveryConfig orgConfig + * @property {google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation|null} [otherCloudStartingLocation] DiscoveryConfig otherCloudStartingLocation + * @property {Array.|null} [inspectTemplates] DiscoveryConfig inspectTemplates + * @property {Array.|null} [actions] DiscoveryConfig actions + * @property {Array.|null} [targets] DiscoveryConfig targets + * @property {Array.|null} [errors] DiscoveryConfig errors + * @property {google.protobuf.ITimestamp|null} [createTime] DiscoveryConfig createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] DiscoveryConfig updateTime + * @property {google.protobuf.ITimestamp|null} [lastRunTime] DiscoveryConfig lastRunTime + * @property {google.privacy.dlp.v2.DiscoveryConfig.Status|null} [status] DiscoveryConfig status + * @property {google.privacy.dlp.v2.IProcessingLocation|null} [processingLocation] DiscoveryConfig processingLocation + */ + + /** + * Constructs a new DiscoveryConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoveryConfig. + * @implements IDiscoveryConfig + * @constructor + * @param {google.privacy.dlp.v2.IDiscoveryConfig=} [properties] Properties to set + */ + function DiscoveryConfig(properties) { + this.inspectTemplates = []; + this.actions = []; + this.targets = []; + this.errors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryConfig name. + * @member {string} name + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + */ + DiscoveryConfig.prototype.name = ""; + + /** + * DiscoveryConfig displayName. + * @member {string} displayName + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + */ + DiscoveryConfig.prototype.displayName = ""; + + /** + * DiscoveryConfig orgConfig. + * @member {google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig|null|undefined} orgConfig + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + */ + DiscoveryConfig.prototype.orgConfig = null; + + /** + * DiscoveryConfig otherCloudStartingLocation. + * @member {google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation|null|undefined} otherCloudStartingLocation + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + */ + DiscoveryConfig.prototype.otherCloudStartingLocation = null; + + /** + * DiscoveryConfig inspectTemplates. + * @member {Array.} inspectTemplates + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + */ + DiscoveryConfig.prototype.inspectTemplates = $util.emptyArray; + + /** + * DiscoveryConfig actions. + * @member {Array.} actions + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + */ + DiscoveryConfig.prototype.actions = $util.emptyArray; + + /** + * DiscoveryConfig targets. + * @member {Array.} targets + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + */ + DiscoveryConfig.prototype.targets = $util.emptyArray; + + /** + * DiscoveryConfig errors. + * @member {Array.} errors + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + */ + DiscoveryConfig.prototype.errors = $util.emptyArray; + + /** + * DiscoveryConfig createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + */ + DiscoveryConfig.prototype.createTime = null; + + /** + * DiscoveryConfig updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + */ + DiscoveryConfig.prototype.updateTime = null; + + /** + * DiscoveryConfig lastRunTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastRunTime + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + */ + DiscoveryConfig.prototype.lastRunTime = null; + + /** + * DiscoveryConfig status. + * @member {google.privacy.dlp.v2.DiscoveryConfig.Status} status + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + */ + DiscoveryConfig.prototype.status = 0; + + /** + * DiscoveryConfig processingLocation. + * @member {google.privacy.dlp.v2.IProcessingLocation|null|undefined} processingLocation + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + */ + DiscoveryConfig.prototype.processingLocation = null; + + /** + * Creates a new DiscoveryConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @static + * @param {google.privacy.dlp.v2.IDiscoveryConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryConfig} DiscoveryConfig instance + */ + DiscoveryConfig.create = function create(properties) { + return new DiscoveryConfig(properties); + }; + + /** + * Encodes the specified DiscoveryConfig message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @static + * @param {google.privacy.dlp.v2.IDiscoveryConfig} message DiscoveryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.orgConfig != null && Object.hasOwnProperty.call(message, "orgConfig")) + $root.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.encode(message.orgConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.inspectTemplates != null && message.inspectTemplates.length) + for (var i = 0; i < message.inspectTemplates.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.inspectTemplates[i]); + if (message.actions != null && message.actions.length) + for (var i = 0; i < message.actions.length; ++i) + $root.google.privacy.dlp.v2.DataProfileAction.encode(message.actions[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + $root.google.privacy.dlp.v2.DiscoveryTarget.encode(message.targets[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.privacy.dlp.v2.Error.encode(message.errors[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.lastRunTime != null && Object.hasOwnProperty.call(message, "lastRunTime")) + $root.google.protobuf.Timestamp.encode(message.lastRunTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.status); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.displayName); + if (message.otherCloudStartingLocation != null && Object.hasOwnProperty.call(message, "otherCloudStartingLocation")) + $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.encode(message.otherCloudStartingLocation, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.processingLocation != null && Object.hasOwnProperty.call(message, "processingLocation")) + $root.google.privacy.dlp.v2.ProcessingLocation.encode(message.processingLocation, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @static + * @param {google.privacy.dlp.v2.IDiscoveryConfig} message DiscoveryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryConfig} DiscoveryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 11: { + message.displayName = reader.string(); + break; + } + case 2: { + message.orgConfig = $root.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 12: { + message.otherCloudStartingLocation = $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + if (!(message.inspectTemplates && message.inspectTemplates.length)) + message.inspectTemplates = []; + message.inspectTemplates.push(reader.string()); + break; + } + case 4: { + if (!(message.actions && message.actions.length)) + message.actions = []; + message.actions.push($root.google.privacy.dlp.v2.DataProfileAction.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 5: { + if (!(message.targets && message.targets.length)) + message.targets = []; + message.targets.push($root.google.privacy.dlp.v2.DiscoveryTarget.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 6: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.privacy.dlp.v2.Error.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 7: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 8: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 9: { + message.lastRunTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 10: { + message.status = reader.int32(); + break; + } + case 13: { + message.processingLocation = $root.google.privacy.dlp.v2.ProcessingLocation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryConfig} DiscoveryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.orgConfig != null && message.hasOwnProperty("orgConfig")) { + var error = $root.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.verify(message.orgConfig, long + 1); + if (error) + return "orgConfig." + error; + } + if (message.otherCloudStartingLocation != null && message.hasOwnProperty("otherCloudStartingLocation")) { + var error = $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.verify(message.otherCloudStartingLocation, long + 1); + if (error) + return "otherCloudStartingLocation." + error; + } + if (message.inspectTemplates != null && message.hasOwnProperty("inspectTemplates")) { + if (!Array.isArray(message.inspectTemplates)) + return "inspectTemplates: array expected"; + for (var i = 0; i < message.inspectTemplates.length; ++i) + if (!$util.isString(message.inspectTemplates[i])) + return "inspectTemplates: string[] expected"; + } + if (message.actions != null && message.hasOwnProperty("actions")) { + if (!Array.isArray(message.actions)) + return "actions: array expected"; + for (var i = 0; i < message.actions.length; ++i) { + var error = $root.google.privacy.dlp.v2.DataProfileAction.verify(message.actions[i], long + 1); + if (error) + return "actions." + error; + } + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) { + var error = $root.google.privacy.dlp.v2.DiscoveryTarget.verify(message.targets[i], long + 1); + if (error) + return "targets." + error; + } + } + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.privacy.dlp.v2.Error.verify(message.errors[i], long + 1); + if (error) + return "errors." + error; + } + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime, long + 1); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime, long + 1); + if (error) + return "updateTime." + error; + } + if (message.lastRunTime != null && message.hasOwnProperty("lastRunTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastRunTime, long + 1); + if (error) + return "lastRunTime." + error; + } + if (message.status != null && message.hasOwnProperty("status")) + switch (message.status) { + default: + return "status: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.processingLocation != null && message.hasOwnProperty("processingLocation")) { + var error = $root.google.privacy.dlp.v2.ProcessingLocation.verify(message.processingLocation, long + 1); + if (error) + return "processingLocation." + error; + } + return null; + }; + + /** + * Creates a DiscoveryConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryConfig} DiscoveryConfig + */ + DiscoveryConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DiscoveryConfig(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.orgConfig != null) { + if (typeof object.orgConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.orgConfig: object expected"); + message.orgConfig = $root.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.fromObject(object.orgConfig, long + 1); + } + if (object.otherCloudStartingLocation != null) { + if (typeof object.otherCloudStartingLocation !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.otherCloudStartingLocation: object expected"); + message.otherCloudStartingLocation = $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.fromObject(object.otherCloudStartingLocation, long + 1); + } + if (object.inspectTemplates) { + if (!Array.isArray(object.inspectTemplates)) + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.inspectTemplates: array expected"); + message.inspectTemplates = []; + for (var i = 0; i < object.inspectTemplates.length; ++i) + message.inspectTemplates[i] = String(object.inspectTemplates[i]); + } + if (object.actions) { + if (!Array.isArray(object.actions)) + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.actions: array expected"); + message.actions = []; + for (var i = 0; i < object.actions.length; ++i) { + if (typeof object.actions[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.actions: object expected"); + message.actions[i] = $root.google.privacy.dlp.v2.DataProfileAction.fromObject(object.actions[i], long + 1); + } + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) { + if (typeof object.targets[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.targets: object expected"); + message.targets[i] = $root.google.privacy.dlp.v2.DiscoveryTarget.fromObject(object.targets[i], long + 1); + } + } + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.errors: object expected"); + message.errors[i] = $root.google.privacy.dlp.v2.Error.fromObject(object.errors[i], long + 1); + } + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime, long + 1); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime, long + 1); + } + if (object.lastRunTime != null) { + if (typeof object.lastRunTime !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.lastRunTime: object expected"); + message.lastRunTime = $root.google.protobuf.Timestamp.fromObject(object.lastRunTime, long + 1); + } + switch (object.status) { + default: + if (typeof object.status === "number") { + message.status = object.status; + break; + } + break; + case "STATUS_UNSPECIFIED": + case 0: + message.status = 0; + break; + case "RUNNING": + case 1: + message.status = 1; + break; + case "PAUSED": + case 2: + message.status = 2; + break; + } + if (object.processingLocation != null) { + if (typeof object.processingLocation !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.processingLocation: object expected"); + message.processingLocation = $root.google.privacy.dlp.v2.ProcessingLocation.fromObject(object.processingLocation, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @static + * @param {google.privacy.dlp.v2.DiscoveryConfig} message DiscoveryConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.inspectTemplates = []; + object.actions = []; + object.targets = []; + object.errors = []; + } + if (options.defaults) { + object.name = ""; + object.orgConfig = null; + object.createTime = null; + object.updateTime = null; + object.lastRunTime = null; + object.status = options.enums === String ? "STATUS_UNSPECIFIED" : 0; + object.displayName = ""; + object.otherCloudStartingLocation = null; + object.processingLocation = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.orgConfig != null && message.hasOwnProperty("orgConfig")) + object.orgConfig = $root.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.toObject(message.orgConfig, options); + if (message.inspectTemplates && message.inspectTemplates.length) { + object.inspectTemplates = []; + for (var j = 0; j < message.inspectTemplates.length; ++j) + object.inspectTemplates[j] = message.inspectTemplates[j]; + } + if (message.actions && message.actions.length) { + object.actions = []; + for (var j = 0; j < message.actions.length; ++j) + object.actions[j] = $root.google.privacy.dlp.v2.DataProfileAction.toObject(message.actions[j], options); + } + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = $root.google.privacy.dlp.v2.DiscoveryTarget.toObject(message.targets[j], options); + } + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.privacy.dlp.v2.Error.toObject(message.errors[j], options); + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.lastRunTime != null && message.hasOwnProperty("lastRunTime")) + object.lastRunTime = $root.google.protobuf.Timestamp.toObject(message.lastRunTime, options); + if (message.status != null && message.hasOwnProperty("status")) + object.status = options.enums === String ? $root.google.privacy.dlp.v2.DiscoveryConfig.Status[message.status] === undefined ? message.status : $root.google.privacy.dlp.v2.DiscoveryConfig.Status[message.status] : message.status; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.otherCloudStartingLocation != null && message.hasOwnProperty("otherCloudStartingLocation")) + object.otherCloudStartingLocation = $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.toObject(message.otherCloudStartingLocation, options); + if (message.processingLocation != null && message.hasOwnProperty("processingLocation")) + object.processingLocation = $root.google.privacy.dlp.v2.ProcessingLocation.toObject(message.processingLocation, options); + return object; + }; + + /** + * Converts this DiscoveryConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @instance + * @returns {Object.} JSON object + */ + DiscoveryConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryConfig"; + }; + + DiscoveryConfig.OrgConfig = (function() { + + /** + * Properties of an OrgConfig. + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @interface IOrgConfig + * @property {google.privacy.dlp.v2.IDiscoveryStartingLocation|null} [location] OrgConfig location + * @property {string|null} [projectId] OrgConfig projectId + */ + + /** + * Constructs a new OrgConfig. + * @memberof google.privacy.dlp.v2.DiscoveryConfig + * @classdesc Represents an OrgConfig. + * @implements IOrgConfig + * @constructor + * @param {google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig=} [properties] Properties to set + */ + function OrgConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * OrgConfig location. + * @member {google.privacy.dlp.v2.IDiscoveryStartingLocation|null|undefined} location + * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig + * @instance + */ + OrgConfig.prototype.location = null; + + /** + * OrgConfig projectId. + * @member {string} projectId + * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig + * @instance + */ + OrgConfig.prototype.projectId = ""; + + /** + * Creates a new OrgConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig + * @static + * @param {google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryConfig.OrgConfig} OrgConfig instance + */ + OrgConfig.create = function create(properties) { + return new OrgConfig(properties); + }; + + /** + * Encodes the specified OrgConfig message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig + * @static + * @param {google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig} message OrgConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrgConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + $root.google.privacy.dlp.v2.DiscoveryStartingLocation.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectId); + return writer; + }; + + /** + * Encodes the specified OrgConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig + * @static + * @param {google.privacy.dlp.v2.DiscoveryConfig.IOrgConfig} message OrgConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrgConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OrgConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryConfig.OrgConfig} OrgConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrgConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.location = $root.google.privacy.dlp.v2.DiscoveryStartingLocation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.projectId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OrgConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryConfig.OrgConfig} OrgConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrgConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OrgConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OrgConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.google.privacy.dlp.v2.DiscoveryStartingLocation.verify(message.location, long + 1); + if (error) + return "location." + error; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + return null; + }; + + /** + * Creates an OrgConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryConfig.OrgConfig} OrgConfig + */ + OrgConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DiscoveryConfig.OrgConfig(); + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryConfig.OrgConfig.location: object expected"); + message.location = $root.google.privacy.dlp.v2.DiscoveryStartingLocation.fromObject(object.location, long + 1); + } + if (object.projectId != null) + message.projectId = String(object.projectId); + return message; + }; + + /** + * Creates a plain object from an OrgConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig + * @static + * @param {google.privacy.dlp.v2.DiscoveryConfig.OrgConfig} message OrgConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OrgConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.location = null; + object.projectId = ""; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.google.privacy.dlp.v2.DiscoveryStartingLocation.toObject(message.location, options); + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + return object; + }; + + /** + * Converts this OrgConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig + * @instance + * @returns {Object.} JSON object + */ + OrgConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OrgConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryConfig.OrgConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OrgConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryConfig.OrgConfig"; + }; + + return OrgConfig; + })(); + + /** + * Status enum. + * @name google.privacy.dlp.v2.DiscoveryConfig.Status + * @enum {number} + * @property {number} STATUS_UNSPECIFIED=0 STATUS_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} PAUSED=2 PAUSED value + */ + DiscoveryConfig.Status = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "PAUSED"] = 2; + return values; + })(); + + return DiscoveryConfig; + })(); + + v2.DiscoveryTarget = (function() { + + /** + * Properties of a DiscoveryTarget. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoveryTarget + * @property {google.privacy.dlp.v2.IBigQueryDiscoveryTarget|null} [bigQueryTarget] DiscoveryTarget bigQueryTarget + * @property {google.privacy.dlp.v2.ICloudSqlDiscoveryTarget|null} [cloudSqlTarget] DiscoveryTarget cloudSqlTarget + * @property {google.privacy.dlp.v2.ISecretsDiscoveryTarget|null} [secretsTarget] DiscoveryTarget secretsTarget + * @property {google.privacy.dlp.v2.ICloudStorageDiscoveryTarget|null} [cloudStorageTarget] DiscoveryTarget cloudStorageTarget + * @property {google.privacy.dlp.v2.IOtherCloudDiscoveryTarget|null} [otherCloudTarget] DiscoveryTarget otherCloudTarget + * @property {google.privacy.dlp.v2.IVertexDatasetDiscoveryTarget|null} [vertexDatasetTarget] DiscoveryTarget vertexDatasetTarget + */ + + /** + * Constructs a new DiscoveryTarget. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoveryTarget. + * @implements IDiscoveryTarget + * @constructor + * @param {google.privacy.dlp.v2.IDiscoveryTarget=} [properties] Properties to set + */ + function DiscoveryTarget(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryTarget bigQueryTarget. + * @member {google.privacy.dlp.v2.IBigQueryDiscoveryTarget|null|undefined} bigQueryTarget + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @instance + */ + DiscoveryTarget.prototype.bigQueryTarget = null; + + /** + * DiscoveryTarget cloudSqlTarget. + * @member {google.privacy.dlp.v2.ICloudSqlDiscoveryTarget|null|undefined} cloudSqlTarget + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @instance + */ + DiscoveryTarget.prototype.cloudSqlTarget = null; + + /** + * DiscoveryTarget secretsTarget. + * @member {google.privacy.dlp.v2.ISecretsDiscoveryTarget|null|undefined} secretsTarget + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @instance + */ + DiscoveryTarget.prototype.secretsTarget = null; + + /** + * DiscoveryTarget cloudStorageTarget. + * @member {google.privacy.dlp.v2.ICloudStorageDiscoveryTarget|null|undefined} cloudStorageTarget + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @instance + */ + DiscoveryTarget.prototype.cloudStorageTarget = null; + + /** + * DiscoveryTarget otherCloudTarget. + * @member {google.privacy.dlp.v2.IOtherCloudDiscoveryTarget|null|undefined} otherCloudTarget + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @instance + */ + DiscoveryTarget.prototype.otherCloudTarget = null; + + /** + * DiscoveryTarget vertexDatasetTarget. + * @member {google.privacy.dlp.v2.IVertexDatasetDiscoveryTarget|null|undefined} vertexDatasetTarget + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @instance + */ + DiscoveryTarget.prototype.vertexDatasetTarget = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DiscoveryTarget target. + * @member {"bigQueryTarget"|"cloudSqlTarget"|"secretsTarget"|"cloudStorageTarget"|"otherCloudTarget"|"vertexDatasetTarget"|undefined} target + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @instance + */ + Object.defineProperty(DiscoveryTarget.prototype, "target", { + get: $util.oneOfGetter($oneOfFields = ["bigQueryTarget", "cloudSqlTarget", "secretsTarget", "cloudStorageTarget", "otherCloudTarget", "vertexDatasetTarget"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoveryTarget instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.IDiscoveryTarget=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryTarget} DiscoveryTarget instance + */ + DiscoveryTarget.create = function create(properties) { + return new DiscoveryTarget(properties); + }; + + /** + * Encodes the specified DiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryTarget.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.IDiscoveryTarget} message DiscoveryTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryTarget.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bigQueryTarget != null && Object.hasOwnProperty.call(message, "bigQueryTarget")) + $root.google.privacy.dlp.v2.BigQueryDiscoveryTarget.encode(message.bigQueryTarget, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.cloudSqlTarget != null && Object.hasOwnProperty.call(message, "cloudSqlTarget")) + $root.google.privacy.dlp.v2.CloudSqlDiscoveryTarget.encode(message.cloudSqlTarget, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.secretsTarget != null && Object.hasOwnProperty.call(message, "secretsTarget")) + $root.google.privacy.dlp.v2.SecretsDiscoveryTarget.encode(message.secretsTarget, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.cloudStorageTarget != null && Object.hasOwnProperty.call(message, "cloudStorageTarget")) + $root.google.privacy.dlp.v2.CloudStorageDiscoveryTarget.encode(message.cloudStorageTarget, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.otherCloudTarget != null && Object.hasOwnProperty.call(message, "otherCloudTarget")) + $root.google.privacy.dlp.v2.OtherCloudDiscoveryTarget.encode(message.otherCloudTarget, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.vertexDatasetTarget != null && Object.hasOwnProperty.call(message, "vertexDatasetTarget")) + $root.google.privacy.dlp.v2.VertexDatasetDiscoveryTarget.encode(message.vertexDatasetTarget, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryTarget.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.IDiscoveryTarget} message DiscoveryTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryTarget.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryTarget message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryTarget} DiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryTarget.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryTarget(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.bigQueryTarget = $root.google.privacy.dlp.v2.BigQueryDiscoveryTarget.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.cloudSqlTarget = $root.google.privacy.dlp.v2.CloudSqlDiscoveryTarget.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.secretsTarget = $root.google.privacy.dlp.v2.SecretsDiscoveryTarget.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.cloudStorageTarget = $root.google.privacy.dlp.v2.CloudStorageDiscoveryTarget.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.otherCloudTarget = $root.google.privacy.dlp.v2.OtherCloudDiscoveryTarget.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 7: { + message.vertexDatasetTarget = $root.google.privacy.dlp.v2.VertexDatasetDiscoveryTarget.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryTarget message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryTarget} DiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryTarget.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryTarget message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryTarget.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.bigQueryTarget != null && message.hasOwnProperty("bigQueryTarget")) { + properties.target = 1; + { + var error = $root.google.privacy.dlp.v2.BigQueryDiscoveryTarget.verify(message.bigQueryTarget, long + 1); + if (error) + return "bigQueryTarget." + error; + } + } + if (message.cloudSqlTarget != null && message.hasOwnProperty("cloudSqlTarget")) { + if (properties.target === 1) + return "target: multiple values"; + properties.target = 1; + { + var error = $root.google.privacy.dlp.v2.CloudSqlDiscoveryTarget.verify(message.cloudSqlTarget, long + 1); + if (error) + return "cloudSqlTarget." + error; + } + } + if (message.secretsTarget != null && message.hasOwnProperty("secretsTarget")) { + if (properties.target === 1) + return "target: multiple values"; + properties.target = 1; + { + var error = $root.google.privacy.dlp.v2.SecretsDiscoveryTarget.verify(message.secretsTarget, long + 1); + if (error) + return "secretsTarget." + error; + } + } + if (message.cloudStorageTarget != null && message.hasOwnProperty("cloudStorageTarget")) { + if (properties.target === 1) + return "target: multiple values"; + properties.target = 1; + { + var error = $root.google.privacy.dlp.v2.CloudStorageDiscoveryTarget.verify(message.cloudStorageTarget, long + 1); + if (error) + return "cloudStorageTarget." + error; + } + } + if (message.otherCloudTarget != null && message.hasOwnProperty("otherCloudTarget")) { + if (properties.target === 1) + return "target: multiple values"; + properties.target = 1; + { + var error = $root.google.privacy.dlp.v2.OtherCloudDiscoveryTarget.verify(message.otherCloudTarget, long + 1); + if (error) + return "otherCloudTarget." + error; + } + } + if (message.vertexDatasetTarget != null && message.hasOwnProperty("vertexDatasetTarget")) { + if (properties.target === 1) + return "target: multiple values"; + properties.target = 1; + { + var error = $root.google.privacy.dlp.v2.VertexDatasetDiscoveryTarget.verify(message.vertexDatasetTarget, long + 1); + if (error) + return "vertexDatasetTarget." + error; + } + } + return null; + }; + + /** + * Creates a DiscoveryTarget message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryTarget} DiscoveryTarget + */ + DiscoveryTarget.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryTarget) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DiscoveryTarget(); + if (object.bigQueryTarget != null) { + if (typeof object.bigQueryTarget !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryTarget.bigQueryTarget: object expected"); + message.bigQueryTarget = $root.google.privacy.dlp.v2.BigQueryDiscoveryTarget.fromObject(object.bigQueryTarget, long + 1); + } + if (object.cloudSqlTarget != null) { + if (typeof object.cloudSqlTarget !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryTarget.cloudSqlTarget: object expected"); + message.cloudSqlTarget = $root.google.privacy.dlp.v2.CloudSqlDiscoveryTarget.fromObject(object.cloudSqlTarget, long + 1); + } + if (object.secretsTarget != null) { + if (typeof object.secretsTarget !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryTarget.secretsTarget: object expected"); + message.secretsTarget = $root.google.privacy.dlp.v2.SecretsDiscoveryTarget.fromObject(object.secretsTarget, long + 1); + } + if (object.cloudStorageTarget != null) { + if (typeof object.cloudStorageTarget !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryTarget.cloudStorageTarget: object expected"); + message.cloudStorageTarget = $root.google.privacy.dlp.v2.CloudStorageDiscoveryTarget.fromObject(object.cloudStorageTarget, long + 1); + } + if (object.otherCloudTarget != null) { + if (typeof object.otherCloudTarget !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryTarget.otherCloudTarget: object expected"); + message.otherCloudTarget = $root.google.privacy.dlp.v2.OtherCloudDiscoveryTarget.fromObject(object.otherCloudTarget, long + 1); + } + if (object.vertexDatasetTarget != null) { + if (typeof object.vertexDatasetTarget !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryTarget.vertexDatasetTarget: object expected"); + message.vertexDatasetTarget = $root.google.privacy.dlp.v2.VertexDatasetDiscoveryTarget.fromObject(object.vertexDatasetTarget, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryTarget message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.DiscoveryTarget} message DiscoveryTarget + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryTarget.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.bigQueryTarget != null && message.hasOwnProperty("bigQueryTarget")) { + object.bigQueryTarget = $root.google.privacy.dlp.v2.BigQueryDiscoveryTarget.toObject(message.bigQueryTarget, options); + if (options.oneofs) + object.target = "bigQueryTarget"; + } + if (message.cloudSqlTarget != null && message.hasOwnProperty("cloudSqlTarget")) { + object.cloudSqlTarget = $root.google.privacy.dlp.v2.CloudSqlDiscoveryTarget.toObject(message.cloudSqlTarget, options); + if (options.oneofs) + object.target = "cloudSqlTarget"; + } + if (message.secretsTarget != null && message.hasOwnProperty("secretsTarget")) { + object.secretsTarget = $root.google.privacy.dlp.v2.SecretsDiscoveryTarget.toObject(message.secretsTarget, options); + if (options.oneofs) + object.target = "secretsTarget"; + } + if (message.cloudStorageTarget != null && message.hasOwnProperty("cloudStorageTarget")) { + object.cloudStorageTarget = $root.google.privacy.dlp.v2.CloudStorageDiscoveryTarget.toObject(message.cloudStorageTarget, options); + if (options.oneofs) + object.target = "cloudStorageTarget"; + } + if (message.otherCloudTarget != null && message.hasOwnProperty("otherCloudTarget")) { + object.otherCloudTarget = $root.google.privacy.dlp.v2.OtherCloudDiscoveryTarget.toObject(message.otherCloudTarget, options); + if (options.oneofs) + object.target = "otherCloudTarget"; + } + if (message.vertexDatasetTarget != null && message.hasOwnProperty("vertexDatasetTarget")) { + object.vertexDatasetTarget = $root.google.privacy.dlp.v2.VertexDatasetDiscoveryTarget.toObject(message.vertexDatasetTarget, options); + if (options.oneofs) + object.target = "vertexDatasetTarget"; + } + return object; + }; + + /** + * Converts this DiscoveryTarget to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @instance + * @returns {Object.} JSON object + */ + DiscoveryTarget.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryTarget + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryTarget + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryTarget"; + }; + + return DiscoveryTarget; + })(); + + v2.BigQueryDiscoveryTarget = (function() { + + /** + * Properties of a BigQueryDiscoveryTarget. + * @memberof google.privacy.dlp.v2 + * @interface IBigQueryDiscoveryTarget + * @property {google.privacy.dlp.v2.IDiscoveryBigQueryFilter|null} [filter] BigQueryDiscoveryTarget filter + * @property {google.privacy.dlp.v2.IDiscoveryBigQueryConditions|null} [conditions] BigQueryDiscoveryTarget conditions + * @property {google.privacy.dlp.v2.IDiscoveryGenerationCadence|null} [cadence] BigQueryDiscoveryTarget cadence + * @property {google.privacy.dlp.v2.IDisabled|null} [disabled] BigQueryDiscoveryTarget disabled + */ + + /** + * Constructs a new BigQueryDiscoveryTarget. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a BigQueryDiscoveryTarget. + * @implements IBigQueryDiscoveryTarget + * @constructor + * @param {google.privacy.dlp.v2.IBigQueryDiscoveryTarget=} [properties] Properties to set + */ + function BigQueryDiscoveryTarget(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryDiscoveryTarget filter. + * @member {google.privacy.dlp.v2.IDiscoveryBigQueryFilter|null|undefined} filter + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @instance + */ + BigQueryDiscoveryTarget.prototype.filter = null; + + /** + * BigQueryDiscoveryTarget conditions. + * @member {google.privacy.dlp.v2.IDiscoveryBigQueryConditions|null|undefined} conditions + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @instance + */ + BigQueryDiscoveryTarget.prototype.conditions = null; + + /** + * BigQueryDiscoveryTarget cadence. + * @member {google.privacy.dlp.v2.IDiscoveryGenerationCadence|null|undefined} cadence + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @instance + */ + BigQueryDiscoveryTarget.prototype.cadence = null; + + /** + * BigQueryDiscoveryTarget disabled. + * @member {google.privacy.dlp.v2.IDisabled|null|undefined} disabled + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @instance + */ + BigQueryDiscoveryTarget.prototype.disabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BigQueryDiscoveryTarget frequency. + * @member {"cadence"|"disabled"|undefined} frequency + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @instance + */ + Object.defineProperty(BigQueryDiscoveryTarget.prototype, "frequency", { + get: $util.oneOfGetter($oneOfFields = ["cadence", "disabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BigQueryDiscoveryTarget instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.IBigQueryDiscoveryTarget=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.BigQueryDiscoveryTarget} BigQueryDiscoveryTarget instance + */ + BigQueryDiscoveryTarget.create = function create(properties) { + return new BigQueryDiscoveryTarget(properties); + }; + + /** + * Encodes the specified BigQueryDiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryDiscoveryTarget.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.IBigQueryDiscoveryTarget} message BigQueryDiscoveryTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryDiscoveryTarget.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.encode(message.filter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.conditions != null && Object.hasOwnProperty.call(message, "conditions")) + $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.encode(message.conditions, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.cadence != null && Object.hasOwnProperty.call(message, "cadence")) + $root.google.privacy.dlp.v2.DiscoveryGenerationCadence.encode(message.cadence, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + $root.google.privacy.dlp.v2.Disabled.encode(message.disabled, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BigQueryDiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryDiscoveryTarget.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.IBigQueryDiscoveryTarget} message BigQueryDiscoveryTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryDiscoveryTarget.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryDiscoveryTarget message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.BigQueryDiscoveryTarget} BigQueryDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryDiscoveryTarget.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.BigQueryDiscoveryTarget(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.filter = $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.conditions = $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.cadence = $root.google.privacy.dlp.v2.DiscoveryGenerationCadence.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.disabled = $root.google.privacy.dlp.v2.Disabled.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryDiscoveryTarget message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.BigQueryDiscoveryTarget} BigQueryDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryDiscoveryTarget.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryDiscoveryTarget message. + * @function verify + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryDiscoveryTarget.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.filter != null && message.hasOwnProperty("filter")) { + var error = $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.verify(message.filter, long + 1); + if (error) + return "filter." + error; + } + if (message.conditions != null && message.hasOwnProperty("conditions")) { + var error = $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.verify(message.conditions, long + 1); + if (error) + return "conditions." + error; + } + if (message.cadence != null && message.hasOwnProperty("cadence")) { + properties.frequency = 1; + { + var error = $root.google.privacy.dlp.v2.DiscoveryGenerationCadence.verify(message.cadence, long + 1); + if (error) + return "cadence." + error; + } + } + if (message.disabled != null && message.hasOwnProperty("disabled")) { + if (properties.frequency === 1) + return "frequency: multiple values"; + properties.frequency = 1; + { + var error = $root.google.privacy.dlp.v2.Disabled.verify(message.disabled, long + 1); + if (error) + return "disabled." + error; + } + } + return null; + }; + + /** + * Creates a BigQueryDiscoveryTarget message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.BigQueryDiscoveryTarget} BigQueryDiscoveryTarget + */ + BigQueryDiscoveryTarget.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.BigQueryDiscoveryTarget) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.BigQueryDiscoveryTarget(); + if (object.filter != null) { + if (typeof object.filter !== "object") + throw TypeError(".google.privacy.dlp.v2.BigQueryDiscoveryTarget.filter: object expected"); + message.filter = $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.fromObject(object.filter, long + 1); + } + if (object.conditions != null) { + if (typeof object.conditions !== "object") + throw TypeError(".google.privacy.dlp.v2.BigQueryDiscoveryTarget.conditions: object expected"); + message.conditions = $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.fromObject(object.conditions, long + 1); + } + if (object.cadence != null) { + if (typeof object.cadence !== "object") + throw TypeError(".google.privacy.dlp.v2.BigQueryDiscoveryTarget.cadence: object expected"); + message.cadence = $root.google.privacy.dlp.v2.DiscoveryGenerationCadence.fromObject(object.cadence, long + 1); + } + if (object.disabled != null) { + if (typeof object.disabled !== "object") + throw TypeError(".google.privacy.dlp.v2.BigQueryDiscoveryTarget.disabled: object expected"); + message.disabled = $root.google.privacy.dlp.v2.Disabled.fromObject(object.disabled, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a BigQueryDiscoveryTarget message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.BigQueryDiscoveryTarget} message BigQueryDiscoveryTarget + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryDiscoveryTarget.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = null; + object.conditions = null; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.toObject(message.filter, options); + if (message.conditions != null && message.hasOwnProperty("conditions")) + object.conditions = $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.toObject(message.conditions, options); + if (message.cadence != null && message.hasOwnProperty("cadence")) { + object.cadence = $root.google.privacy.dlp.v2.DiscoveryGenerationCadence.toObject(message.cadence, options); + if (options.oneofs) + object.frequency = "cadence"; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) { + object.disabled = $root.google.privacy.dlp.v2.Disabled.toObject(message.disabled, options); + if (options.oneofs) + object.frequency = "disabled"; + } + return object; + }; + + /** + * Converts this BigQueryDiscoveryTarget to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @instance + * @returns {Object.} JSON object + */ + BigQueryDiscoveryTarget.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryDiscoveryTarget + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.BigQueryDiscoveryTarget + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryDiscoveryTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.BigQueryDiscoveryTarget"; + }; + + return BigQueryDiscoveryTarget; + })(); + + v2.DiscoveryBigQueryFilter = (function() { + + /** + * Properties of a DiscoveryBigQueryFilter. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoveryBigQueryFilter + * @property {google.privacy.dlp.v2.IBigQueryTableCollection|null} [tables] DiscoveryBigQueryFilter tables + * @property {google.privacy.dlp.v2.DiscoveryBigQueryFilter.IAllOtherBigQueryTables|null} [otherTables] DiscoveryBigQueryFilter otherTables + * @property {google.privacy.dlp.v2.ITableReference|null} [tableReference] DiscoveryBigQueryFilter tableReference + */ + + /** + * Constructs a new DiscoveryBigQueryFilter. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoveryBigQueryFilter. + * @implements IDiscoveryBigQueryFilter + * @constructor + * @param {google.privacy.dlp.v2.IDiscoveryBigQueryFilter=} [properties] Properties to set + */ + function DiscoveryBigQueryFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryBigQueryFilter tables. + * @member {google.privacy.dlp.v2.IBigQueryTableCollection|null|undefined} tables + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @instance + */ + DiscoveryBigQueryFilter.prototype.tables = null; + + /** + * DiscoveryBigQueryFilter otherTables. + * @member {google.privacy.dlp.v2.DiscoveryBigQueryFilter.IAllOtherBigQueryTables|null|undefined} otherTables + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @instance + */ + DiscoveryBigQueryFilter.prototype.otherTables = null; + + /** + * DiscoveryBigQueryFilter tableReference. + * @member {google.privacy.dlp.v2.ITableReference|null|undefined} tableReference + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @instance + */ + DiscoveryBigQueryFilter.prototype.tableReference = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DiscoveryBigQueryFilter filter. + * @member {"tables"|"otherTables"|"tableReference"|undefined} filter + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @instance + */ + Object.defineProperty(DiscoveryBigQueryFilter.prototype, "filter", { + get: $util.oneOfGetter($oneOfFields = ["tables", "otherTables", "tableReference"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoveryBigQueryFilter instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @static + * @param {google.privacy.dlp.v2.IDiscoveryBigQueryFilter=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryFilter} DiscoveryBigQueryFilter instance + */ + DiscoveryBigQueryFilter.create = function create(properties) { + return new DiscoveryBigQueryFilter(properties); + }; + + /** + * Encodes the specified DiscoveryBigQueryFilter message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryFilter.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @static + * @param {google.privacy.dlp.v2.IDiscoveryBigQueryFilter} message DiscoveryBigQueryFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryBigQueryFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tables != null && Object.hasOwnProperty.call(message, "tables")) + $root.google.privacy.dlp.v2.BigQueryTableCollection.encode(message.tables, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.otherTables != null && Object.hasOwnProperty.call(message, "otherTables")) + $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables.encode(message.otherTables, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.tableReference != null && Object.hasOwnProperty.call(message, "tableReference")) + $root.google.privacy.dlp.v2.TableReference.encode(message.tableReference, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryBigQueryFilter message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @static + * @param {google.privacy.dlp.v2.IDiscoveryBigQueryFilter} message DiscoveryBigQueryFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryBigQueryFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryBigQueryFilter message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryFilter} DiscoveryBigQueryFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryBigQueryFilter.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tables = $root.google.privacy.dlp.v2.BigQueryTableCollection.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.otherTables = $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.tableReference = $root.google.privacy.dlp.v2.TableReference.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryBigQueryFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryFilter} DiscoveryBigQueryFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryBigQueryFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryBigQueryFilter message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryBigQueryFilter.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.tables != null && message.hasOwnProperty("tables")) { + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.BigQueryTableCollection.verify(message.tables, long + 1); + if (error) + return "tables." + error; + } + } + if (message.otherTables != null && message.hasOwnProperty("otherTables")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables.verify(message.otherTables, long + 1); + if (error) + return "otherTables." + error; + } + } + if (message.tableReference != null && message.hasOwnProperty("tableReference")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.TableReference.verify(message.tableReference, long + 1); + if (error) + return "tableReference." + error; + } + } + return null; + }; + + /** + * Creates a DiscoveryBigQueryFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryFilter} DiscoveryBigQueryFilter + */ + DiscoveryBigQueryFilter.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter(); + if (object.tables != null) { + if (typeof object.tables !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryBigQueryFilter.tables: object expected"); + message.tables = $root.google.privacy.dlp.v2.BigQueryTableCollection.fromObject(object.tables, long + 1); + } + if (object.otherTables != null) { + if (typeof object.otherTables !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryBigQueryFilter.otherTables: object expected"); + message.otherTables = $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables.fromObject(object.otherTables, long + 1); + } + if (object.tableReference != null) { + if (typeof object.tableReference !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryBigQueryFilter.tableReference: object expected"); + message.tableReference = $root.google.privacy.dlp.v2.TableReference.fromObject(object.tableReference, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryBigQueryFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @static + * @param {google.privacy.dlp.v2.DiscoveryBigQueryFilter} message DiscoveryBigQueryFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryBigQueryFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.tables != null && message.hasOwnProperty("tables")) { + object.tables = $root.google.privacy.dlp.v2.BigQueryTableCollection.toObject(message.tables, options); + if (options.oneofs) + object.filter = "tables"; + } + if (message.otherTables != null && message.hasOwnProperty("otherTables")) { + object.otherTables = $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables.toObject(message.otherTables, options); + if (options.oneofs) + object.filter = "otherTables"; + } + if (message.tableReference != null && message.hasOwnProperty("tableReference")) { + object.tableReference = $root.google.privacy.dlp.v2.TableReference.toObject(message.tableReference, options); + if (options.oneofs) + object.filter = "tableReference"; + } + return object; + }; + + /** + * Converts this DiscoveryBigQueryFilter to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @instance + * @returns {Object.} JSON object + */ + DiscoveryBigQueryFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryBigQueryFilter + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryBigQueryFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryBigQueryFilter"; + }; + + DiscoveryBigQueryFilter.AllOtherBigQueryTables = (function() { + + /** + * Properties of an AllOtherBigQueryTables. + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @interface IAllOtherBigQueryTables + */ + + /** + * Constructs a new AllOtherBigQueryTables. + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter + * @classdesc Represents an AllOtherBigQueryTables. + * @implements IAllOtherBigQueryTables + * @constructor + * @param {google.privacy.dlp.v2.DiscoveryBigQueryFilter.IAllOtherBigQueryTables=} [properties] Properties to set + */ + function AllOtherBigQueryTables(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new AllOtherBigQueryTables instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables + * @static + * @param {google.privacy.dlp.v2.DiscoveryBigQueryFilter.IAllOtherBigQueryTables=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables} AllOtherBigQueryTables instance + */ + AllOtherBigQueryTables.create = function create(properties) { + return new AllOtherBigQueryTables(properties); + }; + + /** + * Encodes the specified AllOtherBigQueryTables message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables + * @static + * @param {google.privacy.dlp.v2.DiscoveryBigQueryFilter.IAllOtherBigQueryTables} message AllOtherBigQueryTables message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllOtherBigQueryTables.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AllOtherBigQueryTables message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables + * @static + * @param {google.privacy.dlp.v2.DiscoveryBigQueryFilter.IAllOtherBigQueryTables} message AllOtherBigQueryTables message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllOtherBigQueryTables.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AllOtherBigQueryTables message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables} AllOtherBigQueryTables + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllOtherBigQueryTables.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AllOtherBigQueryTables message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables} AllOtherBigQueryTables + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllOtherBigQueryTables.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AllOtherBigQueryTables message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AllOtherBigQueryTables.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates an AllOtherBigQueryTables message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables} AllOtherBigQueryTables + */ + AllOtherBigQueryTables.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables(); + }; + + /** + * Creates a plain object from an AllOtherBigQueryTables message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables + * @static + * @param {google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables} message AllOtherBigQueryTables + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AllOtherBigQueryTables.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AllOtherBigQueryTables to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables + * @instance + * @returns {Object.} JSON object + */ + AllOtherBigQueryTables.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AllOtherBigQueryTables + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AllOtherBigQueryTables.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryBigQueryFilter.AllOtherBigQueryTables"; + }; + + return AllOtherBigQueryTables; + })(); + + return DiscoveryBigQueryFilter; + })(); + + v2.BigQueryTableCollection = (function() { + + /** + * Properties of a BigQueryTableCollection. + * @memberof google.privacy.dlp.v2 + * @interface IBigQueryTableCollection + * @property {google.privacy.dlp.v2.IBigQueryRegexes|null} [includeRegexes] BigQueryTableCollection includeRegexes + */ + + /** + * Constructs a new BigQueryTableCollection. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a BigQueryTableCollection. + * @implements IBigQueryTableCollection + * @constructor + * @param {google.privacy.dlp.v2.IBigQueryTableCollection=} [properties] Properties to set + */ + function BigQueryTableCollection(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryTableCollection includeRegexes. + * @member {google.privacy.dlp.v2.IBigQueryRegexes|null|undefined} includeRegexes + * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @instance + */ + BigQueryTableCollection.prototype.includeRegexes = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BigQueryTableCollection pattern. + * @member {"includeRegexes"|undefined} pattern + * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @instance + */ + Object.defineProperty(BigQueryTableCollection.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["includeRegexes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BigQueryTableCollection instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @static + * @param {google.privacy.dlp.v2.IBigQueryTableCollection=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.BigQueryTableCollection} BigQueryTableCollection instance + */ + BigQueryTableCollection.create = function create(properties) { + return new BigQueryTableCollection(properties); + }; + + /** + * Encodes the specified BigQueryTableCollection message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryTableCollection.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @static + * @param {google.privacy.dlp.v2.IBigQueryTableCollection} message BigQueryTableCollection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryTableCollection.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.includeRegexes != null && Object.hasOwnProperty.call(message, "includeRegexes")) + $root.google.privacy.dlp.v2.BigQueryRegexes.encode(message.includeRegexes, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BigQueryTableCollection message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryTableCollection.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @static + * @param {google.privacy.dlp.v2.IBigQueryTableCollection} message BigQueryTableCollection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryTableCollection.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryTableCollection message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.BigQueryTableCollection} BigQueryTableCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryTableCollection.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.BigQueryTableCollection(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.includeRegexes = $root.google.privacy.dlp.v2.BigQueryRegexes.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryTableCollection message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.BigQueryTableCollection} BigQueryTableCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryTableCollection.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryTableCollection message. + * @function verify + * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryTableCollection.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.includeRegexes != null && message.hasOwnProperty("includeRegexes")) { + properties.pattern = 1; + { + var error = $root.google.privacy.dlp.v2.BigQueryRegexes.verify(message.includeRegexes, long + 1); + if (error) + return "includeRegexes." + error; + } + } + return null; + }; + + /** + * Creates a BigQueryTableCollection message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.BigQueryTableCollection} BigQueryTableCollection + */ + BigQueryTableCollection.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.BigQueryTableCollection) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.BigQueryTableCollection(); + if (object.includeRegexes != null) { + if (typeof object.includeRegexes !== "object") + throw TypeError(".google.privacy.dlp.v2.BigQueryTableCollection.includeRegexes: object expected"); + message.includeRegexes = $root.google.privacy.dlp.v2.BigQueryRegexes.fromObject(object.includeRegexes, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a BigQueryTableCollection message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @static + * @param {google.privacy.dlp.v2.BigQueryTableCollection} message BigQueryTableCollection + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryTableCollection.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.includeRegexes != null && message.hasOwnProperty("includeRegexes")) { + object.includeRegexes = $root.google.privacy.dlp.v2.BigQueryRegexes.toObject(message.includeRegexes, options); + if (options.oneofs) + object.pattern = "includeRegexes"; + } + return object; + }; + + /** + * Converts this BigQueryTableCollection to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @instance + * @returns {Object.} JSON object + */ + BigQueryTableCollection.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryTableCollection + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.BigQueryTableCollection + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryTableCollection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.BigQueryTableCollection"; + }; + + return BigQueryTableCollection; + })(); + + v2.DiscoveryBigQueryConditions = (function() { + + /** + * Properties of a DiscoveryBigQueryConditions. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoveryBigQueryConditions + * @property {google.protobuf.ITimestamp|null} [createdAfter] DiscoveryBigQueryConditions createdAfter + * @property {google.privacy.dlp.v2.IBigQueryTableTypes|null} [types] DiscoveryBigQueryConditions types + * @property {google.privacy.dlp.v2.BigQueryTableTypeCollection|null} [typeCollection] DiscoveryBigQueryConditions typeCollection + * @property {google.privacy.dlp.v2.DiscoveryBigQueryConditions.IOrConditions|null} [orConditions] DiscoveryBigQueryConditions orConditions + */ + + /** + * Constructs a new DiscoveryBigQueryConditions. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoveryBigQueryConditions. + * @implements IDiscoveryBigQueryConditions + * @constructor + * @param {google.privacy.dlp.v2.IDiscoveryBigQueryConditions=} [properties] Properties to set + */ + function DiscoveryBigQueryConditions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryBigQueryConditions createdAfter. + * @member {google.protobuf.ITimestamp|null|undefined} createdAfter + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @instance + */ + DiscoveryBigQueryConditions.prototype.createdAfter = null; + + /** + * DiscoveryBigQueryConditions types. + * @member {google.privacy.dlp.v2.IBigQueryTableTypes|null|undefined} types + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @instance + */ + DiscoveryBigQueryConditions.prototype.types = null; + + /** + * DiscoveryBigQueryConditions typeCollection. + * @member {google.privacy.dlp.v2.BigQueryTableTypeCollection|null|undefined} typeCollection + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @instance + */ + DiscoveryBigQueryConditions.prototype.typeCollection = null; + + /** + * DiscoveryBigQueryConditions orConditions. + * @member {google.privacy.dlp.v2.DiscoveryBigQueryConditions.IOrConditions|null|undefined} orConditions + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @instance + */ + DiscoveryBigQueryConditions.prototype.orConditions = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DiscoveryBigQueryConditions includedTypes. + * @member {"types"|"typeCollection"|undefined} includedTypes + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @instance + */ + Object.defineProperty(DiscoveryBigQueryConditions.prototype, "includedTypes", { + get: $util.oneOfGetter($oneOfFields = ["types", "typeCollection"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoveryBigQueryConditions instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @static + * @param {google.privacy.dlp.v2.IDiscoveryBigQueryConditions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryConditions} DiscoveryBigQueryConditions instance + */ + DiscoveryBigQueryConditions.create = function create(properties) { + return new DiscoveryBigQueryConditions(properties); + }; + + /** + * Encodes the specified DiscoveryBigQueryConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryConditions.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @static + * @param {google.privacy.dlp.v2.IDiscoveryBigQueryConditions} message DiscoveryBigQueryConditions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryBigQueryConditions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createdAfter != null && Object.hasOwnProperty.call(message, "createdAfter")) + $root.google.protobuf.Timestamp.encode(message.createdAfter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.types != null && Object.hasOwnProperty.call(message, "types")) + $root.google.privacy.dlp.v2.BigQueryTableTypes.encode(message.types, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.typeCollection != null && Object.hasOwnProperty.call(message, "typeCollection")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.typeCollection); + if (message.orConditions != null && Object.hasOwnProperty.call(message, "orConditions")) + $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.encode(message.orConditions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryBigQueryConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryConditions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @static + * @param {google.privacy.dlp.v2.IDiscoveryBigQueryConditions} message DiscoveryBigQueryConditions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryBigQueryConditions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryBigQueryConditions message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryConditions} DiscoveryBigQueryConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryBigQueryConditions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.createdAfter = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.types = $root.google.privacy.dlp.v2.BigQueryTableTypes.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.typeCollection = reader.int32(); + break; + } + case 4: { + message.orConditions = $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryBigQueryConditions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryConditions} DiscoveryBigQueryConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryBigQueryConditions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryBigQueryConditions message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryBigQueryConditions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.createdAfter != null && message.hasOwnProperty("createdAfter")) { + var error = $root.google.protobuf.Timestamp.verify(message.createdAfter, long + 1); + if (error) + return "createdAfter." + error; + } + if (message.types != null && message.hasOwnProperty("types")) { + properties.includedTypes = 1; + { + var error = $root.google.privacy.dlp.v2.BigQueryTableTypes.verify(message.types, long + 1); + if (error) + return "types." + error; + } + } + if (message.typeCollection != null && message.hasOwnProperty("typeCollection")) { + if (properties.includedTypes === 1) + return "includedTypes: multiple values"; + properties.includedTypes = 1; + switch (message.typeCollection) { + default: + return "typeCollection: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.orConditions != null && message.hasOwnProperty("orConditions")) { + var error = $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.verify(message.orConditions, long + 1); + if (error) + return "orConditions." + error; + } + return null; + }; + + /** + * Creates a DiscoveryBigQueryConditions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryConditions} DiscoveryBigQueryConditions + */ + DiscoveryBigQueryConditions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions(); + if (object.createdAfter != null) { + if (typeof object.createdAfter !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryBigQueryConditions.createdAfter: object expected"); + message.createdAfter = $root.google.protobuf.Timestamp.fromObject(object.createdAfter, long + 1); + } + if (object.types != null) { + if (typeof object.types !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryBigQueryConditions.types: object expected"); + message.types = $root.google.privacy.dlp.v2.BigQueryTableTypes.fromObject(object.types, long + 1); + } + switch (object.typeCollection) { + default: + if (typeof object.typeCollection === "number") { + message.typeCollection = object.typeCollection; + break; + } + break; + case "BIG_QUERY_COLLECTION_UNSPECIFIED": + case 0: + message.typeCollection = 0; + break; + case "BIG_QUERY_COLLECTION_ALL_TYPES": + case 1: + message.typeCollection = 1; + break; + case "BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES": + case 2: + message.typeCollection = 2; + break; + } + if (object.orConditions != null) { + if (typeof object.orConditions !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryBigQueryConditions.orConditions: object expected"); + message.orConditions = $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.fromObject(object.orConditions, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryBigQueryConditions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @static + * @param {google.privacy.dlp.v2.DiscoveryBigQueryConditions} message DiscoveryBigQueryConditions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryBigQueryConditions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createdAfter = null; + object.orConditions = null; + } + if (message.createdAfter != null && message.hasOwnProperty("createdAfter")) + object.createdAfter = $root.google.protobuf.Timestamp.toObject(message.createdAfter, options); + if (message.types != null && message.hasOwnProperty("types")) { + object.types = $root.google.privacy.dlp.v2.BigQueryTableTypes.toObject(message.types, options); + if (options.oneofs) + object.includedTypes = "types"; + } + if (message.typeCollection != null && message.hasOwnProperty("typeCollection")) { + object.typeCollection = options.enums === String ? $root.google.privacy.dlp.v2.BigQueryTableTypeCollection[message.typeCollection] === undefined ? message.typeCollection : $root.google.privacy.dlp.v2.BigQueryTableTypeCollection[message.typeCollection] : message.typeCollection; + if (options.oneofs) + object.includedTypes = "typeCollection"; + } + if (message.orConditions != null && message.hasOwnProperty("orConditions")) + object.orConditions = $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.toObject(message.orConditions, options); + return object; + }; + + /** + * Converts this DiscoveryBigQueryConditions to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @instance + * @returns {Object.} JSON object + */ + DiscoveryBigQueryConditions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryBigQueryConditions + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryBigQueryConditions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryBigQueryConditions"; + }; + + DiscoveryBigQueryConditions.OrConditions = (function() { + + /** + * Properties of an OrConditions. + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @interface IOrConditions + * @property {number|null} [minRowCount] OrConditions minRowCount + * @property {google.protobuf.IDuration|null} [minAge] OrConditions minAge + */ + + /** + * Constructs a new OrConditions. + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions + * @classdesc Represents an OrConditions. + * @implements IOrConditions + * @constructor + * @param {google.privacy.dlp.v2.DiscoveryBigQueryConditions.IOrConditions=} [properties] Properties to set + */ + function OrConditions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * OrConditions minRowCount. + * @member {number} minRowCount + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @instance + */ + OrConditions.prototype.minRowCount = 0; + + /** + * OrConditions minAge. + * @member {google.protobuf.IDuration|null|undefined} minAge + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @instance + */ + OrConditions.prototype.minAge = null; + + /** + * Creates a new OrConditions instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @static + * @param {google.privacy.dlp.v2.DiscoveryBigQueryConditions.IOrConditions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions} OrConditions instance + */ + OrConditions.create = function create(properties) { + return new OrConditions(properties); + }; + + /** + * Encodes the specified OrConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @static + * @param {google.privacy.dlp.v2.DiscoveryBigQueryConditions.IOrConditions} message OrConditions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrConditions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minRowCount != null && Object.hasOwnProperty.call(message, "minRowCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.minRowCount); + if (message.minAge != null && Object.hasOwnProperty.call(message, "minAge")) + $root.google.protobuf.Duration.encode(message.minAge, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OrConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @static + * @param {google.privacy.dlp.v2.DiscoveryBigQueryConditions.IOrConditions} message OrConditions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OrConditions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OrConditions message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions} OrConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrConditions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.minRowCount = reader.int32(); + break; + } + case 2: { + message.minAge = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OrConditions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions} OrConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OrConditions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OrConditions message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OrConditions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.minRowCount != null && message.hasOwnProperty("minRowCount")) + if (!$util.isInteger(message.minRowCount)) + return "minRowCount: integer expected"; + if (message.minAge != null && message.hasOwnProperty("minAge")) { + var error = $root.google.protobuf.Duration.verify(message.minAge, long + 1); + if (error) + return "minAge." + error; + } + return null; + }; + + /** + * Creates an OrConditions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions} OrConditions + */ + OrConditions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions(); + if (object.minRowCount != null) + message.minRowCount = object.minRowCount | 0; + if (object.minAge != null) { + if (typeof object.minAge !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions.minAge: object expected"); + message.minAge = $root.google.protobuf.Duration.fromObject(object.minAge, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an OrConditions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @static + * @param {google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions} message OrConditions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OrConditions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.minRowCount = 0; + object.minAge = null; + } + if (message.minRowCount != null && message.hasOwnProperty("minRowCount")) + object.minRowCount = message.minRowCount; + if (message.minAge != null && message.hasOwnProperty("minAge")) + object.minAge = $root.google.protobuf.Duration.toObject(message.minAge, options); + return object; + }; + + /** + * Converts this OrConditions to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @instance + * @returns {Object.} JSON object + */ + OrConditions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OrConditions + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OrConditions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryBigQueryConditions.OrConditions"; + }; + + return OrConditions; + })(); + + return DiscoveryBigQueryConditions; + })(); + + v2.DiscoveryGenerationCadence = (function() { + + /** + * Properties of a DiscoveryGenerationCadence. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoveryGenerationCadence + * @property {google.privacy.dlp.v2.IDiscoverySchemaModifiedCadence|null} [schemaModifiedCadence] DiscoveryGenerationCadence schemaModifiedCadence + * @property {google.privacy.dlp.v2.IDiscoveryTableModifiedCadence|null} [tableModifiedCadence] DiscoveryGenerationCadence tableModifiedCadence + * @property {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null} [inspectTemplateModifiedCadence] DiscoveryGenerationCadence inspectTemplateModifiedCadence + * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [refreshFrequency] DiscoveryGenerationCadence refreshFrequency + */ + + /** + * Constructs a new DiscoveryGenerationCadence. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoveryGenerationCadence. + * @implements IDiscoveryGenerationCadence + * @constructor + * @param {google.privacy.dlp.v2.IDiscoveryGenerationCadence=} [properties] Properties to set + */ + function DiscoveryGenerationCadence(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryGenerationCadence schemaModifiedCadence. + * @member {google.privacy.dlp.v2.IDiscoverySchemaModifiedCadence|null|undefined} schemaModifiedCadence + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence + * @instance + */ + DiscoveryGenerationCadence.prototype.schemaModifiedCadence = null; + + /** + * DiscoveryGenerationCadence tableModifiedCadence. + * @member {google.privacy.dlp.v2.IDiscoveryTableModifiedCadence|null|undefined} tableModifiedCadence + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence + * @instance + */ + DiscoveryGenerationCadence.prototype.tableModifiedCadence = null; + + /** + * DiscoveryGenerationCadence inspectTemplateModifiedCadence. + * @member {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null|undefined} inspectTemplateModifiedCadence + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence + * @instance + */ + DiscoveryGenerationCadence.prototype.inspectTemplateModifiedCadence = null; + + /** + * DiscoveryGenerationCadence refreshFrequency. + * @member {google.privacy.dlp.v2.DataProfileUpdateFrequency} refreshFrequency + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence + * @instance + */ + DiscoveryGenerationCadence.prototype.refreshFrequency = 0; + + /** + * Creates a new DiscoveryGenerationCadence instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence + * @static + * @param {google.privacy.dlp.v2.IDiscoveryGenerationCadence=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryGenerationCadence} DiscoveryGenerationCadence instance + */ + DiscoveryGenerationCadence.create = function create(properties) { + return new DiscoveryGenerationCadence(properties); + }; + + /** + * Encodes the specified DiscoveryGenerationCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryGenerationCadence.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence + * @static + * @param {google.privacy.dlp.v2.IDiscoveryGenerationCadence} message DiscoveryGenerationCadence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryGenerationCadence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.schemaModifiedCadence != null && Object.hasOwnProperty.call(message, "schemaModifiedCadence")) + $root.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.encode(message.schemaModifiedCadence, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.tableModifiedCadence != null && Object.hasOwnProperty.call(message, "tableModifiedCadence")) + $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence.encode(message.tableModifiedCadence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.inspectTemplateModifiedCadence != null && Object.hasOwnProperty.call(message, "inspectTemplateModifiedCadence")) + $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.encode(message.inspectTemplateModifiedCadence, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.refreshFrequency != null && Object.hasOwnProperty.call(message, "refreshFrequency")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.refreshFrequency); + return writer; + }; + + /** + * Encodes the specified DiscoveryGenerationCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryGenerationCadence.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence + * @static + * @param {google.privacy.dlp.v2.IDiscoveryGenerationCadence} message DiscoveryGenerationCadence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryGenerationCadence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryGenerationCadence message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryGenerationCadence} DiscoveryGenerationCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryGenerationCadence.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryGenerationCadence(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.schemaModifiedCadence = $root.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.tableModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.refreshFrequency = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryGenerationCadence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryGenerationCadence} DiscoveryGenerationCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryGenerationCadence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryGenerationCadence message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryGenerationCadence.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.schemaModifiedCadence != null && message.hasOwnProperty("schemaModifiedCadence")) { + var error = $root.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.verify(message.schemaModifiedCadence, long + 1); + if (error) + return "schemaModifiedCadence." + error; + } + if (message.tableModifiedCadence != null && message.hasOwnProperty("tableModifiedCadence")) { + var error = $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence.verify(message.tableModifiedCadence, long + 1); + if (error) + return "tableModifiedCadence." + error; + } + if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence")) { + var error = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.verify(message.inspectTemplateModifiedCadence, long + 1); + if (error) + return "inspectTemplateModifiedCadence." + error; + } + if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency")) + switch (message.refreshFrequency) { + default: + return "refreshFrequency: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; + } + return null; + }; + + /** + * Creates a DiscoveryGenerationCadence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryGenerationCadence} DiscoveryGenerationCadence + */ + DiscoveryGenerationCadence.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryGenerationCadence) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DiscoveryGenerationCadence(); + if (object.schemaModifiedCadence != null) { + if (typeof object.schemaModifiedCadence !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryGenerationCadence.schemaModifiedCadence: object expected"); + message.schemaModifiedCadence = $root.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.fromObject(object.schemaModifiedCadence, long + 1); + } + if (object.tableModifiedCadence != null) { + if (typeof object.tableModifiedCadence !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryGenerationCadence.tableModifiedCadence: object expected"); + message.tableModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence.fromObject(object.tableModifiedCadence, long + 1); + } + if (object.inspectTemplateModifiedCadence != null) { + if (typeof object.inspectTemplateModifiedCadence !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryGenerationCadence.inspectTemplateModifiedCadence: object expected"); + message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.fromObject(object.inspectTemplateModifiedCadence, long + 1); + } + switch (object.refreshFrequency) { + default: + if (typeof object.refreshFrequency === "number") { + message.refreshFrequency = object.refreshFrequency; + break; + } + break; + case "UPDATE_FREQUENCY_UNSPECIFIED": + case 0: + message.refreshFrequency = 0; + break; + case "UPDATE_FREQUENCY_NEVER": + case 1: + message.refreshFrequency = 1; + break; + case "UPDATE_FREQUENCY_DAILY": + case 2: + message.refreshFrequency = 2; + break; + case "UPDATE_FREQUENCY_MONTHLY": + case 4: + message.refreshFrequency = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryGenerationCadence message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence + * @static + * @param {google.privacy.dlp.v2.DiscoveryGenerationCadence} message DiscoveryGenerationCadence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryGenerationCadence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.schemaModifiedCadence = null; + object.tableModifiedCadence = null; + object.inspectTemplateModifiedCadence = null; + object.refreshFrequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0; + } + if (message.schemaModifiedCadence != null && message.hasOwnProperty("schemaModifiedCadence")) + object.schemaModifiedCadence = $root.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.toObject(message.schemaModifiedCadence, options); + if (message.tableModifiedCadence != null && message.hasOwnProperty("tableModifiedCadence")) + object.tableModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence.toObject(message.tableModifiedCadence, options); + if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence")) + object.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.toObject(message.inspectTemplateModifiedCadence, options); + if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency")) + object.refreshFrequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] === undefined ? message.refreshFrequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] : message.refreshFrequency; + return object; + }; + + /** + * Converts this DiscoveryGenerationCadence to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence + * @instance + * @returns {Object.} JSON object + */ + DiscoveryGenerationCadence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryGenerationCadence + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryGenerationCadence + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryGenerationCadence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryGenerationCadence"; + }; + + return DiscoveryGenerationCadence; + })(); + + v2.DiscoveryTableModifiedCadence = (function() { + + /** + * Properties of a DiscoveryTableModifiedCadence. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoveryTableModifiedCadence + * @property {Array.|null} [types] DiscoveryTableModifiedCadence types + * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [frequency] DiscoveryTableModifiedCadence frequency + */ + + /** + * Constructs a new DiscoveryTableModifiedCadence. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoveryTableModifiedCadence. + * @implements IDiscoveryTableModifiedCadence + * @constructor + * @param {google.privacy.dlp.v2.IDiscoveryTableModifiedCadence=} [properties] Properties to set + */ + function DiscoveryTableModifiedCadence(properties) { + this.types = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryTableModifiedCadence types. + * @member {Array.} types + * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence + * @instance + */ + DiscoveryTableModifiedCadence.prototype.types = $util.emptyArray; + + /** + * DiscoveryTableModifiedCadence frequency. + * @member {google.privacy.dlp.v2.DataProfileUpdateFrequency} frequency + * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence + * @instance + */ + DiscoveryTableModifiedCadence.prototype.frequency = 0; + + /** + * Creates a new DiscoveryTableModifiedCadence instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence + * @static + * @param {google.privacy.dlp.v2.IDiscoveryTableModifiedCadence=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryTableModifiedCadence} DiscoveryTableModifiedCadence instance + */ + DiscoveryTableModifiedCadence.create = function create(properties) { + return new DiscoveryTableModifiedCadence(properties); + }; + + /** + * Encodes the specified DiscoveryTableModifiedCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryTableModifiedCadence.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence + * @static + * @param {google.privacy.dlp.v2.IDiscoveryTableModifiedCadence} message DiscoveryTableModifiedCadence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryTableModifiedCadence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.types != null && message.types.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.types.length; ++i) + writer.int32(message.types[i]); + writer.ldelim(); + } + if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.frequency); + return writer; + }; + + /** + * Encodes the specified DiscoveryTableModifiedCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryTableModifiedCadence.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence + * @static + * @param {google.privacy.dlp.v2.IDiscoveryTableModifiedCadence} message DiscoveryTableModifiedCadence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryTableModifiedCadence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryTableModifiedCadence message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryTableModifiedCadence} DiscoveryTableModifiedCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryTableModifiedCadence.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.types && message.types.length)) + message.types = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.types.push(reader.int32()); + } else + message.types.push(reader.int32()); + break; + } + case 2: { + message.frequency = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryTableModifiedCadence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryTableModifiedCadence} DiscoveryTableModifiedCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryTableModifiedCadence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryTableModifiedCadence message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryTableModifiedCadence.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.types != null && message.hasOwnProperty("types")) { + if (!Array.isArray(message.types)) + return "types: array expected"; + for (var i = 0; i < message.types.length; ++i) + switch (message.types[i]) { + default: + return "types: enum value[] expected"; + case 0: + case 1: + break; + } + } + if (message.frequency != null && message.hasOwnProperty("frequency")) + switch (message.frequency) { + default: + return "frequency: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; + } + return null; + }; + + /** + * Creates a DiscoveryTableModifiedCadence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryTableModifiedCadence} DiscoveryTableModifiedCadence + */ + DiscoveryTableModifiedCadence.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DiscoveryTableModifiedCadence(); + if (object.types) { + if (!Array.isArray(object.types)) + throw TypeError(".google.privacy.dlp.v2.DiscoveryTableModifiedCadence.types: array expected"); + message.types = []; + for (var i = 0; i < object.types.length; ++i) + switch (object.types[i]) { + default: + if (typeof object.types[i] === "number") { + message.types[i] = object.types[i]; + break; + } + case "TABLE_MODIFICATION_UNSPECIFIED": + case 0: + message.types[i] = 0; + break; + case "TABLE_MODIFIED_TIMESTAMP": + case 1: + message.types[i] = 1; + break; + } + } + switch (object.frequency) { + default: + if (typeof object.frequency === "number") { + message.frequency = object.frequency; + break; + } + break; + case "UPDATE_FREQUENCY_UNSPECIFIED": + case 0: + message.frequency = 0; + break; + case "UPDATE_FREQUENCY_NEVER": + case 1: + message.frequency = 1; + break; + case "UPDATE_FREQUENCY_DAILY": + case 2: + message.frequency = 2; + break; + case "UPDATE_FREQUENCY_MONTHLY": + case 4: + message.frequency = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryTableModifiedCadence message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence + * @static + * @param {google.privacy.dlp.v2.DiscoveryTableModifiedCadence} message DiscoveryTableModifiedCadence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryTableModifiedCadence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.types = []; + if (options.defaults) + object.frequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0; + if (message.types && message.types.length) { + object.types = []; + for (var j = 0; j < message.types.length; ++j) + object.types[j] = options.enums === String ? $root.google.privacy.dlp.v2.BigQueryTableModification[message.types[j]] === undefined ? message.types[j] : $root.google.privacy.dlp.v2.BigQueryTableModification[message.types[j]] : message.types[j]; + } + if (message.frequency != null && message.hasOwnProperty("frequency")) + object.frequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.frequency] === undefined ? message.frequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.frequency] : message.frequency; + return object; + }; + + /** + * Converts this DiscoveryTableModifiedCadence to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence + * @instance + * @returns {Object.} JSON object + */ + DiscoveryTableModifiedCadence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryTableModifiedCadence + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryTableModifiedCadence + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryTableModifiedCadence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryTableModifiedCadence"; + }; + + return DiscoveryTableModifiedCadence; + })(); + + /** + * BigQueryTableModification enum. + * @name google.privacy.dlp.v2.BigQueryTableModification + * @enum {number} + * @property {number} TABLE_MODIFICATION_UNSPECIFIED=0 TABLE_MODIFICATION_UNSPECIFIED value + * @property {number} TABLE_MODIFIED_TIMESTAMP=1 TABLE_MODIFIED_TIMESTAMP value + */ + v2.BigQueryTableModification = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TABLE_MODIFICATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "TABLE_MODIFIED_TIMESTAMP"] = 1; + return values; + })(); + + v2.DiscoverySchemaModifiedCadence = (function() { + + /** + * Properties of a DiscoverySchemaModifiedCadence. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoverySchemaModifiedCadence + * @property {Array.|null} [types] DiscoverySchemaModifiedCadence types + * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [frequency] DiscoverySchemaModifiedCadence frequency + */ + + /** + * Constructs a new DiscoverySchemaModifiedCadence. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoverySchemaModifiedCadence. + * @implements IDiscoverySchemaModifiedCadence + * @constructor + * @param {google.privacy.dlp.v2.IDiscoverySchemaModifiedCadence=} [properties] Properties to set + */ + function DiscoverySchemaModifiedCadence(properties) { + this.types = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoverySchemaModifiedCadence types. + * @member {Array.} types + * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence + * @instance + */ + DiscoverySchemaModifiedCadence.prototype.types = $util.emptyArray; + + /** + * DiscoverySchemaModifiedCadence frequency. + * @member {google.privacy.dlp.v2.DataProfileUpdateFrequency} frequency + * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence + * @instance + */ + DiscoverySchemaModifiedCadence.prototype.frequency = 0; + + /** + * Creates a new DiscoverySchemaModifiedCadence instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence + * @static + * @param {google.privacy.dlp.v2.IDiscoverySchemaModifiedCadence=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoverySchemaModifiedCadence} DiscoverySchemaModifiedCadence instance + */ + DiscoverySchemaModifiedCadence.create = function create(properties) { + return new DiscoverySchemaModifiedCadence(properties); + }; + + /** + * Encodes the specified DiscoverySchemaModifiedCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence + * @static + * @param {google.privacy.dlp.v2.IDiscoverySchemaModifiedCadence} message DiscoverySchemaModifiedCadence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoverySchemaModifiedCadence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.types != null && message.types.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.types.length; ++i) + writer.int32(message.types[i]); + writer.ldelim(); + } + if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.frequency); + return writer; + }; + + /** + * Encodes the specified DiscoverySchemaModifiedCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence + * @static + * @param {google.privacy.dlp.v2.IDiscoverySchemaModifiedCadence} message DiscoverySchemaModifiedCadence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoverySchemaModifiedCadence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoverySchemaModifiedCadence message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoverySchemaModifiedCadence} DiscoverySchemaModifiedCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoverySchemaModifiedCadence.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.types && message.types.length)) + message.types = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.types.push(reader.int32()); + } else + message.types.push(reader.int32()); + break; + } + case 2: { + message.frequency = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoverySchemaModifiedCadence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoverySchemaModifiedCadence} DiscoverySchemaModifiedCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoverySchemaModifiedCadence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoverySchemaModifiedCadence message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoverySchemaModifiedCadence.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.types != null && message.hasOwnProperty("types")) { + if (!Array.isArray(message.types)) + return "types: array expected"; + for (var i = 0; i < message.types.length; ++i) + switch (message.types[i]) { + default: + return "types: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.frequency != null && message.hasOwnProperty("frequency")) + switch (message.frequency) { + default: + return "frequency: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; + } + return null; + }; + + /** + * Creates a DiscoverySchemaModifiedCadence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoverySchemaModifiedCadence} DiscoverySchemaModifiedCadence + */ + DiscoverySchemaModifiedCadence.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DiscoverySchemaModifiedCadence(); + if (object.types) { + if (!Array.isArray(object.types)) + throw TypeError(".google.privacy.dlp.v2.DiscoverySchemaModifiedCadence.types: array expected"); + message.types = []; + for (var i = 0; i < object.types.length; ++i) + switch (object.types[i]) { + default: + if (typeof object.types[i] === "number") { + message.types[i] = object.types[i]; + break; + } + case "SCHEMA_MODIFICATION_UNSPECIFIED": + case 0: + message.types[i] = 0; + break; + case "SCHEMA_NEW_COLUMNS": + case 1: + message.types[i] = 1; + break; + case "SCHEMA_REMOVED_COLUMNS": + case 2: + message.types[i] = 2; + break; + } + } + switch (object.frequency) { + default: + if (typeof object.frequency === "number") { + message.frequency = object.frequency; + break; + } + break; + case "UPDATE_FREQUENCY_UNSPECIFIED": + case 0: + message.frequency = 0; + break; + case "UPDATE_FREQUENCY_NEVER": + case 1: + message.frequency = 1; + break; + case "UPDATE_FREQUENCY_DAILY": + case 2: + message.frequency = 2; + break; + case "UPDATE_FREQUENCY_MONTHLY": + case 4: + message.frequency = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a DiscoverySchemaModifiedCadence message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence + * @static + * @param {google.privacy.dlp.v2.DiscoverySchemaModifiedCadence} message DiscoverySchemaModifiedCadence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoverySchemaModifiedCadence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.types = []; + if (options.defaults) + object.frequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0; + if (message.types && message.types.length) { + object.types = []; + for (var j = 0; j < message.types.length; ++j) + object.types[j] = options.enums === String ? $root.google.privacy.dlp.v2.BigQuerySchemaModification[message.types[j]] === undefined ? message.types[j] : $root.google.privacy.dlp.v2.BigQuerySchemaModification[message.types[j]] : message.types[j]; + } + if (message.frequency != null && message.hasOwnProperty("frequency")) + object.frequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.frequency] === undefined ? message.frequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.frequency] : message.frequency; + return object; + }; + + /** + * Converts this DiscoverySchemaModifiedCadence to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence + * @instance + * @returns {Object.} JSON object + */ + DiscoverySchemaModifiedCadence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoverySchemaModifiedCadence + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoverySchemaModifiedCadence + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoverySchemaModifiedCadence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoverySchemaModifiedCadence"; + }; + + return DiscoverySchemaModifiedCadence; + })(); + + /** + * BigQuerySchemaModification enum. + * @name google.privacy.dlp.v2.BigQuerySchemaModification + * @enum {number} + * @property {number} SCHEMA_MODIFICATION_UNSPECIFIED=0 SCHEMA_MODIFICATION_UNSPECIFIED value + * @property {number} SCHEMA_NEW_COLUMNS=1 SCHEMA_NEW_COLUMNS value + * @property {number} SCHEMA_REMOVED_COLUMNS=2 SCHEMA_REMOVED_COLUMNS value + */ + v2.BigQuerySchemaModification = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SCHEMA_MODIFICATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "SCHEMA_NEW_COLUMNS"] = 1; + values[valuesById[2] = "SCHEMA_REMOVED_COLUMNS"] = 2; + return values; + })(); + + v2.DiscoveryInspectTemplateModifiedCadence = (function() { + + /** + * Properties of a DiscoveryInspectTemplateModifiedCadence. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoveryInspectTemplateModifiedCadence + * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [frequency] DiscoveryInspectTemplateModifiedCadence frequency + */ + + /** + * Constructs a new DiscoveryInspectTemplateModifiedCadence. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoveryInspectTemplateModifiedCadence. + * @implements IDiscoveryInspectTemplateModifiedCadence + * @constructor + * @param {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence=} [properties] Properties to set + */ + function DiscoveryInspectTemplateModifiedCadence(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryInspectTemplateModifiedCadence frequency. + * @member {google.privacy.dlp.v2.DataProfileUpdateFrequency} frequency + * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence + * @instance + */ + DiscoveryInspectTemplateModifiedCadence.prototype.frequency = 0; + + /** + * Creates a new DiscoveryInspectTemplateModifiedCadence instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence + * @static + * @param {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence} DiscoveryInspectTemplateModifiedCadence instance + */ + DiscoveryInspectTemplateModifiedCadence.create = function create(properties) { + return new DiscoveryInspectTemplateModifiedCadence(properties); + }; + + /** + * Encodes the specified DiscoveryInspectTemplateModifiedCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence + * @static + * @param {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence} message DiscoveryInspectTemplateModifiedCadence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryInspectTemplateModifiedCadence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.frequency); + return writer; + }; + + /** + * Encodes the specified DiscoveryInspectTemplateModifiedCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence + * @static + * @param {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence} message DiscoveryInspectTemplateModifiedCadence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryInspectTemplateModifiedCadence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryInspectTemplateModifiedCadence message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence} DiscoveryInspectTemplateModifiedCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryInspectTemplateModifiedCadence.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.frequency = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryInspectTemplateModifiedCadence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence} DiscoveryInspectTemplateModifiedCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryInspectTemplateModifiedCadence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryInspectTemplateModifiedCadence message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryInspectTemplateModifiedCadence.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.frequency != null && message.hasOwnProperty("frequency")) + switch (message.frequency) { + default: + return "frequency: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; + } + return null; + }; + + /** + * Creates a DiscoveryInspectTemplateModifiedCadence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence} DiscoveryInspectTemplateModifiedCadence + */ + DiscoveryInspectTemplateModifiedCadence.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence(); + switch (object.frequency) { + default: + if (typeof object.frequency === "number") { + message.frequency = object.frequency; + break; + } + break; + case "UPDATE_FREQUENCY_UNSPECIFIED": + case 0: + message.frequency = 0; + break; + case "UPDATE_FREQUENCY_NEVER": + case 1: + message.frequency = 1; + break; + case "UPDATE_FREQUENCY_DAILY": + case 2: + message.frequency = 2; + break; + case "UPDATE_FREQUENCY_MONTHLY": + case 4: + message.frequency = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryInspectTemplateModifiedCadence message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence + * @static + * @param {google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence} message DiscoveryInspectTemplateModifiedCadence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryInspectTemplateModifiedCadence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.frequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0; + if (message.frequency != null && message.hasOwnProperty("frequency")) + object.frequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.frequency] === undefined ? message.frequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.frequency] : message.frequency; + return object; + }; + + /** + * Converts this DiscoveryInspectTemplateModifiedCadence to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence + * @instance + * @returns {Object.} JSON object + */ + DiscoveryInspectTemplateModifiedCadence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryInspectTemplateModifiedCadence + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryInspectTemplateModifiedCadence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence"; + }; + + return DiscoveryInspectTemplateModifiedCadence; + })(); + + v2.CloudSqlDiscoveryTarget = (function() { + + /** + * Properties of a CloudSqlDiscoveryTarget. + * @memberof google.privacy.dlp.v2 + * @interface ICloudSqlDiscoveryTarget + * @property {google.privacy.dlp.v2.IDiscoveryCloudSqlFilter|null} [filter] CloudSqlDiscoveryTarget filter + * @property {google.privacy.dlp.v2.IDiscoveryCloudSqlConditions|null} [conditions] CloudSqlDiscoveryTarget conditions + * @property {google.privacy.dlp.v2.IDiscoveryCloudSqlGenerationCadence|null} [generationCadence] CloudSqlDiscoveryTarget generationCadence + * @property {google.privacy.dlp.v2.IDisabled|null} [disabled] CloudSqlDiscoveryTarget disabled + */ + + /** + * Constructs a new CloudSqlDiscoveryTarget. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CloudSqlDiscoveryTarget. + * @implements ICloudSqlDiscoveryTarget + * @constructor + * @param {google.privacy.dlp.v2.ICloudSqlDiscoveryTarget=} [properties] Properties to set + */ + function CloudSqlDiscoveryTarget(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudSqlDiscoveryTarget filter. + * @member {google.privacy.dlp.v2.IDiscoveryCloudSqlFilter|null|undefined} filter + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @instance + */ + CloudSqlDiscoveryTarget.prototype.filter = null; + + /** + * CloudSqlDiscoveryTarget conditions. + * @member {google.privacy.dlp.v2.IDiscoveryCloudSqlConditions|null|undefined} conditions + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @instance + */ + CloudSqlDiscoveryTarget.prototype.conditions = null; + + /** + * CloudSqlDiscoveryTarget generationCadence. + * @member {google.privacy.dlp.v2.IDiscoveryCloudSqlGenerationCadence|null|undefined} generationCadence + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @instance + */ + CloudSqlDiscoveryTarget.prototype.generationCadence = null; + + /** + * CloudSqlDiscoveryTarget disabled. + * @member {google.privacy.dlp.v2.IDisabled|null|undefined} disabled + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @instance + */ + CloudSqlDiscoveryTarget.prototype.disabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CloudSqlDiscoveryTarget cadence. + * @member {"generationCadence"|"disabled"|undefined} cadence + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @instance + */ + Object.defineProperty(CloudSqlDiscoveryTarget.prototype, "cadence", { + get: $util.oneOfGetter($oneOfFields = ["generationCadence", "disabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CloudSqlDiscoveryTarget instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.ICloudSqlDiscoveryTarget=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CloudSqlDiscoveryTarget} CloudSqlDiscoveryTarget instance + */ + CloudSqlDiscoveryTarget.create = function create(properties) { + return new CloudSqlDiscoveryTarget(properties); + }; + + /** + * Encodes the specified CloudSqlDiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.CloudSqlDiscoveryTarget.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.ICloudSqlDiscoveryTarget} message CloudSqlDiscoveryTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudSqlDiscoveryTarget.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + $root.google.privacy.dlp.v2.DiscoveryCloudSqlFilter.encode(message.filter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.conditions != null && Object.hasOwnProperty.call(message, "conditions")) + $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.encode(message.conditions, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.generationCadence != null && Object.hasOwnProperty.call(message, "generationCadence")) + $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.encode(message.generationCadence, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + $root.google.privacy.dlp.v2.Disabled.encode(message.disabled, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CloudSqlDiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudSqlDiscoveryTarget.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.ICloudSqlDiscoveryTarget} message CloudSqlDiscoveryTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudSqlDiscoveryTarget.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudSqlDiscoveryTarget message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CloudSqlDiscoveryTarget} CloudSqlDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudSqlDiscoveryTarget.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CloudSqlDiscoveryTarget(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.filter = $root.google.privacy.dlp.v2.DiscoveryCloudSqlFilter.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.conditions = $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.generationCadence = $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.disabled = $root.google.privacy.dlp.v2.Disabled.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CloudSqlDiscoveryTarget message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CloudSqlDiscoveryTarget} CloudSqlDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudSqlDiscoveryTarget.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudSqlDiscoveryTarget message. + * @function verify + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudSqlDiscoveryTarget.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.filter != null && message.hasOwnProperty("filter")) { + var error = $root.google.privacy.dlp.v2.DiscoveryCloudSqlFilter.verify(message.filter, long + 1); + if (error) + return "filter." + error; + } + if (message.conditions != null && message.hasOwnProperty("conditions")) { + var error = $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.verify(message.conditions, long + 1); + if (error) + return "conditions." + error; + } + if (message.generationCadence != null && message.hasOwnProperty("generationCadence")) { + properties.cadence = 1; + { + var error = $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.verify(message.generationCadence, long + 1); + if (error) + return "generationCadence." + error; + } + } + if (message.disabled != null && message.hasOwnProperty("disabled")) { + if (properties.cadence === 1) + return "cadence: multiple values"; + properties.cadence = 1; + { + var error = $root.google.privacy.dlp.v2.Disabled.verify(message.disabled, long + 1); + if (error) + return "disabled." + error; + } + } + return null; + }; + + /** + * Creates a CloudSqlDiscoveryTarget message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CloudSqlDiscoveryTarget} CloudSqlDiscoveryTarget + */ + CloudSqlDiscoveryTarget.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CloudSqlDiscoveryTarget) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CloudSqlDiscoveryTarget(); + if (object.filter != null) { + if (typeof object.filter !== "object") + throw TypeError(".google.privacy.dlp.v2.CloudSqlDiscoveryTarget.filter: object expected"); + message.filter = $root.google.privacy.dlp.v2.DiscoveryCloudSqlFilter.fromObject(object.filter, long + 1); + } + if (object.conditions != null) { + if (typeof object.conditions !== "object") + throw TypeError(".google.privacy.dlp.v2.CloudSqlDiscoveryTarget.conditions: object expected"); + message.conditions = $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.fromObject(object.conditions, long + 1); + } + if (object.generationCadence != null) { + if (typeof object.generationCadence !== "object") + throw TypeError(".google.privacy.dlp.v2.CloudSqlDiscoveryTarget.generationCadence: object expected"); + message.generationCadence = $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.fromObject(object.generationCadence, long + 1); + } + if (object.disabled != null) { + if (typeof object.disabled !== "object") + throw TypeError(".google.privacy.dlp.v2.CloudSqlDiscoveryTarget.disabled: object expected"); + message.disabled = $root.google.privacy.dlp.v2.Disabled.fromObject(object.disabled, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CloudSqlDiscoveryTarget message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.CloudSqlDiscoveryTarget} message CloudSqlDiscoveryTarget + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudSqlDiscoveryTarget.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = null; + object.conditions = null; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = $root.google.privacy.dlp.v2.DiscoveryCloudSqlFilter.toObject(message.filter, options); + if (message.conditions != null && message.hasOwnProperty("conditions")) + object.conditions = $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.toObject(message.conditions, options); + if (message.generationCadence != null && message.hasOwnProperty("generationCadence")) { + object.generationCadence = $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.toObject(message.generationCadence, options); + if (options.oneofs) + object.cadence = "generationCadence"; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) { + object.disabled = $root.google.privacy.dlp.v2.Disabled.toObject(message.disabled, options); + if (options.oneofs) + object.cadence = "disabled"; + } + return object; + }; + + /** + * Converts this CloudSqlDiscoveryTarget to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @instance + * @returns {Object.} JSON object + */ + CloudSqlDiscoveryTarget.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudSqlDiscoveryTarget + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CloudSqlDiscoveryTarget + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudSqlDiscoveryTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CloudSqlDiscoveryTarget"; + }; + + return CloudSqlDiscoveryTarget; + })(); + + v2.DiscoveryCloudSqlFilter = (function() { + + /** + * Properties of a DiscoveryCloudSqlFilter. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoveryCloudSqlFilter + * @property {google.privacy.dlp.v2.IDatabaseResourceCollection|null} [collection] DiscoveryCloudSqlFilter collection + * @property {google.privacy.dlp.v2.IAllOtherDatabaseResources|null} [others] DiscoveryCloudSqlFilter others + * @property {google.privacy.dlp.v2.IDatabaseResourceReference|null} [databaseResourceReference] DiscoveryCloudSqlFilter databaseResourceReference + */ + + /** + * Constructs a new DiscoveryCloudSqlFilter. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoveryCloudSqlFilter. + * @implements IDiscoveryCloudSqlFilter + * @constructor + * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlFilter=} [properties] Properties to set + */ + function DiscoveryCloudSqlFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryCloudSqlFilter collection. + * @member {google.privacy.dlp.v2.IDatabaseResourceCollection|null|undefined} collection + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * @instance + */ + DiscoveryCloudSqlFilter.prototype.collection = null; + + /** + * DiscoveryCloudSqlFilter others. + * @member {google.privacy.dlp.v2.IAllOtherDatabaseResources|null|undefined} others + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * @instance + */ + DiscoveryCloudSqlFilter.prototype.others = null; + + /** + * DiscoveryCloudSqlFilter databaseResourceReference. + * @member {google.privacy.dlp.v2.IDatabaseResourceReference|null|undefined} databaseResourceReference + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * @instance + */ + DiscoveryCloudSqlFilter.prototype.databaseResourceReference = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DiscoveryCloudSqlFilter filter. + * @member {"collection"|"others"|"databaseResourceReference"|undefined} filter + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * @instance + */ + Object.defineProperty(DiscoveryCloudSqlFilter.prototype, "filter", { + get: $util.oneOfGetter($oneOfFields = ["collection", "others", "databaseResourceReference"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoveryCloudSqlFilter instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * @static + * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlFilter=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlFilter} DiscoveryCloudSqlFilter instance + */ + DiscoveryCloudSqlFilter.create = function create(properties) { + return new DiscoveryCloudSqlFilter(properties); + }; + + /** + * Encodes the specified DiscoveryCloudSqlFilter message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlFilter.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * @static + * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlFilter} message DiscoveryCloudSqlFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryCloudSqlFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.collection != null && Object.hasOwnProperty.call(message, "collection")) + $root.google.privacy.dlp.v2.DatabaseResourceCollection.encode(message.collection, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.others != null && Object.hasOwnProperty.call(message, "others")) + $root.google.privacy.dlp.v2.AllOtherDatabaseResources.encode(message.others, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.databaseResourceReference != null && Object.hasOwnProperty.call(message, "databaseResourceReference")) + $root.google.privacy.dlp.v2.DatabaseResourceReference.encode(message.databaseResourceReference, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryCloudSqlFilter message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * @static + * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlFilter} message DiscoveryCloudSqlFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryCloudSqlFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryCloudSqlFilter message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlFilter} DiscoveryCloudSqlFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryCloudSqlFilter.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryCloudSqlFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.collection = $root.google.privacy.dlp.v2.DatabaseResourceCollection.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.others = $root.google.privacy.dlp.v2.AllOtherDatabaseResources.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.databaseResourceReference = $root.google.privacy.dlp.v2.DatabaseResourceReference.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryCloudSqlFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlFilter} DiscoveryCloudSqlFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryCloudSqlFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryCloudSqlFilter message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryCloudSqlFilter.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.collection != null && message.hasOwnProperty("collection")) { + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.DatabaseResourceCollection.verify(message.collection, long + 1); + if (error) + return "collection." + error; + } + } + if (message.others != null && message.hasOwnProperty("others")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.AllOtherDatabaseResources.verify(message.others, long + 1); + if (error) + return "others." + error; + } + } + if (message.databaseResourceReference != null && message.hasOwnProperty("databaseResourceReference")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.DatabaseResourceReference.verify(message.databaseResourceReference, long + 1); + if (error) + return "databaseResourceReference." + error; + } + } + return null; + }; + + /** + * Creates a DiscoveryCloudSqlFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlFilter} DiscoveryCloudSqlFilter + */ + DiscoveryCloudSqlFilter.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryCloudSqlFilter) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DiscoveryCloudSqlFilter(); + if (object.collection != null) { + if (typeof object.collection !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudSqlFilter.collection: object expected"); + message.collection = $root.google.privacy.dlp.v2.DatabaseResourceCollection.fromObject(object.collection, long + 1); + } + if (object.others != null) { + if (typeof object.others !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudSqlFilter.others: object expected"); + message.others = $root.google.privacy.dlp.v2.AllOtherDatabaseResources.fromObject(object.others, long + 1); + } + if (object.databaseResourceReference != null) { + if (typeof object.databaseResourceReference !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudSqlFilter.databaseResourceReference: object expected"); + message.databaseResourceReference = $root.google.privacy.dlp.v2.DatabaseResourceReference.fromObject(object.databaseResourceReference, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryCloudSqlFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * @static + * @param {google.privacy.dlp.v2.DiscoveryCloudSqlFilter} message DiscoveryCloudSqlFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryCloudSqlFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.collection != null && message.hasOwnProperty("collection")) { + object.collection = $root.google.privacy.dlp.v2.DatabaseResourceCollection.toObject(message.collection, options); + if (options.oneofs) + object.filter = "collection"; + } + if (message.others != null && message.hasOwnProperty("others")) { + object.others = $root.google.privacy.dlp.v2.AllOtherDatabaseResources.toObject(message.others, options); + if (options.oneofs) + object.filter = "others"; + } + if (message.databaseResourceReference != null && message.hasOwnProperty("databaseResourceReference")) { + object.databaseResourceReference = $root.google.privacy.dlp.v2.DatabaseResourceReference.toObject(message.databaseResourceReference, options); + if (options.oneofs) + object.filter = "databaseResourceReference"; + } + return object; + }; + + /** + * Converts this DiscoveryCloudSqlFilter to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * @instance + * @returns {Object.} JSON object + */ + DiscoveryCloudSqlFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryCloudSqlFilter + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryCloudSqlFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryCloudSqlFilter"; + }; + + return DiscoveryCloudSqlFilter; + })(); + + v2.DatabaseResourceCollection = (function() { + + /** + * Properties of a DatabaseResourceCollection. + * @memberof google.privacy.dlp.v2 + * @interface IDatabaseResourceCollection + * @property {google.privacy.dlp.v2.IDatabaseResourceRegexes|null} [includeRegexes] DatabaseResourceCollection includeRegexes + */ + + /** + * Constructs a new DatabaseResourceCollection. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DatabaseResourceCollection. + * @implements IDatabaseResourceCollection + * @constructor + * @param {google.privacy.dlp.v2.IDatabaseResourceCollection=} [properties] Properties to set + */ + function DatabaseResourceCollection(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DatabaseResourceCollection includeRegexes. + * @member {google.privacy.dlp.v2.IDatabaseResourceRegexes|null|undefined} includeRegexes + * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * @instance + */ + DatabaseResourceCollection.prototype.includeRegexes = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DatabaseResourceCollection pattern. + * @member {"includeRegexes"|undefined} pattern + * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * @instance + */ + Object.defineProperty(DatabaseResourceCollection.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["includeRegexes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DatabaseResourceCollection instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * @static + * @param {google.privacy.dlp.v2.IDatabaseResourceCollection=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DatabaseResourceCollection} DatabaseResourceCollection instance + */ + DatabaseResourceCollection.create = function create(properties) { + return new DatabaseResourceCollection(properties); + }; + + /** + * Encodes the specified DatabaseResourceCollection message. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceCollection.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * @static + * @param {google.privacy.dlp.v2.IDatabaseResourceCollection} message DatabaseResourceCollection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseResourceCollection.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.includeRegexes != null && Object.hasOwnProperty.call(message, "includeRegexes")) + $root.google.privacy.dlp.v2.DatabaseResourceRegexes.encode(message.includeRegexes, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DatabaseResourceCollection message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceCollection.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * @static + * @param {google.privacy.dlp.v2.IDatabaseResourceCollection} message DatabaseResourceCollection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseResourceCollection.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatabaseResourceCollection message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DatabaseResourceCollection} DatabaseResourceCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseResourceCollection.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DatabaseResourceCollection(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.includeRegexes = $root.google.privacy.dlp.v2.DatabaseResourceRegexes.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DatabaseResourceCollection message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DatabaseResourceCollection} DatabaseResourceCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseResourceCollection.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatabaseResourceCollection message. + * @function verify + * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatabaseResourceCollection.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.includeRegexes != null && message.hasOwnProperty("includeRegexes")) { + properties.pattern = 1; + { + var error = $root.google.privacy.dlp.v2.DatabaseResourceRegexes.verify(message.includeRegexes, long + 1); + if (error) + return "includeRegexes." + error; + } + } + return null; + }; + + /** + * Creates a DatabaseResourceCollection message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DatabaseResourceCollection} DatabaseResourceCollection + */ + DatabaseResourceCollection.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DatabaseResourceCollection) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DatabaseResourceCollection(); + if (object.includeRegexes != null) { + if (typeof object.includeRegexes !== "object") + throw TypeError(".google.privacy.dlp.v2.DatabaseResourceCollection.includeRegexes: object expected"); + message.includeRegexes = $root.google.privacy.dlp.v2.DatabaseResourceRegexes.fromObject(object.includeRegexes, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DatabaseResourceCollection message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * @static + * @param {google.privacy.dlp.v2.DatabaseResourceCollection} message DatabaseResourceCollection + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatabaseResourceCollection.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.includeRegexes != null && message.hasOwnProperty("includeRegexes")) { + object.includeRegexes = $root.google.privacy.dlp.v2.DatabaseResourceRegexes.toObject(message.includeRegexes, options); + if (options.oneofs) + object.pattern = "includeRegexes"; + } + return object; + }; + + /** + * Converts this DatabaseResourceCollection to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * @instance + * @returns {Object.} JSON object + */ + DatabaseResourceCollection.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatabaseResourceCollection + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DatabaseResourceCollection + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatabaseResourceCollection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DatabaseResourceCollection"; + }; + + return DatabaseResourceCollection; + })(); + + v2.DatabaseResourceRegexes = (function() { + + /** + * Properties of a DatabaseResourceRegexes. + * @memberof google.privacy.dlp.v2 + * @interface IDatabaseResourceRegexes + * @property {Array.|null} [patterns] DatabaseResourceRegexes patterns + */ + + /** + * Constructs a new DatabaseResourceRegexes. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DatabaseResourceRegexes. + * @implements IDatabaseResourceRegexes + * @constructor + * @param {google.privacy.dlp.v2.IDatabaseResourceRegexes=} [properties] Properties to set + */ + function DatabaseResourceRegexes(properties) { + this.patterns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DatabaseResourceRegexes patterns. + * @member {Array.} patterns + * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @instance + */ + DatabaseResourceRegexes.prototype.patterns = $util.emptyArray; + + /** + * Creates a new DatabaseResourceRegexes instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @static + * @param {google.privacy.dlp.v2.IDatabaseResourceRegexes=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DatabaseResourceRegexes} DatabaseResourceRegexes instance + */ + DatabaseResourceRegexes.create = function create(properties) { + return new DatabaseResourceRegexes(properties); + }; + + /** + * Encodes the specified DatabaseResourceRegexes message. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceRegexes.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @static + * @param {google.privacy.dlp.v2.IDatabaseResourceRegexes} message DatabaseResourceRegexes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseResourceRegexes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.patterns != null && message.patterns.length) + for (var i = 0; i < message.patterns.length; ++i) + $root.google.privacy.dlp.v2.DatabaseResourceRegex.encode(message.patterns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DatabaseResourceRegexes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceRegexes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @static + * @param {google.privacy.dlp.v2.IDatabaseResourceRegexes} message DatabaseResourceRegexes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseResourceRegexes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatabaseResourceRegexes message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DatabaseResourceRegexes} DatabaseResourceRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseResourceRegexes.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DatabaseResourceRegexes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.patterns && message.patterns.length)) + message.patterns = []; + message.patterns.push($root.google.privacy.dlp.v2.DatabaseResourceRegex.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DatabaseResourceRegexes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DatabaseResourceRegexes} DatabaseResourceRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseResourceRegexes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatabaseResourceRegexes message. + * @function verify + * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatabaseResourceRegexes.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.patterns != null && message.hasOwnProperty("patterns")) { + if (!Array.isArray(message.patterns)) + return "patterns: array expected"; + for (var i = 0; i < message.patterns.length; ++i) { + var error = $root.google.privacy.dlp.v2.DatabaseResourceRegex.verify(message.patterns[i], long + 1); + if (error) + return "patterns." + error; + } + } + return null; + }; + + /** + * Creates a DatabaseResourceRegexes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DatabaseResourceRegexes} DatabaseResourceRegexes + */ + DatabaseResourceRegexes.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DatabaseResourceRegexes) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DatabaseResourceRegexes(); + if (object.patterns) { + if (!Array.isArray(object.patterns)) + throw TypeError(".google.privacy.dlp.v2.DatabaseResourceRegexes.patterns: array expected"); + message.patterns = []; + for (var i = 0; i < object.patterns.length; ++i) { + if (typeof object.patterns[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.DatabaseResourceRegexes.patterns: object expected"); + message.patterns[i] = $root.google.privacy.dlp.v2.DatabaseResourceRegex.fromObject(object.patterns[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a DatabaseResourceRegexes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @static + * @param {google.privacy.dlp.v2.DatabaseResourceRegexes} message DatabaseResourceRegexes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatabaseResourceRegexes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.patterns = []; + if (message.patterns && message.patterns.length) { + object.patterns = []; + for (var j = 0; j < message.patterns.length; ++j) + object.patterns[j] = $root.google.privacy.dlp.v2.DatabaseResourceRegex.toObject(message.patterns[j], options); + } + return object; + }; + + /** + * Converts this DatabaseResourceRegexes to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @instance + * @returns {Object.} JSON object + */ + DatabaseResourceRegexes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatabaseResourceRegexes + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DatabaseResourceRegexes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatabaseResourceRegexes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DatabaseResourceRegexes"; + }; + + return DatabaseResourceRegexes; + })(); + + v2.DatabaseResourceRegex = (function() { + + /** + * Properties of a DatabaseResourceRegex. + * @memberof google.privacy.dlp.v2 + * @interface IDatabaseResourceRegex + * @property {string|null} [projectIdRegex] DatabaseResourceRegex projectIdRegex + * @property {string|null} [instanceRegex] DatabaseResourceRegex instanceRegex + * @property {string|null} [databaseRegex] DatabaseResourceRegex databaseRegex + * @property {string|null} [databaseResourceNameRegex] DatabaseResourceRegex databaseResourceNameRegex + */ + + /** + * Constructs a new DatabaseResourceRegex. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DatabaseResourceRegex. + * @implements IDatabaseResourceRegex + * @constructor + * @param {google.privacy.dlp.v2.IDatabaseResourceRegex=} [properties] Properties to set + */ + function DatabaseResourceRegex(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DatabaseResourceRegex projectIdRegex. + * @member {string} projectIdRegex + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * @instance + */ + DatabaseResourceRegex.prototype.projectIdRegex = ""; + + /** + * DatabaseResourceRegex instanceRegex. + * @member {string} instanceRegex + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * @instance + */ + DatabaseResourceRegex.prototype.instanceRegex = ""; + + /** + * DatabaseResourceRegex databaseRegex. + * @member {string} databaseRegex + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * @instance + */ + DatabaseResourceRegex.prototype.databaseRegex = ""; + + /** + * DatabaseResourceRegex databaseResourceNameRegex. + * @member {string} databaseResourceNameRegex + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * @instance + */ + DatabaseResourceRegex.prototype.databaseResourceNameRegex = ""; + + /** + * Creates a new DatabaseResourceRegex instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * @static + * @param {google.privacy.dlp.v2.IDatabaseResourceRegex=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DatabaseResourceRegex} DatabaseResourceRegex instance + */ + DatabaseResourceRegex.create = function create(properties) { + return new DatabaseResourceRegex(properties); + }; + + /** + * Encodes the specified DatabaseResourceRegex message. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceRegex.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * @static + * @param {google.privacy.dlp.v2.IDatabaseResourceRegex} message DatabaseResourceRegex message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseResourceRegex.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectIdRegex != null && Object.hasOwnProperty.call(message, "projectIdRegex")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectIdRegex); + if (message.instanceRegex != null && Object.hasOwnProperty.call(message, "instanceRegex")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.instanceRegex); + if (message.databaseRegex != null && Object.hasOwnProperty.call(message, "databaseRegex")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.databaseRegex); + if (message.databaseResourceNameRegex != null && Object.hasOwnProperty.call(message, "databaseResourceNameRegex")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.databaseResourceNameRegex); + return writer; + }; + + /** + * Encodes the specified DatabaseResourceRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceRegex.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * @static + * @param {google.privacy.dlp.v2.IDatabaseResourceRegex} message DatabaseResourceRegex message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseResourceRegex.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatabaseResourceRegex message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DatabaseResourceRegex} DatabaseResourceRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseResourceRegex.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DatabaseResourceRegex(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.projectIdRegex = reader.string(); + break; + } + case 2: { + message.instanceRegex = reader.string(); + break; + } + case 3: { + message.databaseRegex = reader.string(); + break; + } + case 4: { + message.databaseResourceNameRegex = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DatabaseResourceRegex message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DatabaseResourceRegex} DatabaseResourceRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseResourceRegex.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatabaseResourceRegex message. + * @function verify + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatabaseResourceRegex.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.projectIdRegex != null && message.hasOwnProperty("projectIdRegex")) + if (!$util.isString(message.projectIdRegex)) + return "projectIdRegex: string expected"; + if (message.instanceRegex != null && message.hasOwnProperty("instanceRegex")) + if (!$util.isString(message.instanceRegex)) + return "instanceRegex: string expected"; + if (message.databaseRegex != null && message.hasOwnProperty("databaseRegex")) + if (!$util.isString(message.databaseRegex)) + return "databaseRegex: string expected"; + if (message.databaseResourceNameRegex != null && message.hasOwnProperty("databaseResourceNameRegex")) + if (!$util.isString(message.databaseResourceNameRegex)) + return "databaseResourceNameRegex: string expected"; + return null; + }; + + /** + * Creates a DatabaseResourceRegex message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DatabaseResourceRegex} DatabaseResourceRegex + */ + DatabaseResourceRegex.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DatabaseResourceRegex) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DatabaseResourceRegex(); + if (object.projectIdRegex != null) + message.projectIdRegex = String(object.projectIdRegex); + if (object.instanceRegex != null) + message.instanceRegex = String(object.instanceRegex); + if (object.databaseRegex != null) + message.databaseRegex = String(object.databaseRegex); + if (object.databaseResourceNameRegex != null) + message.databaseResourceNameRegex = String(object.databaseResourceNameRegex); + return message; + }; + + /** + * Creates a plain object from a DatabaseResourceRegex message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * @static + * @param {google.privacy.dlp.v2.DatabaseResourceRegex} message DatabaseResourceRegex + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatabaseResourceRegex.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectIdRegex = ""; + object.instanceRegex = ""; + object.databaseRegex = ""; + object.databaseResourceNameRegex = ""; + } + if (message.projectIdRegex != null && message.hasOwnProperty("projectIdRegex")) + object.projectIdRegex = message.projectIdRegex; + if (message.instanceRegex != null && message.hasOwnProperty("instanceRegex")) + object.instanceRegex = message.instanceRegex; + if (message.databaseRegex != null && message.hasOwnProperty("databaseRegex")) + object.databaseRegex = message.databaseRegex; + if (message.databaseResourceNameRegex != null && message.hasOwnProperty("databaseResourceNameRegex")) + object.databaseResourceNameRegex = message.databaseResourceNameRegex; + return object; + }; + + /** + * Converts this DatabaseResourceRegex to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * @instance + * @returns {Object.} JSON object + */ + DatabaseResourceRegex.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatabaseResourceRegex + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DatabaseResourceRegex + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatabaseResourceRegex.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DatabaseResourceRegex"; + }; + + return DatabaseResourceRegex; + })(); + + v2.AllOtherDatabaseResources = (function() { + + /** + * Properties of an AllOtherDatabaseResources. + * @memberof google.privacy.dlp.v2 + * @interface IAllOtherDatabaseResources + */ + + /** + * Constructs a new AllOtherDatabaseResources. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an AllOtherDatabaseResources. + * @implements IAllOtherDatabaseResources + * @constructor + * @param {google.privacy.dlp.v2.IAllOtherDatabaseResources=} [properties] Properties to set + */ + function AllOtherDatabaseResources(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new AllOtherDatabaseResources instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources + * @static + * @param {google.privacy.dlp.v2.IAllOtherDatabaseResources=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AllOtherDatabaseResources} AllOtherDatabaseResources instance + */ + AllOtherDatabaseResources.create = function create(properties) { + return new AllOtherDatabaseResources(properties); + }; + + /** + * Encodes the specified AllOtherDatabaseResources message. Does not implicitly {@link google.privacy.dlp.v2.AllOtherDatabaseResources.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources + * @static + * @param {google.privacy.dlp.v2.IAllOtherDatabaseResources} message AllOtherDatabaseResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllOtherDatabaseResources.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AllOtherDatabaseResources message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AllOtherDatabaseResources.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources + * @static + * @param {google.privacy.dlp.v2.IAllOtherDatabaseResources} message AllOtherDatabaseResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllOtherDatabaseResources.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AllOtherDatabaseResources message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AllOtherDatabaseResources} AllOtherDatabaseResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllOtherDatabaseResources.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AllOtherDatabaseResources(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AllOtherDatabaseResources message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AllOtherDatabaseResources} AllOtherDatabaseResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllOtherDatabaseResources.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AllOtherDatabaseResources message. + * @function verify + * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AllOtherDatabaseResources.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates an AllOtherDatabaseResources message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AllOtherDatabaseResources} AllOtherDatabaseResources + */ + AllOtherDatabaseResources.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AllOtherDatabaseResources) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.AllOtherDatabaseResources(); + }; + + /** + * Creates a plain object from an AllOtherDatabaseResources message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources + * @static + * @param {google.privacy.dlp.v2.AllOtherDatabaseResources} message AllOtherDatabaseResources + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AllOtherDatabaseResources.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AllOtherDatabaseResources to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources + * @instance + * @returns {Object.} JSON object + */ + AllOtherDatabaseResources.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AllOtherDatabaseResources + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AllOtherDatabaseResources + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AllOtherDatabaseResources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AllOtherDatabaseResources"; + }; + + return AllOtherDatabaseResources; + })(); + + v2.DatabaseResourceReference = (function() { + + /** + * Properties of a DatabaseResourceReference. + * @memberof google.privacy.dlp.v2 + * @interface IDatabaseResourceReference + * @property {string|null} [projectId] DatabaseResourceReference projectId + * @property {string|null} [instance] DatabaseResourceReference instance + * @property {string|null} [database] DatabaseResourceReference database + * @property {string|null} [databaseResource] DatabaseResourceReference databaseResource + */ + + /** + * Constructs a new DatabaseResourceReference. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DatabaseResourceReference. + * @implements IDatabaseResourceReference + * @constructor + * @param {google.privacy.dlp.v2.IDatabaseResourceReference=} [properties] Properties to set + */ + function DatabaseResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DatabaseResourceReference projectId. + * @member {string} projectId + * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @instance + */ + DatabaseResourceReference.prototype.projectId = ""; + + /** + * DatabaseResourceReference instance. + * @member {string} instance + * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @instance + */ + DatabaseResourceReference.prototype.instance = ""; + + /** + * DatabaseResourceReference database. + * @member {string} database + * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @instance + */ + DatabaseResourceReference.prototype.database = ""; + + /** + * DatabaseResourceReference databaseResource. + * @member {string} databaseResource + * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @instance + */ + DatabaseResourceReference.prototype.databaseResource = ""; + + /** + * Creates a new DatabaseResourceReference instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @static + * @param {google.privacy.dlp.v2.IDatabaseResourceReference=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DatabaseResourceReference} DatabaseResourceReference instance + */ + DatabaseResourceReference.create = function create(properties) { + return new DatabaseResourceReference(properties); + }; + + /** + * Encodes the specified DatabaseResourceReference message. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceReference.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @static + * @param {google.privacy.dlp.v2.IDatabaseResourceReference} message DatabaseResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.instance != null && Object.hasOwnProperty.call(message, "instance")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.instance); + if (message.database != null && Object.hasOwnProperty.call(message, "database")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.database); + if (message.databaseResource != null && Object.hasOwnProperty.call(message, "databaseResource")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.databaseResource); + return writer; + }; + + /** + * Encodes the specified DatabaseResourceReference message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DatabaseResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @static + * @param {google.privacy.dlp.v2.IDatabaseResourceReference} message DatabaseResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatabaseResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DatabaseResourceReference} DatabaseResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseResourceReference.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DatabaseResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.instance = reader.string(); + break; + } + case 3: { + message.database = reader.string(); + break; + } + case 4: { + message.databaseResource = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DatabaseResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DatabaseResourceReference} DatabaseResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatabaseResourceReference message. + * @function verify + * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatabaseResourceReference.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.instance != null && message.hasOwnProperty("instance")) + if (!$util.isString(message.instance)) + return "instance: string expected"; + if (message.database != null && message.hasOwnProperty("database")) + if (!$util.isString(message.database)) + return "database: string expected"; + if (message.databaseResource != null && message.hasOwnProperty("databaseResource")) + if (!$util.isString(message.databaseResource)) + return "databaseResource: string expected"; + return null; + }; + + /** + * Creates a DatabaseResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DatabaseResourceReference} DatabaseResourceReference + */ + DatabaseResourceReference.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DatabaseResourceReference) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DatabaseResourceReference(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.instance != null) + message.instance = String(object.instance); + if (object.database != null) + message.database = String(object.database); + if (object.databaseResource != null) + message.databaseResource = String(object.databaseResource); + return message; + }; + + /** + * Creates a plain object from a DatabaseResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @static + * @param {google.privacy.dlp.v2.DatabaseResourceReference} message DatabaseResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatabaseResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.instance = ""; + object.database = ""; + object.databaseResource = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.instance != null && message.hasOwnProperty("instance")) + object.instance = message.instance; + if (message.database != null && message.hasOwnProperty("database")) + object.database = message.database; + if (message.databaseResource != null && message.hasOwnProperty("databaseResource")) + object.databaseResource = message.databaseResource; + return object; + }; + + /** + * Converts this DatabaseResourceReference to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @instance + * @returns {Object.} JSON object + */ + DatabaseResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatabaseResourceReference + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DatabaseResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatabaseResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DatabaseResourceReference"; + }; + + return DatabaseResourceReference; + })(); + + v2.DiscoveryCloudSqlConditions = (function() { + + /** + * Properties of a DiscoveryCloudSqlConditions. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoveryCloudSqlConditions + * @property {Array.|null} [databaseEngines] DiscoveryCloudSqlConditions databaseEngines + * @property {Array.|null} [types] DiscoveryCloudSqlConditions types + */ + + /** + * Constructs a new DiscoveryCloudSqlConditions. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoveryCloudSqlConditions. + * @implements IDiscoveryCloudSqlConditions + * @constructor + * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlConditions=} [properties] Properties to set + */ + function DiscoveryCloudSqlConditions(properties) { + this.databaseEngines = []; + this.types = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryCloudSqlConditions databaseEngines. + * @member {Array.} databaseEngines + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions + * @instance + */ + DiscoveryCloudSqlConditions.prototype.databaseEngines = $util.emptyArray; + + /** + * DiscoveryCloudSqlConditions types. + * @member {Array.} types + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions + * @instance + */ + DiscoveryCloudSqlConditions.prototype.types = $util.emptyArray; + + /** + * Creates a new DiscoveryCloudSqlConditions instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions + * @static + * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlConditions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlConditions} DiscoveryCloudSqlConditions instance + */ + DiscoveryCloudSqlConditions.create = function create(properties) { + return new DiscoveryCloudSqlConditions(properties); + }; + + /** + * Encodes the specified DiscoveryCloudSqlConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlConditions.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions + * @static + * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlConditions} message DiscoveryCloudSqlConditions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryCloudSqlConditions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.databaseEngines != null && message.databaseEngines.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.databaseEngines.length; ++i) + writer.int32(message.databaseEngines[i]); + writer.ldelim(); + } + if (message.types != null && message.types.length) { + writer.uint32(/* id 3, wireType 2 =*/26).fork(); + for (var i = 0; i < message.types.length; ++i) + writer.int32(message.types[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified DiscoveryCloudSqlConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlConditions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions + * @static + * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlConditions} message DiscoveryCloudSqlConditions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryCloudSqlConditions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryCloudSqlConditions message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlConditions} DiscoveryCloudSqlConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryCloudSqlConditions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.databaseEngines && message.databaseEngines.length)) + message.databaseEngines = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.databaseEngines.push(reader.int32()); + } else + message.databaseEngines.push(reader.int32()); + break; + } + case 3: { + if (!(message.types && message.types.length)) + message.types = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.types.push(reader.int32()); + } else + message.types.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryCloudSqlConditions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlConditions} DiscoveryCloudSqlConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryCloudSqlConditions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryCloudSqlConditions message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryCloudSqlConditions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.databaseEngines != null && message.hasOwnProperty("databaseEngines")) { + if (!Array.isArray(message.databaseEngines)) + return "databaseEngines: array expected"; + for (var i = 0; i < message.databaseEngines.length; ++i) + switch (message.databaseEngines[i]) { + default: + return "databaseEngines: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.types != null && message.hasOwnProperty("types")) { + if (!Array.isArray(message.types)) + return "types: array expected"; + for (var i = 0; i < message.types.length; ++i) + switch (message.types[i]) { + default: + return "types: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a DiscoveryCloudSqlConditions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlConditions} DiscoveryCloudSqlConditions + */ + DiscoveryCloudSqlConditions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions(); + if (object.databaseEngines) { + if (!Array.isArray(object.databaseEngines)) + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudSqlConditions.databaseEngines: array expected"); + message.databaseEngines = []; + for (var i = 0; i < object.databaseEngines.length; ++i) + switch (object.databaseEngines[i]) { + default: + if (typeof object.databaseEngines[i] === "number") { + message.databaseEngines[i] = object.databaseEngines[i]; + break; + } + case "DATABASE_ENGINE_UNSPECIFIED": + case 0: + message.databaseEngines[i] = 0; + break; + case "ALL_SUPPORTED_DATABASE_ENGINES": + case 1: + message.databaseEngines[i] = 1; + break; + case "MYSQL": + case 2: + message.databaseEngines[i] = 2; + break; + case "POSTGRES": + case 3: + message.databaseEngines[i] = 3; + break; + } + } + if (object.types) { + if (!Array.isArray(object.types)) + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudSqlConditions.types: array expected"); + message.types = []; + for (var i = 0; i < object.types.length; ++i) + switch (object.types[i]) { + default: + if (typeof object.types[i] === "number") { + message.types[i] = object.types[i]; + break; + } + case "DATABASE_RESOURCE_TYPE_UNSPECIFIED": + case 0: + message.types[i] = 0; + break; + case "DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES": + case 1: + message.types[i] = 1; + break; + case "DATABASE_RESOURCE_TYPE_TABLE": + case 2: + message.types[i] = 2; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryCloudSqlConditions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions + * @static + * @param {google.privacy.dlp.v2.DiscoveryCloudSqlConditions} message DiscoveryCloudSqlConditions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryCloudSqlConditions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.databaseEngines = []; + object.types = []; + } + if (message.databaseEngines && message.databaseEngines.length) { + object.databaseEngines = []; + for (var j = 0; j < message.databaseEngines.length; ++j) + object.databaseEngines[j] = options.enums === String ? $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseEngine[message.databaseEngines[j]] === undefined ? message.databaseEngines[j] : $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseEngine[message.databaseEngines[j]] : message.databaseEngines[j]; + } + if (message.types && message.types.length) { + object.types = []; + for (var j = 0; j < message.types.length; ++j) + object.types[j] = options.enums === String ? $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseResourceType[message.types[j]] === undefined ? message.types[j] : $root.google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseResourceType[message.types[j]] : message.types[j]; + } + return object; + }; + + /** + * Converts this DiscoveryCloudSqlConditions to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions + * @instance + * @returns {Object.} JSON object + */ + DiscoveryCloudSqlConditions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryCloudSqlConditions + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlConditions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryCloudSqlConditions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryCloudSqlConditions"; + }; + + /** + * DatabaseEngine enum. + * @name google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseEngine + * @enum {number} + * @property {number} DATABASE_ENGINE_UNSPECIFIED=0 DATABASE_ENGINE_UNSPECIFIED value + * @property {number} ALL_SUPPORTED_DATABASE_ENGINES=1 ALL_SUPPORTED_DATABASE_ENGINES value + * @property {number} MYSQL=2 MYSQL value + * @property {number} POSTGRES=3 POSTGRES value + */ + DiscoveryCloudSqlConditions.DatabaseEngine = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATABASE_ENGINE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALL_SUPPORTED_DATABASE_ENGINES"] = 1; + values[valuesById[2] = "MYSQL"] = 2; + values[valuesById[3] = "POSTGRES"] = 3; + return values; + })(); + + /** + * DatabaseResourceType enum. + * @name google.privacy.dlp.v2.DiscoveryCloudSqlConditions.DatabaseResourceType + * @enum {number} + * @property {number} DATABASE_RESOURCE_TYPE_UNSPECIFIED=0 DATABASE_RESOURCE_TYPE_UNSPECIFIED value + * @property {number} DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES=1 DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES value + * @property {number} DATABASE_RESOURCE_TYPE_TABLE=2 DATABASE_RESOURCE_TYPE_TABLE value + */ + DiscoveryCloudSqlConditions.DatabaseResourceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATABASE_RESOURCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES"] = 1; + values[valuesById[2] = "DATABASE_RESOURCE_TYPE_TABLE"] = 2; + return values; + })(); + + return DiscoveryCloudSqlConditions; + })(); + + v2.DiscoveryCloudSqlGenerationCadence = (function() { + + /** + * Properties of a DiscoveryCloudSqlGenerationCadence. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoveryCloudSqlGenerationCadence + * @property {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.ISchemaModifiedCadence|null} [schemaModifiedCadence] DiscoveryCloudSqlGenerationCadence schemaModifiedCadence + * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [refreshFrequency] DiscoveryCloudSqlGenerationCadence refreshFrequency + * @property {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null} [inspectTemplateModifiedCadence] DiscoveryCloudSqlGenerationCadence inspectTemplateModifiedCadence + */ + + /** + * Constructs a new DiscoveryCloudSqlGenerationCadence. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoveryCloudSqlGenerationCadence. + * @implements IDiscoveryCloudSqlGenerationCadence + * @constructor + * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlGenerationCadence=} [properties] Properties to set + */ + function DiscoveryCloudSqlGenerationCadence(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryCloudSqlGenerationCadence schemaModifiedCadence. + * @member {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.ISchemaModifiedCadence|null|undefined} schemaModifiedCadence + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @instance + */ + DiscoveryCloudSqlGenerationCadence.prototype.schemaModifiedCadence = null; + + /** + * DiscoveryCloudSqlGenerationCadence refreshFrequency. + * @member {google.privacy.dlp.v2.DataProfileUpdateFrequency} refreshFrequency + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @instance + */ + DiscoveryCloudSqlGenerationCadence.prototype.refreshFrequency = 0; + + /** + * DiscoveryCloudSqlGenerationCadence inspectTemplateModifiedCadence. + * @member {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null|undefined} inspectTemplateModifiedCadence + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @instance + */ + DiscoveryCloudSqlGenerationCadence.prototype.inspectTemplateModifiedCadence = null; + + /** + * Creates a new DiscoveryCloudSqlGenerationCadence instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @static + * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlGenerationCadence=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence} DiscoveryCloudSqlGenerationCadence instance + */ + DiscoveryCloudSqlGenerationCadence.create = function create(properties) { + return new DiscoveryCloudSqlGenerationCadence(properties); + }; + + /** + * Encodes the specified DiscoveryCloudSqlGenerationCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @static + * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlGenerationCadence} message DiscoveryCloudSqlGenerationCadence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryCloudSqlGenerationCadence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.schemaModifiedCadence != null && Object.hasOwnProperty.call(message, "schemaModifiedCadence")) + $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.encode(message.schemaModifiedCadence, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.refreshFrequency != null && Object.hasOwnProperty.call(message, "refreshFrequency")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.refreshFrequency); + if (message.inspectTemplateModifiedCadence != null && Object.hasOwnProperty.call(message, "inspectTemplateModifiedCadence")) + $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.encode(message.inspectTemplateModifiedCadence, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryCloudSqlGenerationCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @static + * @param {google.privacy.dlp.v2.IDiscoveryCloudSqlGenerationCadence} message DiscoveryCloudSqlGenerationCadence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryCloudSqlGenerationCadence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryCloudSqlGenerationCadence message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence} DiscoveryCloudSqlGenerationCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryCloudSqlGenerationCadence.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.schemaModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.refreshFrequency = reader.int32(); + break; + } + case 3: { + message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryCloudSqlGenerationCadence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence} DiscoveryCloudSqlGenerationCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryCloudSqlGenerationCadence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryCloudSqlGenerationCadence message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryCloudSqlGenerationCadence.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.schemaModifiedCadence != null && message.hasOwnProperty("schemaModifiedCadence")) { + var error = $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.verify(message.schemaModifiedCadence, long + 1); + if (error) + return "schemaModifiedCadence." + error; + } + if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency")) + switch (message.refreshFrequency) { + default: + return "refreshFrequency: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; + } + if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence")) { + var error = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.verify(message.inspectTemplateModifiedCadence, long + 1); + if (error) + return "inspectTemplateModifiedCadence." + error; + } + return null; + }; + + /** + * Creates a DiscoveryCloudSqlGenerationCadence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence} DiscoveryCloudSqlGenerationCadence + */ + DiscoveryCloudSqlGenerationCadence.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence(); + if (object.schemaModifiedCadence != null) { + if (typeof object.schemaModifiedCadence !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.schemaModifiedCadence: object expected"); + message.schemaModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.fromObject(object.schemaModifiedCadence, long + 1); + } + switch (object.refreshFrequency) { + default: + if (typeof object.refreshFrequency === "number") { + message.refreshFrequency = object.refreshFrequency; + break; + } + break; + case "UPDATE_FREQUENCY_UNSPECIFIED": + case 0: + message.refreshFrequency = 0; + break; + case "UPDATE_FREQUENCY_NEVER": + case 1: + message.refreshFrequency = 1; + break; + case "UPDATE_FREQUENCY_DAILY": + case 2: + message.refreshFrequency = 2; + break; + case "UPDATE_FREQUENCY_MONTHLY": + case 4: + message.refreshFrequency = 4; + break; + } + if (object.inspectTemplateModifiedCadence != null) { + if (typeof object.inspectTemplateModifiedCadence !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.inspectTemplateModifiedCadence: object expected"); + message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.fromObject(object.inspectTemplateModifiedCadence, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryCloudSqlGenerationCadence message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @static + * @param {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence} message DiscoveryCloudSqlGenerationCadence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryCloudSqlGenerationCadence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.schemaModifiedCadence = null; + object.refreshFrequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0; + object.inspectTemplateModifiedCadence = null; + } + if (message.schemaModifiedCadence != null && message.hasOwnProperty("schemaModifiedCadence")) + object.schemaModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.toObject(message.schemaModifiedCadence, options); + if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency")) + object.refreshFrequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] === undefined ? message.refreshFrequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] : message.refreshFrequency; + if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence")) + object.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.toObject(message.inspectTemplateModifiedCadence, options); + return object; + }; + + /** + * Converts this DiscoveryCloudSqlGenerationCadence to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @instance + * @returns {Object.} JSON object + */ + DiscoveryCloudSqlGenerationCadence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryCloudSqlGenerationCadence + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryCloudSqlGenerationCadence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence"; + }; + + DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence = (function() { + + /** + * Properties of a SchemaModifiedCadence. + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @interface ISchemaModifiedCadence + * @property {Array.|null} [types] SchemaModifiedCadence types + * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [frequency] SchemaModifiedCadence frequency + */ + + /** + * Constructs a new SchemaModifiedCadence. + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence + * @classdesc Represents a SchemaModifiedCadence. + * @implements ISchemaModifiedCadence + * @constructor + * @param {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.ISchemaModifiedCadence=} [properties] Properties to set + */ + function SchemaModifiedCadence(properties) { + this.types = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchemaModifiedCadence types. + * @member {Array.} types + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence + * @instance + */ + SchemaModifiedCadence.prototype.types = $util.emptyArray; + + /** + * SchemaModifiedCadence frequency. + * @member {google.privacy.dlp.v2.DataProfileUpdateFrequency} frequency + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence + * @instance + */ + SchemaModifiedCadence.prototype.frequency = 0; + + /** + * Creates a new SchemaModifiedCadence instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence + * @static + * @param {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.ISchemaModifiedCadence=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence} SchemaModifiedCadence instance + */ + SchemaModifiedCadence.create = function create(properties) { + return new SchemaModifiedCadence(properties); + }; + + /** + * Encodes the specified SchemaModifiedCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence + * @static + * @param {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.ISchemaModifiedCadence} message SchemaModifiedCadence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaModifiedCadence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.types != null && message.types.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.types.length; ++i) + writer.int32(message.types[i]); + writer.ldelim(); + } + if (message.frequency != null && Object.hasOwnProperty.call(message, "frequency")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.frequency); + return writer; + }; + + /** + * Encodes the specified SchemaModifiedCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence + * @static + * @param {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.ISchemaModifiedCadence} message SchemaModifiedCadence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchemaModifiedCadence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchemaModifiedCadence message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence} SchemaModifiedCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaModifiedCadence.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.types && message.types.length)) + message.types = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.types.push(reader.int32()); + } else + message.types.push(reader.int32()); + break; + } + case 2: { + message.frequency = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SchemaModifiedCadence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence} SchemaModifiedCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchemaModifiedCadence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchemaModifiedCadence message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchemaModifiedCadence.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.types != null && message.hasOwnProperty("types")) { + if (!Array.isArray(message.types)) + return "types: array expected"; + for (var i = 0; i < message.types.length; ++i) + switch (message.types[i]) { + default: + return "types: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.frequency != null && message.hasOwnProperty("frequency")) + switch (message.frequency) { + default: + return "frequency: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; + } + return null; + }; + + /** + * Creates a SchemaModifiedCadence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence} SchemaModifiedCadence + */ + SchemaModifiedCadence.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence(); + if (object.types) { + if (!Array.isArray(object.types)) + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.types: array expected"); + message.types = []; + for (var i = 0; i < object.types.length; ++i) + switch (object.types[i]) { + default: + if (typeof object.types[i] === "number") { + message.types[i] = object.types[i]; + break; + } + case "SQL_SCHEMA_MODIFICATION_UNSPECIFIED": + case 0: + message.types[i] = 0; + break; + case "NEW_COLUMNS": + case 1: + message.types[i] = 1; + break; + case "REMOVED_COLUMNS": + case 2: + message.types[i] = 2; + break; + } + } + switch (object.frequency) { + default: + if (typeof object.frequency === "number") { + message.frequency = object.frequency; + break; + } + break; + case "UPDATE_FREQUENCY_UNSPECIFIED": + case 0: + message.frequency = 0; + break; + case "UPDATE_FREQUENCY_NEVER": + case 1: + message.frequency = 1; + break; + case "UPDATE_FREQUENCY_DAILY": + case 2: + message.frequency = 2; + break; + case "UPDATE_FREQUENCY_MONTHLY": + case 4: + message.frequency = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a SchemaModifiedCadence message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence + * @static + * @param {google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence} message SchemaModifiedCadence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchemaModifiedCadence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.types = []; + if (options.defaults) + object.frequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0; + if (message.types && message.types.length) { + object.types = []; + for (var j = 0; j < message.types.length; ++j) + object.types[j] = options.enums === String ? $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.CloudSqlSchemaModification[message.types[j]] === undefined ? message.types[j] : $root.google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.CloudSqlSchemaModification[message.types[j]] : message.types[j]; + } + if (message.frequency != null && message.hasOwnProperty("frequency")) + object.frequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.frequency] === undefined ? message.frequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.frequency] : message.frequency; + return object; + }; + + /** + * Converts this SchemaModifiedCadence to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence + * @instance + * @returns {Object.} JSON object + */ + SchemaModifiedCadence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchemaModifiedCadence + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchemaModifiedCadence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence"; + }; + + /** + * CloudSqlSchemaModification enum. + * @name google.privacy.dlp.v2.DiscoveryCloudSqlGenerationCadence.SchemaModifiedCadence.CloudSqlSchemaModification + * @enum {number} + * @property {number} SQL_SCHEMA_MODIFICATION_UNSPECIFIED=0 SQL_SCHEMA_MODIFICATION_UNSPECIFIED value + * @property {number} NEW_COLUMNS=1 NEW_COLUMNS value + * @property {number} REMOVED_COLUMNS=2 REMOVED_COLUMNS value + */ + SchemaModifiedCadence.CloudSqlSchemaModification = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SQL_SCHEMA_MODIFICATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "NEW_COLUMNS"] = 1; + values[valuesById[2] = "REMOVED_COLUMNS"] = 2; + return values; + })(); + + return SchemaModifiedCadence; + })(); + + return DiscoveryCloudSqlGenerationCadence; + })(); + + v2.SecretsDiscoveryTarget = (function() { + + /** + * Properties of a SecretsDiscoveryTarget. + * @memberof google.privacy.dlp.v2 + * @interface ISecretsDiscoveryTarget + */ + + /** + * Constructs a new SecretsDiscoveryTarget. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a SecretsDiscoveryTarget. + * @implements ISecretsDiscoveryTarget + * @constructor + * @param {google.privacy.dlp.v2.ISecretsDiscoveryTarget=} [properties] Properties to set + */ + function SecretsDiscoveryTarget(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new SecretsDiscoveryTarget instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.ISecretsDiscoveryTarget=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.SecretsDiscoveryTarget} SecretsDiscoveryTarget instance + */ + SecretsDiscoveryTarget.create = function create(properties) { + return new SecretsDiscoveryTarget(properties); + }; + + /** + * Encodes the specified SecretsDiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.SecretsDiscoveryTarget.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.ISecretsDiscoveryTarget} message SecretsDiscoveryTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecretsDiscoveryTarget.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified SecretsDiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.SecretsDiscoveryTarget.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.ISecretsDiscoveryTarget} message SecretsDiscoveryTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecretsDiscoveryTarget.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecretsDiscoveryTarget message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.SecretsDiscoveryTarget} SecretsDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecretsDiscoveryTarget.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.SecretsDiscoveryTarget(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SecretsDiscoveryTarget message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.SecretsDiscoveryTarget} SecretsDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecretsDiscoveryTarget.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecretsDiscoveryTarget message. + * @function verify + * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecretsDiscoveryTarget.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a SecretsDiscoveryTarget message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.SecretsDiscoveryTarget} SecretsDiscoveryTarget + */ + SecretsDiscoveryTarget.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.SecretsDiscoveryTarget) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.SecretsDiscoveryTarget(); + }; + + /** + * Creates a plain object from a SecretsDiscoveryTarget message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.SecretsDiscoveryTarget} message SecretsDiscoveryTarget + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecretsDiscoveryTarget.toObject = function toObject() { + return {}; + }; + + /** + * Converts this SecretsDiscoveryTarget to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget + * @instance + * @returns {Object.} JSON object + */ + SecretsDiscoveryTarget.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecretsDiscoveryTarget + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.SecretsDiscoveryTarget + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecretsDiscoveryTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.SecretsDiscoveryTarget"; + }; + + return SecretsDiscoveryTarget; + })(); + + v2.CloudStorageDiscoveryTarget = (function() { + + /** + * Properties of a CloudStorageDiscoveryTarget. + * @memberof google.privacy.dlp.v2 + * @interface ICloudStorageDiscoveryTarget + * @property {google.privacy.dlp.v2.IDiscoveryCloudStorageFilter|null} [filter] CloudStorageDiscoveryTarget filter + * @property {google.privacy.dlp.v2.IDiscoveryFileStoreConditions|null} [conditions] CloudStorageDiscoveryTarget conditions + * @property {google.privacy.dlp.v2.IDiscoveryCloudStorageGenerationCadence|null} [generationCadence] CloudStorageDiscoveryTarget generationCadence + * @property {google.privacy.dlp.v2.IDisabled|null} [disabled] CloudStorageDiscoveryTarget disabled + */ + + /** + * Constructs a new CloudStorageDiscoveryTarget. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CloudStorageDiscoveryTarget. + * @implements ICloudStorageDiscoveryTarget + * @constructor + * @param {google.privacy.dlp.v2.ICloudStorageDiscoveryTarget=} [properties] Properties to set + */ + function CloudStorageDiscoveryTarget(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudStorageDiscoveryTarget filter. + * @member {google.privacy.dlp.v2.IDiscoveryCloudStorageFilter|null|undefined} filter + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @instance + */ + CloudStorageDiscoveryTarget.prototype.filter = null; + + /** + * CloudStorageDiscoveryTarget conditions. + * @member {google.privacy.dlp.v2.IDiscoveryFileStoreConditions|null|undefined} conditions + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @instance + */ + CloudStorageDiscoveryTarget.prototype.conditions = null; + + /** + * CloudStorageDiscoveryTarget generationCadence. + * @member {google.privacy.dlp.v2.IDiscoveryCloudStorageGenerationCadence|null|undefined} generationCadence + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @instance + */ + CloudStorageDiscoveryTarget.prototype.generationCadence = null; + + /** + * CloudStorageDiscoveryTarget disabled. + * @member {google.privacy.dlp.v2.IDisabled|null|undefined} disabled + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @instance + */ + CloudStorageDiscoveryTarget.prototype.disabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CloudStorageDiscoveryTarget cadence. + * @member {"generationCadence"|"disabled"|undefined} cadence + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @instance + */ + Object.defineProperty(CloudStorageDiscoveryTarget.prototype, "cadence", { + get: $util.oneOfGetter($oneOfFields = ["generationCadence", "disabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CloudStorageDiscoveryTarget instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.ICloudStorageDiscoveryTarget=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CloudStorageDiscoveryTarget} CloudStorageDiscoveryTarget instance + */ + CloudStorageDiscoveryTarget.create = function create(properties) { + return new CloudStorageDiscoveryTarget(properties); + }; + + /** + * Encodes the specified CloudStorageDiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageDiscoveryTarget.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.ICloudStorageDiscoveryTarget} message CloudStorageDiscoveryTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudStorageDiscoveryTarget.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + $root.google.privacy.dlp.v2.DiscoveryCloudStorageFilter.encode(message.filter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.generationCadence != null && Object.hasOwnProperty.call(message, "generationCadence")) + $root.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.encode(message.generationCadence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + $root.google.privacy.dlp.v2.Disabled.encode(message.disabled, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.conditions != null && Object.hasOwnProperty.call(message, "conditions")) + $root.google.privacy.dlp.v2.DiscoveryFileStoreConditions.encode(message.conditions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CloudStorageDiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageDiscoveryTarget.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.ICloudStorageDiscoveryTarget} message CloudStorageDiscoveryTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudStorageDiscoveryTarget.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudStorageDiscoveryTarget message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CloudStorageDiscoveryTarget} CloudStorageDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudStorageDiscoveryTarget.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CloudStorageDiscoveryTarget(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.filter = $root.google.privacy.dlp.v2.DiscoveryCloudStorageFilter.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.conditions = $root.google.privacy.dlp.v2.DiscoveryFileStoreConditions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.generationCadence = $root.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.disabled = $root.google.privacy.dlp.v2.Disabled.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CloudStorageDiscoveryTarget message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CloudStorageDiscoveryTarget} CloudStorageDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudStorageDiscoveryTarget.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudStorageDiscoveryTarget message. + * @function verify + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudStorageDiscoveryTarget.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.filter != null && message.hasOwnProperty("filter")) { + var error = $root.google.privacy.dlp.v2.DiscoveryCloudStorageFilter.verify(message.filter, long + 1); + if (error) + return "filter." + error; + } + if (message.conditions != null && message.hasOwnProperty("conditions")) { + var error = $root.google.privacy.dlp.v2.DiscoveryFileStoreConditions.verify(message.conditions, long + 1); + if (error) + return "conditions." + error; + } + if (message.generationCadence != null && message.hasOwnProperty("generationCadence")) { + properties.cadence = 1; + { + var error = $root.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.verify(message.generationCadence, long + 1); + if (error) + return "generationCadence." + error; + } + } + if (message.disabled != null && message.hasOwnProperty("disabled")) { + if (properties.cadence === 1) + return "cadence: multiple values"; + properties.cadence = 1; + { + var error = $root.google.privacy.dlp.v2.Disabled.verify(message.disabled, long + 1); + if (error) + return "disabled." + error; + } + } + return null; + }; + + /** + * Creates a CloudStorageDiscoveryTarget message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CloudStorageDiscoveryTarget} CloudStorageDiscoveryTarget + */ + CloudStorageDiscoveryTarget.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CloudStorageDiscoveryTarget) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CloudStorageDiscoveryTarget(); + if (object.filter != null) { + if (typeof object.filter !== "object") + throw TypeError(".google.privacy.dlp.v2.CloudStorageDiscoveryTarget.filter: object expected"); + message.filter = $root.google.privacy.dlp.v2.DiscoveryCloudStorageFilter.fromObject(object.filter, long + 1); + } + if (object.conditions != null) { + if (typeof object.conditions !== "object") + throw TypeError(".google.privacy.dlp.v2.CloudStorageDiscoveryTarget.conditions: object expected"); + message.conditions = $root.google.privacy.dlp.v2.DiscoveryFileStoreConditions.fromObject(object.conditions, long + 1); + } + if (object.generationCadence != null) { + if (typeof object.generationCadence !== "object") + throw TypeError(".google.privacy.dlp.v2.CloudStorageDiscoveryTarget.generationCadence: object expected"); + message.generationCadence = $root.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.fromObject(object.generationCadence, long + 1); + } + if (object.disabled != null) { + if (typeof object.disabled !== "object") + throw TypeError(".google.privacy.dlp.v2.CloudStorageDiscoveryTarget.disabled: object expected"); + message.disabled = $root.google.privacy.dlp.v2.Disabled.fromObject(object.disabled, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CloudStorageDiscoveryTarget message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.CloudStorageDiscoveryTarget} message CloudStorageDiscoveryTarget + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudStorageDiscoveryTarget.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = null; + object.conditions = null; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = $root.google.privacy.dlp.v2.DiscoveryCloudStorageFilter.toObject(message.filter, options); + if (message.generationCadence != null && message.hasOwnProperty("generationCadence")) { + object.generationCadence = $root.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.toObject(message.generationCadence, options); + if (options.oneofs) + object.cadence = "generationCadence"; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) { + object.disabled = $root.google.privacy.dlp.v2.Disabled.toObject(message.disabled, options); + if (options.oneofs) + object.cadence = "disabled"; + } + if (message.conditions != null && message.hasOwnProperty("conditions")) + object.conditions = $root.google.privacy.dlp.v2.DiscoveryFileStoreConditions.toObject(message.conditions, options); + return object; + }; + + /** + * Converts this CloudStorageDiscoveryTarget to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @instance + * @returns {Object.} JSON object + */ + CloudStorageDiscoveryTarget.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudStorageDiscoveryTarget + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CloudStorageDiscoveryTarget + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudStorageDiscoveryTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CloudStorageDiscoveryTarget"; + }; + + return CloudStorageDiscoveryTarget; + })(); + + v2.DiscoveryCloudStorageFilter = (function() { + + /** + * Properties of a DiscoveryCloudStorageFilter. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoveryCloudStorageFilter + * @property {google.privacy.dlp.v2.IFileStoreCollection|null} [collection] DiscoveryCloudStorageFilter collection + * @property {google.privacy.dlp.v2.ICloudStorageResourceReference|null} [cloudStorageResourceReference] DiscoveryCloudStorageFilter cloudStorageResourceReference + * @property {google.privacy.dlp.v2.IAllOtherResources|null} [others] DiscoveryCloudStorageFilter others + */ + + /** + * Constructs a new DiscoveryCloudStorageFilter. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoveryCloudStorageFilter. + * @implements IDiscoveryCloudStorageFilter + * @constructor + * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageFilter=} [properties] Properties to set + */ + function DiscoveryCloudStorageFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryCloudStorageFilter collection. + * @member {google.privacy.dlp.v2.IFileStoreCollection|null|undefined} collection + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @instance + */ + DiscoveryCloudStorageFilter.prototype.collection = null; + + /** + * DiscoveryCloudStorageFilter cloudStorageResourceReference. + * @member {google.privacy.dlp.v2.ICloudStorageResourceReference|null|undefined} cloudStorageResourceReference + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @instance + */ + DiscoveryCloudStorageFilter.prototype.cloudStorageResourceReference = null; + + /** + * DiscoveryCloudStorageFilter others. + * @member {google.privacy.dlp.v2.IAllOtherResources|null|undefined} others + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @instance + */ + DiscoveryCloudStorageFilter.prototype.others = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DiscoveryCloudStorageFilter filter. + * @member {"collection"|"cloudStorageResourceReference"|"others"|undefined} filter + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @instance + */ + Object.defineProperty(DiscoveryCloudStorageFilter.prototype, "filter", { + get: $util.oneOfGetter($oneOfFields = ["collection", "cloudStorageResourceReference", "others"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoveryCloudStorageFilter instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @static + * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageFilter=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageFilter} DiscoveryCloudStorageFilter instance + */ + DiscoveryCloudStorageFilter.create = function create(properties) { + return new DiscoveryCloudStorageFilter(properties); + }; + + /** + * Encodes the specified DiscoveryCloudStorageFilter message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudStorageFilter.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @static + * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageFilter} message DiscoveryCloudStorageFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryCloudStorageFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.collection != null && Object.hasOwnProperty.call(message, "collection")) + $root.google.privacy.dlp.v2.FileStoreCollection.encode(message.collection, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.cloudStorageResourceReference != null && Object.hasOwnProperty.call(message, "cloudStorageResourceReference")) + $root.google.privacy.dlp.v2.CloudStorageResourceReference.encode(message.cloudStorageResourceReference, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.others != null && Object.hasOwnProperty.call(message, "others")) + $root.google.privacy.dlp.v2.AllOtherResources.encode(message.others, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryCloudStorageFilter message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudStorageFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @static + * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageFilter} message DiscoveryCloudStorageFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryCloudStorageFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryCloudStorageFilter message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageFilter} DiscoveryCloudStorageFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryCloudStorageFilter.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryCloudStorageFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.collection = $root.google.privacy.dlp.v2.FileStoreCollection.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.cloudStorageResourceReference = $root.google.privacy.dlp.v2.CloudStorageResourceReference.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 100: { + message.others = $root.google.privacy.dlp.v2.AllOtherResources.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryCloudStorageFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageFilter} DiscoveryCloudStorageFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryCloudStorageFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryCloudStorageFilter message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryCloudStorageFilter.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.collection != null && message.hasOwnProperty("collection")) { + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.FileStoreCollection.verify(message.collection, long + 1); + if (error) + return "collection." + error; + } + } + if (message.cloudStorageResourceReference != null && message.hasOwnProperty("cloudStorageResourceReference")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.CloudStorageResourceReference.verify(message.cloudStorageResourceReference, long + 1); + if (error) + return "cloudStorageResourceReference." + error; + } + } + if (message.others != null && message.hasOwnProperty("others")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.AllOtherResources.verify(message.others, long + 1); + if (error) + return "others." + error; + } + } + return null; + }; + + /** + * Creates a DiscoveryCloudStorageFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageFilter} DiscoveryCloudStorageFilter + */ + DiscoveryCloudStorageFilter.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryCloudStorageFilter) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DiscoveryCloudStorageFilter(); + if (object.collection != null) { + if (typeof object.collection !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudStorageFilter.collection: object expected"); + message.collection = $root.google.privacy.dlp.v2.FileStoreCollection.fromObject(object.collection, long + 1); + } + if (object.cloudStorageResourceReference != null) { + if (typeof object.cloudStorageResourceReference !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudStorageFilter.cloudStorageResourceReference: object expected"); + message.cloudStorageResourceReference = $root.google.privacy.dlp.v2.CloudStorageResourceReference.fromObject(object.cloudStorageResourceReference, long + 1); + } + if (object.others != null) { + if (typeof object.others !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudStorageFilter.others: object expected"); + message.others = $root.google.privacy.dlp.v2.AllOtherResources.fromObject(object.others, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryCloudStorageFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @static + * @param {google.privacy.dlp.v2.DiscoveryCloudStorageFilter} message DiscoveryCloudStorageFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryCloudStorageFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.collection != null && message.hasOwnProperty("collection")) { + object.collection = $root.google.privacy.dlp.v2.FileStoreCollection.toObject(message.collection, options); + if (options.oneofs) + object.filter = "collection"; + } + if (message.cloudStorageResourceReference != null && message.hasOwnProperty("cloudStorageResourceReference")) { + object.cloudStorageResourceReference = $root.google.privacy.dlp.v2.CloudStorageResourceReference.toObject(message.cloudStorageResourceReference, options); + if (options.oneofs) + object.filter = "cloudStorageResourceReference"; + } + if (message.others != null && message.hasOwnProperty("others")) { + object.others = $root.google.privacy.dlp.v2.AllOtherResources.toObject(message.others, options); + if (options.oneofs) + object.filter = "others"; + } + return object; + }; + + /** + * Converts this DiscoveryCloudStorageFilter to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @instance + * @returns {Object.} JSON object + */ + DiscoveryCloudStorageFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryCloudStorageFilter + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryCloudStorageFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryCloudStorageFilter"; + }; + + return DiscoveryCloudStorageFilter; + })(); + + v2.FileStoreCollection = (function() { + + /** + * Properties of a FileStoreCollection. + * @memberof google.privacy.dlp.v2 + * @interface IFileStoreCollection + * @property {google.privacy.dlp.v2.IFileStoreRegexes|null} [includeRegexes] FileStoreCollection includeRegexes + * @property {google.privacy.dlp.v2.ITagFilters|null} [includeTags] FileStoreCollection includeTags + */ + + /** + * Constructs a new FileStoreCollection. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a FileStoreCollection. + * @implements IFileStoreCollection + * @constructor + * @param {google.privacy.dlp.v2.IFileStoreCollection=} [properties] Properties to set + */ + function FileStoreCollection(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileStoreCollection includeRegexes. + * @member {google.privacy.dlp.v2.IFileStoreRegexes|null|undefined} includeRegexes + * @memberof google.privacy.dlp.v2.FileStoreCollection + * @instance + */ + FileStoreCollection.prototype.includeRegexes = null; + + /** + * FileStoreCollection includeTags. + * @member {google.privacy.dlp.v2.ITagFilters|null|undefined} includeTags + * @memberof google.privacy.dlp.v2.FileStoreCollection + * @instance + */ + FileStoreCollection.prototype.includeTags = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FileStoreCollection pattern. + * @member {"includeRegexes"|undefined} pattern + * @memberof google.privacy.dlp.v2.FileStoreCollection + * @instance + */ + Object.defineProperty(FileStoreCollection.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["includeRegexes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FileStoreCollection instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.FileStoreCollection + * @static + * @param {google.privacy.dlp.v2.IFileStoreCollection=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.FileStoreCollection} FileStoreCollection instance + */ + FileStoreCollection.create = function create(properties) { + return new FileStoreCollection(properties); + }; + + /** + * Encodes the specified FileStoreCollection message. Does not implicitly {@link google.privacy.dlp.v2.FileStoreCollection.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.FileStoreCollection + * @static + * @param {google.privacy.dlp.v2.IFileStoreCollection} message FileStoreCollection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileStoreCollection.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.includeRegexes != null && Object.hasOwnProperty.call(message, "includeRegexes")) + $root.google.privacy.dlp.v2.FileStoreRegexes.encode(message.includeRegexes, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.includeTags != null && Object.hasOwnProperty.call(message, "includeTags")) + $root.google.privacy.dlp.v2.TagFilters.encode(message.includeTags, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileStoreCollection message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FileStoreCollection.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.FileStoreCollection + * @static + * @param {google.privacy.dlp.v2.IFileStoreCollection} message FileStoreCollection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileStoreCollection.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileStoreCollection message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.FileStoreCollection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.FileStoreCollection} FileStoreCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileStoreCollection.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.FileStoreCollection(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.includeRegexes = $root.google.privacy.dlp.v2.FileStoreRegexes.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.includeTags = $root.google.privacy.dlp.v2.TagFilters.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FileStoreCollection message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.FileStoreCollection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.FileStoreCollection} FileStoreCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileStoreCollection.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileStoreCollection message. + * @function verify + * @memberof google.privacy.dlp.v2.FileStoreCollection + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileStoreCollection.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.includeRegexes != null && message.hasOwnProperty("includeRegexes")) { + properties.pattern = 1; + { + var error = $root.google.privacy.dlp.v2.FileStoreRegexes.verify(message.includeRegexes, long + 1); + if (error) + return "includeRegexes." + error; + } + } + if (message.includeTags != null && message.hasOwnProperty("includeTags")) { + var error = $root.google.privacy.dlp.v2.TagFilters.verify(message.includeTags, long + 1); + if (error) + return "includeTags." + error; + } + return null; + }; + + /** + * Creates a FileStoreCollection message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.FileStoreCollection + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.FileStoreCollection} FileStoreCollection + */ + FileStoreCollection.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.FileStoreCollection) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.FileStoreCollection(); + if (object.includeRegexes != null) { + if (typeof object.includeRegexes !== "object") + throw TypeError(".google.privacy.dlp.v2.FileStoreCollection.includeRegexes: object expected"); + message.includeRegexes = $root.google.privacy.dlp.v2.FileStoreRegexes.fromObject(object.includeRegexes, long + 1); + } + if (object.includeTags != null) { + if (typeof object.includeTags !== "object") + throw TypeError(".google.privacy.dlp.v2.FileStoreCollection.includeTags: object expected"); + message.includeTags = $root.google.privacy.dlp.v2.TagFilters.fromObject(object.includeTags, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a FileStoreCollection message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.FileStoreCollection + * @static + * @param {google.privacy.dlp.v2.FileStoreCollection} message FileStoreCollection + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileStoreCollection.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.includeTags = null; + if (message.includeRegexes != null && message.hasOwnProperty("includeRegexes")) { + object.includeRegexes = $root.google.privacy.dlp.v2.FileStoreRegexes.toObject(message.includeRegexes, options); + if (options.oneofs) + object.pattern = "includeRegexes"; + } + if (message.includeTags != null && message.hasOwnProperty("includeTags")) + object.includeTags = $root.google.privacy.dlp.v2.TagFilters.toObject(message.includeTags, options); + return object; + }; + + /** + * Converts this FileStoreCollection to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.FileStoreCollection + * @instance + * @returns {Object.} JSON object + */ + FileStoreCollection.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileStoreCollection + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.FileStoreCollection + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileStoreCollection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.FileStoreCollection"; + }; + + return FileStoreCollection; + })(); + + v2.FileStoreRegexes = (function() { + + /** + * Properties of a FileStoreRegexes. + * @memberof google.privacy.dlp.v2 + * @interface IFileStoreRegexes + * @property {Array.|null} [patterns] FileStoreRegexes patterns + */ + + /** + * Constructs a new FileStoreRegexes. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a FileStoreRegexes. + * @implements IFileStoreRegexes + * @constructor + * @param {google.privacy.dlp.v2.IFileStoreRegexes=} [properties] Properties to set + */ + function FileStoreRegexes(properties) { + this.patterns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileStoreRegexes patterns. + * @member {Array.} patterns + * @memberof google.privacy.dlp.v2.FileStoreRegexes + * @instance + */ + FileStoreRegexes.prototype.patterns = $util.emptyArray; + + /** + * Creates a new FileStoreRegexes instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.FileStoreRegexes + * @static + * @param {google.privacy.dlp.v2.IFileStoreRegexes=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.FileStoreRegexes} FileStoreRegexes instance + */ + FileStoreRegexes.create = function create(properties) { + return new FileStoreRegexes(properties); + }; + + /** + * Encodes the specified FileStoreRegexes message. Does not implicitly {@link google.privacy.dlp.v2.FileStoreRegexes.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.FileStoreRegexes + * @static + * @param {google.privacy.dlp.v2.IFileStoreRegexes} message FileStoreRegexes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileStoreRegexes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.patterns != null && message.patterns.length) + for (var i = 0; i < message.patterns.length; ++i) + $root.google.privacy.dlp.v2.FileStoreRegex.encode(message.patterns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileStoreRegexes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FileStoreRegexes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.FileStoreRegexes + * @static + * @param {google.privacy.dlp.v2.IFileStoreRegexes} message FileStoreRegexes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileStoreRegexes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileStoreRegexes message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.FileStoreRegexes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.FileStoreRegexes} FileStoreRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileStoreRegexes.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.FileStoreRegexes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.patterns && message.patterns.length)) + message.patterns = []; + message.patterns.push($root.google.privacy.dlp.v2.FileStoreRegex.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FileStoreRegexes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.FileStoreRegexes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.FileStoreRegexes} FileStoreRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileStoreRegexes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileStoreRegexes message. + * @function verify + * @memberof google.privacy.dlp.v2.FileStoreRegexes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileStoreRegexes.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.patterns != null && message.hasOwnProperty("patterns")) { + if (!Array.isArray(message.patterns)) + return "patterns: array expected"; + for (var i = 0; i < message.patterns.length; ++i) { + var error = $root.google.privacy.dlp.v2.FileStoreRegex.verify(message.patterns[i], long + 1); + if (error) + return "patterns." + error; + } + } + return null; + }; + + /** + * Creates a FileStoreRegexes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.FileStoreRegexes + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.FileStoreRegexes} FileStoreRegexes + */ + FileStoreRegexes.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.FileStoreRegexes) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.FileStoreRegexes(); + if (object.patterns) { + if (!Array.isArray(object.patterns)) + throw TypeError(".google.privacy.dlp.v2.FileStoreRegexes.patterns: array expected"); + message.patterns = []; + for (var i = 0; i < object.patterns.length; ++i) { + if (typeof object.patterns[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.FileStoreRegexes.patterns: object expected"); + message.patterns[i] = $root.google.privacy.dlp.v2.FileStoreRegex.fromObject(object.patterns[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a FileStoreRegexes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.FileStoreRegexes + * @static + * @param {google.privacy.dlp.v2.FileStoreRegexes} message FileStoreRegexes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileStoreRegexes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.patterns = []; + if (message.patterns && message.patterns.length) { + object.patterns = []; + for (var j = 0; j < message.patterns.length; ++j) + object.patterns[j] = $root.google.privacy.dlp.v2.FileStoreRegex.toObject(message.patterns[j], options); + } + return object; + }; + + /** + * Converts this FileStoreRegexes to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.FileStoreRegexes + * @instance + * @returns {Object.} JSON object + */ + FileStoreRegexes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileStoreRegexes + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.FileStoreRegexes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileStoreRegexes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.FileStoreRegexes"; + }; + + return FileStoreRegexes; + })(); + + v2.FileStoreRegex = (function() { + + /** + * Properties of a FileStoreRegex. + * @memberof google.privacy.dlp.v2 + * @interface IFileStoreRegex + * @property {google.privacy.dlp.v2.ICloudStorageRegex|null} [cloudStorageRegex] FileStoreRegex cloudStorageRegex + */ + + /** + * Constructs a new FileStoreRegex. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a FileStoreRegex. + * @implements IFileStoreRegex + * @constructor + * @param {google.privacy.dlp.v2.IFileStoreRegex=} [properties] Properties to set + */ + function FileStoreRegex(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileStoreRegex cloudStorageRegex. + * @member {google.privacy.dlp.v2.ICloudStorageRegex|null|undefined} cloudStorageRegex + * @memberof google.privacy.dlp.v2.FileStoreRegex + * @instance + */ + FileStoreRegex.prototype.cloudStorageRegex = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FileStoreRegex resourceRegex. + * @member {"cloudStorageRegex"|undefined} resourceRegex + * @memberof google.privacy.dlp.v2.FileStoreRegex + * @instance + */ + Object.defineProperty(FileStoreRegex.prototype, "resourceRegex", { + get: $util.oneOfGetter($oneOfFields = ["cloudStorageRegex"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FileStoreRegex instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.FileStoreRegex + * @static + * @param {google.privacy.dlp.v2.IFileStoreRegex=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.FileStoreRegex} FileStoreRegex instance + */ + FileStoreRegex.create = function create(properties) { + return new FileStoreRegex(properties); + }; + + /** + * Encodes the specified FileStoreRegex message. Does not implicitly {@link google.privacy.dlp.v2.FileStoreRegex.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.FileStoreRegex + * @static + * @param {google.privacy.dlp.v2.IFileStoreRegex} message FileStoreRegex message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileStoreRegex.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cloudStorageRegex != null && Object.hasOwnProperty.call(message, "cloudStorageRegex")) + $root.google.privacy.dlp.v2.CloudStorageRegex.encode(message.cloudStorageRegex, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileStoreRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FileStoreRegex.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.FileStoreRegex + * @static + * @param {google.privacy.dlp.v2.IFileStoreRegex} message FileStoreRegex message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileStoreRegex.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileStoreRegex message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.FileStoreRegex + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.FileStoreRegex} FileStoreRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileStoreRegex.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.FileStoreRegex(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.cloudStorageRegex = $root.google.privacy.dlp.v2.CloudStorageRegex.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FileStoreRegex message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.FileStoreRegex + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.FileStoreRegex} FileStoreRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileStoreRegex.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileStoreRegex message. + * @function verify + * @memberof google.privacy.dlp.v2.FileStoreRegex + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileStoreRegex.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.cloudStorageRegex != null && message.hasOwnProperty("cloudStorageRegex")) { + properties.resourceRegex = 1; + { + var error = $root.google.privacy.dlp.v2.CloudStorageRegex.verify(message.cloudStorageRegex, long + 1); + if (error) + return "cloudStorageRegex." + error; + } + } + return null; + }; + + /** + * Creates a FileStoreRegex message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.FileStoreRegex + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.FileStoreRegex} FileStoreRegex + */ + FileStoreRegex.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.FileStoreRegex) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.FileStoreRegex(); + if (object.cloudStorageRegex != null) { + if (typeof object.cloudStorageRegex !== "object") + throw TypeError(".google.privacy.dlp.v2.FileStoreRegex.cloudStorageRegex: object expected"); + message.cloudStorageRegex = $root.google.privacy.dlp.v2.CloudStorageRegex.fromObject(object.cloudStorageRegex, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a FileStoreRegex message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.FileStoreRegex + * @static + * @param {google.privacy.dlp.v2.FileStoreRegex} message FileStoreRegex + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileStoreRegex.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.cloudStorageRegex != null && message.hasOwnProperty("cloudStorageRegex")) { + object.cloudStorageRegex = $root.google.privacy.dlp.v2.CloudStorageRegex.toObject(message.cloudStorageRegex, options); + if (options.oneofs) + object.resourceRegex = "cloudStorageRegex"; + } + return object; + }; + + /** + * Converts this FileStoreRegex to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.FileStoreRegex + * @instance + * @returns {Object.} JSON object + */ + FileStoreRegex.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileStoreRegex + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.FileStoreRegex + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileStoreRegex.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.FileStoreRegex"; + }; + + return FileStoreRegex; + })(); + + v2.CloudStorageRegex = (function() { + + /** + * Properties of a CloudStorageRegex. + * @memberof google.privacy.dlp.v2 + * @interface ICloudStorageRegex + * @property {string|null} [projectIdRegex] CloudStorageRegex projectIdRegex + * @property {string|null} [bucketNameRegex] CloudStorageRegex bucketNameRegex + */ + + /** + * Constructs a new CloudStorageRegex. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CloudStorageRegex. + * @implements ICloudStorageRegex + * @constructor + * @param {google.privacy.dlp.v2.ICloudStorageRegex=} [properties] Properties to set + */ + function CloudStorageRegex(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudStorageRegex projectIdRegex. + * @member {string} projectIdRegex + * @memberof google.privacy.dlp.v2.CloudStorageRegex + * @instance + */ + CloudStorageRegex.prototype.projectIdRegex = ""; + + /** + * CloudStorageRegex bucketNameRegex. + * @member {string} bucketNameRegex + * @memberof google.privacy.dlp.v2.CloudStorageRegex + * @instance + */ + CloudStorageRegex.prototype.bucketNameRegex = ""; + + /** + * Creates a new CloudStorageRegex instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CloudStorageRegex + * @static + * @param {google.privacy.dlp.v2.ICloudStorageRegex=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CloudStorageRegex} CloudStorageRegex instance + */ + CloudStorageRegex.create = function create(properties) { + return new CloudStorageRegex(properties); + }; + + /** + * Encodes the specified CloudStorageRegex message. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageRegex.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CloudStorageRegex + * @static + * @param {google.privacy.dlp.v2.ICloudStorageRegex} message CloudStorageRegex message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudStorageRegex.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectIdRegex != null && Object.hasOwnProperty.call(message, "projectIdRegex")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectIdRegex); + if (message.bucketNameRegex != null && Object.hasOwnProperty.call(message, "bucketNameRegex")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.bucketNameRegex); + return writer; + }; + + /** + * Encodes the specified CloudStorageRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageRegex.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CloudStorageRegex + * @static + * @param {google.privacy.dlp.v2.ICloudStorageRegex} message CloudStorageRegex message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudStorageRegex.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudStorageRegex message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CloudStorageRegex + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CloudStorageRegex} CloudStorageRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudStorageRegex.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CloudStorageRegex(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.projectIdRegex = reader.string(); + break; + } + case 2: { + message.bucketNameRegex = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CloudStorageRegex message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CloudStorageRegex + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CloudStorageRegex} CloudStorageRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudStorageRegex.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudStorageRegex message. + * @function verify + * @memberof google.privacy.dlp.v2.CloudStorageRegex + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudStorageRegex.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.projectIdRegex != null && message.hasOwnProperty("projectIdRegex")) + if (!$util.isString(message.projectIdRegex)) + return "projectIdRegex: string expected"; + if (message.bucketNameRegex != null && message.hasOwnProperty("bucketNameRegex")) + if (!$util.isString(message.bucketNameRegex)) + return "bucketNameRegex: string expected"; + return null; + }; + + /** + * Creates a CloudStorageRegex message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CloudStorageRegex + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CloudStorageRegex} CloudStorageRegex + */ + CloudStorageRegex.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CloudStorageRegex) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CloudStorageRegex(); + if (object.projectIdRegex != null) + message.projectIdRegex = String(object.projectIdRegex); + if (object.bucketNameRegex != null) + message.bucketNameRegex = String(object.bucketNameRegex); + return message; + }; + + /** + * Creates a plain object from a CloudStorageRegex message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CloudStorageRegex + * @static + * @param {google.privacy.dlp.v2.CloudStorageRegex} message CloudStorageRegex + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudStorageRegex.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectIdRegex = ""; + object.bucketNameRegex = ""; + } + if (message.projectIdRegex != null && message.hasOwnProperty("projectIdRegex")) + object.projectIdRegex = message.projectIdRegex; + if (message.bucketNameRegex != null && message.hasOwnProperty("bucketNameRegex")) + object.bucketNameRegex = message.bucketNameRegex; + return object; + }; + + /** + * Converts this CloudStorageRegex to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CloudStorageRegex + * @instance + * @returns {Object.} JSON object + */ + CloudStorageRegex.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudStorageRegex + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CloudStorageRegex + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudStorageRegex.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CloudStorageRegex"; + }; + + return CloudStorageRegex; + })(); + + v2.CloudStorageResourceReference = (function() { + + /** + * Properties of a CloudStorageResourceReference. + * @memberof google.privacy.dlp.v2 + * @interface ICloudStorageResourceReference + * @property {string|null} [bucketName] CloudStorageResourceReference bucketName + * @property {string|null} [projectId] CloudStorageResourceReference projectId + */ + + /** + * Constructs a new CloudStorageResourceReference. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CloudStorageResourceReference. + * @implements ICloudStorageResourceReference + * @constructor + * @param {google.privacy.dlp.v2.ICloudStorageResourceReference=} [properties] Properties to set + */ + function CloudStorageResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudStorageResourceReference bucketName. + * @member {string} bucketName + * @memberof google.privacy.dlp.v2.CloudStorageResourceReference + * @instance + */ + CloudStorageResourceReference.prototype.bucketName = ""; + + /** + * CloudStorageResourceReference projectId. + * @member {string} projectId + * @memberof google.privacy.dlp.v2.CloudStorageResourceReference + * @instance + */ + CloudStorageResourceReference.prototype.projectId = ""; + + /** + * Creates a new CloudStorageResourceReference instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CloudStorageResourceReference + * @static + * @param {google.privacy.dlp.v2.ICloudStorageResourceReference=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CloudStorageResourceReference} CloudStorageResourceReference instance + */ + CloudStorageResourceReference.create = function create(properties) { + return new CloudStorageResourceReference(properties); + }; + + /** + * Encodes the specified CloudStorageResourceReference message. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageResourceReference.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CloudStorageResourceReference + * @static + * @param {google.privacy.dlp.v2.ICloudStorageResourceReference} message CloudStorageResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudStorageResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bucketName != null && Object.hasOwnProperty.call(message, "bucketName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucketName); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectId); + return writer; + }; + + /** + * Encodes the specified CloudStorageResourceReference message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CloudStorageResourceReference + * @static + * @param {google.privacy.dlp.v2.ICloudStorageResourceReference} message CloudStorageResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudStorageResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudStorageResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CloudStorageResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CloudStorageResourceReference} CloudStorageResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudStorageResourceReference.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CloudStorageResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.bucketName = reader.string(); + break; + } + case 2: { + message.projectId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CloudStorageResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CloudStorageResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CloudStorageResourceReference} CloudStorageResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudStorageResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudStorageResourceReference message. + * @function verify + * @memberof google.privacy.dlp.v2.CloudStorageResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudStorageResourceReference.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.bucketName != null && message.hasOwnProperty("bucketName")) + if (!$util.isString(message.bucketName)) + return "bucketName: string expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + return null; + }; + + /** + * Creates a CloudStorageResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CloudStorageResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CloudStorageResourceReference} CloudStorageResourceReference + */ + CloudStorageResourceReference.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CloudStorageResourceReference) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CloudStorageResourceReference(); + if (object.bucketName != null) + message.bucketName = String(object.bucketName); + if (object.projectId != null) + message.projectId = String(object.projectId); + return message; + }; + + /** + * Creates a plain object from a CloudStorageResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CloudStorageResourceReference + * @static + * @param {google.privacy.dlp.v2.CloudStorageResourceReference} message CloudStorageResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudStorageResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.bucketName = ""; + object.projectId = ""; + } + if (message.bucketName != null && message.hasOwnProperty("bucketName")) + object.bucketName = message.bucketName; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + return object; + }; + + /** + * Converts this CloudStorageResourceReference to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CloudStorageResourceReference + * @instance + * @returns {Object.} JSON object + */ + CloudStorageResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudStorageResourceReference + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CloudStorageResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudStorageResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CloudStorageResourceReference"; + }; + + return CloudStorageResourceReference; + })(); + + v2.DiscoveryCloudStorageGenerationCadence = (function() { + + /** + * Properties of a DiscoveryCloudStorageGenerationCadence. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoveryCloudStorageGenerationCadence + * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [refreshFrequency] DiscoveryCloudStorageGenerationCadence refreshFrequency + * @property {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null} [inspectTemplateModifiedCadence] DiscoveryCloudStorageGenerationCadence inspectTemplateModifiedCadence + */ + + /** + * Constructs a new DiscoveryCloudStorageGenerationCadence. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoveryCloudStorageGenerationCadence. + * @implements IDiscoveryCloudStorageGenerationCadence + * @constructor + * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageGenerationCadence=} [properties] Properties to set + */ + function DiscoveryCloudStorageGenerationCadence(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryCloudStorageGenerationCadence refreshFrequency. + * @member {google.privacy.dlp.v2.DataProfileUpdateFrequency} refreshFrequency + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence + * @instance + */ + DiscoveryCloudStorageGenerationCadence.prototype.refreshFrequency = 0; + + /** + * DiscoveryCloudStorageGenerationCadence inspectTemplateModifiedCadence. + * @member {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null|undefined} inspectTemplateModifiedCadence + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence + * @instance + */ + DiscoveryCloudStorageGenerationCadence.prototype.inspectTemplateModifiedCadence = null; + + /** + * Creates a new DiscoveryCloudStorageGenerationCadence instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence + * @static + * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageGenerationCadence=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence} DiscoveryCloudStorageGenerationCadence instance + */ + DiscoveryCloudStorageGenerationCadence.create = function create(properties) { + return new DiscoveryCloudStorageGenerationCadence(properties); + }; + + /** + * Encodes the specified DiscoveryCloudStorageGenerationCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence + * @static + * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageGenerationCadence} message DiscoveryCloudStorageGenerationCadence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryCloudStorageGenerationCadence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.refreshFrequency != null && Object.hasOwnProperty.call(message, "refreshFrequency")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.refreshFrequency); + if (message.inspectTemplateModifiedCadence != null && Object.hasOwnProperty.call(message, "inspectTemplateModifiedCadence")) + $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.encode(message.inspectTemplateModifiedCadence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryCloudStorageGenerationCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence + * @static + * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageGenerationCadence} message DiscoveryCloudStorageGenerationCadence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryCloudStorageGenerationCadence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryCloudStorageGenerationCadence message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence} DiscoveryCloudStorageGenerationCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryCloudStorageGenerationCadence.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.refreshFrequency = reader.int32(); + break; + } + case 2: { + message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryCloudStorageGenerationCadence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence} DiscoveryCloudStorageGenerationCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryCloudStorageGenerationCadence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryCloudStorageGenerationCadence message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryCloudStorageGenerationCadence.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency")) + switch (message.refreshFrequency) { + default: + return "refreshFrequency: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; + } + if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence")) { + var error = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.verify(message.inspectTemplateModifiedCadence, long + 1); + if (error) + return "inspectTemplateModifiedCadence." + error; + } + return null; + }; + + /** + * Creates a DiscoveryCloudStorageGenerationCadence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence} DiscoveryCloudStorageGenerationCadence + */ + DiscoveryCloudStorageGenerationCadence.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence(); + switch (object.refreshFrequency) { + default: + if (typeof object.refreshFrequency === "number") { + message.refreshFrequency = object.refreshFrequency; + break; + } + break; + case "UPDATE_FREQUENCY_UNSPECIFIED": + case 0: + message.refreshFrequency = 0; + break; + case "UPDATE_FREQUENCY_NEVER": + case 1: + message.refreshFrequency = 1; + break; + case "UPDATE_FREQUENCY_DAILY": + case 2: + message.refreshFrequency = 2; + break; + case "UPDATE_FREQUENCY_MONTHLY": + case 4: + message.refreshFrequency = 4; + break; + } + if (object.inspectTemplateModifiedCadence != null) { + if (typeof object.inspectTemplateModifiedCadence !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence.inspectTemplateModifiedCadence: object expected"); + message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.fromObject(object.inspectTemplateModifiedCadence, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryCloudStorageGenerationCadence message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence + * @static + * @param {google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence} message DiscoveryCloudStorageGenerationCadence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryCloudStorageGenerationCadence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.refreshFrequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0; + object.inspectTemplateModifiedCadence = null; + } + if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency")) + object.refreshFrequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] === undefined ? message.refreshFrequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] : message.refreshFrequency; + if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence")) + object.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.toObject(message.inspectTemplateModifiedCadence, options); + return object; + }; + + /** + * Converts this DiscoveryCloudStorageGenerationCadence to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence + * @instance + * @returns {Object.} JSON object + */ + DiscoveryCloudStorageGenerationCadence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryCloudStorageGenerationCadence + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryCloudStorageGenerationCadence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryCloudStorageGenerationCadence"; + }; + + return DiscoveryCloudStorageGenerationCadence; + })(); + + v2.DiscoveryCloudStorageConditions = (function() { + + /** + * Properties of a DiscoveryCloudStorageConditions. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoveryCloudStorageConditions + * @property {Array.|null} [includedObjectAttributes] DiscoveryCloudStorageConditions includedObjectAttributes + * @property {Array.|null} [includedBucketAttributes] DiscoveryCloudStorageConditions includedBucketAttributes + */ + + /** + * Constructs a new DiscoveryCloudStorageConditions. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoveryCloudStorageConditions. + * @implements IDiscoveryCloudStorageConditions + * @constructor + * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageConditions=} [properties] Properties to set + */ + function DiscoveryCloudStorageConditions(properties) { + this.includedObjectAttributes = []; + this.includedBucketAttributes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryCloudStorageConditions includedObjectAttributes. + * @member {Array.} includedObjectAttributes + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * @instance + */ + DiscoveryCloudStorageConditions.prototype.includedObjectAttributes = $util.emptyArray; + + /** + * DiscoveryCloudStorageConditions includedBucketAttributes. + * @member {Array.} includedBucketAttributes + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * @instance + */ + DiscoveryCloudStorageConditions.prototype.includedBucketAttributes = $util.emptyArray; + + /** + * Creates a new DiscoveryCloudStorageConditions instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * @static + * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageConditions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageConditions} DiscoveryCloudStorageConditions instance + */ + DiscoveryCloudStorageConditions.create = function create(properties) { + return new DiscoveryCloudStorageConditions(properties); + }; + + /** + * Encodes the specified DiscoveryCloudStorageConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudStorageConditions.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * @static + * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageConditions} message DiscoveryCloudStorageConditions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryCloudStorageConditions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.includedObjectAttributes != null && message.includedObjectAttributes.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.includedObjectAttributes.length; ++i) + writer.int32(message.includedObjectAttributes[i]); + writer.ldelim(); + } + if (message.includedBucketAttributes != null && message.includedBucketAttributes.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.includedBucketAttributes.length; ++i) + writer.int32(message.includedBucketAttributes[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified DiscoveryCloudStorageConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryCloudStorageConditions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * @static + * @param {google.privacy.dlp.v2.IDiscoveryCloudStorageConditions} message DiscoveryCloudStorageConditions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryCloudStorageConditions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryCloudStorageConditions message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageConditions} DiscoveryCloudStorageConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryCloudStorageConditions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.includedObjectAttributes && message.includedObjectAttributes.length)) + message.includedObjectAttributes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.includedObjectAttributes.push(reader.int32()); + } else + message.includedObjectAttributes.push(reader.int32()); + break; + } + case 2: { + if (!(message.includedBucketAttributes && message.includedBucketAttributes.length)) + message.includedBucketAttributes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.includedBucketAttributes.push(reader.int32()); + } else + message.includedBucketAttributes.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryCloudStorageConditions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageConditions} DiscoveryCloudStorageConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryCloudStorageConditions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryCloudStorageConditions message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryCloudStorageConditions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.includedObjectAttributes != null && message.hasOwnProperty("includedObjectAttributes")) { + if (!Array.isArray(message.includedObjectAttributes)) + return "includedObjectAttributes: array expected"; + for (var i = 0; i < message.includedObjectAttributes.length; ++i) + switch (message.includedObjectAttributes[i]) { + default: + return "includedObjectAttributes: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message.includedBucketAttributes != null && message.hasOwnProperty("includedBucketAttributes")) { + if (!Array.isArray(message.includedBucketAttributes)) + return "includedBucketAttributes: array expected"; + for (var i = 0; i < message.includedBucketAttributes.length; ++i) + switch (message.includedBucketAttributes[i]) { + default: + return "includedBucketAttributes: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + return null; + }; + + /** + * Creates a DiscoveryCloudStorageConditions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryCloudStorageConditions} DiscoveryCloudStorageConditions + */ + DiscoveryCloudStorageConditions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions(); + if (object.includedObjectAttributes) { + if (!Array.isArray(object.includedObjectAttributes)) + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudStorageConditions.includedObjectAttributes: array expected"); + message.includedObjectAttributes = []; + for (var i = 0; i < object.includedObjectAttributes.length; ++i) + switch (object.includedObjectAttributes[i]) { + default: + if (typeof object.includedObjectAttributes[i] === "number") { + message.includedObjectAttributes[i] = object.includedObjectAttributes[i]; + break; + } + case "CLOUD_STORAGE_OBJECT_ATTRIBUTE_UNSPECIFIED": + case 0: + message.includedObjectAttributes[i] = 0; + break; + case "ALL_SUPPORTED_OBJECTS": + case 1: + message.includedObjectAttributes[i] = 1; + break; + case "STANDARD": + case 2: + message.includedObjectAttributes[i] = 2; + break; + case "NEARLINE": + case 3: + message.includedObjectAttributes[i] = 3; + break; + case "COLDLINE": + case 4: + message.includedObjectAttributes[i] = 4; + break; + case "ARCHIVE": + case 5: + message.includedObjectAttributes[i] = 5; + break; + case "REGIONAL": + case 6: + message.includedObjectAttributes[i] = 6; + break; + case "MULTI_REGIONAL": + case 7: + message.includedObjectAttributes[i] = 7; + break; + case "DURABLE_REDUCED_AVAILABILITY": + case 8: + message.includedObjectAttributes[i] = 8; + break; + } + } + if (object.includedBucketAttributes) { + if (!Array.isArray(object.includedBucketAttributes)) + throw TypeError(".google.privacy.dlp.v2.DiscoveryCloudStorageConditions.includedBucketAttributes: array expected"); + message.includedBucketAttributes = []; + for (var i = 0; i < object.includedBucketAttributes.length; ++i) + switch (object.includedBucketAttributes[i]) { + default: + if (typeof object.includedBucketAttributes[i] === "number") { + message.includedBucketAttributes[i] = object.includedBucketAttributes[i]; + break; + } + case "CLOUD_STORAGE_BUCKET_ATTRIBUTE_UNSPECIFIED": + case 0: + message.includedBucketAttributes[i] = 0; + break; + case "ALL_SUPPORTED_BUCKETS": + case 1: + message.includedBucketAttributes[i] = 1; + break; + case "AUTOCLASS_DISABLED": + case 2: + message.includedBucketAttributes[i] = 2; + break; + case "AUTOCLASS_ENABLED": + case 3: + message.includedBucketAttributes[i] = 3; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryCloudStorageConditions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * @static + * @param {google.privacy.dlp.v2.DiscoveryCloudStorageConditions} message DiscoveryCloudStorageConditions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryCloudStorageConditions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.includedObjectAttributes = []; + object.includedBucketAttributes = []; + } + if (message.includedObjectAttributes && message.includedObjectAttributes.length) { + object.includedObjectAttributes = []; + for (var j = 0; j < message.includedObjectAttributes.length; ++j) + object.includedObjectAttributes[j] = options.enums === String ? $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageObjectAttribute[message.includedObjectAttributes[j]] === undefined ? message.includedObjectAttributes[j] : $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageObjectAttribute[message.includedObjectAttributes[j]] : message.includedObjectAttributes[j]; + } + if (message.includedBucketAttributes && message.includedBucketAttributes.length) { + object.includedBucketAttributes = []; + for (var j = 0; j < message.includedBucketAttributes.length; ++j) + object.includedBucketAttributes[j] = options.enums === String ? $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageBucketAttribute[message.includedBucketAttributes[j]] === undefined ? message.includedBucketAttributes[j] : $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageBucketAttribute[message.includedBucketAttributes[j]] : message.includedBucketAttributes[j]; + } + return object; + }; + + /** + * Converts this DiscoveryCloudStorageConditions to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * @instance + * @returns {Object.} JSON object + */ + DiscoveryCloudStorageConditions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryCloudStorageConditions + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryCloudStorageConditions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryCloudStorageConditions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryCloudStorageConditions"; + }; + + /** + * CloudStorageObjectAttribute enum. + * @name google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageObjectAttribute + * @enum {number} + * @property {number} CLOUD_STORAGE_OBJECT_ATTRIBUTE_UNSPECIFIED=0 CLOUD_STORAGE_OBJECT_ATTRIBUTE_UNSPECIFIED value + * @property {number} ALL_SUPPORTED_OBJECTS=1 ALL_SUPPORTED_OBJECTS value + * @property {number} STANDARD=2 STANDARD value + * @property {number} NEARLINE=3 NEARLINE value + * @property {number} COLDLINE=4 COLDLINE value + * @property {number} ARCHIVE=5 ARCHIVE value + * @property {number} REGIONAL=6 REGIONAL value + * @property {number} MULTI_REGIONAL=7 MULTI_REGIONAL value + * @property {number} DURABLE_REDUCED_AVAILABILITY=8 DURABLE_REDUCED_AVAILABILITY value + */ + DiscoveryCloudStorageConditions.CloudStorageObjectAttribute = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLOUD_STORAGE_OBJECT_ATTRIBUTE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALL_SUPPORTED_OBJECTS"] = 1; + values[valuesById[2] = "STANDARD"] = 2; + values[valuesById[3] = "NEARLINE"] = 3; + values[valuesById[4] = "COLDLINE"] = 4; + values[valuesById[5] = "ARCHIVE"] = 5; + values[valuesById[6] = "REGIONAL"] = 6; + values[valuesById[7] = "MULTI_REGIONAL"] = 7; + values[valuesById[8] = "DURABLE_REDUCED_AVAILABILITY"] = 8; + return values; + })(); + + /** + * CloudStorageBucketAttribute enum. + * @name google.privacy.dlp.v2.DiscoveryCloudStorageConditions.CloudStorageBucketAttribute + * @enum {number} + * @property {number} CLOUD_STORAGE_BUCKET_ATTRIBUTE_UNSPECIFIED=0 CLOUD_STORAGE_BUCKET_ATTRIBUTE_UNSPECIFIED value + * @property {number} ALL_SUPPORTED_BUCKETS=1 ALL_SUPPORTED_BUCKETS value + * @property {number} AUTOCLASS_DISABLED=2 AUTOCLASS_DISABLED value + * @property {number} AUTOCLASS_ENABLED=3 AUTOCLASS_ENABLED value + */ + DiscoveryCloudStorageConditions.CloudStorageBucketAttribute = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLOUD_STORAGE_BUCKET_ATTRIBUTE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ALL_SUPPORTED_BUCKETS"] = 1; + values[valuesById[2] = "AUTOCLASS_DISABLED"] = 2; + values[valuesById[3] = "AUTOCLASS_ENABLED"] = 3; + return values; + })(); + + return DiscoveryCloudStorageConditions; + })(); + + v2.DiscoveryFileStoreConditions = (function() { + + /** + * Properties of a DiscoveryFileStoreConditions. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoveryFileStoreConditions + * @property {google.protobuf.ITimestamp|null} [createdAfter] DiscoveryFileStoreConditions createdAfter + * @property {google.protobuf.IDuration|null} [minAge] DiscoveryFileStoreConditions minAge + * @property {google.privacy.dlp.v2.IDiscoveryCloudStorageConditions|null} [cloudStorageConditions] DiscoveryFileStoreConditions cloudStorageConditions + */ + + /** + * Constructs a new DiscoveryFileStoreConditions. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoveryFileStoreConditions. + * @implements IDiscoveryFileStoreConditions + * @constructor + * @param {google.privacy.dlp.v2.IDiscoveryFileStoreConditions=} [properties] Properties to set + */ + function DiscoveryFileStoreConditions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryFileStoreConditions createdAfter. + * @member {google.protobuf.ITimestamp|null|undefined} createdAfter + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * @instance + */ + DiscoveryFileStoreConditions.prototype.createdAfter = null; + + /** + * DiscoveryFileStoreConditions minAge. + * @member {google.protobuf.IDuration|null|undefined} minAge + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * @instance + */ + DiscoveryFileStoreConditions.prototype.minAge = null; + + /** + * DiscoveryFileStoreConditions cloudStorageConditions. + * @member {google.privacy.dlp.v2.IDiscoveryCloudStorageConditions|null|undefined} cloudStorageConditions + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * @instance + */ + DiscoveryFileStoreConditions.prototype.cloudStorageConditions = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DiscoveryFileStoreConditions conditions. + * @member {"cloudStorageConditions"|undefined} conditions + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * @instance + */ + Object.defineProperty(DiscoveryFileStoreConditions.prototype, "conditions", { + get: $util.oneOfGetter($oneOfFields = ["cloudStorageConditions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoveryFileStoreConditions instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * @static + * @param {google.privacy.dlp.v2.IDiscoveryFileStoreConditions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryFileStoreConditions} DiscoveryFileStoreConditions instance + */ + DiscoveryFileStoreConditions.create = function create(properties) { + return new DiscoveryFileStoreConditions(properties); + }; + + /** + * Encodes the specified DiscoveryFileStoreConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryFileStoreConditions.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * @static + * @param {google.privacy.dlp.v2.IDiscoveryFileStoreConditions} message DiscoveryFileStoreConditions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryFileStoreConditions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createdAfter != null && Object.hasOwnProperty.call(message, "createdAfter")) + $root.google.protobuf.Timestamp.encode(message.createdAfter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minAge != null && Object.hasOwnProperty.call(message, "minAge")) + $root.google.protobuf.Duration.encode(message.minAge, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.cloudStorageConditions != null && Object.hasOwnProperty.call(message, "cloudStorageConditions")) + $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.encode(message.cloudStorageConditions, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryFileStoreConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryFileStoreConditions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * @static + * @param {google.privacy.dlp.v2.IDiscoveryFileStoreConditions} message DiscoveryFileStoreConditions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryFileStoreConditions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryFileStoreConditions message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryFileStoreConditions} DiscoveryFileStoreConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryFileStoreConditions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryFileStoreConditions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.createdAfter = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.minAge = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.cloudStorageConditions = $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryFileStoreConditions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryFileStoreConditions} DiscoveryFileStoreConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryFileStoreConditions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryFileStoreConditions message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryFileStoreConditions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.createdAfter != null && message.hasOwnProperty("createdAfter")) { + var error = $root.google.protobuf.Timestamp.verify(message.createdAfter, long + 1); + if (error) + return "createdAfter." + error; + } + if (message.minAge != null && message.hasOwnProperty("minAge")) { + var error = $root.google.protobuf.Duration.verify(message.minAge, long + 1); + if (error) + return "minAge." + error; + } + if (message.cloudStorageConditions != null && message.hasOwnProperty("cloudStorageConditions")) { + properties.conditions = 1; + { + var error = $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.verify(message.cloudStorageConditions, long + 1); + if (error) + return "cloudStorageConditions." + error; + } + } + return null; + }; + + /** + * Creates a DiscoveryFileStoreConditions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryFileStoreConditions} DiscoveryFileStoreConditions + */ + DiscoveryFileStoreConditions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryFileStoreConditions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DiscoveryFileStoreConditions(); + if (object.createdAfter != null) { + if (typeof object.createdAfter !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryFileStoreConditions.createdAfter: object expected"); + message.createdAfter = $root.google.protobuf.Timestamp.fromObject(object.createdAfter, long + 1); + } + if (object.minAge != null) { + if (typeof object.minAge !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryFileStoreConditions.minAge: object expected"); + message.minAge = $root.google.protobuf.Duration.fromObject(object.minAge, long + 1); + } + if (object.cloudStorageConditions != null) { + if (typeof object.cloudStorageConditions !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryFileStoreConditions.cloudStorageConditions: object expected"); + message.cloudStorageConditions = $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.fromObject(object.cloudStorageConditions, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryFileStoreConditions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * @static + * @param {google.privacy.dlp.v2.DiscoveryFileStoreConditions} message DiscoveryFileStoreConditions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryFileStoreConditions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createdAfter = null; + object.minAge = null; + } + if (message.createdAfter != null && message.hasOwnProperty("createdAfter")) + object.createdAfter = $root.google.protobuf.Timestamp.toObject(message.createdAfter, options); + if (message.minAge != null && message.hasOwnProperty("minAge")) + object.minAge = $root.google.protobuf.Duration.toObject(message.minAge, options); + if (message.cloudStorageConditions != null && message.hasOwnProperty("cloudStorageConditions")) { + object.cloudStorageConditions = $root.google.privacy.dlp.v2.DiscoveryCloudStorageConditions.toObject(message.cloudStorageConditions, options); + if (options.oneofs) + object.conditions = "cloudStorageConditions"; + } + return object; + }; + + /** + * Converts this DiscoveryFileStoreConditions to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * @instance + * @returns {Object.} JSON object + */ + DiscoveryFileStoreConditions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryFileStoreConditions + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryFileStoreConditions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryFileStoreConditions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryFileStoreConditions"; + }; + + return DiscoveryFileStoreConditions; + })(); + + v2.OtherCloudDiscoveryTarget = (function() { + + /** + * Properties of an OtherCloudDiscoveryTarget. + * @memberof google.privacy.dlp.v2 + * @interface IOtherCloudDiscoveryTarget + * @property {google.privacy.dlp.v2.IDataSourceType|null} [dataSourceType] OtherCloudDiscoveryTarget dataSourceType + * @property {google.privacy.dlp.v2.IDiscoveryOtherCloudFilter|null} [filter] OtherCloudDiscoveryTarget filter + * @property {google.privacy.dlp.v2.IDiscoveryOtherCloudConditions|null} [conditions] OtherCloudDiscoveryTarget conditions + * @property {google.privacy.dlp.v2.IDiscoveryOtherCloudGenerationCadence|null} [generationCadence] OtherCloudDiscoveryTarget generationCadence + * @property {google.privacy.dlp.v2.IDisabled|null} [disabled] OtherCloudDiscoveryTarget disabled + */ + + /** + * Constructs a new OtherCloudDiscoveryTarget. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an OtherCloudDiscoveryTarget. + * @implements IOtherCloudDiscoveryTarget + * @constructor + * @param {google.privacy.dlp.v2.IOtherCloudDiscoveryTarget=} [properties] Properties to set + */ + function OtherCloudDiscoveryTarget(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * OtherCloudDiscoveryTarget dataSourceType. + * @member {google.privacy.dlp.v2.IDataSourceType|null|undefined} dataSourceType + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget + * @instance + */ + OtherCloudDiscoveryTarget.prototype.dataSourceType = null; + + /** + * OtherCloudDiscoveryTarget filter. + * @member {google.privacy.dlp.v2.IDiscoveryOtherCloudFilter|null|undefined} filter + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget + * @instance + */ + OtherCloudDiscoveryTarget.prototype.filter = null; + + /** + * OtherCloudDiscoveryTarget conditions. + * @member {google.privacy.dlp.v2.IDiscoveryOtherCloudConditions|null|undefined} conditions + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget + * @instance + */ + OtherCloudDiscoveryTarget.prototype.conditions = null; + + /** + * OtherCloudDiscoveryTarget generationCadence. + * @member {google.privacy.dlp.v2.IDiscoveryOtherCloudGenerationCadence|null|undefined} generationCadence + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget + * @instance + */ + OtherCloudDiscoveryTarget.prototype.generationCadence = null; + + /** + * OtherCloudDiscoveryTarget disabled. + * @member {google.privacy.dlp.v2.IDisabled|null|undefined} disabled + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget + * @instance + */ + OtherCloudDiscoveryTarget.prototype.disabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OtherCloudDiscoveryTarget cadence. + * @member {"generationCadence"|"disabled"|undefined} cadence + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget + * @instance + */ + Object.defineProperty(OtherCloudDiscoveryTarget.prototype, "cadence", { + get: $util.oneOfGetter($oneOfFields = ["generationCadence", "disabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OtherCloudDiscoveryTarget instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.IOtherCloudDiscoveryTarget=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.OtherCloudDiscoveryTarget} OtherCloudDiscoveryTarget instance + */ + OtherCloudDiscoveryTarget.create = function create(properties) { + return new OtherCloudDiscoveryTarget(properties); + }; + + /** + * Encodes the specified OtherCloudDiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudDiscoveryTarget.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.IOtherCloudDiscoveryTarget} message OtherCloudDiscoveryTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OtherCloudDiscoveryTarget.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSourceType != null && Object.hasOwnProperty.call(message, "dataSourceType")) + $root.google.privacy.dlp.v2.DataSourceType.encode(message.dataSourceType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + $root.google.privacy.dlp.v2.DiscoveryOtherCloudFilter.encode(message.filter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.conditions != null && Object.hasOwnProperty.call(message, "conditions")) + $root.google.privacy.dlp.v2.DiscoveryOtherCloudConditions.encode(message.conditions, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.generationCadence != null && Object.hasOwnProperty.call(message, "generationCadence")) + $root.google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence.encode(message.generationCadence, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + $root.google.privacy.dlp.v2.Disabled.encode(message.disabled, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OtherCloudDiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudDiscoveryTarget.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.IOtherCloudDiscoveryTarget} message OtherCloudDiscoveryTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OtherCloudDiscoveryTarget.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OtherCloudDiscoveryTarget message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.OtherCloudDiscoveryTarget} OtherCloudDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OtherCloudDiscoveryTarget.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.OtherCloudDiscoveryTarget(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dataSourceType = $root.google.privacy.dlp.v2.DataSourceType.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.filter = $root.google.privacy.dlp.v2.DiscoveryOtherCloudFilter.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.conditions = $root.google.privacy.dlp.v2.DiscoveryOtherCloudConditions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.generationCadence = $root.google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.disabled = $root.google.privacy.dlp.v2.Disabled.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OtherCloudDiscoveryTarget message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.OtherCloudDiscoveryTarget} OtherCloudDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OtherCloudDiscoveryTarget.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OtherCloudDiscoveryTarget message. + * @function verify + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OtherCloudDiscoveryTarget.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) { + var error = $root.google.privacy.dlp.v2.DataSourceType.verify(message.dataSourceType, long + 1); + if (error) + return "dataSourceType." + error; + } + if (message.filter != null && message.hasOwnProperty("filter")) { + var error = $root.google.privacy.dlp.v2.DiscoveryOtherCloudFilter.verify(message.filter, long + 1); + if (error) + return "filter." + error; + } + if (message.conditions != null && message.hasOwnProperty("conditions")) { + var error = $root.google.privacy.dlp.v2.DiscoveryOtherCloudConditions.verify(message.conditions, long + 1); + if (error) + return "conditions." + error; + } + if (message.generationCadence != null && message.hasOwnProperty("generationCadence")) { + properties.cadence = 1; + { + var error = $root.google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence.verify(message.generationCadence, long + 1); + if (error) + return "generationCadence." + error; + } + } + if (message.disabled != null && message.hasOwnProperty("disabled")) { + if (properties.cadence === 1) + return "cadence: multiple values"; + properties.cadence = 1; + { + var error = $root.google.privacy.dlp.v2.Disabled.verify(message.disabled, long + 1); + if (error) + return "disabled." + error; + } + } + return null; + }; + + /** + * Creates an OtherCloudDiscoveryTarget message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.OtherCloudDiscoveryTarget} OtherCloudDiscoveryTarget + */ + OtherCloudDiscoveryTarget.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.OtherCloudDiscoveryTarget) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.OtherCloudDiscoveryTarget(); + if (object.dataSourceType != null) { + if (typeof object.dataSourceType !== "object") + throw TypeError(".google.privacy.dlp.v2.OtherCloudDiscoveryTarget.dataSourceType: object expected"); + message.dataSourceType = $root.google.privacy.dlp.v2.DataSourceType.fromObject(object.dataSourceType, long + 1); + } + if (object.filter != null) { + if (typeof object.filter !== "object") + throw TypeError(".google.privacy.dlp.v2.OtherCloudDiscoveryTarget.filter: object expected"); + message.filter = $root.google.privacy.dlp.v2.DiscoveryOtherCloudFilter.fromObject(object.filter, long + 1); + } + if (object.conditions != null) { + if (typeof object.conditions !== "object") + throw TypeError(".google.privacy.dlp.v2.OtherCloudDiscoveryTarget.conditions: object expected"); + message.conditions = $root.google.privacy.dlp.v2.DiscoveryOtherCloudConditions.fromObject(object.conditions, long + 1); + } + if (object.generationCadence != null) { + if (typeof object.generationCadence !== "object") + throw TypeError(".google.privacy.dlp.v2.OtherCloudDiscoveryTarget.generationCadence: object expected"); + message.generationCadence = $root.google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence.fromObject(object.generationCadence, long + 1); + } + if (object.disabled != null) { + if (typeof object.disabled !== "object") + throw TypeError(".google.privacy.dlp.v2.OtherCloudDiscoveryTarget.disabled: object expected"); + message.disabled = $root.google.privacy.dlp.v2.Disabled.fromObject(object.disabled, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an OtherCloudDiscoveryTarget message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.OtherCloudDiscoveryTarget} message OtherCloudDiscoveryTarget + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OtherCloudDiscoveryTarget.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.dataSourceType = null; + object.filter = null; + object.conditions = null; + } + if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) + object.dataSourceType = $root.google.privacy.dlp.v2.DataSourceType.toObject(message.dataSourceType, options); + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = $root.google.privacy.dlp.v2.DiscoveryOtherCloudFilter.toObject(message.filter, options); + if (message.conditions != null && message.hasOwnProperty("conditions")) + object.conditions = $root.google.privacy.dlp.v2.DiscoveryOtherCloudConditions.toObject(message.conditions, options); + if (message.generationCadence != null && message.hasOwnProperty("generationCadence")) { + object.generationCadence = $root.google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence.toObject(message.generationCadence, options); + if (options.oneofs) + object.cadence = "generationCadence"; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) { + object.disabled = $root.google.privacy.dlp.v2.Disabled.toObject(message.disabled, options); + if (options.oneofs) + object.cadence = "disabled"; + } + return object; + }; + + /** + * Converts this OtherCloudDiscoveryTarget to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget + * @instance + * @returns {Object.} JSON object + */ + OtherCloudDiscoveryTarget.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OtherCloudDiscoveryTarget + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryTarget + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OtherCloudDiscoveryTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.OtherCloudDiscoveryTarget"; + }; + + return OtherCloudDiscoveryTarget; + })(); + + v2.DiscoveryOtherCloudFilter = (function() { + + /** + * Properties of a DiscoveryOtherCloudFilter. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoveryOtherCloudFilter + * @property {google.privacy.dlp.v2.IOtherCloudResourceCollection|null} [collection] DiscoveryOtherCloudFilter collection + * @property {google.privacy.dlp.v2.IOtherCloudSingleResourceReference|null} [singleResource] DiscoveryOtherCloudFilter singleResource + * @property {google.privacy.dlp.v2.IAllOtherResources|null} [others] DiscoveryOtherCloudFilter others + */ + + /** + * Constructs a new DiscoveryOtherCloudFilter. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoveryOtherCloudFilter. + * @implements IDiscoveryOtherCloudFilter + * @constructor + * @param {google.privacy.dlp.v2.IDiscoveryOtherCloudFilter=} [properties] Properties to set + */ + function DiscoveryOtherCloudFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryOtherCloudFilter collection. + * @member {google.privacy.dlp.v2.IOtherCloudResourceCollection|null|undefined} collection + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter + * @instance + */ + DiscoveryOtherCloudFilter.prototype.collection = null; + + /** + * DiscoveryOtherCloudFilter singleResource. + * @member {google.privacy.dlp.v2.IOtherCloudSingleResourceReference|null|undefined} singleResource + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter + * @instance + */ + DiscoveryOtherCloudFilter.prototype.singleResource = null; + + /** + * DiscoveryOtherCloudFilter others. + * @member {google.privacy.dlp.v2.IAllOtherResources|null|undefined} others + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter + * @instance + */ + DiscoveryOtherCloudFilter.prototype.others = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DiscoveryOtherCloudFilter filter. + * @member {"collection"|"singleResource"|"others"|undefined} filter + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter + * @instance + */ + Object.defineProperty(DiscoveryOtherCloudFilter.prototype, "filter", { + get: $util.oneOfGetter($oneOfFields = ["collection", "singleResource", "others"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoveryOtherCloudFilter instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter + * @static + * @param {google.privacy.dlp.v2.IDiscoveryOtherCloudFilter=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryOtherCloudFilter} DiscoveryOtherCloudFilter instance + */ + DiscoveryOtherCloudFilter.create = function create(properties) { + return new DiscoveryOtherCloudFilter(properties); + }; + + /** + * Encodes the specified DiscoveryOtherCloudFilter message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryOtherCloudFilter.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter + * @static + * @param {google.privacy.dlp.v2.IDiscoveryOtherCloudFilter} message DiscoveryOtherCloudFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryOtherCloudFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.collection != null && Object.hasOwnProperty.call(message, "collection")) + $root.google.privacy.dlp.v2.OtherCloudResourceCollection.encode(message.collection, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.singleResource != null && Object.hasOwnProperty.call(message, "singleResource")) + $root.google.privacy.dlp.v2.OtherCloudSingleResourceReference.encode(message.singleResource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.others != null && Object.hasOwnProperty.call(message, "others")) + $root.google.privacy.dlp.v2.AllOtherResources.encode(message.others, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryOtherCloudFilter message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryOtherCloudFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter + * @static + * @param {google.privacy.dlp.v2.IDiscoveryOtherCloudFilter} message DiscoveryOtherCloudFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryOtherCloudFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryOtherCloudFilter message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryOtherCloudFilter} DiscoveryOtherCloudFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryOtherCloudFilter.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryOtherCloudFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.collection = $root.google.privacy.dlp.v2.OtherCloudResourceCollection.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.singleResource = $root.google.privacy.dlp.v2.OtherCloudSingleResourceReference.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 100: { + message.others = $root.google.privacy.dlp.v2.AllOtherResources.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryOtherCloudFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryOtherCloudFilter} DiscoveryOtherCloudFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryOtherCloudFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryOtherCloudFilter message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryOtherCloudFilter.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.collection != null && message.hasOwnProperty("collection")) { + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.OtherCloudResourceCollection.verify(message.collection, long + 1); + if (error) + return "collection." + error; + } + } + if (message.singleResource != null && message.hasOwnProperty("singleResource")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.OtherCloudSingleResourceReference.verify(message.singleResource, long + 1); + if (error) + return "singleResource." + error; + } + } + if (message.others != null && message.hasOwnProperty("others")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.AllOtherResources.verify(message.others, long + 1); + if (error) + return "others." + error; + } + } + return null; + }; + + /** + * Creates a DiscoveryOtherCloudFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryOtherCloudFilter} DiscoveryOtherCloudFilter + */ + DiscoveryOtherCloudFilter.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryOtherCloudFilter) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DiscoveryOtherCloudFilter(); + if (object.collection != null) { + if (typeof object.collection !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryOtherCloudFilter.collection: object expected"); + message.collection = $root.google.privacy.dlp.v2.OtherCloudResourceCollection.fromObject(object.collection, long + 1); + } + if (object.singleResource != null) { + if (typeof object.singleResource !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryOtherCloudFilter.singleResource: object expected"); + message.singleResource = $root.google.privacy.dlp.v2.OtherCloudSingleResourceReference.fromObject(object.singleResource, long + 1); + } + if (object.others != null) { + if (typeof object.others !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryOtherCloudFilter.others: object expected"); + message.others = $root.google.privacy.dlp.v2.AllOtherResources.fromObject(object.others, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryOtherCloudFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter + * @static + * @param {google.privacy.dlp.v2.DiscoveryOtherCloudFilter} message DiscoveryOtherCloudFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryOtherCloudFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.collection != null && message.hasOwnProperty("collection")) { + object.collection = $root.google.privacy.dlp.v2.OtherCloudResourceCollection.toObject(message.collection, options); + if (options.oneofs) + object.filter = "collection"; + } + if (message.singleResource != null && message.hasOwnProperty("singleResource")) { + object.singleResource = $root.google.privacy.dlp.v2.OtherCloudSingleResourceReference.toObject(message.singleResource, options); + if (options.oneofs) + object.filter = "singleResource"; + } + if (message.others != null && message.hasOwnProperty("others")) { + object.others = $root.google.privacy.dlp.v2.AllOtherResources.toObject(message.others, options); + if (options.oneofs) + object.filter = "others"; + } + return object; + }; + + /** + * Converts this DiscoveryOtherCloudFilter to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter + * @instance + * @returns {Object.} JSON object + */ + DiscoveryOtherCloudFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryOtherCloudFilter + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryOtherCloudFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryOtherCloudFilter"; + }; + + return DiscoveryOtherCloudFilter; + })(); + + v2.OtherCloudResourceCollection = (function() { + + /** + * Properties of an OtherCloudResourceCollection. + * @memberof google.privacy.dlp.v2 + * @interface IOtherCloudResourceCollection + * @property {google.privacy.dlp.v2.IOtherCloudResourceRegexes|null} [includeRegexes] OtherCloudResourceCollection includeRegexes + */ + + /** + * Constructs a new OtherCloudResourceCollection. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an OtherCloudResourceCollection. + * @implements IOtherCloudResourceCollection + * @constructor + * @param {google.privacy.dlp.v2.IOtherCloudResourceCollection=} [properties] Properties to set + */ + function OtherCloudResourceCollection(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * OtherCloudResourceCollection includeRegexes. + * @member {google.privacy.dlp.v2.IOtherCloudResourceRegexes|null|undefined} includeRegexes + * @memberof google.privacy.dlp.v2.OtherCloudResourceCollection + * @instance + */ + OtherCloudResourceCollection.prototype.includeRegexes = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OtherCloudResourceCollection pattern. + * @member {"includeRegexes"|undefined} pattern + * @memberof google.privacy.dlp.v2.OtherCloudResourceCollection + * @instance + */ + Object.defineProperty(OtherCloudResourceCollection.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["includeRegexes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OtherCloudResourceCollection instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.OtherCloudResourceCollection + * @static + * @param {google.privacy.dlp.v2.IOtherCloudResourceCollection=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.OtherCloudResourceCollection} OtherCloudResourceCollection instance + */ + OtherCloudResourceCollection.create = function create(properties) { + return new OtherCloudResourceCollection(properties); + }; + + /** + * Encodes the specified OtherCloudResourceCollection message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudResourceCollection.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.OtherCloudResourceCollection + * @static + * @param {google.privacy.dlp.v2.IOtherCloudResourceCollection} message OtherCloudResourceCollection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OtherCloudResourceCollection.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.includeRegexes != null && Object.hasOwnProperty.call(message, "includeRegexes")) + $root.google.privacy.dlp.v2.OtherCloudResourceRegexes.encode(message.includeRegexes, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OtherCloudResourceCollection message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudResourceCollection.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.OtherCloudResourceCollection + * @static + * @param {google.privacy.dlp.v2.IOtherCloudResourceCollection} message OtherCloudResourceCollection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OtherCloudResourceCollection.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OtherCloudResourceCollection message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.OtherCloudResourceCollection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.OtherCloudResourceCollection} OtherCloudResourceCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OtherCloudResourceCollection.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.OtherCloudResourceCollection(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.includeRegexes = $root.google.privacy.dlp.v2.OtherCloudResourceRegexes.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OtherCloudResourceCollection message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.OtherCloudResourceCollection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.OtherCloudResourceCollection} OtherCloudResourceCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OtherCloudResourceCollection.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OtherCloudResourceCollection message. + * @function verify + * @memberof google.privacy.dlp.v2.OtherCloudResourceCollection + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OtherCloudResourceCollection.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.includeRegexes != null && message.hasOwnProperty("includeRegexes")) { + properties.pattern = 1; + { + var error = $root.google.privacy.dlp.v2.OtherCloudResourceRegexes.verify(message.includeRegexes, long + 1); + if (error) + return "includeRegexes." + error; + } + } + return null; + }; + + /** + * Creates an OtherCloudResourceCollection message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.OtherCloudResourceCollection + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.OtherCloudResourceCollection} OtherCloudResourceCollection + */ + OtherCloudResourceCollection.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.OtherCloudResourceCollection) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.OtherCloudResourceCollection(); + if (object.includeRegexes != null) { + if (typeof object.includeRegexes !== "object") + throw TypeError(".google.privacy.dlp.v2.OtherCloudResourceCollection.includeRegexes: object expected"); + message.includeRegexes = $root.google.privacy.dlp.v2.OtherCloudResourceRegexes.fromObject(object.includeRegexes, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an OtherCloudResourceCollection message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.OtherCloudResourceCollection + * @static + * @param {google.privacy.dlp.v2.OtherCloudResourceCollection} message OtherCloudResourceCollection + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OtherCloudResourceCollection.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.includeRegexes != null && message.hasOwnProperty("includeRegexes")) { + object.includeRegexes = $root.google.privacy.dlp.v2.OtherCloudResourceRegexes.toObject(message.includeRegexes, options); + if (options.oneofs) + object.pattern = "includeRegexes"; + } + return object; + }; + + /** + * Converts this OtherCloudResourceCollection to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.OtherCloudResourceCollection + * @instance + * @returns {Object.} JSON object + */ + OtherCloudResourceCollection.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OtherCloudResourceCollection + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.OtherCloudResourceCollection + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OtherCloudResourceCollection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.OtherCloudResourceCollection"; + }; + + return OtherCloudResourceCollection; + })(); + + v2.OtherCloudResourceRegexes = (function() { + + /** + * Properties of an OtherCloudResourceRegexes. + * @memberof google.privacy.dlp.v2 + * @interface IOtherCloudResourceRegexes + * @property {Array.|null} [patterns] OtherCloudResourceRegexes patterns + */ + + /** + * Constructs a new OtherCloudResourceRegexes. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an OtherCloudResourceRegexes. + * @implements IOtherCloudResourceRegexes + * @constructor + * @param {google.privacy.dlp.v2.IOtherCloudResourceRegexes=} [properties] Properties to set + */ + function OtherCloudResourceRegexes(properties) { + this.patterns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * OtherCloudResourceRegexes patterns. + * @member {Array.} patterns + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegexes + * @instance + */ + OtherCloudResourceRegexes.prototype.patterns = $util.emptyArray; + + /** + * Creates a new OtherCloudResourceRegexes instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegexes + * @static + * @param {google.privacy.dlp.v2.IOtherCloudResourceRegexes=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.OtherCloudResourceRegexes} OtherCloudResourceRegexes instance + */ + OtherCloudResourceRegexes.create = function create(properties) { + return new OtherCloudResourceRegexes(properties); + }; + + /** + * Encodes the specified OtherCloudResourceRegexes message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudResourceRegexes.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegexes + * @static + * @param {google.privacy.dlp.v2.IOtherCloudResourceRegexes} message OtherCloudResourceRegexes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OtherCloudResourceRegexes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.patterns != null && message.patterns.length) + for (var i = 0; i < message.patterns.length; ++i) + $root.google.privacy.dlp.v2.OtherCloudResourceRegex.encode(message.patterns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OtherCloudResourceRegexes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudResourceRegexes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegexes + * @static + * @param {google.privacy.dlp.v2.IOtherCloudResourceRegexes} message OtherCloudResourceRegexes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OtherCloudResourceRegexes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OtherCloudResourceRegexes message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegexes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.OtherCloudResourceRegexes} OtherCloudResourceRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OtherCloudResourceRegexes.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.OtherCloudResourceRegexes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.patterns && message.patterns.length)) + message.patterns = []; + message.patterns.push($root.google.privacy.dlp.v2.OtherCloudResourceRegex.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OtherCloudResourceRegexes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegexes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.OtherCloudResourceRegexes} OtherCloudResourceRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OtherCloudResourceRegexes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OtherCloudResourceRegexes message. + * @function verify + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegexes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OtherCloudResourceRegexes.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.patterns != null && message.hasOwnProperty("patterns")) { + if (!Array.isArray(message.patterns)) + return "patterns: array expected"; + for (var i = 0; i < message.patterns.length; ++i) { + var error = $root.google.privacy.dlp.v2.OtherCloudResourceRegex.verify(message.patterns[i], long + 1); + if (error) + return "patterns." + error; + } + } + return null; + }; + + /** + * Creates an OtherCloudResourceRegexes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegexes + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.OtherCloudResourceRegexes} OtherCloudResourceRegexes + */ + OtherCloudResourceRegexes.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.OtherCloudResourceRegexes) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.OtherCloudResourceRegexes(); + if (object.patterns) { + if (!Array.isArray(object.patterns)) + throw TypeError(".google.privacy.dlp.v2.OtherCloudResourceRegexes.patterns: array expected"); + message.patterns = []; + for (var i = 0; i < object.patterns.length; ++i) { + if (typeof object.patterns[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.OtherCloudResourceRegexes.patterns: object expected"); + message.patterns[i] = $root.google.privacy.dlp.v2.OtherCloudResourceRegex.fromObject(object.patterns[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from an OtherCloudResourceRegexes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegexes + * @static + * @param {google.privacy.dlp.v2.OtherCloudResourceRegexes} message OtherCloudResourceRegexes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OtherCloudResourceRegexes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.patterns = []; + if (message.patterns && message.patterns.length) { + object.patterns = []; + for (var j = 0; j < message.patterns.length; ++j) + object.patterns[j] = $root.google.privacy.dlp.v2.OtherCloudResourceRegex.toObject(message.patterns[j], options); + } + return object; + }; + + /** + * Converts this OtherCloudResourceRegexes to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegexes + * @instance + * @returns {Object.} JSON object + */ + OtherCloudResourceRegexes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OtherCloudResourceRegexes + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegexes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OtherCloudResourceRegexes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.OtherCloudResourceRegexes"; + }; + + return OtherCloudResourceRegexes; + })(); + + v2.OtherCloudResourceRegex = (function() { + + /** + * Properties of an OtherCloudResourceRegex. + * @memberof google.privacy.dlp.v2 + * @interface IOtherCloudResourceRegex + * @property {google.privacy.dlp.v2.IAmazonS3BucketRegex|null} [amazonS3BucketRegex] OtherCloudResourceRegex amazonS3BucketRegex + */ + + /** + * Constructs a new OtherCloudResourceRegex. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an OtherCloudResourceRegex. + * @implements IOtherCloudResourceRegex + * @constructor + * @param {google.privacy.dlp.v2.IOtherCloudResourceRegex=} [properties] Properties to set + */ + function OtherCloudResourceRegex(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * OtherCloudResourceRegex amazonS3BucketRegex. + * @member {google.privacy.dlp.v2.IAmazonS3BucketRegex|null|undefined} amazonS3BucketRegex + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegex + * @instance + */ + OtherCloudResourceRegex.prototype.amazonS3BucketRegex = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OtherCloudResourceRegex resourceRegex. + * @member {"amazonS3BucketRegex"|undefined} resourceRegex + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegex + * @instance + */ + Object.defineProperty(OtherCloudResourceRegex.prototype, "resourceRegex", { + get: $util.oneOfGetter($oneOfFields = ["amazonS3BucketRegex"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OtherCloudResourceRegex instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegex + * @static + * @param {google.privacy.dlp.v2.IOtherCloudResourceRegex=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.OtherCloudResourceRegex} OtherCloudResourceRegex instance + */ + OtherCloudResourceRegex.create = function create(properties) { + return new OtherCloudResourceRegex(properties); + }; + + /** + * Encodes the specified OtherCloudResourceRegex message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudResourceRegex.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegex + * @static + * @param {google.privacy.dlp.v2.IOtherCloudResourceRegex} message OtherCloudResourceRegex message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OtherCloudResourceRegex.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.amazonS3BucketRegex != null && Object.hasOwnProperty.call(message, "amazonS3BucketRegex")) + $root.google.privacy.dlp.v2.AmazonS3BucketRegex.encode(message.amazonS3BucketRegex, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OtherCloudResourceRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudResourceRegex.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegex + * @static + * @param {google.privacy.dlp.v2.IOtherCloudResourceRegex} message OtherCloudResourceRegex message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OtherCloudResourceRegex.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OtherCloudResourceRegex message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegex + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.OtherCloudResourceRegex} OtherCloudResourceRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OtherCloudResourceRegex.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.OtherCloudResourceRegex(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.amazonS3BucketRegex = $root.google.privacy.dlp.v2.AmazonS3BucketRegex.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OtherCloudResourceRegex message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegex + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.OtherCloudResourceRegex} OtherCloudResourceRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OtherCloudResourceRegex.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OtherCloudResourceRegex message. + * @function verify + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegex + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OtherCloudResourceRegex.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.amazonS3BucketRegex != null && message.hasOwnProperty("amazonS3BucketRegex")) { + properties.resourceRegex = 1; + { + var error = $root.google.privacy.dlp.v2.AmazonS3BucketRegex.verify(message.amazonS3BucketRegex, long + 1); + if (error) + return "amazonS3BucketRegex." + error; + } + } + return null; + }; + + /** + * Creates an OtherCloudResourceRegex message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegex + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.OtherCloudResourceRegex} OtherCloudResourceRegex + */ + OtherCloudResourceRegex.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.OtherCloudResourceRegex) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.OtherCloudResourceRegex(); + if (object.amazonS3BucketRegex != null) { + if (typeof object.amazonS3BucketRegex !== "object") + throw TypeError(".google.privacy.dlp.v2.OtherCloudResourceRegex.amazonS3BucketRegex: object expected"); + message.amazonS3BucketRegex = $root.google.privacy.dlp.v2.AmazonS3BucketRegex.fromObject(object.amazonS3BucketRegex, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an OtherCloudResourceRegex message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegex + * @static + * @param {google.privacy.dlp.v2.OtherCloudResourceRegex} message OtherCloudResourceRegex + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OtherCloudResourceRegex.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.amazonS3BucketRegex != null && message.hasOwnProperty("amazonS3BucketRegex")) { + object.amazonS3BucketRegex = $root.google.privacy.dlp.v2.AmazonS3BucketRegex.toObject(message.amazonS3BucketRegex, options); + if (options.oneofs) + object.resourceRegex = "amazonS3BucketRegex"; + } + return object; + }; + + /** + * Converts this OtherCloudResourceRegex to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegex + * @instance + * @returns {Object.} JSON object + */ + OtherCloudResourceRegex.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OtherCloudResourceRegex + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.OtherCloudResourceRegex + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OtherCloudResourceRegex.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.OtherCloudResourceRegex"; + }; + + return OtherCloudResourceRegex; + })(); + + v2.AwsAccountRegex = (function() { + + /** + * Properties of an AwsAccountRegex. + * @memberof google.privacy.dlp.v2 + * @interface IAwsAccountRegex + * @property {string|null} [accountIdRegex] AwsAccountRegex accountIdRegex + */ + + /** + * Constructs a new AwsAccountRegex. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an AwsAccountRegex. + * @implements IAwsAccountRegex + * @constructor + * @param {google.privacy.dlp.v2.IAwsAccountRegex=} [properties] Properties to set + */ + function AwsAccountRegex(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * AwsAccountRegex accountIdRegex. + * @member {string} accountIdRegex + * @memberof google.privacy.dlp.v2.AwsAccountRegex + * @instance + */ + AwsAccountRegex.prototype.accountIdRegex = ""; + + /** + * Creates a new AwsAccountRegex instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AwsAccountRegex + * @static + * @param {google.privacy.dlp.v2.IAwsAccountRegex=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AwsAccountRegex} AwsAccountRegex instance + */ + AwsAccountRegex.create = function create(properties) { + return new AwsAccountRegex(properties); + }; + + /** + * Encodes the specified AwsAccountRegex message. Does not implicitly {@link google.privacy.dlp.v2.AwsAccountRegex.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AwsAccountRegex + * @static + * @param {google.privacy.dlp.v2.IAwsAccountRegex} message AwsAccountRegex message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsAccountRegex.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accountIdRegex != null && Object.hasOwnProperty.call(message, "accountIdRegex")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.accountIdRegex); + return writer; + }; + + /** + * Encodes the specified AwsAccountRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AwsAccountRegex.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AwsAccountRegex + * @static + * @param {google.privacy.dlp.v2.IAwsAccountRegex} message AwsAccountRegex message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsAccountRegex.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AwsAccountRegex message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AwsAccountRegex + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AwsAccountRegex} AwsAccountRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsAccountRegex.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AwsAccountRegex(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.accountIdRegex = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AwsAccountRegex message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AwsAccountRegex + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AwsAccountRegex} AwsAccountRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsAccountRegex.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AwsAccountRegex message. + * @function verify + * @memberof google.privacy.dlp.v2.AwsAccountRegex + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AwsAccountRegex.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.accountIdRegex != null && message.hasOwnProperty("accountIdRegex")) + if (!$util.isString(message.accountIdRegex)) + return "accountIdRegex: string expected"; + return null; + }; + + /** + * Creates an AwsAccountRegex message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AwsAccountRegex + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AwsAccountRegex} AwsAccountRegex + */ + AwsAccountRegex.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AwsAccountRegex) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.AwsAccountRegex(); + if (object.accountIdRegex != null) + message.accountIdRegex = String(object.accountIdRegex); + return message; + }; + + /** + * Creates a plain object from an AwsAccountRegex message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AwsAccountRegex + * @static + * @param {google.privacy.dlp.v2.AwsAccountRegex} message AwsAccountRegex + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AwsAccountRegex.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.accountIdRegex = ""; + if (message.accountIdRegex != null && message.hasOwnProperty("accountIdRegex")) + object.accountIdRegex = message.accountIdRegex; + return object; + }; + + /** + * Converts this AwsAccountRegex to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AwsAccountRegex + * @instance + * @returns {Object.} JSON object + */ + AwsAccountRegex.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AwsAccountRegex + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AwsAccountRegex + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AwsAccountRegex.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AwsAccountRegex"; + }; + + return AwsAccountRegex; + })(); + + v2.AmazonS3BucketRegex = (function() { + + /** + * Properties of an AmazonS3BucketRegex. + * @memberof google.privacy.dlp.v2 + * @interface IAmazonS3BucketRegex + * @property {google.privacy.dlp.v2.IAwsAccountRegex|null} [awsAccountRegex] AmazonS3BucketRegex awsAccountRegex + * @property {string|null} [bucketNameRegex] AmazonS3BucketRegex bucketNameRegex + */ + + /** + * Constructs a new AmazonS3BucketRegex. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an AmazonS3BucketRegex. + * @implements IAmazonS3BucketRegex + * @constructor + * @param {google.privacy.dlp.v2.IAmazonS3BucketRegex=} [properties] Properties to set + */ + function AmazonS3BucketRegex(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * AmazonS3BucketRegex awsAccountRegex. + * @member {google.privacy.dlp.v2.IAwsAccountRegex|null|undefined} awsAccountRegex + * @memberof google.privacy.dlp.v2.AmazonS3BucketRegex + * @instance + */ + AmazonS3BucketRegex.prototype.awsAccountRegex = null; + + /** + * AmazonS3BucketRegex bucketNameRegex. + * @member {string} bucketNameRegex + * @memberof google.privacy.dlp.v2.AmazonS3BucketRegex + * @instance + */ + AmazonS3BucketRegex.prototype.bucketNameRegex = ""; + + /** + * Creates a new AmazonS3BucketRegex instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AmazonS3BucketRegex + * @static + * @param {google.privacy.dlp.v2.IAmazonS3BucketRegex=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AmazonS3BucketRegex} AmazonS3BucketRegex instance + */ + AmazonS3BucketRegex.create = function create(properties) { + return new AmazonS3BucketRegex(properties); + }; + + /** + * Encodes the specified AmazonS3BucketRegex message. Does not implicitly {@link google.privacy.dlp.v2.AmazonS3BucketRegex.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AmazonS3BucketRegex + * @static + * @param {google.privacy.dlp.v2.IAmazonS3BucketRegex} message AmazonS3BucketRegex message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AmazonS3BucketRegex.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.awsAccountRegex != null && Object.hasOwnProperty.call(message, "awsAccountRegex")) + $root.google.privacy.dlp.v2.AwsAccountRegex.encode(message.awsAccountRegex, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.bucketNameRegex != null && Object.hasOwnProperty.call(message, "bucketNameRegex")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.bucketNameRegex); + return writer; + }; + + /** + * Encodes the specified AmazonS3BucketRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AmazonS3BucketRegex.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AmazonS3BucketRegex + * @static + * @param {google.privacy.dlp.v2.IAmazonS3BucketRegex} message AmazonS3BucketRegex message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AmazonS3BucketRegex.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AmazonS3BucketRegex message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AmazonS3BucketRegex + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AmazonS3BucketRegex} AmazonS3BucketRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AmazonS3BucketRegex.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AmazonS3BucketRegex(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.awsAccountRegex = $root.google.privacy.dlp.v2.AwsAccountRegex.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.bucketNameRegex = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AmazonS3BucketRegex message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AmazonS3BucketRegex + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AmazonS3BucketRegex} AmazonS3BucketRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AmazonS3BucketRegex.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AmazonS3BucketRegex message. + * @function verify + * @memberof google.privacy.dlp.v2.AmazonS3BucketRegex + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AmazonS3BucketRegex.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.awsAccountRegex != null && message.hasOwnProperty("awsAccountRegex")) { + var error = $root.google.privacy.dlp.v2.AwsAccountRegex.verify(message.awsAccountRegex, long + 1); + if (error) + return "awsAccountRegex." + error; + } + if (message.bucketNameRegex != null && message.hasOwnProperty("bucketNameRegex")) + if (!$util.isString(message.bucketNameRegex)) + return "bucketNameRegex: string expected"; + return null; + }; + + /** + * Creates an AmazonS3BucketRegex message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AmazonS3BucketRegex + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AmazonS3BucketRegex} AmazonS3BucketRegex + */ + AmazonS3BucketRegex.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AmazonS3BucketRegex) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.AmazonS3BucketRegex(); + if (object.awsAccountRegex != null) { + if (typeof object.awsAccountRegex !== "object") + throw TypeError(".google.privacy.dlp.v2.AmazonS3BucketRegex.awsAccountRegex: object expected"); + message.awsAccountRegex = $root.google.privacy.dlp.v2.AwsAccountRegex.fromObject(object.awsAccountRegex, long + 1); + } + if (object.bucketNameRegex != null) + message.bucketNameRegex = String(object.bucketNameRegex); + return message; + }; + + /** + * Creates a plain object from an AmazonS3BucketRegex message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AmazonS3BucketRegex + * @static + * @param {google.privacy.dlp.v2.AmazonS3BucketRegex} message AmazonS3BucketRegex + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AmazonS3BucketRegex.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.awsAccountRegex = null; + object.bucketNameRegex = ""; + } + if (message.awsAccountRegex != null && message.hasOwnProperty("awsAccountRegex")) + object.awsAccountRegex = $root.google.privacy.dlp.v2.AwsAccountRegex.toObject(message.awsAccountRegex, options); + if (message.bucketNameRegex != null && message.hasOwnProperty("bucketNameRegex")) + object.bucketNameRegex = message.bucketNameRegex; + return object; + }; + + /** + * Converts this AmazonS3BucketRegex to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AmazonS3BucketRegex + * @instance + * @returns {Object.} JSON object + */ + AmazonS3BucketRegex.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AmazonS3BucketRegex + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AmazonS3BucketRegex + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AmazonS3BucketRegex.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AmazonS3BucketRegex"; + }; + + return AmazonS3BucketRegex; + })(); + + v2.OtherCloudSingleResourceReference = (function() { + + /** + * Properties of an OtherCloudSingleResourceReference. + * @memberof google.privacy.dlp.v2 + * @interface IOtherCloudSingleResourceReference + * @property {google.privacy.dlp.v2.IAmazonS3Bucket|null} [amazonS3Bucket] OtherCloudSingleResourceReference amazonS3Bucket + */ + + /** + * Constructs a new OtherCloudSingleResourceReference. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an OtherCloudSingleResourceReference. + * @implements IOtherCloudSingleResourceReference + * @constructor + * @param {google.privacy.dlp.v2.IOtherCloudSingleResourceReference=} [properties] Properties to set + */ + function OtherCloudSingleResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * OtherCloudSingleResourceReference amazonS3Bucket. + * @member {google.privacy.dlp.v2.IAmazonS3Bucket|null|undefined} amazonS3Bucket + * @memberof google.privacy.dlp.v2.OtherCloudSingleResourceReference + * @instance + */ + OtherCloudSingleResourceReference.prototype.amazonS3Bucket = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OtherCloudSingleResourceReference resource. + * @member {"amazonS3Bucket"|undefined} resource + * @memberof google.privacy.dlp.v2.OtherCloudSingleResourceReference + * @instance + */ + Object.defineProperty(OtherCloudSingleResourceReference.prototype, "resource", { + get: $util.oneOfGetter($oneOfFields = ["amazonS3Bucket"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OtherCloudSingleResourceReference instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.OtherCloudSingleResourceReference + * @static + * @param {google.privacy.dlp.v2.IOtherCloudSingleResourceReference=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.OtherCloudSingleResourceReference} OtherCloudSingleResourceReference instance + */ + OtherCloudSingleResourceReference.create = function create(properties) { + return new OtherCloudSingleResourceReference(properties); + }; + + /** + * Encodes the specified OtherCloudSingleResourceReference message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudSingleResourceReference.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.OtherCloudSingleResourceReference + * @static + * @param {google.privacy.dlp.v2.IOtherCloudSingleResourceReference} message OtherCloudSingleResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OtherCloudSingleResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.amazonS3Bucket != null && Object.hasOwnProperty.call(message, "amazonS3Bucket")) + $root.google.privacy.dlp.v2.AmazonS3Bucket.encode(message.amazonS3Bucket, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OtherCloudSingleResourceReference message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudSingleResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.OtherCloudSingleResourceReference + * @static + * @param {google.privacy.dlp.v2.IOtherCloudSingleResourceReference} message OtherCloudSingleResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OtherCloudSingleResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OtherCloudSingleResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.OtherCloudSingleResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.OtherCloudSingleResourceReference} OtherCloudSingleResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OtherCloudSingleResourceReference.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.OtherCloudSingleResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.amazonS3Bucket = $root.google.privacy.dlp.v2.AmazonS3Bucket.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OtherCloudSingleResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.OtherCloudSingleResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.OtherCloudSingleResourceReference} OtherCloudSingleResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OtherCloudSingleResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OtherCloudSingleResourceReference message. + * @function verify + * @memberof google.privacy.dlp.v2.OtherCloudSingleResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OtherCloudSingleResourceReference.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.amazonS3Bucket != null && message.hasOwnProperty("amazonS3Bucket")) { + properties.resource = 1; + { + var error = $root.google.privacy.dlp.v2.AmazonS3Bucket.verify(message.amazonS3Bucket, long + 1); + if (error) + return "amazonS3Bucket." + error; + } + } + return null; + }; + + /** + * Creates an OtherCloudSingleResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.OtherCloudSingleResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.OtherCloudSingleResourceReference} OtherCloudSingleResourceReference + */ + OtherCloudSingleResourceReference.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.OtherCloudSingleResourceReference) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.OtherCloudSingleResourceReference(); + if (object.amazonS3Bucket != null) { + if (typeof object.amazonS3Bucket !== "object") + throw TypeError(".google.privacy.dlp.v2.OtherCloudSingleResourceReference.amazonS3Bucket: object expected"); + message.amazonS3Bucket = $root.google.privacy.dlp.v2.AmazonS3Bucket.fromObject(object.amazonS3Bucket, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an OtherCloudSingleResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.OtherCloudSingleResourceReference + * @static + * @param {google.privacy.dlp.v2.OtherCloudSingleResourceReference} message OtherCloudSingleResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OtherCloudSingleResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.amazonS3Bucket != null && message.hasOwnProperty("amazonS3Bucket")) { + object.amazonS3Bucket = $root.google.privacy.dlp.v2.AmazonS3Bucket.toObject(message.amazonS3Bucket, options); + if (options.oneofs) + object.resource = "amazonS3Bucket"; + } + return object; + }; + + /** + * Converts this OtherCloudSingleResourceReference to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.OtherCloudSingleResourceReference + * @instance + * @returns {Object.} JSON object + */ + OtherCloudSingleResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OtherCloudSingleResourceReference + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.OtherCloudSingleResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OtherCloudSingleResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.OtherCloudSingleResourceReference"; + }; + + return OtherCloudSingleResourceReference; + })(); + + v2.AwsAccount = (function() { + + /** + * Properties of an AwsAccount. + * @memberof google.privacy.dlp.v2 + * @interface IAwsAccount + * @property {string|null} [accountId] AwsAccount accountId + */ + + /** + * Constructs a new AwsAccount. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an AwsAccount. + * @implements IAwsAccount + * @constructor + * @param {google.privacy.dlp.v2.IAwsAccount=} [properties] Properties to set + */ + function AwsAccount(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * AwsAccount accountId. + * @member {string} accountId + * @memberof google.privacy.dlp.v2.AwsAccount + * @instance + */ + AwsAccount.prototype.accountId = ""; + + /** + * Creates a new AwsAccount instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AwsAccount + * @static + * @param {google.privacy.dlp.v2.IAwsAccount=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AwsAccount} AwsAccount instance + */ + AwsAccount.create = function create(properties) { + return new AwsAccount(properties); + }; + + /** + * Encodes the specified AwsAccount message. Does not implicitly {@link google.privacy.dlp.v2.AwsAccount.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AwsAccount + * @static + * @param {google.privacy.dlp.v2.IAwsAccount} message AwsAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsAccount.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accountId != null && Object.hasOwnProperty.call(message, "accountId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.accountId); + return writer; + }; + + /** + * Encodes the specified AwsAccount message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AwsAccount.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AwsAccount + * @static + * @param {google.privacy.dlp.v2.IAwsAccount} message AwsAccount message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsAccount.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AwsAccount message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AwsAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AwsAccount} AwsAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsAccount.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AwsAccount(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.accountId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AwsAccount message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AwsAccount + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AwsAccount} AwsAccount + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsAccount.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AwsAccount message. + * @function verify + * @memberof google.privacy.dlp.v2.AwsAccount + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AwsAccount.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.accountId != null && message.hasOwnProperty("accountId")) + if (!$util.isString(message.accountId)) + return "accountId: string expected"; + return null; + }; + + /** + * Creates an AwsAccount message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AwsAccount + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AwsAccount} AwsAccount + */ + AwsAccount.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AwsAccount) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.AwsAccount(); + if (object.accountId != null) + message.accountId = String(object.accountId); + return message; + }; + + /** + * Creates a plain object from an AwsAccount message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AwsAccount + * @static + * @param {google.privacy.dlp.v2.AwsAccount} message AwsAccount + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AwsAccount.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.accountId = ""; + if (message.accountId != null && message.hasOwnProperty("accountId")) + object.accountId = message.accountId; + return object; + }; + + /** + * Converts this AwsAccount to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AwsAccount + * @instance + * @returns {Object.} JSON object + */ + AwsAccount.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AwsAccount + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AwsAccount + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AwsAccount.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AwsAccount"; + }; + + return AwsAccount; + })(); + + v2.AmazonS3Bucket = (function() { + + /** + * Properties of an AmazonS3Bucket. + * @memberof google.privacy.dlp.v2 + * @interface IAmazonS3Bucket + * @property {google.privacy.dlp.v2.IAwsAccount|null} [awsAccount] AmazonS3Bucket awsAccount + * @property {string|null} [bucketName] AmazonS3Bucket bucketName + */ + + /** + * Constructs a new AmazonS3Bucket. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an AmazonS3Bucket. + * @implements IAmazonS3Bucket + * @constructor + * @param {google.privacy.dlp.v2.IAmazonS3Bucket=} [properties] Properties to set + */ + function AmazonS3Bucket(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * AmazonS3Bucket awsAccount. + * @member {google.privacy.dlp.v2.IAwsAccount|null|undefined} awsAccount + * @memberof google.privacy.dlp.v2.AmazonS3Bucket + * @instance + */ + AmazonS3Bucket.prototype.awsAccount = null; + + /** + * AmazonS3Bucket bucketName. + * @member {string} bucketName + * @memberof google.privacy.dlp.v2.AmazonS3Bucket + * @instance + */ + AmazonS3Bucket.prototype.bucketName = ""; + + /** + * Creates a new AmazonS3Bucket instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AmazonS3Bucket + * @static + * @param {google.privacy.dlp.v2.IAmazonS3Bucket=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AmazonS3Bucket} AmazonS3Bucket instance + */ + AmazonS3Bucket.create = function create(properties) { + return new AmazonS3Bucket(properties); + }; + + /** + * Encodes the specified AmazonS3Bucket message. Does not implicitly {@link google.privacy.dlp.v2.AmazonS3Bucket.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AmazonS3Bucket + * @static + * @param {google.privacy.dlp.v2.IAmazonS3Bucket} message AmazonS3Bucket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AmazonS3Bucket.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.awsAccount != null && Object.hasOwnProperty.call(message, "awsAccount")) + $root.google.privacy.dlp.v2.AwsAccount.encode(message.awsAccount, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.bucketName != null && Object.hasOwnProperty.call(message, "bucketName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.bucketName); + return writer; + }; + + /** + * Encodes the specified AmazonS3Bucket message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AmazonS3Bucket.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AmazonS3Bucket + * @static + * @param {google.privacy.dlp.v2.IAmazonS3Bucket} message AmazonS3Bucket message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AmazonS3Bucket.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AmazonS3Bucket message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AmazonS3Bucket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AmazonS3Bucket} AmazonS3Bucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AmazonS3Bucket.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AmazonS3Bucket(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.awsAccount = $root.google.privacy.dlp.v2.AwsAccount.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.bucketName = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AmazonS3Bucket message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AmazonS3Bucket + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AmazonS3Bucket} AmazonS3Bucket + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AmazonS3Bucket.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AmazonS3Bucket message. + * @function verify + * @memberof google.privacy.dlp.v2.AmazonS3Bucket + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AmazonS3Bucket.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.awsAccount != null && message.hasOwnProperty("awsAccount")) { + var error = $root.google.privacy.dlp.v2.AwsAccount.verify(message.awsAccount, long + 1); + if (error) + return "awsAccount." + error; + } + if (message.bucketName != null && message.hasOwnProperty("bucketName")) + if (!$util.isString(message.bucketName)) + return "bucketName: string expected"; + return null; + }; + + /** + * Creates an AmazonS3Bucket message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AmazonS3Bucket + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AmazonS3Bucket} AmazonS3Bucket + */ + AmazonS3Bucket.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AmazonS3Bucket) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.AmazonS3Bucket(); + if (object.awsAccount != null) { + if (typeof object.awsAccount !== "object") + throw TypeError(".google.privacy.dlp.v2.AmazonS3Bucket.awsAccount: object expected"); + message.awsAccount = $root.google.privacy.dlp.v2.AwsAccount.fromObject(object.awsAccount, long + 1); + } + if (object.bucketName != null) + message.bucketName = String(object.bucketName); + return message; + }; + + /** + * Creates a plain object from an AmazonS3Bucket message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AmazonS3Bucket + * @static + * @param {google.privacy.dlp.v2.AmazonS3Bucket} message AmazonS3Bucket + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AmazonS3Bucket.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.awsAccount = null; + object.bucketName = ""; + } + if (message.awsAccount != null && message.hasOwnProperty("awsAccount")) + object.awsAccount = $root.google.privacy.dlp.v2.AwsAccount.toObject(message.awsAccount, options); + if (message.bucketName != null && message.hasOwnProperty("bucketName")) + object.bucketName = message.bucketName; + return object; + }; + + /** + * Converts this AmazonS3Bucket to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AmazonS3Bucket + * @instance + * @returns {Object.} JSON object + */ + AmazonS3Bucket.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AmazonS3Bucket + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AmazonS3Bucket + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AmazonS3Bucket.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AmazonS3Bucket"; + }; + + return AmazonS3Bucket; + })(); + + v2.DiscoveryOtherCloudConditions = (function() { + + /** + * Properties of a DiscoveryOtherCloudConditions. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoveryOtherCloudConditions + * @property {google.protobuf.IDuration|null} [minAge] DiscoveryOtherCloudConditions minAge + * @property {google.privacy.dlp.v2.IAmazonS3BucketConditions|null} [amazonS3BucketConditions] DiscoveryOtherCloudConditions amazonS3BucketConditions + */ + + /** + * Constructs a new DiscoveryOtherCloudConditions. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoveryOtherCloudConditions. + * @implements IDiscoveryOtherCloudConditions + * @constructor + * @param {google.privacy.dlp.v2.IDiscoveryOtherCloudConditions=} [properties] Properties to set + */ + function DiscoveryOtherCloudConditions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryOtherCloudConditions minAge. + * @member {google.protobuf.IDuration|null|undefined} minAge + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions + * @instance + */ + DiscoveryOtherCloudConditions.prototype.minAge = null; + + /** + * DiscoveryOtherCloudConditions amazonS3BucketConditions. + * @member {google.privacy.dlp.v2.IAmazonS3BucketConditions|null|undefined} amazonS3BucketConditions + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions + * @instance + */ + DiscoveryOtherCloudConditions.prototype.amazonS3BucketConditions = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DiscoveryOtherCloudConditions conditions. + * @member {"amazonS3BucketConditions"|undefined} conditions + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions + * @instance + */ + Object.defineProperty(DiscoveryOtherCloudConditions.prototype, "conditions", { + get: $util.oneOfGetter($oneOfFields = ["amazonS3BucketConditions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoveryOtherCloudConditions instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions + * @static + * @param {google.privacy.dlp.v2.IDiscoveryOtherCloudConditions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryOtherCloudConditions} DiscoveryOtherCloudConditions instance + */ + DiscoveryOtherCloudConditions.create = function create(properties) { + return new DiscoveryOtherCloudConditions(properties); + }; + + /** + * Encodes the specified DiscoveryOtherCloudConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryOtherCloudConditions.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions + * @static + * @param {google.privacy.dlp.v2.IDiscoveryOtherCloudConditions} message DiscoveryOtherCloudConditions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryOtherCloudConditions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minAge != null && Object.hasOwnProperty.call(message, "minAge")) + $root.google.protobuf.Duration.encode(message.minAge, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.amazonS3BucketConditions != null && Object.hasOwnProperty.call(message, "amazonS3BucketConditions")) + $root.google.privacy.dlp.v2.AmazonS3BucketConditions.encode(message.amazonS3BucketConditions, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryOtherCloudConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryOtherCloudConditions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions + * @static + * @param {google.privacy.dlp.v2.IDiscoveryOtherCloudConditions} message DiscoveryOtherCloudConditions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryOtherCloudConditions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryOtherCloudConditions message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryOtherCloudConditions} DiscoveryOtherCloudConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryOtherCloudConditions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryOtherCloudConditions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.minAge = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.amazonS3BucketConditions = $root.google.privacy.dlp.v2.AmazonS3BucketConditions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryOtherCloudConditions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryOtherCloudConditions} DiscoveryOtherCloudConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryOtherCloudConditions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryOtherCloudConditions message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryOtherCloudConditions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.minAge != null && message.hasOwnProperty("minAge")) { + var error = $root.google.protobuf.Duration.verify(message.minAge, long + 1); + if (error) + return "minAge." + error; + } + if (message.amazonS3BucketConditions != null && message.hasOwnProperty("amazonS3BucketConditions")) { + properties.conditions = 1; + { + var error = $root.google.privacy.dlp.v2.AmazonS3BucketConditions.verify(message.amazonS3BucketConditions, long + 1); + if (error) + return "amazonS3BucketConditions." + error; + } + } + return null; + }; + + /** + * Creates a DiscoveryOtherCloudConditions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryOtherCloudConditions} DiscoveryOtherCloudConditions + */ + DiscoveryOtherCloudConditions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryOtherCloudConditions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DiscoveryOtherCloudConditions(); + if (object.minAge != null) { + if (typeof object.minAge !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryOtherCloudConditions.minAge: object expected"); + message.minAge = $root.google.protobuf.Duration.fromObject(object.minAge, long + 1); + } + if (object.amazonS3BucketConditions != null) { + if (typeof object.amazonS3BucketConditions !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryOtherCloudConditions.amazonS3BucketConditions: object expected"); + message.amazonS3BucketConditions = $root.google.privacy.dlp.v2.AmazonS3BucketConditions.fromObject(object.amazonS3BucketConditions, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryOtherCloudConditions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions + * @static + * @param {google.privacy.dlp.v2.DiscoveryOtherCloudConditions} message DiscoveryOtherCloudConditions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryOtherCloudConditions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.minAge = null; + if (message.minAge != null && message.hasOwnProperty("minAge")) + object.minAge = $root.google.protobuf.Duration.toObject(message.minAge, options); + if (message.amazonS3BucketConditions != null && message.hasOwnProperty("amazonS3BucketConditions")) { + object.amazonS3BucketConditions = $root.google.privacy.dlp.v2.AmazonS3BucketConditions.toObject(message.amazonS3BucketConditions, options); + if (options.oneofs) + object.conditions = "amazonS3BucketConditions"; + } + return object; + }; + + /** + * Converts this DiscoveryOtherCloudConditions to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions + * @instance + * @returns {Object.} JSON object + */ + DiscoveryOtherCloudConditions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryOtherCloudConditions + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudConditions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryOtherCloudConditions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryOtherCloudConditions"; + }; + + return DiscoveryOtherCloudConditions; + })(); + + v2.AmazonS3BucketConditions = (function() { + + /** + * Properties of an AmazonS3BucketConditions. + * @memberof google.privacy.dlp.v2 + * @interface IAmazonS3BucketConditions + * @property {Array.|null} [bucketTypes] AmazonS3BucketConditions bucketTypes + * @property {Array.|null} [objectStorageClasses] AmazonS3BucketConditions objectStorageClasses + */ + + /** + * Constructs a new AmazonS3BucketConditions. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an AmazonS3BucketConditions. + * @implements IAmazonS3BucketConditions + * @constructor + * @param {google.privacy.dlp.v2.IAmazonS3BucketConditions=} [properties] Properties to set + */ + function AmazonS3BucketConditions(properties) { + this.bucketTypes = []; + this.objectStorageClasses = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * AmazonS3BucketConditions bucketTypes. + * @member {Array.} bucketTypes + * @memberof google.privacy.dlp.v2.AmazonS3BucketConditions + * @instance + */ + AmazonS3BucketConditions.prototype.bucketTypes = $util.emptyArray; + + /** + * AmazonS3BucketConditions objectStorageClasses. + * @member {Array.} objectStorageClasses + * @memberof google.privacy.dlp.v2.AmazonS3BucketConditions + * @instance + */ + AmazonS3BucketConditions.prototype.objectStorageClasses = $util.emptyArray; + + /** + * Creates a new AmazonS3BucketConditions instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AmazonS3BucketConditions + * @static + * @param {google.privacy.dlp.v2.IAmazonS3BucketConditions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AmazonS3BucketConditions} AmazonS3BucketConditions instance + */ + AmazonS3BucketConditions.create = function create(properties) { + return new AmazonS3BucketConditions(properties); + }; + + /** + * Encodes the specified AmazonS3BucketConditions message. Does not implicitly {@link google.privacy.dlp.v2.AmazonS3BucketConditions.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AmazonS3BucketConditions + * @static + * @param {google.privacy.dlp.v2.IAmazonS3BucketConditions} message AmazonS3BucketConditions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AmazonS3BucketConditions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bucketTypes != null && message.bucketTypes.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.bucketTypes.length; ++i) + writer.int32(message.bucketTypes[i]); + writer.ldelim(); + } + if (message.objectStorageClasses != null && message.objectStorageClasses.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.objectStorageClasses.length; ++i) + writer.int32(message.objectStorageClasses[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified AmazonS3BucketConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AmazonS3BucketConditions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AmazonS3BucketConditions + * @static + * @param {google.privacy.dlp.v2.IAmazonS3BucketConditions} message AmazonS3BucketConditions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AmazonS3BucketConditions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AmazonS3BucketConditions message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AmazonS3BucketConditions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AmazonS3BucketConditions} AmazonS3BucketConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AmazonS3BucketConditions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AmazonS3BucketConditions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.bucketTypes && message.bucketTypes.length)) + message.bucketTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.bucketTypes.push(reader.int32()); + } else + message.bucketTypes.push(reader.int32()); + break; + } + case 2: { + if (!(message.objectStorageClasses && message.objectStorageClasses.length)) + message.objectStorageClasses = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.objectStorageClasses.push(reader.int32()); + } else + message.objectStorageClasses.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AmazonS3BucketConditions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AmazonS3BucketConditions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AmazonS3BucketConditions} AmazonS3BucketConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AmazonS3BucketConditions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AmazonS3BucketConditions message. + * @function verify + * @memberof google.privacy.dlp.v2.AmazonS3BucketConditions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AmazonS3BucketConditions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.bucketTypes != null && message.hasOwnProperty("bucketTypes")) { + if (!Array.isArray(message.bucketTypes)) + return "bucketTypes: array expected"; + for (var i = 0; i < message.bucketTypes.length; ++i) + switch (message.bucketTypes[i]) { + default: + return "bucketTypes: enum value[] expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.objectStorageClasses != null && message.hasOwnProperty("objectStorageClasses")) { + if (!Array.isArray(message.objectStorageClasses)) + return "objectStorageClasses: array expected"; + for (var i = 0; i < message.objectStorageClasses.length; ++i) + switch (message.objectStorageClasses[i]) { + default: + return "objectStorageClasses: enum value[] expected"; + case 0: + case 1: + case 2: + case 4: + case 6: + case 7: + break; + } + } + return null; + }; + + /** + * Creates an AmazonS3BucketConditions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AmazonS3BucketConditions + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AmazonS3BucketConditions} AmazonS3BucketConditions + */ + AmazonS3BucketConditions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AmazonS3BucketConditions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.AmazonS3BucketConditions(); + if (object.bucketTypes) { + if (!Array.isArray(object.bucketTypes)) + throw TypeError(".google.privacy.dlp.v2.AmazonS3BucketConditions.bucketTypes: array expected"); + message.bucketTypes = []; + for (var i = 0; i < object.bucketTypes.length; ++i) + switch (object.bucketTypes[i]) { + default: + if (typeof object.bucketTypes[i] === "number") { + message.bucketTypes[i] = object.bucketTypes[i]; + break; + } + case "TYPE_UNSPECIFIED": + case 0: + message.bucketTypes[i] = 0; + break; + case "TYPE_ALL_SUPPORTED": + case 1: + message.bucketTypes[i] = 1; + break; + case "TYPE_GENERAL_PURPOSE": + case 2: + message.bucketTypes[i] = 2; + break; + } + } + if (object.objectStorageClasses) { + if (!Array.isArray(object.objectStorageClasses)) + throw TypeError(".google.privacy.dlp.v2.AmazonS3BucketConditions.objectStorageClasses: array expected"); + message.objectStorageClasses = []; + for (var i = 0; i < object.objectStorageClasses.length; ++i) + switch (object.objectStorageClasses[i]) { + default: + if (typeof object.objectStorageClasses[i] === "number") { + message.objectStorageClasses[i] = object.objectStorageClasses[i]; + break; + } + case "UNSPECIFIED": + case 0: + message.objectStorageClasses[i] = 0; + break; + case "ALL_SUPPORTED_CLASSES": + case 1: + message.objectStorageClasses[i] = 1; + break; + case "STANDARD": + case 2: + message.objectStorageClasses[i] = 2; + break; + case "STANDARD_INFREQUENT_ACCESS": + case 4: + message.objectStorageClasses[i] = 4; + break; + case "GLACIER_INSTANT_RETRIEVAL": + case 6: + message.objectStorageClasses[i] = 6; + break; + case "INTELLIGENT_TIERING": + case 7: + message.objectStorageClasses[i] = 7; + break; + } + } + return message; + }; + + /** + * Creates a plain object from an AmazonS3BucketConditions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AmazonS3BucketConditions + * @static + * @param {google.privacy.dlp.v2.AmazonS3BucketConditions} message AmazonS3BucketConditions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AmazonS3BucketConditions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bucketTypes = []; + object.objectStorageClasses = []; + } + if (message.bucketTypes && message.bucketTypes.length) { + object.bucketTypes = []; + for (var j = 0; j < message.bucketTypes.length; ++j) + object.bucketTypes[j] = options.enums === String ? $root.google.privacy.dlp.v2.AmazonS3BucketConditions.BucketType[message.bucketTypes[j]] === undefined ? message.bucketTypes[j] : $root.google.privacy.dlp.v2.AmazonS3BucketConditions.BucketType[message.bucketTypes[j]] : message.bucketTypes[j]; + } + if (message.objectStorageClasses && message.objectStorageClasses.length) { + object.objectStorageClasses = []; + for (var j = 0; j < message.objectStorageClasses.length; ++j) + object.objectStorageClasses[j] = options.enums === String ? $root.google.privacy.dlp.v2.AmazonS3BucketConditions.ObjectStorageClass[message.objectStorageClasses[j]] === undefined ? message.objectStorageClasses[j] : $root.google.privacy.dlp.v2.AmazonS3BucketConditions.ObjectStorageClass[message.objectStorageClasses[j]] : message.objectStorageClasses[j]; + } + return object; + }; + + /** + * Converts this AmazonS3BucketConditions to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AmazonS3BucketConditions + * @instance + * @returns {Object.} JSON object + */ + AmazonS3BucketConditions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AmazonS3BucketConditions + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AmazonS3BucketConditions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AmazonS3BucketConditions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AmazonS3BucketConditions"; + }; + + /** + * BucketType enum. + * @name google.privacy.dlp.v2.AmazonS3BucketConditions.BucketType + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} TYPE_ALL_SUPPORTED=1 TYPE_ALL_SUPPORTED value + * @property {number} TYPE_GENERAL_PURPOSE=2 TYPE_GENERAL_PURPOSE value + */ + AmazonS3BucketConditions.BucketType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TYPE_ALL_SUPPORTED"] = 1; + values[valuesById[2] = "TYPE_GENERAL_PURPOSE"] = 2; + return values; + })(); + + /** + * ObjectStorageClass enum. + * @name google.privacy.dlp.v2.AmazonS3BucketConditions.ObjectStorageClass + * @enum {number} + * @property {number} UNSPECIFIED=0 UNSPECIFIED value + * @property {number} ALL_SUPPORTED_CLASSES=1 ALL_SUPPORTED_CLASSES value + * @property {number} STANDARD=2 STANDARD value + * @property {number} STANDARD_INFREQUENT_ACCESS=4 STANDARD_INFREQUENT_ACCESS value + * @property {number} GLACIER_INSTANT_RETRIEVAL=6 GLACIER_INSTANT_RETRIEVAL value + * @property {number} INTELLIGENT_TIERING=7 INTELLIGENT_TIERING value + */ + AmazonS3BucketConditions.ObjectStorageClass = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNSPECIFIED"] = 0; + values[valuesById[1] = "ALL_SUPPORTED_CLASSES"] = 1; + values[valuesById[2] = "STANDARD"] = 2; + values[valuesById[4] = "STANDARD_INFREQUENT_ACCESS"] = 4; + values[valuesById[6] = "GLACIER_INSTANT_RETRIEVAL"] = 6; + values[valuesById[7] = "INTELLIGENT_TIERING"] = 7; + return values; + })(); + + return AmazonS3BucketConditions; + })(); + + v2.DiscoveryOtherCloudGenerationCadence = (function() { + + /** + * Properties of a DiscoveryOtherCloudGenerationCadence. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoveryOtherCloudGenerationCadence + * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [refreshFrequency] DiscoveryOtherCloudGenerationCadence refreshFrequency + * @property {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null} [inspectTemplateModifiedCadence] DiscoveryOtherCloudGenerationCadence inspectTemplateModifiedCadence + */ + + /** + * Constructs a new DiscoveryOtherCloudGenerationCadence. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoveryOtherCloudGenerationCadence. + * @implements IDiscoveryOtherCloudGenerationCadence + * @constructor + * @param {google.privacy.dlp.v2.IDiscoveryOtherCloudGenerationCadence=} [properties] Properties to set + */ + function DiscoveryOtherCloudGenerationCadence(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryOtherCloudGenerationCadence refreshFrequency. + * @member {google.privacy.dlp.v2.DataProfileUpdateFrequency} refreshFrequency + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence + * @instance + */ + DiscoveryOtherCloudGenerationCadence.prototype.refreshFrequency = 0; + + /** + * DiscoveryOtherCloudGenerationCadence inspectTemplateModifiedCadence. + * @member {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null|undefined} inspectTemplateModifiedCadence + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence + * @instance + */ + DiscoveryOtherCloudGenerationCadence.prototype.inspectTemplateModifiedCadence = null; + + /** + * Creates a new DiscoveryOtherCloudGenerationCadence instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence + * @static + * @param {google.privacy.dlp.v2.IDiscoveryOtherCloudGenerationCadence=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence} DiscoveryOtherCloudGenerationCadence instance + */ + DiscoveryOtherCloudGenerationCadence.create = function create(properties) { + return new DiscoveryOtherCloudGenerationCadence(properties); + }; + + /** + * Encodes the specified DiscoveryOtherCloudGenerationCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence + * @static + * @param {google.privacy.dlp.v2.IDiscoveryOtherCloudGenerationCadence} message DiscoveryOtherCloudGenerationCadence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryOtherCloudGenerationCadence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.refreshFrequency != null && Object.hasOwnProperty.call(message, "refreshFrequency")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.refreshFrequency); + if (message.inspectTemplateModifiedCadence != null && Object.hasOwnProperty.call(message, "inspectTemplateModifiedCadence")) + $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.encode(message.inspectTemplateModifiedCadence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryOtherCloudGenerationCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence + * @static + * @param {google.privacy.dlp.v2.IDiscoveryOtherCloudGenerationCadence} message DiscoveryOtherCloudGenerationCadence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryOtherCloudGenerationCadence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryOtherCloudGenerationCadence message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence} DiscoveryOtherCloudGenerationCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryOtherCloudGenerationCadence.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.refreshFrequency = reader.int32(); + break; + } + case 2: { + message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryOtherCloudGenerationCadence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence} DiscoveryOtherCloudGenerationCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryOtherCloudGenerationCadence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryOtherCloudGenerationCadence message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryOtherCloudGenerationCadence.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency")) + switch (message.refreshFrequency) { + default: + return "refreshFrequency: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; + } + if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence")) { + var error = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.verify(message.inspectTemplateModifiedCadence, long + 1); + if (error) + return "inspectTemplateModifiedCadence." + error; + } + return null; + }; + + /** + * Creates a DiscoveryOtherCloudGenerationCadence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence} DiscoveryOtherCloudGenerationCadence + */ + DiscoveryOtherCloudGenerationCadence.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence(); + switch (object.refreshFrequency) { + default: + if (typeof object.refreshFrequency === "number") { + message.refreshFrequency = object.refreshFrequency; + break; + } + break; + case "UPDATE_FREQUENCY_UNSPECIFIED": + case 0: + message.refreshFrequency = 0; + break; + case "UPDATE_FREQUENCY_NEVER": + case 1: + message.refreshFrequency = 1; + break; + case "UPDATE_FREQUENCY_DAILY": + case 2: + message.refreshFrequency = 2; + break; + case "UPDATE_FREQUENCY_MONTHLY": + case 4: + message.refreshFrequency = 4; + break; + } + if (object.inspectTemplateModifiedCadence != null) { + if (typeof object.inspectTemplateModifiedCadence !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence.inspectTemplateModifiedCadence: object expected"); + message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.fromObject(object.inspectTemplateModifiedCadence, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryOtherCloudGenerationCadence message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence + * @static + * @param {google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence} message DiscoveryOtherCloudGenerationCadence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryOtherCloudGenerationCadence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.refreshFrequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0; + object.inspectTemplateModifiedCadence = null; + } + if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency")) + object.refreshFrequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] === undefined ? message.refreshFrequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] : message.refreshFrequency; + if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence")) + object.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.toObject(message.inspectTemplateModifiedCadence, options); + return object; + }; + + /** + * Converts this DiscoveryOtherCloudGenerationCadence to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence + * @instance + * @returns {Object.} JSON object + */ + DiscoveryOtherCloudGenerationCadence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryOtherCloudGenerationCadence + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryOtherCloudGenerationCadence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryOtherCloudGenerationCadence"; + }; + + return DiscoveryOtherCloudGenerationCadence; + })(); + + v2.DiscoveryStartingLocation = (function() { + + /** + * Properties of a DiscoveryStartingLocation. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoveryStartingLocation + * @property {number|Long|null} [organizationId] DiscoveryStartingLocation organizationId + * @property {number|Long|null} [folderId] DiscoveryStartingLocation folderId + */ + + /** + * Constructs a new DiscoveryStartingLocation. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoveryStartingLocation. + * @implements IDiscoveryStartingLocation + * @constructor + * @param {google.privacy.dlp.v2.IDiscoveryStartingLocation=} [properties] Properties to set + */ + function DiscoveryStartingLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryStartingLocation organizationId. + * @member {number|Long|null|undefined} organizationId + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation + * @instance + */ + DiscoveryStartingLocation.prototype.organizationId = null; + + /** + * DiscoveryStartingLocation folderId. + * @member {number|Long|null|undefined} folderId + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation + * @instance + */ + DiscoveryStartingLocation.prototype.folderId = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DiscoveryStartingLocation location. + * @member {"organizationId"|"folderId"|undefined} location + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation + * @instance + */ + Object.defineProperty(DiscoveryStartingLocation.prototype, "location", { + get: $util.oneOfGetter($oneOfFields = ["organizationId", "folderId"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoveryStartingLocation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation + * @static + * @param {google.privacy.dlp.v2.IDiscoveryStartingLocation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryStartingLocation} DiscoveryStartingLocation instance + */ + DiscoveryStartingLocation.create = function create(properties) { + return new DiscoveryStartingLocation(properties); + }; + + /** + * Encodes the specified DiscoveryStartingLocation message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryStartingLocation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation + * @static + * @param {google.privacy.dlp.v2.IDiscoveryStartingLocation} message DiscoveryStartingLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryStartingLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.organizationId != null && Object.hasOwnProperty.call(message, "organizationId")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.organizationId); + if (message.folderId != null && Object.hasOwnProperty.call(message, "folderId")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.folderId); + return writer; + }; + + /** + * Encodes the specified DiscoveryStartingLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryStartingLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation + * @static + * @param {google.privacy.dlp.v2.IDiscoveryStartingLocation} message DiscoveryStartingLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryStartingLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryStartingLocation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryStartingLocation} DiscoveryStartingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryStartingLocation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryStartingLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.organizationId = reader.int64(); + break; + } + case 2: { + message.folderId = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryStartingLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryStartingLocation} DiscoveryStartingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryStartingLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryStartingLocation message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryStartingLocation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.organizationId != null && message.hasOwnProperty("organizationId")) { + properties.location = 1; + if (!$util.isInteger(message.organizationId) && !(message.organizationId && $util.isInteger(message.organizationId.low) && $util.isInteger(message.organizationId.high))) + return "organizationId: integer|Long expected"; + } + if (message.folderId != null && message.hasOwnProperty("folderId")) { + if (properties.location === 1) + return "location: multiple values"; + properties.location = 1; + if (!$util.isInteger(message.folderId) && !(message.folderId && $util.isInteger(message.folderId.low) && $util.isInteger(message.folderId.high))) + return "folderId: integer|Long expected"; + } + return null; + }; + + /** + * Creates a DiscoveryStartingLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryStartingLocation} DiscoveryStartingLocation + */ + DiscoveryStartingLocation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryStartingLocation) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DiscoveryStartingLocation(); + if (object.organizationId != null) + if ($util.Long) + (message.organizationId = $util.Long.fromValue(object.organizationId)).unsigned = false; + else if (typeof object.organizationId === "string") + message.organizationId = parseInt(object.organizationId, 10); + else if (typeof object.organizationId === "number") + message.organizationId = object.organizationId; + else if (typeof object.organizationId === "object") + message.organizationId = new $util.LongBits(object.organizationId.low >>> 0, object.organizationId.high >>> 0).toNumber(); + if (object.folderId != null) + if ($util.Long) + (message.folderId = $util.Long.fromValue(object.folderId)).unsigned = false; + else if (typeof object.folderId === "string") + message.folderId = parseInt(object.folderId, 10); + else if (typeof object.folderId === "number") + message.folderId = object.folderId; + else if (typeof object.folderId === "object") + message.folderId = new $util.LongBits(object.folderId.low >>> 0, object.folderId.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a DiscoveryStartingLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation + * @static + * @param {google.privacy.dlp.v2.DiscoveryStartingLocation} message DiscoveryStartingLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryStartingLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.organizationId != null && message.hasOwnProperty("organizationId")) { + if (typeof message.organizationId === "number") + object.organizationId = options.longs === String ? String(message.organizationId) : message.organizationId; + else + object.organizationId = options.longs === String ? $util.Long.prototype.toString.call(message.organizationId) : options.longs === Number ? new $util.LongBits(message.organizationId.low >>> 0, message.organizationId.high >>> 0).toNumber() : message.organizationId; + if (options.oneofs) + object.location = "organizationId"; + } + if (message.folderId != null && message.hasOwnProperty("folderId")) { + if (typeof message.folderId === "number") + object.folderId = options.longs === String ? String(message.folderId) : message.folderId; + else + object.folderId = options.longs === String ? $util.Long.prototype.toString.call(message.folderId) : options.longs === Number ? new $util.LongBits(message.folderId.low >>> 0, message.folderId.high >>> 0).toNumber() : message.folderId; + if (options.oneofs) + object.location = "folderId"; + } + return object; + }; + + /** + * Converts this DiscoveryStartingLocation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation + * @instance + * @returns {Object.} JSON object + */ + DiscoveryStartingLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryStartingLocation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryStartingLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryStartingLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryStartingLocation"; + }; + + return DiscoveryStartingLocation; + })(); + + v2.OtherCloudDiscoveryStartingLocation = (function() { + + /** + * Properties of an OtherCloudDiscoveryStartingLocation. + * @memberof google.privacy.dlp.v2 + * @interface IOtherCloudDiscoveryStartingLocation + * @property {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.IAwsDiscoveryStartingLocation|null} [awsLocation] OtherCloudDiscoveryStartingLocation awsLocation + */ + + /** + * Constructs a new OtherCloudDiscoveryStartingLocation. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an OtherCloudDiscoveryStartingLocation. + * @implements IOtherCloudDiscoveryStartingLocation + * @constructor + * @param {google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation=} [properties] Properties to set + */ + function OtherCloudDiscoveryStartingLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * OtherCloudDiscoveryStartingLocation awsLocation. + * @member {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.IAwsDiscoveryStartingLocation|null|undefined} awsLocation + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation + * @instance + */ + OtherCloudDiscoveryStartingLocation.prototype.awsLocation = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * OtherCloudDiscoveryStartingLocation location. + * @member {"awsLocation"|undefined} location + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation + * @instance + */ + Object.defineProperty(OtherCloudDiscoveryStartingLocation.prototype, "location", { + get: $util.oneOfGetter($oneOfFields = ["awsLocation"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new OtherCloudDiscoveryStartingLocation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation + * @static + * @param {google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation} OtherCloudDiscoveryStartingLocation instance + */ + OtherCloudDiscoveryStartingLocation.create = function create(properties) { + return new OtherCloudDiscoveryStartingLocation(properties); + }; + + /** + * Encodes the specified OtherCloudDiscoveryStartingLocation message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation + * @static + * @param {google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation} message OtherCloudDiscoveryStartingLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OtherCloudDiscoveryStartingLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.awsLocation != null && Object.hasOwnProperty.call(message, "awsLocation")) + $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation.encode(message.awsLocation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OtherCloudDiscoveryStartingLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation + * @static + * @param {google.privacy.dlp.v2.IOtherCloudDiscoveryStartingLocation} message OtherCloudDiscoveryStartingLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OtherCloudDiscoveryStartingLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OtherCloudDiscoveryStartingLocation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation} OtherCloudDiscoveryStartingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OtherCloudDiscoveryStartingLocation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.awsLocation = $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OtherCloudDiscoveryStartingLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation} OtherCloudDiscoveryStartingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OtherCloudDiscoveryStartingLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OtherCloudDiscoveryStartingLocation message. + * @function verify + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OtherCloudDiscoveryStartingLocation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.awsLocation != null && message.hasOwnProperty("awsLocation")) { + properties.location = 1; + { + var error = $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation.verify(message.awsLocation, long + 1); + if (error) + return "awsLocation." + error; + } + } + return null; + }; + + /** + * Creates an OtherCloudDiscoveryStartingLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation} OtherCloudDiscoveryStartingLocation + */ + OtherCloudDiscoveryStartingLocation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation(); + if (object.awsLocation != null) { + if (typeof object.awsLocation !== "object") + throw TypeError(".google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.awsLocation: object expected"); + message.awsLocation = $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation.fromObject(object.awsLocation, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an OtherCloudDiscoveryStartingLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation + * @static + * @param {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation} message OtherCloudDiscoveryStartingLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OtherCloudDiscoveryStartingLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.awsLocation != null && message.hasOwnProperty("awsLocation")) { + object.awsLocation = $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation.toObject(message.awsLocation, options); + if (options.oneofs) + object.location = "awsLocation"; + } + return object; + }; + + /** + * Converts this OtherCloudDiscoveryStartingLocation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation + * @instance + * @returns {Object.} JSON object + */ + OtherCloudDiscoveryStartingLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OtherCloudDiscoveryStartingLocation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OtherCloudDiscoveryStartingLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation"; + }; + + OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation = (function() { + + /** + * Properties of an AwsDiscoveryStartingLocation. + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation + * @interface IAwsDiscoveryStartingLocation + * @property {string|null} [accountId] AwsDiscoveryStartingLocation accountId + * @property {boolean|null} [allAssetInventoryAssets] AwsDiscoveryStartingLocation allAssetInventoryAssets + */ + + /** + * Constructs a new AwsDiscoveryStartingLocation. + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation + * @classdesc Represents an AwsDiscoveryStartingLocation. + * @implements IAwsDiscoveryStartingLocation + * @constructor + * @param {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.IAwsDiscoveryStartingLocation=} [properties] Properties to set + */ + function AwsDiscoveryStartingLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * AwsDiscoveryStartingLocation accountId. + * @member {string|null|undefined} accountId + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @instance + */ + AwsDiscoveryStartingLocation.prototype.accountId = null; + + /** + * AwsDiscoveryStartingLocation allAssetInventoryAssets. + * @member {boolean|null|undefined} allAssetInventoryAssets + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @instance + */ + AwsDiscoveryStartingLocation.prototype.allAssetInventoryAssets = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AwsDiscoveryStartingLocation scope. + * @member {"accountId"|"allAssetInventoryAssets"|undefined} scope + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @instance + */ + Object.defineProperty(AwsDiscoveryStartingLocation.prototype, "scope", { + get: $util.oneOfGetter($oneOfFields = ["accountId", "allAssetInventoryAssets"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AwsDiscoveryStartingLocation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @static + * @param {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.IAwsDiscoveryStartingLocation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation} AwsDiscoveryStartingLocation instance + */ + AwsDiscoveryStartingLocation.create = function create(properties) { + return new AwsDiscoveryStartingLocation(properties); + }; + + /** + * Encodes the specified AwsDiscoveryStartingLocation message. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @static + * @param {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.IAwsDiscoveryStartingLocation} message AwsDiscoveryStartingLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsDiscoveryStartingLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.accountId != null && Object.hasOwnProperty.call(message, "accountId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.accountId); + if (message.allAssetInventoryAssets != null && Object.hasOwnProperty.call(message, "allAssetInventoryAssets")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allAssetInventoryAssets); + return writer; + }; + + /** + * Encodes the specified AwsDiscoveryStartingLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @static + * @param {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.IAwsDiscoveryStartingLocation} message AwsDiscoveryStartingLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AwsDiscoveryStartingLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AwsDiscoveryStartingLocation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation} AwsDiscoveryStartingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsDiscoveryStartingLocation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.accountId = reader.string(); + break; + } + case 3: { + message.allAssetInventoryAssets = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AwsDiscoveryStartingLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation} AwsDiscoveryStartingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AwsDiscoveryStartingLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AwsDiscoveryStartingLocation message. + * @function verify + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AwsDiscoveryStartingLocation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.accountId != null && message.hasOwnProperty("accountId")) { + properties.scope = 1; + if (!$util.isString(message.accountId)) + return "accountId: string expected"; + } + if (message.allAssetInventoryAssets != null && message.hasOwnProperty("allAssetInventoryAssets")) { + if (properties.scope === 1) + return "scope: multiple values"; + properties.scope = 1; + if (typeof message.allAssetInventoryAssets !== "boolean") + return "allAssetInventoryAssets: boolean expected"; + } + return null; + }; + + /** + * Creates an AwsDiscoveryStartingLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation} AwsDiscoveryStartingLocation + */ + AwsDiscoveryStartingLocation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation(); + if (object.accountId != null) + message.accountId = String(object.accountId); + if (object.allAssetInventoryAssets != null) + message.allAssetInventoryAssets = Boolean(object.allAssetInventoryAssets); + return message; + }; + + /** + * Creates a plain object from an AwsDiscoveryStartingLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @static + * @param {google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation} message AwsDiscoveryStartingLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AwsDiscoveryStartingLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.accountId != null && message.hasOwnProperty("accountId")) { + object.accountId = message.accountId; + if (options.oneofs) + object.scope = "accountId"; + } + if (message.allAssetInventoryAssets != null && message.hasOwnProperty("allAssetInventoryAssets")) { + object.allAssetInventoryAssets = message.allAssetInventoryAssets; + if (options.oneofs) + object.scope = "allAssetInventoryAssets"; + } + return object; + }; + + /** + * Converts this AwsDiscoveryStartingLocation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @instance + * @returns {Object.} JSON object + */ + AwsDiscoveryStartingLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AwsDiscoveryStartingLocation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AwsDiscoveryStartingLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.OtherCloudDiscoveryStartingLocation.AwsDiscoveryStartingLocation"; + }; + + return AwsDiscoveryStartingLocation; + })(); + + return OtherCloudDiscoveryStartingLocation; + })(); + + v2.AllOtherResources = (function() { + + /** + * Properties of an AllOtherResources. + * @memberof google.privacy.dlp.v2 + * @interface IAllOtherResources + */ + + /** + * Constructs a new AllOtherResources. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an AllOtherResources. + * @implements IAllOtherResources + * @constructor + * @param {google.privacy.dlp.v2.IAllOtherResources=} [properties] Properties to set + */ + function AllOtherResources(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new AllOtherResources instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.AllOtherResources + * @static + * @param {google.privacy.dlp.v2.IAllOtherResources=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.AllOtherResources} AllOtherResources instance + */ + AllOtherResources.create = function create(properties) { + return new AllOtherResources(properties); + }; + + /** + * Encodes the specified AllOtherResources message. Does not implicitly {@link google.privacy.dlp.v2.AllOtherResources.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.AllOtherResources + * @static + * @param {google.privacy.dlp.v2.IAllOtherResources} message AllOtherResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllOtherResources.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AllOtherResources message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.AllOtherResources.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.AllOtherResources + * @static + * @param {google.privacy.dlp.v2.IAllOtherResources} message AllOtherResources message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllOtherResources.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AllOtherResources message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.AllOtherResources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.AllOtherResources} AllOtherResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllOtherResources.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.AllOtherResources(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an AllOtherResources message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.AllOtherResources + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.AllOtherResources} AllOtherResources + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllOtherResources.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AllOtherResources message. + * @function verify + * @memberof google.privacy.dlp.v2.AllOtherResources + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AllOtherResources.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates an AllOtherResources message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.AllOtherResources + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.AllOtherResources} AllOtherResources + */ + AllOtherResources.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.AllOtherResources) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.AllOtherResources(); + }; + + /** + * Creates a plain object from an AllOtherResources message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.AllOtherResources + * @static + * @param {google.privacy.dlp.v2.AllOtherResources} message AllOtherResources + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AllOtherResources.toObject = function toObject() { + return {}; + }; + + /** + * Converts this AllOtherResources to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.AllOtherResources + * @instance + * @returns {Object.} JSON object + */ + AllOtherResources.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AllOtherResources + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.AllOtherResources + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AllOtherResources.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.AllOtherResources"; + }; + + return AllOtherResources; + })(); + + v2.VertexDatasetDiscoveryTarget = (function() { + + /** + * Properties of a VertexDatasetDiscoveryTarget. + * @memberof google.privacy.dlp.v2 + * @interface IVertexDatasetDiscoveryTarget + * @property {google.privacy.dlp.v2.IDiscoveryVertexDatasetFilter|null} [filter] VertexDatasetDiscoveryTarget filter + * @property {google.privacy.dlp.v2.IDiscoveryVertexDatasetConditions|null} [conditions] VertexDatasetDiscoveryTarget conditions + * @property {google.privacy.dlp.v2.IDiscoveryVertexDatasetGenerationCadence|null} [generationCadence] VertexDatasetDiscoveryTarget generationCadence + * @property {google.privacy.dlp.v2.IDisabled|null} [disabled] VertexDatasetDiscoveryTarget disabled + */ + + /** + * Constructs a new VertexDatasetDiscoveryTarget. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a VertexDatasetDiscoveryTarget. + * @implements IVertexDatasetDiscoveryTarget + * @constructor + * @param {google.privacy.dlp.v2.IVertexDatasetDiscoveryTarget=} [properties] Properties to set + */ + function VertexDatasetDiscoveryTarget(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * VertexDatasetDiscoveryTarget filter. + * @member {google.privacy.dlp.v2.IDiscoveryVertexDatasetFilter|null|undefined} filter + * @memberof google.privacy.dlp.v2.VertexDatasetDiscoveryTarget + * @instance + */ + VertexDatasetDiscoveryTarget.prototype.filter = null; + + /** + * VertexDatasetDiscoveryTarget conditions. + * @member {google.privacy.dlp.v2.IDiscoveryVertexDatasetConditions|null|undefined} conditions + * @memberof google.privacy.dlp.v2.VertexDatasetDiscoveryTarget + * @instance + */ + VertexDatasetDiscoveryTarget.prototype.conditions = null; + + /** + * VertexDatasetDiscoveryTarget generationCadence. + * @member {google.privacy.dlp.v2.IDiscoveryVertexDatasetGenerationCadence|null|undefined} generationCadence + * @memberof google.privacy.dlp.v2.VertexDatasetDiscoveryTarget + * @instance + */ + VertexDatasetDiscoveryTarget.prototype.generationCadence = null; + + /** + * VertexDatasetDiscoveryTarget disabled. + * @member {google.privacy.dlp.v2.IDisabled|null|undefined} disabled + * @memberof google.privacy.dlp.v2.VertexDatasetDiscoveryTarget + * @instance + */ + VertexDatasetDiscoveryTarget.prototype.disabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * VertexDatasetDiscoveryTarget cadence. + * @member {"generationCadence"|"disabled"|undefined} cadence + * @memberof google.privacy.dlp.v2.VertexDatasetDiscoveryTarget + * @instance + */ + Object.defineProperty(VertexDatasetDiscoveryTarget.prototype, "cadence", { + get: $util.oneOfGetter($oneOfFields = ["generationCadence", "disabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new VertexDatasetDiscoveryTarget instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.VertexDatasetDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.IVertexDatasetDiscoveryTarget=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.VertexDatasetDiscoveryTarget} VertexDatasetDiscoveryTarget instance + */ + VertexDatasetDiscoveryTarget.create = function create(properties) { + return new VertexDatasetDiscoveryTarget(properties); + }; + + /** + * Encodes the specified VertexDatasetDiscoveryTarget message. Does not implicitly {@link google.privacy.dlp.v2.VertexDatasetDiscoveryTarget.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.VertexDatasetDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.IVertexDatasetDiscoveryTarget} message VertexDatasetDiscoveryTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VertexDatasetDiscoveryTarget.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + $root.google.privacy.dlp.v2.DiscoveryVertexDatasetFilter.encode(message.filter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.conditions != null && Object.hasOwnProperty.call(message, "conditions")) + $root.google.privacy.dlp.v2.DiscoveryVertexDatasetConditions.encode(message.conditions, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.generationCadence != null && Object.hasOwnProperty.call(message, "generationCadence")) + $root.google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence.encode(message.generationCadence, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.disabled != null && Object.hasOwnProperty.call(message, "disabled")) + $root.google.privacy.dlp.v2.Disabled.encode(message.disabled, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VertexDatasetDiscoveryTarget message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.VertexDatasetDiscoveryTarget.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.VertexDatasetDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.IVertexDatasetDiscoveryTarget} message VertexDatasetDiscoveryTarget message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VertexDatasetDiscoveryTarget.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VertexDatasetDiscoveryTarget message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.VertexDatasetDiscoveryTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.VertexDatasetDiscoveryTarget} VertexDatasetDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VertexDatasetDiscoveryTarget.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.VertexDatasetDiscoveryTarget(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.filter = $root.google.privacy.dlp.v2.DiscoveryVertexDatasetFilter.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.conditions = $root.google.privacy.dlp.v2.DiscoveryVertexDatasetConditions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.generationCadence = $root.google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.disabled = $root.google.privacy.dlp.v2.Disabled.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a VertexDatasetDiscoveryTarget message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.VertexDatasetDiscoveryTarget + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.VertexDatasetDiscoveryTarget} VertexDatasetDiscoveryTarget + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VertexDatasetDiscoveryTarget.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VertexDatasetDiscoveryTarget message. + * @function verify + * @memberof google.privacy.dlp.v2.VertexDatasetDiscoveryTarget + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VertexDatasetDiscoveryTarget.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.filter != null && message.hasOwnProperty("filter")) { + var error = $root.google.privacy.dlp.v2.DiscoveryVertexDatasetFilter.verify(message.filter, long + 1); + if (error) + return "filter." + error; + } + if (message.conditions != null && message.hasOwnProperty("conditions")) { + var error = $root.google.privacy.dlp.v2.DiscoveryVertexDatasetConditions.verify(message.conditions, long + 1); + if (error) + return "conditions." + error; + } + if (message.generationCadence != null && message.hasOwnProperty("generationCadence")) { + properties.cadence = 1; + { + var error = $root.google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence.verify(message.generationCadence, long + 1); + if (error) + return "generationCadence." + error; + } + } + if (message.disabled != null && message.hasOwnProperty("disabled")) { + if (properties.cadence === 1) + return "cadence: multiple values"; + properties.cadence = 1; + { + var error = $root.google.privacy.dlp.v2.Disabled.verify(message.disabled, long + 1); + if (error) + return "disabled." + error; + } + } + return null; + }; + + /** + * Creates a VertexDatasetDiscoveryTarget message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.VertexDatasetDiscoveryTarget + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.VertexDatasetDiscoveryTarget} VertexDatasetDiscoveryTarget + */ + VertexDatasetDiscoveryTarget.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.VertexDatasetDiscoveryTarget) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.VertexDatasetDiscoveryTarget(); + if (object.filter != null) { + if (typeof object.filter !== "object") + throw TypeError(".google.privacy.dlp.v2.VertexDatasetDiscoveryTarget.filter: object expected"); + message.filter = $root.google.privacy.dlp.v2.DiscoveryVertexDatasetFilter.fromObject(object.filter, long + 1); + } + if (object.conditions != null) { + if (typeof object.conditions !== "object") + throw TypeError(".google.privacy.dlp.v2.VertexDatasetDiscoveryTarget.conditions: object expected"); + message.conditions = $root.google.privacy.dlp.v2.DiscoveryVertexDatasetConditions.fromObject(object.conditions, long + 1); + } + if (object.generationCadence != null) { + if (typeof object.generationCadence !== "object") + throw TypeError(".google.privacy.dlp.v2.VertexDatasetDiscoveryTarget.generationCadence: object expected"); + message.generationCadence = $root.google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence.fromObject(object.generationCadence, long + 1); + } + if (object.disabled != null) { + if (typeof object.disabled !== "object") + throw TypeError(".google.privacy.dlp.v2.VertexDatasetDiscoveryTarget.disabled: object expected"); + message.disabled = $root.google.privacy.dlp.v2.Disabled.fromObject(object.disabled, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a VertexDatasetDiscoveryTarget message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.VertexDatasetDiscoveryTarget + * @static + * @param {google.privacy.dlp.v2.VertexDatasetDiscoveryTarget} message VertexDatasetDiscoveryTarget + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VertexDatasetDiscoveryTarget.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = null; + object.conditions = null; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = $root.google.privacy.dlp.v2.DiscoveryVertexDatasetFilter.toObject(message.filter, options); + if (message.conditions != null && message.hasOwnProperty("conditions")) + object.conditions = $root.google.privacy.dlp.v2.DiscoveryVertexDatasetConditions.toObject(message.conditions, options); + if (message.generationCadence != null && message.hasOwnProperty("generationCadence")) { + object.generationCadence = $root.google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence.toObject(message.generationCadence, options); + if (options.oneofs) + object.cadence = "generationCadence"; + } + if (message.disabled != null && message.hasOwnProperty("disabled")) { + object.disabled = $root.google.privacy.dlp.v2.Disabled.toObject(message.disabled, options); + if (options.oneofs) + object.cadence = "disabled"; + } + return object; + }; + + /** + * Converts this VertexDatasetDiscoveryTarget to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.VertexDatasetDiscoveryTarget + * @instance + * @returns {Object.} JSON object + */ + VertexDatasetDiscoveryTarget.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VertexDatasetDiscoveryTarget + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.VertexDatasetDiscoveryTarget + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VertexDatasetDiscoveryTarget.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.VertexDatasetDiscoveryTarget"; + }; + + return VertexDatasetDiscoveryTarget; + })(); + + v2.DiscoveryVertexDatasetFilter = (function() { + + /** + * Properties of a DiscoveryVertexDatasetFilter. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoveryVertexDatasetFilter + * @property {google.privacy.dlp.v2.IVertexDatasetCollection|null} [collection] DiscoveryVertexDatasetFilter collection + * @property {google.privacy.dlp.v2.IVertexDatasetResourceReference|null} [vertexDatasetResourceReference] DiscoveryVertexDatasetFilter vertexDatasetResourceReference + * @property {google.privacy.dlp.v2.IAllOtherResources|null} [others] DiscoveryVertexDatasetFilter others + */ + + /** + * Constructs a new DiscoveryVertexDatasetFilter. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoveryVertexDatasetFilter. + * @implements IDiscoveryVertexDatasetFilter + * @constructor + * @param {google.privacy.dlp.v2.IDiscoveryVertexDatasetFilter=} [properties] Properties to set + */ + function DiscoveryVertexDatasetFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryVertexDatasetFilter collection. + * @member {google.privacy.dlp.v2.IVertexDatasetCollection|null|undefined} collection + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetFilter + * @instance + */ + DiscoveryVertexDatasetFilter.prototype.collection = null; + + /** + * DiscoveryVertexDatasetFilter vertexDatasetResourceReference. + * @member {google.privacy.dlp.v2.IVertexDatasetResourceReference|null|undefined} vertexDatasetResourceReference + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetFilter + * @instance + */ + DiscoveryVertexDatasetFilter.prototype.vertexDatasetResourceReference = null; + + /** + * DiscoveryVertexDatasetFilter others. + * @member {google.privacy.dlp.v2.IAllOtherResources|null|undefined} others + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetFilter + * @instance + */ + DiscoveryVertexDatasetFilter.prototype.others = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DiscoveryVertexDatasetFilter filter. + * @member {"collection"|"vertexDatasetResourceReference"|"others"|undefined} filter + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetFilter + * @instance + */ + Object.defineProperty(DiscoveryVertexDatasetFilter.prototype, "filter", { + get: $util.oneOfGetter($oneOfFields = ["collection", "vertexDatasetResourceReference", "others"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DiscoveryVertexDatasetFilter instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetFilter + * @static + * @param {google.privacy.dlp.v2.IDiscoveryVertexDatasetFilter=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryVertexDatasetFilter} DiscoveryVertexDatasetFilter instance + */ + DiscoveryVertexDatasetFilter.create = function create(properties) { + return new DiscoveryVertexDatasetFilter(properties); + }; + + /** + * Encodes the specified DiscoveryVertexDatasetFilter message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryVertexDatasetFilter.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetFilter + * @static + * @param {google.privacy.dlp.v2.IDiscoveryVertexDatasetFilter} message DiscoveryVertexDatasetFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryVertexDatasetFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.collection != null && Object.hasOwnProperty.call(message, "collection")) + $root.google.privacy.dlp.v2.VertexDatasetCollection.encode(message.collection, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.vertexDatasetResourceReference != null && Object.hasOwnProperty.call(message, "vertexDatasetResourceReference")) + $root.google.privacy.dlp.v2.VertexDatasetResourceReference.encode(message.vertexDatasetResourceReference, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.others != null && Object.hasOwnProperty.call(message, "others")) + $root.google.privacy.dlp.v2.AllOtherResources.encode(message.others, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryVertexDatasetFilter message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryVertexDatasetFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetFilter + * @static + * @param {google.privacy.dlp.v2.IDiscoveryVertexDatasetFilter} message DiscoveryVertexDatasetFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryVertexDatasetFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryVertexDatasetFilter message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryVertexDatasetFilter} DiscoveryVertexDatasetFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryVertexDatasetFilter.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryVertexDatasetFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.collection = $root.google.privacy.dlp.v2.VertexDatasetCollection.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.vertexDatasetResourceReference = $root.google.privacy.dlp.v2.VertexDatasetResourceReference.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 100: { + message.others = $root.google.privacy.dlp.v2.AllOtherResources.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryVertexDatasetFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryVertexDatasetFilter} DiscoveryVertexDatasetFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryVertexDatasetFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryVertexDatasetFilter message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryVertexDatasetFilter.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.collection != null && message.hasOwnProperty("collection")) { + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.VertexDatasetCollection.verify(message.collection, long + 1); + if (error) + return "collection." + error; + } + } + if (message.vertexDatasetResourceReference != null && message.hasOwnProperty("vertexDatasetResourceReference")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.VertexDatasetResourceReference.verify(message.vertexDatasetResourceReference, long + 1); + if (error) + return "vertexDatasetResourceReference." + error; + } + } + if (message.others != null && message.hasOwnProperty("others")) { + if (properties.filter === 1) + return "filter: multiple values"; + properties.filter = 1; + { + var error = $root.google.privacy.dlp.v2.AllOtherResources.verify(message.others, long + 1); + if (error) + return "others." + error; + } + } + return null; + }; + + /** + * Creates a DiscoveryVertexDatasetFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetFilter + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryVertexDatasetFilter} DiscoveryVertexDatasetFilter + */ + DiscoveryVertexDatasetFilter.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryVertexDatasetFilter) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DiscoveryVertexDatasetFilter(); + if (object.collection != null) { + if (typeof object.collection !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryVertexDatasetFilter.collection: object expected"); + message.collection = $root.google.privacy.dlp.v2.VertexDatasetCollection.fromObject(object.collection, long + 1); + } + if (object.vertexDatasetResourceReference != null) { + if (typeof object.vertexDatasetResourceReference !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryVertexDatasetFilter.vertexDatasetResourceReference: object expected"); + message.vertexDatasetResourceReference = $root.google.privacy.dlp.v2.VertexDatasetResourceReference.fromObject(object.vertexDatasetResourceReference, long + 1); + } + if (object.others != null) { + if (typeof object.others !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryVertexDatasetFilter.others: object expected"); + message.others = $root.google.privacy.dlp.v2.AllOtherResources.fromObject(object.others, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryVertexDatasetFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetFilter + * @static + * @param {google.privacy.dlp.v2.DiscoveryVertexDatasetFilter} message DiscoveryVertexDatasetFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryVertexDatasetFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.collection != null && message.hasOwnProperty("collection")) { + object.collection = $root.google.privacy.dlp.v2.VertexDatasetCollection.toObject(message.collection, options); + if (options.oneofs) + object.filter = "collection"; + } + if (message.vertexDatasetResourceReference != null && message.hasOwnProperty("vertexDatasetResourceReference")) { + object.vertexDatasetResourceReference = $root.google.privacy.dlp.v2.VertexDatasetResourceReference.toObject(message.vertexDatasetResourceReference, options); + if (options.oneofs) + object.filter = "vertexDatasetResourceReference"; + } + if (message.others != null && message.hasOwnProperty("others")) { + object.others = $root.google.privacy.dlp.v2.AllOtherResources.toObject(message.others, options); + if (options.oneofs) + object.filter = "others"; + } + return object; + }; + + /** + * Converts this DiscoveryVertexDatasetFilter to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetFilter + * @instance + * @returns {Object.} JSON object + */ + DiscoveryVertexDatasetFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryVertexDatasetFilter + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryVertexDatasetFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryVertexDatasetFilter"; + }; + + return DiscoveryVertexDatasetFilter; + })(); + + v2.VertexDatasetCollection = (function() { + + /** + * Properties of a VertexDatasetCollection. + * @memberof google.privacy.dlp.v2 + * @interface IVertexDatasetCollection + * @property {google.privacy.dlp.v2.IVertexDatasetRegexes|null} [vertexDatasetRegexes] VertexDatasetCollection vertexDatasetRegexes + */ + + /** + * Constructs a new VertexDatasetCollection. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a VertexDatasetCollection. + * @implements IVertexDatasetCollection + * @constructor + * @param {google.privacy.dlp.v2.IVertexDatasetCollection=} [properties] Properties to set + */ + function VertexDatasetCollection(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * VertexDatasetCollection vertexDatasetRegexes. + * @member {google.privacy.dlp.v2.IVertexDatasetRegexes|null|undefined} vertexDatasetRegexes + * @memberof google.privacy.dlp.v2.VertexDatasetCollection + * @instance + */ + VertexDatasetCollection.prototype.vertexDatasetRegexes = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * VertexDatasetCollection pattern. + * @member {"vertexDatasetRegexes"|undefined} pattern + * @memberof google.privacy.dlp.v2.VertexDatasetCollection + * @instance + */ + Object.defineProperty(VertexDatasetCollection.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["vertexDatasetRegexes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new VertexDatasetCollection instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.VertexDatasetCollection + * @static + * @param {google.privacy.dlp.v2.IVertexDatasetCollection=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.VertexDatasetCollection} VertexDatasetCollection instance + */ + VertexDatasetCollection.create = function create(properties) { + return new VertexDatasetCollection(properties); + }; + + /** + * Encodes the specified VertexDatasetCollection message. Does not implicitly {@link google.privacy.dlp.v2.VertexDatasetCollection.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.VertexDatasetCollection + * @static + * @param {google.privacy.dlp.v2.IVertexDatasetCollection} message VertexDatasetCollection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VertexDatasetCollection.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.vertexDatasetRegexes != null && Object.hasOwnProperty.call(message, "vertexDatasetRegexes")) + $root.google.privacy.dlp.v2.VertexDatasetRegexes.encode(message.vertexDatasetRegexes, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VertexDatasetCollection message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.VertexDatasetCollection.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.VertexDatasetCollection + * @static + * @param {google.privacy.dlp.v2.IVertexDatasetCollection} message VertexDatasetCollection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VertexDatasetCollection.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VertexDatasetCollection message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.VertexDatasetCollection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.VertexDatasetCollection} VertexDatasetCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VertexDatasetCollection.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.VertexDatasetCollection(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.vertexDatasetRegexes = $root.google.privacy.dlp.v2.VertexDatasetRegexes.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a VertexDatasetCollection message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.VertexDatasetCollection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.VertexDatasetCollection} VertexDatasetCollection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VertexDatasetCollection.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VertexDatasetCollection message. + * @function verify + * @memberof google.privacy.dlp.v2.VertexDatasetCollection + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VertexDatasetCollection.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.vertexDatasetRegexes != null && message.hasOwnProperty("vertexDatasetRegexes")) { + properties.pattern = 1; + { + var error = $root.google.privacy.dlp.v2.VertexDatasetRegexes.verify(message.vertexDatasetRegexes, long + 1); + if (error) + return "vertexDatasetRegexes." + error; + } + } + return null; + }; + + /** + * Creates a VertexDatasetCollection message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.VertexDatasetCollection + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.VertexDatasetCollection} VertexDatasetCollection + */ + VertexDatasetCollection.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.VertexDatasetCollection) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.VertexDatasetCollection(); + if (object.vertexDatasetRegexes != null) { + if (typeof object.vertexDatasetRegexes !== "object") + throw TypeError(".google.privacy.dlp.v2.VertexDatasetCollection.vertexDatasetRegexes: object expected"); + message.vertexDatasetRegexes = $root.google.privacy.dlp.v2.VertexDatasetRegexes.fromObject(object.vertexDatasetRegexes, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a VertexDatasetCollection message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.VertexDatasetCollection + * @static + * @param {google.privacy.dlp.v2.VertexDatasetCollection} message VertexDatasetCollection + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VertexDatasetCollection.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.vertexDatasetRegexes != null && message.hasOwnProperty("vertexDatasetRegexes")) { + object.vertexDatasetRegexes = $root.google.privacy.dlp.v2.VertexDatasetRegexes.toObject(message.vertexDatasetRegexes, options); + if (options.oneofs) + object.pattern = "vertexDatasetRegexes"; + } + return object; + }; + + /** + * Converts this VertexDatasetCollection to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.VertexDatasetCollection + * @instance + * @returns {Object.} JSON object + */ + VertexDatasetCollection.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VertexDatasetCollection + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.VertexDatasetCollection + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VertexDatasetCollection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.VertexDatasetCollection"; + }; + + return VertexDatasetCollection; + })(); + + v2.VertexDatasetRegexes = (function() { + + /** + * Properties of a VertexDatasetRegexes. + * @memberof google.privacy.dlp.v2 + * @interface IVertexDatasetRegexes + * @property {Array.|null} [patterns] VertexDatasetRegexes patterns + */ + + /** + * Constructs a new VertexDatasetRegexes. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a VertexDatasetRegexes. + * @implements IVertexDatasetRegexes + * @constructor + * @param {google.privacy.dlp.v2.IVertexDatasetRegexes=} [properties] Properties to set + */ + function VertexDatasetRegexes(properties) { + this.patterns = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * VertexDatasetRegexes patterns. + * @member {Array.} patterns + * @memberof google.privacy.dlp.v2.VertexDatasetRegexes + * @instance + */ + VertexDatasetRegexes.prototype.patterns = $util.emptyArray; + + /** + * Creates a new VertexDatasetRegexes instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.VertexDatasetRegexes + * @static + * @param {google.privacy.dlp.v2.IVertexDatasetRegexes=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.VertexDatasetRegexes} VertexDatasetRegexes instance + */ + VertexDatasetRegexes.create = function create(properties) { + return new VertexDatasetRegexes(properties); + }; + + /** + * Encodes the specified VertexDatasetRegexes message. Does not implicitly {@link google.privacy.dlp.v2.VertexDatasetRegexes.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.VertexDatasetRegexes + * @static + * @param {google.privacy.dlp.v2.IVertexDatasetRegexes} message VertexDatasetRegexes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VertexDatasetRegexes.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.patterns != null && message.patterns.length) + for (var i = 0; i < message.patterns.length; ++i) + $root.google.privacy.dlp.v2.VertexDatasetRegex.encode(message.patterns[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified VertexDatasetRegexes message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.VertexDatasetRegexes.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.VertexDatasetRegexes + * @static + * @param {google.privacy.dlp.v2.IVertexDatasetRegexes} message VertexDatasetRegexes message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VertexDatasetRegexes.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VertexDatasetRegexes message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.VertexDatasetRegexes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.VertexDatasetRegexes} VertexDatasetRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VertexDatasetRegexes.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.VertexDatasetRegexes(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.patterns && message.patterns.length)) + message.patterns = []; + message.patterns.push($root.google.privacy.dlp.v2.VertexDatasetRegex.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a VertexDatasetRegexes message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.VertexDatasetRegexes + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.VertexDatasetRegexes} VertexDatasetRegexes + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VertexDatasetRegexes.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VertexDatasetRegexes message. + * @function verify + * @memberof google.privacy.dlp.v2.VertexDatasetRegexes + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VertexDatasetRegexes.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.patterns != null && message.hasOwnProperty("patterns")) { + if (!Array.isArray(message.patterns)) + return "patterns: array expected"; + for (var i = 0; i < message.patterns.length; ++i) { + var error = $root.google.privacy.dlp.v2.VertexDatasetRegex.verify(message.patterns[i], long + 1); + if (error) + return "patterns." + error; + } + } + return null; + }; + + /** + * Creates a VertexDatasetRegexes message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.VertexDatasetRegexes + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.VertexDatasetRegexes} VertexDatasetRegexes + */ + VertexDatasetRegexes.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.VertexDatasetRegexes) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.VertexDatasetRegexes(); + if (object.patterns) { + if (!Array.isArray(object.patterns)) + throw TypeError(".google.privacy.dlp.v2.VertexDatasetRegexes.patterns: array expected"); + message.patterns = []; + for (var i = 0; i < object.patterns.length; ++i) { + if (typeof object.patterns[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.VertexDatasetRegexes.patterns: object expected"); + message.patterns[i] = $root.google.privacy.dlp.v2.VertexDatasetRegex.fromObject(object.patterns[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a VertexDatasetRegexes message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.VertexDatasetRegexes + * @static + * @param {google.privacy.dlp.v2.VertexDatasetRegexes} message VertexDatasetRegexes + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VertexDatasetRegexes.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.patterns = []; + if (message.patterns && message.patterns.length) { + object.patterns = []; + for (var j = 0; j < message.patterns.length; ++j) + object.patterns[j] = $root.google.privacy.dlp.v2.VertexDatasetRegex.toObject(message.patterns[j], options); + } + return object; + }; + + /** + * Converts this VertexDatasetRegexes to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.VertexDatasetRegexes + * @instance + * @returns {Object.} JSON object + */ + VertexDatasetRegexes.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VertexDatasetRegexes + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.VertexDatasetRegexes + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VertexDatasetRegexes.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.VertexDatasetRegexes"; + }; + + return VertexDatasetRegexes; + })(); + + v2.VertexDatasetRegex = (function() { + + /** + * Properties of a VertexDatasetRegex. + * @memberof google.privacy.dlp.v2 + * @interface IVertexDatasetRegex + * @property {string|null} [projectIdRegex] VertexDatasetRegex projectIdRegex + */ + + /** + * Constructs a new VertexDatasetRegex. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a VertexDatasetRegex. + * @implements IVertexDatasetRegex + * @constructor + * @param {google.privacy.dlp.v2.IVertexDatasetRegex=} [properties] Properties to set + */ + function VertexDatasetRegex(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * VertexDatasetRegex projectIdRegex. + * @member {string} projectIdRegex + * @memberof google.privacy.dlp.v2.VertexDatasetRegex + * @instance + */ + VertexDatasetRegex.prototype.projectIdRegex = ""; + + /** + * Creates a new VertexDatasetRegex instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.VertexDatasetRegex + * @static + * @param {google.privacy.dlp.v2.IVertexDatasetRegex=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.VertexDatasetRegex} VertexDatasetRegex instance + */ + VertexDatasetRegex.create = function create(properties) { + return new VertexDatasetRegex(properties); + }; + + /** + * Encodes the specified VertexDatasetRegex message. Does not implicitly {@link google.privacy.dlp.v2.VertexDatasetRegex.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.VertexDatasetRegex + * @static + * @param {google.privacy.dlp.v2.IVertexDatasetRegex} message VertexDatasetRegex message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VertexDatasetRegex.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectIdRegex != null && Object.hasOwnProperty.call(message, "projectIdRegex")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectIdRegex); + return writer; + }; + + /** + * Encodes the specified VertexDatasetRegex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.VertexDatasetRegex.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.VertexDatasetRegex + * @static + * @param {google.privacy.dlp.v2.IVertexDatasetRegex} message VertexDatasetRegex message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VertexDatasetRegex.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VertexDatasetRegex message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.VertexDatasetRegex + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.VertexDatasetRegex} VertexDatasetRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VertexDatasetRegex.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.VertexDatasetRegex(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.projectIdRegex = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a VertexDatasetRegex message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.VertexDatasetRegex + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.VertexDatasetRegex} VertexDatasetRegex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VertexDatasetRegex.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VertexDatasetRegex message. + * @function verify + * @memberof google.privacy.dlp.v2.VertexDatasetRegex + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VertexDatasetRegex.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.projectIdRegex != null && message.hasOwnProperty("projectIdRegex")) + if (!$util.isString(message.projectIdRegex)) + return "projectIdRegex: string expected"; + return null; + }; + + /** + * Creates a VertexDatasetRegex message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.VertexDatasetRegex + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.VertexDatasetRegex} VertexDatasetRegex + */ + VertexDatasetRegex.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.VertexDatasetRegex) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.VertexDatasetRegex(); + if (object.projectIdRegex != null) + message.projectIdRegex = String(object.projectIdRegex); + return message; + }; + + /** + * Creates a plain object from a VertexDatasetRegex message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.VertexDatasetRegex + * @static + * @param {google.privacy.dlp.v2.VertexDatasetRegex} message VertexDatasetRegex + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VertexDatasetRegex.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.projectIdRegex = ""; + if (message.projectIdRegex != null && message.hasOwnProperty("projectIdRegex")) + object.projectIdRegex = message.projectIdRegex; + return object; + }; + + /** + * Converts this VertexDatasetRegex to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.VertexDatasetRegex + * @instance + * @returns {Object.} JSON object + */ + VertexDatasetRegex.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VertexDatasetRegex + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.VertexDatasetRegex + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VertexDatasetRegex.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.VertexDatasetRegex"; + }; + + return VertexDatasetRegex; + })(); + + v2.VertexDatasetResourceReference = (function() { + + /** + * Properties of a VertexDatasetResourceReference. + * @memberof google.privacy.dlp.v2 + * @interface IVertexDatasetResourceReference + * @property {string|null} [datasetResourceName] VertexDatasetResourceReference datasetResourceName + */ + + /** + * Constructs a new VertexDatasetResourceReference. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a VertexDatasetResourceReference. + * @implements IVertexDatasetResourceReference + * @constructor + * @param {google.privacy.dlp.v2.IVertexDatasetResourceReference=} [properties] Properties to set + */ + function VertexDatasetResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * VertexDatasetResourceReference datasetResourceName. + * @member {string} datasetResourceName + * @memberof google.privacy.dlp.v2.VertexDatasetResourceReference + * @instance + */ + VertexDatasetResourceReference.prototype.datasetResourceName = ""; + + /** + * Creates a new VertexDatasetResourceReference instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.VertexDatasetResourceReference + * @static + * @param {google.privacy.dlp.v2.IVertexDatasetResourceReference=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.VertexDatasetResourceReference} VertexDatasetResourceReference instance + */ + VertexDatasetResourceReference.create = function create(properties) { + return new VertexDatasetResourceReference(properties); + }; + + /** + * Encodes the specified VertexDatasetResourceReference message. Does not implicitly {@link google.privacy.dlp.v2.VertexDatasetResourceReference.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.VertexDatasetResourceReference + * @static + * @param {google.privacy.dlp.v2.IVertexDatasetResourceReference} message VertexDatasetResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VertexDatasetResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.datasetResourceName != null && Object.hasOwnProperty.call(message, "datasetResourceName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.datasetResourceName); + return writer; + }; + + /** + * Encodes the specified VertexDatasetResourceReference message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.VertexDatasetResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.VertexDatasetResourceReference + * @static + * @param {google.privacy.dlp.v2.IVertexDatasetResourceReference} message VertexDatasetResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VertexDatasetResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VertexDatasetResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.VertexDatasetResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.VertexDatasetResourceReference} VertexDatasetResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VertexDatasetResourceReference.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.VertexDatasetResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.datasetResourceName = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a VertexDatasetResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.VertexDatasetResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.VertexDatasetResourceReference} VertexDatasetResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VertexDatasetResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VertexDatasetResourceReference message. + * @function verify + * @memberof google.privacy.dlp.v2.VertexDatasetResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VertexDatasetResourceReference.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.datasetResourceName != null && message.hasOwnProperty("datasetResourceName")) + if (!$util.isString(message.datasetResourceName)) + return "datasetResourceName: string expected"; + return null; + }; + + /** + * Creates a VertexDatasetResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.VertexDatasetResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.VertexDatasetResourceReference} VertexDatasetResourceReference + */ + VertexDatasetResourceReference.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.VertexDatasetResourceReference) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.VertexDatasetResourceReference(); + if (object.datasetResourceName != null) + message.datasetResourceName = String(object.datasetResourceName); + return message; + }; + + /** + * Creates a plain object from a VertexDatasetResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.VertexDatasetResourceReference + * @static + * @param {google.privacy.dlp.v2.VertexDatasetResourceReference} message VertexDatasetResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VertexDatasetResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.datasetResourceName = ""; + if (message.datasetResourceName != null && message.hasOwnProperty("datasetResourceName")) + object.datasetResourceName = message.datasetResourceName; + return object; + }; + + /** + * Converts this VertexDatasetResourceReference to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.VertexDatasetResourceReference + * @instance + * @returns {Object.} JSON object + */ + VertexDatasetResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VertexDatasetResourceReference + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.VertexDatasetResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VertexDatasetResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.VertexDatasetResourceReference"; + }; + + return VertexDatasetResourceReference; + })(); + + v2.DiscoveryVertexDatasetConditions = (function() { + + /** + * Properties of a DiscoveryVertexDatasetConditions. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoveryVertexDatasetConditions + * @property {google.protobuf.ITimestamp|null} [createdAfter] DiscoveryVertexDatasetConditions createdAfter + * @property {google.protobuf.IDuration|null} [minAge] DiscoveryVertexDatasetConditions minAge + */ + + /** + * Constructs a new DiscoveryVertexDatasetConditions. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoveryVertexDatasetConditions. + * @implements IDiscoveryVertexDatasetConditions + * @constructor + * @param {google.privacy.dlp.v2.IDiscoveryVertexDatasetConditions=} [properties] Properties to set + */ + function DiscoveryVertexDatasetConditions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryVertexDatasetConditions createdAfter. + * @member {google.protobuf.ITimestamp|null|undefined} createdAfter + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetConditions + * @instance + */ + DiscoveryVertexDatasetConditions.prototype.createdAfter = null; + + /** + * DiscoveryVertexDatasetConditions minAge. + * @member {google.protobuf.IDuration|null|undefined} minAge + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetConditions + * @instance + */ + DiscoveryVertexDatasetConditions.prototype.minAge = null; + + /** + * Creates a new DiscoveryVertexDatasetConditions instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetConditions + * @static + * @param {google.privacy.dlp.v2.IDiscoveryVertexDatasetConditions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryVertexDatasetConditions} DiscoveryVertexDatasetConditions instance + */ + DiscoveryVertexDatasetConditions.create = function create(properties) { + return new DiscoveryVertexDatasetConditions(properties); + }; + + /** + * Encodes the specified DiscoveryVertexDatasetConditions message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryVertexDatasetConditions.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetConditions + * @static + * @param {google.privacy.dlp.v2.IDiscoveryVertexDatasetConditions} message DiscoveryVertexDatasetConditions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryVertexDatasetConditions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createdAfter != null && Object.hasOwnProperty.call(message, "createdAfter")) + $root.google.protobuf.Timestamp.encode(message.createdAfter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minAge != null && Object.hasOwnProperty.call(message, "minAge")) + $root.google.protobuf.Duration.encode(message.minAge, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryVertexDatasetConditions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryVertexDatasetConditions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetConditions + * @static + * @param {google.privacy.dlp.v2.IDiscoveryVertexDatasetConditions} message DiscoveryVertexDatasetConditions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryVertexDatasetConditions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryVertexDatasetConditions message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetConditions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryVertexDatasetConditions} DiscoveryVertexDatasetConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryVertexDatasetConditions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryVertexDatasetConditions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.createdAfter = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.minAge = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryVertexDatasetConditions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetConditions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryVertexDatasetConditions} DiscoveryVertexDatasetConditions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryVertexDatasetConditions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryVertexDatasetConditions message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetConditions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryVertexDatasetConditions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.createdAfter != null && message.hasOwnProperty("createdAfter")) { + var error = $root.google.protobuf.Timestamp.verify(message.createdAfter, long + 1); + if (error) + return "createdAfter." + error; + } + if (message.minAge != null && message.hasOwnProperty("minAge")) { + var error = $root.google.protobuf.Duration.verify(message.minAge, long + 1); + if (error) + return "minAge." + error; + } + return null; + }; + + /** + * Creates a DiscoveryVertexDatasetConditions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetConditions + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryVertexDatasetConditions} DiscoveryVertexDatasetConditions + */ + DiscoveryVertexDatasetConditions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryVertexDatasetConditions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DiscoveryVertexDatasetConditions(); + if (object.createdAfter != null) { + if (typeof object.createdAfter !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryVertexDatasetConditions.createdAfter: object expected"); + message.createdAfter = $root.google.protobuf.Timestamp.fromObject(object.createdAfter, long + 1); + } + if (object.minAge != null) { + if (typeof object.minAge !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryVertexDatasetConditions.minAge: object expected"); + message.minAge = $root.google.protobuf.Duration.fromObject(object.minAge, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryVertexDatasetConditions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetConditions + * @static + * @param {google.privacy.dlp.v2.DiscoveryVertexDatasetConditions} message DiscoveryVertexDatasetConditions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryVertexDatasetConditions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createdAfter = null; + object.minAge = null; + } + if (message.createdAfter != null && message.hasOwnProperty("createdAfter")) + object.createdAfter = $root.google.protobuf.Timestamp.toObject(message.createdAfter, options); + if (message.minAge != null && message.hasOwnProperty("minAge")) + object.minAge = $root.google.protobuf.Duration.toObject(message.minAge, options); + return object; + }; + + /** + * Converts this DiscoveryVertexDatasetConditions to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetConditions + * @instance + * @returns {Object.} JSON object + */ + DiscoveryVertexDatasetConditions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryVertexDatasetConditions + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetConditions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryVertexDatasetConditions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryVertexDatasetConditions"; + }; + + return DiscoveryVertexDatasetConditions; + })(); + + v2.DiscoveryVertexDatasetGenerationCadence = (function() { + + /** + * Properties of a DiscoveryVertexDatasetGenerationCadence. + * @memberof google.privacy.dlp.v2 + * @interface IDiscoveryVertexDatasetGenerationCadence + * @property {google.privacy.dlp.v2.DataProfileUpdateFrequency|null} [refreshFrequency] DiscoveryVertexDatasetGenerationCadence refreshFrequency + * @property {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null} [inspectTemplateModifiedCadence] DiscoveryVertexDatasetGenerationCadence inspectTemplateModifiedCadence + */ + + /** + * Constructs a new DiscoveryVertexDatasetGenerationCadence. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DiscoveryVertexDatasetGenerationCadence. + * @implements IDiscoveryVertexDatasetGenerationCadence + * @constructor + * @param {google.privacy.dlp.v2.IDiscoveryVertexDatasetGenerationCadence=} [properties] Properties to set + */ + function DiscoveryVertexDatasetGenerationCadence(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DiscoveryVertexDatasetGenerationCadence refreshFrequency. + * @member {google.privacy.dlp.v2.DataProfileUpdateFrequency} refreshFrequency + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence + * @instance + */ + DiscoveryVertexDatasetGenerationCadence.prototype.refreshFrequency = 0; + + /** + * DiscoveryVertexDatasetGenerationCadence inspectTemplateModifiedCadence. + * @member {google.privacy.dlp.v2.IDiscoveryInspectTemplateModifiedCadence|null|undefined} inspectTemplateModifiedCadence + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence + * @instance + */ + DiscoveryVertexDatasetGenerationCadence.prototype.inspectTemplateModifiedCadence = null; + + /** + * Creates a new DiscoveryVertexDatasetGenerationCadence instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence + * @static + * @param {google.privacy.dlp.v2.IDiscoveryVertexDatasetGenerationCadence=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence} DiscoveryVertexDatasetGenerationCadence instance + */ + DiscoveryVertexDatasetGenerationCadence.create = function create(properties) { + return new DiscoveryVertexDatasetGenerationCadence(properties); + }; + + /** + * Encodes the specified DiscoveryVertexDatasetGenerationCadence message. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence + * @static + * @param {google.privacy.dlp.v2.IDiscoveryVertexDatasetGenerationCadence} message DiscoveryVertexDatasetGenerationCadence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryVertexDatasetGenerationCadence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.refreshFrequency != null && Object.hasOwnProperty.call(message, "refreshFrequency")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.refreshFrequency); + if (message.inspectTemplateModifiedCadence != null && Object.hasOwnProperty.call(message, "inspectTemplateModifiedCadence")) + $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.encode(message.inspectTemplateModifiedCadence, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DiscoveryVertexDatasetGenerationCadence message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence + * @static + * @param {google.privacy.dlp.v2.IDiscoveryVertexDatasetGenerationCadence} message DiscoveryVertexDatasetGenerationCadence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DiscoveryVertexDatasetGenerationCadence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DiscoveryVertexDatasetGenerationCadence message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence} DiscoveryVertexDatasetGenerationCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryVertexDatasetGenerationCadence.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.refreshFrequency = reader.int32(); + break; + } + case 2: { + message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DiscoveryVertexDatasetGenerationCadence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence} DiscoveryVertexDatasetGenerationCadence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DiscoveryVertexDatasetGenerationCadence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DiscoveryVertexDatasetGenerationCadence message. + * @function verify + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DiscoveryVertexDatasetGenerationCadence.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency")) + switch (message.refreshFrequency) { + default: + return "refreshFrequency: enum value expected"; + case 0: + case 1: + case 2: + case 4: + break; + } + if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence")) { + var error = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.verify(message.inspectTemplateModifiedCadence, long + 1); + if (error) + return "inspectTemplateModifiedCadence." + error; + } + return null; + }; + + /** + * Creates a DiscoveryVertexDatasetGenerationCadence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence} DiscoveryVertexDatasetGenerationCadence + */ + DiscoveryVertexDatasetGenerationCadence.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence(); + switch (object.refreshFrequency) { + default: + if (typeof object.refreshFrequency === "number") { + message.refreshFrequency = object.refreshFrequency; + break; + } + break; + case "UPDATE_FREQUENCY_UNSPECIFIED": + case 0: + message.refreshFrequency = 0; + break; + case "UPDATE_FREQUENCY_NEVER": + case 1: + message.refreshFrequency = 1; + break; + case "UPDATE_FREQUENCY_DAILY": + case 2: + message.refreshFrequency = 2; + break; + case "UPDATE_FREQUENCY_MONTHLY": + case 4: + message.refreshFrequency = 4; + break; + } + if (object.inspectTemplateModifiedCadence != null) { + if (typeof object.inspectTemplateModifiedCadence !== "object") + throw TypeError(".google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence.inspectTemplateModifiedCadence: object expected"); + message.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.fromObject(object.inspectTemplateModifiedCadence, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DiscoveryVertexDatasetGenerationCadence message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence + * @static + * @param {google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence} message DiscoveryVertexDatasetGenerationCadence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DiscoveryVertexDatasetGenerationCadence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.refreshFrequency = options.enums === String ? "UPDATE_FREQUENCY_UNSPECIFIED" : 0; + object.inspectTemplateModifiedCadence = null; + } + if (message.refreshFrequency != null && message.hasOwnProperty("refreshFrequency")) + object.refreshFrequency = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] === undefined ? message.refreshFrequency : $root.google.privacy.dlp.v2.DataProfileUpdateFrequency[message.refreshFrequency] : message.refreshFrequency; + if (message.inspectTemplateModifiedCadence != null && message.hasOwnProperty("inspectTemplateModifiedCadence")) + object.inspectTemplateModifiedCadence = $root.google.privacy.dlp.v2.DiscoveryInspectTemplateModifiedCadence.toObject(message.inspectTemplateModifiedCadence, options); + return object; + }; + + /** + * Converts this DiscoveryVertexDatasetGenerationCadence to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence + * @instance + * @returns {Object.} JSON object + */ + DiscoveryVertexDatasetGenerationCadence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DiscoveryVertexDatasetGenerationCadence + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DiscoveryVertexDatasetGenerationCadence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DiscoveryVertexDatasetGenerationCadence"; + }; + + return DiscoveryVertexDatasetGenerationCadence; + })(); + + v2.DlpJob = (function() { + + /** + * Properties of a DlpJob. + * @memberof google.privacy.dlp.v2 + * @interface IDlpJob + * @property {string|null} [name] DlpJob name + * @property {google.privacy.dlp.v2.DlpJobType|null} [type] DlpJob type + * @property {google.privacy.dlp.v2.DlpJob.JobState|null} [state] DlpJob state + * @property {google.privacy.dlp.v2.IAnalyzeDataSourceRiskDetails|null} [riskDetails] DlpJob riskDetails + * @property {google.privacy.dlp.v2.IInspectDataSourceDetails|null} [inspectDetails] DlpJob inspectDetails + * @property {google.protobuf.ITimestamp|null} [createTime] DlpJob createTime + * @property {google.protobuf.ITimestamp|null} [startTime] DlpJob startTime + * @property {google.protobuf.ITimestamp|null} [endTime] DlpJob endTime + * @property {google.protobuf.ITimestamp|null} [lastModified] DlpJob lastModified + * @property {string|null} [jobTriggerName] DlpJob jobTriggerName + * @property {Array.|null} [errors] DlpJob errors + * @property {Array.|null} [actionDetails] DlpJob actionDetails + */ + + /** + * Constructs a new DlpJob. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DlpJob. + * @implements IDlpJob + * @constructor + * @param {google.privacy.dlp.v2.IDlpJob=} [properties] Properties to set + */ + function DlpJob(properties) { + this.errors = []; + this.actionDetails = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DlpJob name. + * @member {string} name + * @memberof google.privacy.dlp.v2.DlpJob + * @instance + */ + DlpJob.prototype.name = ""; + + /** + * DlpJob type. + * @member {google.privacy.dlp.v2.DlpJobType} type + * @memberof google.privacy.dlp.v2.DlpJob + * @instance + */ + DlpJob.prototype.type = 0; + + /** + * DlpJob state. + * @member {google.privacy.dlp.v2.DlpJob.JobState} state + * @memberof google.privacy.dlp.v2.DlpJob + * @instance + */ + DlpJob.prototype.state = 0; + + /** + * DlpJob riskDetails. + * @member {google.privacy.dlp.v2.IAnalyzeDataSourceRiskDetails|null|undefined} riskDetails + * @memberof google.privacy.dlp.v2.DlpJob + * @instance + */ + DlpJob.prototype.riskDetails = null; + + /** + * DlpJob inspectDetails. + * @member {google.privacy.dlp.v2.IInspectDataSourceDetails|null|undefined} inspectDetails + * @memberof google.privacy.dlp.v2.DlpJob + * @instance + */ + DlpJob.prototype.inspectDetails = null; + + /** + * DlpJob createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.privacy.dlp.v2.DlpJob + * @instance + */ + DlpJob.prototype.createTime = null; + + /** + * DlpJob startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.privacy.dlp.v2.DlpJob + * @instance + */ + DlpJob.prototype.startTime = null; + + /** + * DlpJob endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.privacy.dlp.v2.DlpJob + * @instance + */ + DlpJob.prototype.endTime = null; + + /** + * DlpJob lastModified. + * @member {google.protobuf.ITimestamp|null|undefined} lastModified + * @memberof google.privacy.dlp.v2.DlpJob + * @instance + */ + DlpJob.prototype.lastModified = null; + + /** + * DlpJob jobTriggerName. + * @member {string} jobTriggerName + * @memberof google.privacy.dlp.v2.DlpJob + * @instance + */ + DlpJob.prototype.jobTriggerName = ""; + + /** + * DlpJob errors. + * @member {Array.} errors + * @memberof google.privacy.dlp.v2.DlpJob + * @instance + */ + DlpJob.prototype.errors = $util.emptyArray; + + /** + * DlpJob actionDetails. + * @member {Array.} actionDetails + * @memberof google.privacy.dlp.v2.DlpJob + * @instance + */ + DlpJob.prototype.actionDetails = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DlpJob details. + * @member {"riskDetails"|"inspectDetails"|undefined} details + * @memberof google.privacy.dlp.v2.DlpJob + * @instance + */ + Object.defineProperty(DlpJob.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["riskDetails", "inspectDetails"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DlpJob instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DlpJob + * @static + * @param {google.privacy.dlp.v2.IDlpJob=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DlpJob} DlpJob instance + */ + DlpJob.create = function create(properties) { + return new DlpJob(properties); + }; + + /** + * Encodes the specified DlpJob message. Does not implicitly {@link google.privacy.dlp.v2.DlpJob.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DlpJob + * @static + * @param {google.privacy.dlp.v2.IDlpJob} message DlpJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DlpJob.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.riskDetails != null && Object.hasOwnProperty.call(message, "riskDetails")) + $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.encode(message.riskDetails, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.inspectDetails != null && Object.hasOwnProperty.call(message, "inspectDetails")) + $root.google.privacy.dlp.v2.InspectDataSourceDetails.encode(message.inspectDetails, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.jobTriggerName != null && Object.hasOwnProperty.call(message, "jobTriggerName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jobTriggerName); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.privacy.dlp.v2.Error.encode(message.errors[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.actionDetails != null && message.actionDetails.length) + for (var i = 0; i < message.actionDetails.length; ++i) + $root.google.privacy.dlp.v2.ActionDetails.encode(message.actionDetails[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.lastModified != null && Object.hasOwnProperty.call(message, "lastModified")) + $root.google.protobuf.Timestamp.encode(message.lastModified, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DlpJob message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DlpJob.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DlpJob + * @static + * @param {google.privacy.dlp.v2.IDlpJob} message DlpJob message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DlpJob.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DlpJob message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DlpJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DlpJob} DlpJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DlpJob.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DlpJob(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 4: { + message.riskDetails = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.inspectDetails = $root.google.privacy.dlp.v2.InspectDataSourceDetails.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 7: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 8: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 15: { + message.lastModified = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 10: { + message.jobTriggerName = reader.string(); + break; + } + case 11: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.privacy.dlp.v2.Error.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 12: { + if (!(message.actionDetails && message.actionDetails.length)) + message.actionDetails = []; + message.actionDetails.push($root.google.privacy.dlp.v2.ActionDetails.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DlpJob message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DlpJob + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DlpJob} DlpJob + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DlpJob.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DlpJob message. + * @function verify + * @memberof google.privacy.dlp.v2.DlpJob + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DlpJob.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.riskDetails != null && message.hasOwnProperty("riskDetails")) { + properties.details = 1; + { + var error = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.verify(message.riskDetails, long + 1); + if (error) + return "riskDetails." + error; + } + } + if (message.inspectDetails != null && message.hasOwnProperty("inspectDetails")) { + if (properties.details === 1) + return "details: multiple values"; + properties.details = 1; + { + var error = $root.google.privacy.dlp.v2.InspectDataSourceDetails.verify(message.inspectDetails, long + 1); + if (error) + return "inspectDetails." + error; + } + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime, long + 1); + if (error) + return "createTime." + error; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); + if (error) + return "endTime." + error; + } + if (message.lastModified != null && message.hasOwnProperty("lastModified")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastModified, long + 1); + if (error) + return "lastModified." + error; + } + if (message.jobTriggerName != null && message.hasOwnProperty("jobTriggerName")) + if (!$util.isString(message.jobTriggerName)) + return "jobTriggerName: string expected"; + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.privacy.dlp.v2.Error.verify(message.errors[i], long + 1); + if (error) + return "errors." + error; + } + } + if (message.actionDetails != null && message.hasOwnProperty("actionDetails")) { + if (!Array.isArray(message.actionDetails)) + return "actionDetails: array expected"; + for (var i = 0; i < message.actionDetails.length; ++i) { + var error = $root.google.privacy.dlp.v2.ActionDetails.verify(message.actionDetails[i], long + 1); + if (error) + return "actionDetails." + error; + } + } + return null; + }; + + /** + * Creates a DlpJob message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DlpJob + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DlpJob} DlpJob + */ + DlpJob.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DlpJob) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DlpJob(); + if (object.name != null) + message.name = String(object.name); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "DLP_JOB_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "INSPECT_JOB": + case 1: + message.type = 1; + break; + case "RISK_ANALYSIS_JOB": + case 2: + message.type = 2; + break; + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "JOB_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PENDING": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "DONE": + case 3: + message.state = 3; + break; + case "CANCELED": + case 4: + message.state = 4; + break; + case "FAILED": + case 5: + message.state = 5; + break; + case "ACTIVE": + case 6: + message.state = 6; + break; + } + if (object.riskDetails != null) { + if (typeof object.riskDetails !== "object") + throw TypeError(".google.privacy.dlp.v2.DlpJob.riskDetails: object expected"); + message.riskDetails = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.fromObject(object.riskDetails, long + 1); + } + if (object.inspectDetails != null) { + if (typeof object.inspectDetails !== "object") + throw TypeError(".google.privacy.dlp.v2.DlpJob.inspectDetails: object expected"); + message.inspectDetails = $root.google.privacy.dlp.v2.InspectDataSourceDetails.fromObject(object.inspectDetails, long + 1); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.privacy.dlp.v2.DlpJob.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime, long + 1); + } + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.privacy.dlp.v2.DlpJob.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.privacy.dlp.v2.DlpJob.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); + } + if (object.lastModified != null) { + if (typeof object.lastModified !== "object") + throw TypeError(".google.privacy.dlp.v2.DlpJob.lastModified: object expected"); + message.lastModified = $root.google.protobuf.Timestamp.fromObject(object.lastModified, long + 1); + } + if (object.jobTriggerName != null) + message.jobTriggerName = String(object.jobTriggerName); + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.privacy.dlp.v2.DlpJob.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.DlpJob.errors: object expected"); + message.errors[i] = $root.google.privacy.dlp.v2.Error.fromObject(object.errors[i], long + 1); + } + } + if (object.actionDetails) { + if (!Array.isArray(object.actionDetails)) + throw TypeError(".google.privacy.dlp.v2.DlpJob.actionDetails: array expected"); + message.actionDetails = []; + for (var i = 0; i < object.actionDetails.length; ++i) { + if (typeof object.actionDetails[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.DlpJob.actionDetails: object expected"); + message.actionDetails[i] = $root.google.privacy.dlp.v2.ActionDetails.fromObject(object.actionDetails[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a DlpJob message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DlpJob + * @static + * @param {google.privacy.dlp.v2.DlpJob} message DlpJob + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DlpJob.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.errors = []; + object.actionDetails = []; + } + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "DLP_JOB_TYPE_UNSPECIFIED" : 0; + object.state = options.enums === String ? "JOB_STATE_UNSPECIFIED" : 0; + object.createTime = null; + object.startTime = null; + object.endTime = null; + object.jobTriggerName = ""; + object.lastModified = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.privacy.dlp.v2.DlpJobType[message.type] === undefined ? message.type : $root.google.privacy.dlp.v2.DlpJobType[message.type] : message.type; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.privacy.dlp.v2.DlpJob.JobState[message.state] === undefined ? message.state : $root.google.privacy.dlp.v2.DlpJob.JobState[message.state] : message.state; + if (message.riskDetails != null && message.hasOwnProperty("riskDetails")) { + object.riskDetails = $root.google.privacy.dlp.v2.AnalyzeDataSourceRiskDetails.toObject(message.riskDetails, options); + if (options.oneofs) + object.details = "riskDetails"; + } + if (message.inspectDetails != null && message.hasOwnProperty("inspectDetails")) { + object.inspectDetails = $root.google.privacy.dlp.v2.InspectDataSourceDetails.toObject(message.inspectDetails, options); + if (options.oneofs) + object.details = "inspectDetails"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.jobTriggerName != null && message.hasOwnProperty("jobTriggerName")) + object.jobTriggerName = message.jobTriggerName; + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.privacy.dlp.v2.Error.toObject(message.errors[j], options); + } + if (message.actionDetails && message.actionDetails.length) { + object.actionDetails = []; + for (var j = 0; j < message.actionDetails.length; ++j) + object.actionDetails[j] = $root.google.privacy.dlp.v2.ActionDetails.toObject(message.actionDetails[j], options); + } + if (message.lastModified != null && message.hasOwnProperty("lastModified")) + object.lastModified = $root.google.protobuf.Timestamp.toObject(message.lastModified, options); + return object; + }; + + /** + * Converts this DlpJob to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DlpJob + * @instance + * @returns {Object.} JSON object + */ + DlpJob.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DlpJob + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DlpJob + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DlpJob.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DlpJob"; + }; + + /** + * JobState enum. + * @name google.privacy.dlp.v2.DlpJob.JobState + * @enum {number} + * @property {number} JOB_STATE_UNSPECIFIED=0 JOB_STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} RUNNING=2 RUNNING value + * @property {number} DONE=3 DONE value + * @property {number} CANCELED=4 CANCELED value + * @property {number} FAILED=5 FAILED value + * @property {number} ACTIVE=6 ACTIVE value + */ + DlpJob.JobState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JOB_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "DONE"] = 3; + values[valuesById[4] = "CANCELED"] = 4; + values[valuesById[5] = "FAILED"] = 5; + values[valuesById[6] = "ACTIVE"] = 6; + return values; + })(); + + return DlpJob; + })(); + + v2.GetDlpJobRequest = (function() { + + /** + * Properties of a GetDlpJobRequest. + * @memberof google.privacy.dlp.v2 + * @interface IGetDlpJobRequest + * @property {string|null} [name] GetDlpJobRequest name + */ + + /** + * Constructs a new GetDlpJobRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a GetDlpJobRequest. + * @implements IGetDlpJobRequest + * @constructor + * @param {google.privacy.dlp.v2.IGetDlpJobRequest=} [properties] Properties to set + */ + function GetDlpJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDlpJobRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.GetDlpJobRequest + * @instance + */ + GetDlpJobRequest.prototype.name = ""; + + /** + * Creates a new GetDlpJobRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.GetDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.IGetDlpJobRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.GetDlpJobRequest} GetDlpJobRequest instance + */ + GetDlpJobRequest.create = function create(properties) { + return new GetDlpJobRequest(properties); + }; + + /** + * Encodes the specified GetDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetDlpJobRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.GetDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.IGetDlpJobRequest} message GetDlpJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDlpJobRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetDlpJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.GetDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.IGetDlpJobRequest} message GetDlpJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDlpJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDlpJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.GetDlpJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.GetDlpJobRequest} GetDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDlpJobRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.GetDlpJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetDlpJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.GetDlpJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.GetDlpJobRequest} GetDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDlpJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDlpJobRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.GetDlpJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDlpJobRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetDlpJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.GetDlpJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.GetDlpJobRequest} GetDlpJobRequest + */ + GetDlpJobRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.GetDlpJobRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.GetDlpJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDlpJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.GetDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.GetDlpJobRequest} message GetDlpJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDlpJobRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetDlpJobRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.GetDlpJobRequest + * @instance + * @returns {Object.} JSON object + */ + GetDlpJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDlpJobRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.GetDlpJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDlpJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.GetDlpJobRequest"; + }; + + return GetDlpJobRequest; + })(); + + v2.ListDlpJobsRequest = (function() { + + /** + * Properties of a ListDlpJobsRequest. + * @memberof google.privacy.dlp.v2 + * @interface IListDlpJobsRequest + * @property {string|null} [parent] ListDlpJobsRequest parent + * @property {string|null} [filter] ListDlpJobsRequest filter + * @property {number|null} [pageSize] ListDlpJobsRequest pageSize + * @property {string|null} [pageToken] ListDlpJobsRequest pageToken + * @property {google.privacy.dlp.v2.DlpJobType|null} [type] ListDlpJobsRequest type + * @property {string|null} [orderBy] ListDlpJobsRequest orderBy + * @property {string|null} [locationId] ListDlpJobsRequest locationId + */ + + /** + * Constructs a new ListDlpJobsRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListDlpJobsRequest. + * @implements IListDlpJobsRequest + * @constructor + * @param {google.privacy.dlp.v2.IListDlpJobsRequest=} [properties] Properties to set + */ + function ListDlpJobsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDlpJobsRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @instance + */ + ListDlpJobsRequest.prototype.parent = ""; + + /** + * ListDlpJobsRequest filter. + * @member {string} filter + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @instance + */ + ListDlpJobsRequest.prototype.filter = ""; + + /** + * ListDlpJobsRequest pageSize. + * @member {number} pageSize + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @instance + */ + ListDlpJobsRequest.prototype.pageSize = 0; + + /** + * ListDlpJobsRequest pageToken. + * @member {string} pageToken + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @instance + */ + ListDlpJobsRequest.prototype.pageToken = ""; + + /** + * ListDlpJobsRequest type. + * @member {google.privacy.dlp.v2.DlpJobType} type + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @instance + */ + ListDlpJobsRequest.prototype.type = 0; + + /** + * ListDlpJobsRequest orderBy. + * @member {string} orderBy + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @instance + */ + ListDlpJobsRequest.prototype.orderBy = ""; + + /** + * ListDlpJobsRequest locationId. + * @member {string} locationId + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @instance + */ + ListDlpJobsRequest.prototype.locationId = ""; + + /** + * Creates a new ListDlpJobsRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @static + * @param {google.privacy.dlp.v2.IListDlpJobsRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListDlpJobsRequest} ListDlpJobsRequest instance + */ + ListDlpJobsRequest.create = function create(properties) { + return new ListDlpJobsRequest(properties); + }; + + /** + * Encodes the specified ListDlpJobsRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListDlpJobsRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @static + * @param {google.privacy.dlp.v2.IListDlpJobsRequest} message ListDlpJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDlpJobsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.orderBy); + if (message.locationId != null && Object.hasOwnProperty.call(message, "locationId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.locationId); + return writer; + }; + + /** + * Encodes the specified ListDlpJobsRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListDlpJobsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @static + * @param {google.privacy.dlp.v2.IListDlpJobsRequest} message ListDlpJobsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDlpJobsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDlpJobsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ListDlpJobsRequest} ListDlpJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDlpJobsRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListDlpJobsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.parent = reader.string(); + break; + } + case 1: { + message.filter = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.orderBy = reader.string(); + break; + } + case 7: { + message.locationId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListDlpJobsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListDlpJobsRequest} ListDlpJobsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDlpJobsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDlpJobsRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDlpJobsRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; + return null; + }; + + /** + * Creates a ListDlpJobsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListDlpJobsRequest} ListDlpJobsRequest + */ + ListDlpJobsRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ListDlpJobsRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ListDlpJobsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "DLP_JOB_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "INSPECT_JOB": + case 1: + message.type = 1; + break; + case "RISK_ANALYSIS_JOB": + case 2: + message.type = 2; + break; + } + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.locationId != null) + message.locationId = String(object.locationId); + return message; + }; + + /** + * Creates a plain object from a ListDlpJobsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @static + * @param {google.privacy.dlp.v2.ListDlpJobsRequest} message ListDlpJobsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDlpJobsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + object.parent = ""; + object.type = options.enums === String ? "DLP_JOB_TYPE_UNSPECIFIED" : 0; + object.orderBy = ""; + object.locationId = ""; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.privacy.dlp.v2.DlpJobType[message.type] === undefined ? message.type : $root.google.privacy.dlp.v2.DlpJobType[message.type] : message.type; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; + return object; + }; + + /** + * Converts this ListDlpJobsRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @instance + * @returns {Object.} JSON object + */ + ListDlpJobsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDlpJobsRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ListDlpJobsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDlpJobsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ListDlpJobsRequest"; + }; + + return ListDlpJobsRequest; + })(); + + v2.ListDlpJobsResponse = (function() { + + /** + * Properties of a ListDlpJobsResponse. + * @memberof google.privacy.dlp.v2 + * @interface IListDlpJobsResponse + * @property {Array.|null} [jobs] ListDlpJobsResponse jobs + * @property {string|null} [nextPageToken] ListDlpJobsResponse nextPageToken + */ + + /** + * Constructs a new ListDlpJobsResponse. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListDlpJobsResponse. + * @implements IListDlpJobsResponse + * @constructor + * @param {google.privacy.dlp.v2.IListDlpJobsResponse=} [properties] Properties to set + */ + function ListDlpJobsResponse(properties) { + this.jobs = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDlpJobsResponse jobs. + * @member {Array.} jobs + * @memberof google.privacy.dlp.v2.ListDlpJobsResponse + * @instance + */ + ListDlpJobsResponse.prototype.jobs = $util.emptyArray; + + /** + * ListDlpJobsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.privacy.dlp.v2.ListDlpJobsResponse + * @instance + */ + ListDlpJobsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListDlpJobsResponse instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListDlpJobsResponse + * @static + * @param {google.privacy.dlp.v2.IListDlpJobsResponse=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListDlpJobsResponse} ListDlpJobsResponse instance + */ + ListDlpJobsResponse.create = function create(properties) { + return new ListDlpJobsResponse(properties); + }; + + /** + * Encodes the specified ListDlpJobsResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListDlpJobsResponse.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListDlpJobsResponse + * @static + * @param {google.privacy.dlp.v2.IListDlpJobsResponse} message ListDlpJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDlpJobsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.jobs != null && message.jobs.length) + for (var i = 0; i < message.jobs.length; ++i) + $root.google.privacy.dlp.v2.DlpJob.encode(message.jobs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListDlpJobsResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListDlpJobsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListDlpJobsResponse + * @static + * @param {google.privacy.dlp.v2.IListDlpJobsResponse} message ListDlpJobsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDlpJobsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDlpJobsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListDlpJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ListDlpJobsResponse} ListDlpJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDlpJobsResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListDlpJobsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.jobs && message.jobs.length)) + message.jobs = []; + message.jobs.push($root.google.privacy.dlp.v2.DlpJob.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListDlpJobsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListDlpJobsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListDlpJobsResponse} ListDlpJobsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDlpJobsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDlpJobsResponse message. + * @function verify + * @memberof google.privacy.dlp.v2.ListDlpJobsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDlpJobsResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.jobs != null && message.hasOwnProperty("jobs")) { + if (!Array.isArray(message.jobs)) + return "jobs: array expected"; + for (var i = 0; i < message.jobs.length; ++i) { + var error = $root.google.privacy.dlp.v2.DlpJob.verify(message.jobs[i], long + 1); + if (error) + return "jobs." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListDlpJobsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListDlpJobsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListDlpJobsResponse} ListDlpJobsResponse + */ + ListDlpJobsResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ListDlpJobsResponse) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ListDlpJobsResponse(); + if (object.jobs) { + if (!Array.isArray(object.jobs)) + throw TypeError(".google.privacy.dlp.v2.ListDlpJobsResponse.jobs: array expected"); + message.jobs = []; + for (var i = 0; i < object.jobs.length; ++i) { + if (typeof object.jobs[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.ListDlpJobsResponse.jobs: object expected"); + message.jobs[i] = $root.google.privacy.dlp.v2.DlpJob.fromObject(object.jobs[i], long + 1); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListDlpJobsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListDlpJobsResponse + * @static + * @param {google.privacy.dlp.v2.ListDlpJobsResponse} message ListDlpJobsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDlpJobsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.jobs = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.jobs && message.jobs.length) { + object.jobs = []; + for (var j = 0; j < message.jobs.length; ++j) + object.jobs[j] = $root.google.privacy.dlp.v2.DlpJob.toObject(message.jobs[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListDlpJobsResponse to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListDlpJobsResponse + * @instance + * @returns {Object.} JSON object + */ + ListDlpJobsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDlpJobsResponse + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ListDlpJobsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDlpJobsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ListDlpJobsResponse"; + }; + + return ListDlpJobsResponse; + })(); + + v2.CancelDlpJobRequest = (function() { + + /** + * Properties of a CancelDlpJobRequest. + * @memberof google.privacy.dlp.v2 + * @interface ICancelDlpJobRequest + * @property {string|null} [name] CancelDlpJobRequest name + */ + + /** + * Constructs a new CancelDlpJobRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CancelDlpJobRequest. + * @implements ICancelDlpJobRequest + * @constructor + * @param {google.privacy.dlp.v2.ICancelDlpJobRequest=} [properties] Properties to set + */ + function CancelDlpJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelDlpJobRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.CancelDlpJobRequest + * @instance + */ + CancelDlpJobRequest.prototype.name = ""; + + /** + * Creates a new CancelDlpJobRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CancelDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.ICancelDlpJobRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CancelDlpJobRequest} CancelDlpJobRequest instance + */ + CancelDlpJobRequest.create = function create(properties) { + return new CancelDlpJobRequest(properties); + }; + + /** + * Encodes the specified CancelDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.CancelDlpJobRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CancelDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.ICancelDlpJobRequest} message CancelDlpJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelDlpJobRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified CancelDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CancelDlpJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CancelDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.ICancelDlpJobRequest} message CancelDlpJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelDlpJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelDlpJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CancelDlpJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CancelDlpJobRequest} CancelDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelDlpJobRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CancelDlpJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CancelDlpJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CancelDlpJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CancelDlpJobRequest} CancelDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelDlpJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelDlpJobRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.CancelDlpJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelDlpJobRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a CancelDlpJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CancelDlpJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CancelDlpJobRequest} CancelDlpJobRequest + */ + CancelDlpJobRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CancelDlpJobRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CancelDlpJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a CancelDlpJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CancelDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.CancelDlpJobRequest} message CancelDlpJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelDlpJobRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this CancelDlpJobRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CancelDlpJobRequest + * @instance + * @returns {Object.} JSON object + */ + CancelDlpJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelDlpJobRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CancelDlpJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelDlpJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CancelDlpJobRequest"; + }; + + return CancelDlpJobRequest; + })(); + + v2.FinishDlpJobRequest = (function() { + + /** + * Properties of a FinishDlpJobRequest. + * @memberof google.privacy.dlp.v2 + * @interface IFinishDlpJobRequest + * @property {string|null} [name] FinishDlpJobRequest name + */ + + /** + * Constructs a new FinishDlpJobRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a FinishDlpJobRequest. + * @implements IFinishDlpJobRequest + * @constructor + * @param {google.privacy.dlp.v2.IFinishDlpJobRequest=} [properties] Properties to set + */ + function FinishDlpJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FinishDlpJobRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.FinishDlpJobRequest + * @instance + */ + FinishDlpJobRequest.prototype.name = ""; + + /** + * Creates a new FinishDlpJobRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.FinishDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.IFinishDlpJobRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.FinishDlpJobRequest} FinishDlpJobRequest instance + */ + FinishDlpJobRequest.create = function create(properties) { + return new FinishDlpJobRequest(properties); + }; + + /** + * Encodes the specified FinishDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.FinishDlpJobRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.FinishDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.IFinishDlpJobRequest} message FinishDlpJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FinishDlpJobRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified FinishDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FinishDlpJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.FinishDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.IFinishDlpJobRequest} message FinishDlpJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FinishDlpJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FinishDlpJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.FinishDlpJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.FinishDlpJobRequest} FinishDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FinishDlpJobRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.FinishDlpJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FinishDlpJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.FinishDlpJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.FinishDlpJobRequest} FinishDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FinishDlpJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FinishDlpJobRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.FinishDlpJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FinishDlpJobRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a FinishDlpJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.FinishDlpJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.FinishDlpJobRequest} FinishDlpJobRequest + */ + FinishDlpJobRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.FinishDlpJobRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.FinishDlpJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a FinishDlpJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.FinishDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.FinishDlpJobRequest} message FinishDlpJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FinishDlpJobRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this FinishDlpJobRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.FinishDlpJobRequest + * @instance + * @returns {Object.} JSON object + */ + FinishDlpJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FinishDlpJobRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.FinishDlpJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FinishDlpJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.FinishDlpJobRequest"; + }; + + return FinishDlpJobRequest; + })(); + + v2.DeleteDlpJobRequest = (function() { + + /** + * Properties of a DeleteDlpJobRequest. + * @memberof google.privacy.dlp.v2 + * @interface IDeleteDlpJobRequest + * @property {string|null} [name] DeleteDlpJobRequest name + */ + + /** + * Constructs a new DeleteDlpJobRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DeleteDlpJobRequest. + * @implements IDeleteDlpJobRequest + * @constructor + * @param {google.privacy.dlp.v2.IDeleteDlpJobRequest=} [properties] Properties to set + */ + function DeleteDlpJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteDlpJobRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest + * @instance + */ + DeleteDlpJobRequest.prototype.name = ""; + + /** + * Creates a new DeleteDlpJobRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteDlpJobRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DeleteDlpJobRequest} DeleteDlpJobRequest instance + */ + DeleteDlpJobRequest.create = function create(properties) { + return new DeleteDlpJobRequest(properties); + }; + + /** + * Encodes the specified DeleteDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteDlpJobRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteDlpJobRequest} message DeleteDlpJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDlpJobRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteDlpJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteDlpJobRequest} message DeleteDlpJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDlpJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteDlpJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DeleteDlpJobRequest} DeleteDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDlpJobRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DeleteDlpJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteDlpJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DeleteDlpJobRequest} DeleteDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDlpJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteDlpJobRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteDlpJobRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteDlpJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DeleteDlpJobRequest} DeleteDlpJobRequest + */ + DeleteDlpJobRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DeleteDlpJobRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DeleteDlpJobRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteDlpJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.DeleteDlpJobRequest} message DeleteDlpJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteDlpJobRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteDlpJobRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteDlpJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteDlpJobRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DeleteDlpJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteDlpJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DeleteDlpJobRequest"; + }; + + return DeleteDlpJobRequest; + })(); + + v2.CreateDeidentifyTemplateRequest = (function() { + + /** + * Properties of a CreateDeidentifyTemplateRequest. + * @memberof google.privacy.dlp.v2 + * @interface ICreateDeidentifyTemplateRequest + * @property {string|null} [parent] CreateDeidentifyTemplateRequest parent + * @property {google.privacy.dlp.v2.IDeidentifyTemplate|null} [deidentifyTemplate] CreateDeidentifyTemplateRequest deidentifyTemplate + * @property {string|null} [templateId] CreateDeidentifyTemplateRequest templateId + * @property {string|null} [locationId] CreateDeidentifyTemplateRequest locationId + */ + + /** + * Constructs a new CreateDeidentifyTemplateRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CreateDeidentifyTemplateRequest. + * @implements ICreateDeidentifyTemplateRequest + * @constructor + * @param {google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest=} [properties] Properties to set + */ + function CreateDeidentifyTemplateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateDeidentifyTemplateRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @instance + */ + CreateDeidentifyTemplateRequest.prototype.parent = ""; + + /** + * CreateDeidentifyTemplateRequest deidentifyTemplate. + * @member {google.privacy.dlp.v2.IDeidentifyTemplate|null|undefined} deidentifyTemplate + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @instance + */ + CreateDeidentifyTemplateRequest.prototype.deidentifyTemplate = null; + + /** + * CreateDeidentifyTemplateRequest templateId. + * @member {string} templateId + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @instance + */ + CreateDeidentifyTemplateRequest.prototype.templateId = ""; + + /** + * CreateDeidentifyTemplateRequest locationId. + * @member {string} locationId + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @instance + */ + CreateDeidentifyTemplateRequest.prototype.locationId = ""; + + /** + * Creates a new CreateDeidentifyTemplateRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @static + * @param {google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CreateDeidentifyTemplateRequest} CreateDeidentifyTemplateRequest instance + */ + CreateDeidentifyTemplateRequest.create = function create(properties) { + return new CreateDeidentifyTemplateRequest(properties); + }; + + /** + * Encodes the specified CreateDeidentifyTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @static + * @param {google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest} message CreateDeidentifyTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDeidentifyTemplateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.deidentifyTemplate != null && Object.hasOwnProperty.call(message, "deidentifyTemplate")) + $root.google.privacy.dlp.v2.DeidentifyTemplate.encode(message.deidentifyTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.templateId != null && Object.hasOwnProperty.call(message, "templateId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.templateId); + if (message.locationId != null && Object.hasOwnProperty.call(message, "locationId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.locationId); + return writer; + }; + + /** + * Encodes the specified CreateDeidentifyTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @static + * @param {google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest} message CreateDeidentifyTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateDeidentifyTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateDeidentifyTemplateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CreateDeidentifyTemplateRequest} CreateDeidentifyTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDeidentifyTemplateRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.deidentifyTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.templateId = reader.string(); + break; + } + case 4: { + message.locationId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CreateDeidentifyTemplateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CreateDeidentifyTemplateRequest} CreateDeidentifyTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateDeidentifyTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateDeidentifyTemplateRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateDeidentifyTemplateRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) { + var error = $root.google.privacy.dlp.v2.DeidentifyTemplate.verify(message.deidentifyTemplate, long + 1); + if (error) + return "deidentifyTemplate." + error; + } + if (message.templateId != null && message.hasOwnProperty("templateId")) + if (!$util.isString(message.templateId)) + return "templateId: string expected"; + if (message.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; + return null; + }; + + /** + * Creates a CreateDeidentifyTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CreateDeidentifyTemplateRequest} CreateDeidentifyTemplateRequest + */ + CreateDeidentifyTemplateRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.deidentifyTemplate != null) { + if (typeof object.deidentifyTemplate !== "object") + throw TypeError(".google.privacy.dlp.v2.CreateDeidentifyTemplateRequest.deidentifyTemplate: object expected"); + message.deidentifyTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.fromObject(object.deidentifyTemplate, long + 1); + } + if (object.templateId != null) + message.templateId = String(object.templateId); + if (object.locationId != null) + message.locationId = String(object.locationId); + return message; + }; + + /** + * Creates a plain object from a CreateDeidentifyTemplateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @static + * @param {google.privacy.dlp.v2.CreateDeidentifyTemplateRequest} message CreateDeidentifyTemplateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateDeidentifyTemplateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.deidentifyTemplate = null; + object.templateId = ""; + object.locationId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) + object.deidentifyTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.toObject(message.deidentifyTemplate, options); + if (message.templateId != null && message.hasOwnProperty("templateId")) + object.templateId = message.templateId; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; + return object; + }; + + /** + * Converts this CreateDeidentifyTemplateRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @instance + * @returns {Object.} JSON object + */ + CreateDeidentifyTemplateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateDeidentifyTemplateRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CreateDeidentifyTemplateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateDeidentifyTemplateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CreateDeidentifyTemplateRequest"; + }; + + return CreateDeidentifyTemplateRequest; + })(); + + v2.UpdateDeidentifyTemplateRequest = (function() { + + /** + * Properties of an UpdateDeidentifyTemplateRequest. + * @memberof google.privacy.dlp.v2 + * @interface IUpdateDeidentifyTemplateRequest + * @property {string|null} [name] UpdateDeidentifyTemplateRequest name + * @property {google.privacy.dlp.v2.IDeidentifyTemplate|null} [deidentifyTemplate] UpdateDeidentifyTemplateRequest deidentifyTemplate + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateDeidentifyTemplateRequest updateMask + */ + + /** + * Constructs a new UpdateDeidentifyTemplateRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an UpdateDeidentifyTemplateRequest. + * @implements IUpdateDeidentifyTemplateRequest + * @constructor + * @param {google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest=} [properties] Properties to set + */ + function UpdateDeidentifyTemplateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateDeidentifyTemplateRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest + * @instance + */ + UpdateDeidentifyTemplateRequest.prototype.name = ""; + + /** + * UpdateDeidentifyTemplateRequest deidentifyTemplate. + * @member {google.privacy.dlp.v2.IDeidentifyTemplate|null|undefined} deidentifyTemplate + * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest + * @instance + */ + UpdateDeidentifyTemplateRequest.prototype.deidentifyTemplate = null; + + /** + * UpdateDeidentifyTemplateRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest + * @instance + */ + UpdateDeidentifyTemplateRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateDeidentifyTemplateRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest + * @static + * @param {google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest} UpdateDeidentifyTemplateRequest instance + */ + UpdateDeidentifyTemplateRequest.create = function create(properties) { + return new UpdateDeidentifyTemplateRequest(properties); + }; + + /** + * Encodes the specified UpdateDeidentifyTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest + * @static + * @param {google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest} message UpdateDeidentifyTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDeidentifyTemplateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.deidentifyTemplate != null && Object.hasOwnProperty.call(message, "deidentifyTemplate")) + $root.google.privacy.dlp.v2.DeidentifyTemplate.encode(message.deidentifyTemplate, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateDeidentifyTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest + * @static + * @param {google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest} message UpdateDeidentifyTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateDeidentifyTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateDeidentifyTemplateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest} UpdateDeidentifyTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDeidentifyTemplateRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.deidentifyTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateDeidentifyTemplateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest} UpdateDeidentifyTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateDeidentifyTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateDeidentifyTemplateRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateDeidentifyTemplateRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) { + var error = $root.google.privacy.dlp.v2.DeidentifyTemplate.verify(message.deidentifyTemplate, long + 1); + if (error) + return "deidentifyTemplate." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateDeidentifyTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest} UpdateDeidentifyTemplateRequest + */ + UpdateDeidentifyTemplateRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.deidentifyTemplate != null) { + if (typeof object.deidentifyTemplate !== "object") + throw TypeError(".google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.deidentifyTemplate: object expected"); + message.deidentifyTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.fromObject(object.deidentifyTemplate, long + 1); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an UpdateDeidentifyTemplateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest + * @static + * @param {google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest} message UpdateDeidentifyTemplateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateDeidentifyTemplateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.deidentifyTemplate = null; + object.updateMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.deidentifyTemplate != null && message.hasOwnProperty("deidentifyTemplate")) + object.deidentifyTemplate = $root.google.privacy.dlp.v2.DeidentifyTemplate.toObject(message.deidentifyTemplate, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateDeidentifyTemplateRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateDeidentifyTemplateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateDeidentifyTemplateRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateDeidentifyTemplateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest"; + }; + + return UpdateDeidentifyTemplateRequest; + })(); + + v2.GetDeidentifyTemplateRequest = (function() { + + /** + * Properties of a GetDeidentifyTemplateRequest. + * @memberof google.privacy.dlp.v2 + * @interface IGetDeidentifyTemplateRequest + * @property {string|null} [name] GetDeidentifyTemplateRequest name + */ + + /** + * Constructs a new GetDeidentifyTemplateRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a GetDeidentifyTemplateRequest. + * @implements IGetDeidentifyTemplateRequest + * @constructor + * @param {google.privacy.dlp.v2.IGetDeidentifyTemplateRequest=} [properties] Properties to set + */ + function GetDeidentifyTemplateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetDeidentifyTemplateRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest + * @instance + */ + GetDeidentifyTemplateRequest.prototype.name = ""; + + /** + * Creates a new GetDeidentifyTemplateRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest + * @static + * @param {google.privacy.dlp.v2.IGetDeidentifyTemplateRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.GetDeidentifyTemplateRequest} GetDeidentifyTemplateRequest instance + */ + GetDeidentifyTemplateRequest.create = function create(properties) { + return new GetDeidentifyTemplateRequest(properties); + }; + + /** + * Encodes the specified GetDeidentifyTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetDeidentifyTemplateRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest + * @static + * @param {google.privacy.dlp.v2.IGetDeidentifyTemplateRequest} message GetDeidentifyTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDeidentifyTemplateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetDeidentifyTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetDeidentifyTemplateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest + * @static + * @param {google.privacy.dlp.v2.IGetDeidentifyTemplateRequest} message GetDeidentifyTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetDeidentifyTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetDeidentifyTemplateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.GetDeidentifyTemplateRequest} GetDeidentifyTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDeidentifyTemplateRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.GetDeidentifyTemplateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetDeidentifyTemplateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.GetDeidentifyTemplateRequest} GetDeidentifyTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetDeidentifyTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetDeidentifyTemplateRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetDeidentifyTemplateRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetDeidentifyTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.GetDeidentifyTemplateRequest} GetDeidentifyTemplateRequest + */ + GetDeidentifyTemplateRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.GetDeidentifyTemplateRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.GetDeidentifyTemplateRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetDeidentifyTemplateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest + * @static + * @param {google.privacy.dlp.v2.GetDeidentifyTemplateRequest} message GetDeidentifyTemplateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetDeidentifyTemplateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetDeidentifyTemplateRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest + * @instance + * @returns {Object.} JSON object + */ + GetDeidentifyTemplateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetDeidentifyTemplateRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.GetDeidentifyTemplateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetDeidentifyTemplateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.GetDeidentifyTemplateRequest"; + }; + + return GetDeidentifyTemplateRequest; + })(); + + v2.ListDeidentifyTemplatesRequest = (function() { + + /** + * Properties of a ListDeidentifyTemplatesRequest. + * @memberof google.privacy.dlp.v2 + * @interface IListDeidentifyTemplatesRequest + * @property {string|null} [parent] ListDeidentifyTemplatesRequest parent + * @property {string|null} [pageToken] ListDeidentifyTemplatesRequest pageToken + * @property {number|null} [pageSize] ListDeidentifyTemplatesRequest pageSize + * @property {string|null} [orderBy] ListDeidentifyTemplatesRequest orderBy + * @property {string|null} [locationId] ListDeidentifyTemplatesRequest locationId + */ + + /** + * Constructs a new ListDeidentifyTemplatesRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListDeidentifyTemplatesRequest. + * @implements IListDeidentifyTemplatesRequest + * @constructor + * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesRequest=} [properties] Properties to set + */ + function ListDeidentifyTemplatesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDeidentifyTemplatesRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @instance + */ + ListDeidentifyTemplatesRequest.prototype.parent = ""; + + /** + * ListDeidentifyTemplatesRequest pageToken. + * @member {string} pageToken + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @instance + */ + ListDeidentifyTemplatesRequest.prototype.pageToken = ""; + + /** + * ListDeidentifyTemplatesRequest pageSize. + * @member {number} pageSize + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @instance + */ + ListDeidentifyTemplatesRequest.prototype.pageSize = 0; + + /** + * ListDeidentifyTemplatesRequest orderBy. + * @member {string} orderBy + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @instance + */ + ListDeidentifyTemplatesRequest.prototype.orderBy = ""; + + /** + * ListDeidentifyTemplatesRequest locationId. + * @member {string} locationId + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @instance + */ + ListDeidentifyTemplatesRequest.prototype.locationId = ""; + + /** + * Creates a new ListDeidentifyTemplatesRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @static + * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListDeidentifyTemplatesRequest} ListDeidentifyTemplatesRequest instance + */ + ListDeidentifyTemplatesRequest.create = function create(properties) { + return new ListDeidentifyTemplatesRequest(properties); + }; + + /** + * Encodes the specified ListDeidentifyTemplatesRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @static + * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesRequest} message ListDeidentifyTemplatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeidentifyTemplatesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.locationId != null && Object.hasOwnProperty.call(message, "locationId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.locationId); + return writer; + }; + + /** + * Encodes the specified ListDeidentifyTemplatesRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListDeidentifyTemplatesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @static + * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesRequest} message ListDeidentifyTemplatesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeidentifyTemplatesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDeidentifyTemplatesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ListDeidentifyTemplatesRequest} ListDeidentifyTemplatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeidentifyTemplatesRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.locationId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListDeidentifyTemplatesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListDeidentifyTemplatesRequest} ListDeidentifyTemplatesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeidentifyTemplatesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDeidentifyTemplatesRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDeidentifyTemplatesRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; + return null; + }; + + /** + * Creates a ListDeidentifyTemplatesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListDeidentifyTemplatesRequest} ListDeidentifyTemplatesRequest + */ + ListDeidentifyTemplatesRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.locationId != null) + message.locationId = String(object.locationId); + return message; + }; + + /** + * Creates a plain object from a ListDeidentifyTemplatesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @static + * @param {google.privacy.dlp.v2.ListDeidentifyTemplatesRequest} message ListDeidentifyTemplatesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDeidentifyTemplatesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + object.orderBy = ""; + object.locationId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; + return object; + }; + + /** + * Converts this ListDeidentifyTemplatesRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @instance + * @returns {Object.} JSON object + */ + ListDeidentifyTemplatesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDeidentifyTemplatesRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDeidentifyTemplatesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ListDeidentifyTemplatesRequest"; + }; + + return ListDeidentifyTemplatesRequest; + })(); + + v2.ListDeidentifyTemplatesResponse = (function() { + + /** + * Properties of a ListDeidentifyTemplatesResponse. + * @memberof google.privacy.dlp.v2 + * @interface IListDeidentifyTemplatesResponse + * @property {Array.|null} [deidentifyTemplates] ListDeidentifyTemplatesResponse deidentifyTemplates + * @property {string|null} [nextPageToken] ListDeidentifyTemplatesResponse nextPageToken + */ + + /** + * Constructs a new ListDeidentifyTemplatesResponse. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListDeidentifyTemplatesResponse. + * @implements IListDeidentifyTemplatesResponse + * @constructor + * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesResponse=} [properties] Properties to set + */ + function ListDeidentifyTemplatesResponse(properties) { + this.deidentifyTemplates = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListDeidentifyTemplatesResponse deidentifyTemplates. + * @member {Array.} deidentifyTemplates + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse + * @instance + */ + ListDeidentifyTemplatesResponse.prototype.deidentifyTemplates = $util.emptyArray; + + /** + * ListDeidentifyTemplatesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse + * @instance + */ + ListDeidentifyTemplatesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListDeidentifyTemplatesResponse instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse + * @static + * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesResponse=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListDeidentifyTemplatesResponse} ListDeidentifyTemplatesResponse instance + */ + ListDeidentifyTemplatesResponse.create = function create(properties) { + return new ListDeidentifyTemplatesResponse(properties); + }; + + /** + * Encodes the specified ListDeidentifyTemplatesResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse + * @static + * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesResponse} message ListDeidentifyTemplatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeidentifyTemplatesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deidentifyTemplates != null && message.deidentifyTemplates.length) + for (var i = 0; i < message.deidentifyTemplates.length; ++i) + $root.google.privacy.dlp.v2.DeidentifyTemplate.encode(message.deidentifyTemplates[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListDeidentifyTemplatesResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse + * @static + * @param {google.privacy.dlp.v2.IListDeidentifyTemplatesResponse} message ListDeidentifyTemplatesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListDeidentifyTemplatesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListDeidentifyTemplatesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ListDeidentifyTemplatesResponse} ListDeidentifyTemplatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeidentifyTemplatesResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.deidentifyTemplates && message.deidentifyTemplates.length)) + message.deidentifyTemplates = []; + message.deidentifyTemplates.push($root.google.privacy.dlp.v2.DeidentifyTemplate.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListDeidentifyTemplatesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListDeidentifyTemplatesResponse} ListDeidentifyTemplatesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListDeidentifyTemplatesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListDeidentifyTemplatesResponse message. + * @function verify + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListDeidentifyTemplatesResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.deidentifyTemplates != null && message.hasOwnProperty("deidentifyTemplates")) { + if (!Array.isArray(message.deidentifyTemplates)) + return "deidentifyTemplates: array expected"; + for (var i = 0; i < message.deidentifyTemplates.length; ++i) { + var error = $root.google.privacy.dlp.v2.DeidentifyTemplate.verify(message.deidentifyTemplates[i], long + 1); + if (error) + return "deidentifyTemplates." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListDeidentifyTemplatesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListDeidentifyTemplatesResponse} ListDeidentifyTemplatesResponse + */ + ListDeidentifyTemplatesResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ListDeidentifyTemplatesResponse(); + if (object.deidentifyTemplates) { + if (!Array.isArray(object.deidentifyTemplates)) + throw TypeError(".google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.deidentifyTemplates: array expected"); + message.deidentifyTemplates = []; + for (var i = 0; i < object.deidentifyTemplates.length; ++i) { + if (typeof object.deidentifyTemplates[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.ListDeidentifyTemplatesResponse.deidentifyTemplates: object expected"); + message.deidentifyTemplates[i] = $root.google.privacy.dlp.v2.DeidentifyTemplate.fromObject(object.deidentifyTemplates[i], long + 1); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListDeidentifyTemplatesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse + * @static + * @param {google.privacy.dlp.v2.ListDeidentifyTemplatesResponse} message ListDeidentifyTemplatesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListDeidentifyTemplatesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.deidentifyTemplates = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.deidentifyTemplates && message.deidentifyTemplates.length) { + object.deidentifyTemplates = []; + for (var j = 0; j < message.deidentifyTemplates.length; ++j) + object.deidentifyTemplates[j] = $root.google.privacy.dlp.v2.DeidentifyTemplate.toObject(message.deidentifyTemplates[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListDeidentifyTemplatesResponse to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse + * @instance + * @returns {Object.} JSON object + */ + ListDeidentifyTemplatesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListDeidentifyTemplatesResponse + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ListDeidentifyTemplatesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListDeidentifyTemplatesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ListDeidentifyTemplatesResponse"; + }; + + return ListDeidentifyTemplatesResponse; + })(); + + v2.DeleteDeidentifyTemplateRequest = (function() { + + /** + * Properties of a DeleteDeidentifyTemplateRequest. + * @memberof google.privacy.dlp.v2 + * @interface IDeleteDeidentifyTemplateRequest + * @property {string|null} [name] DeleteDeidentifyTemplateRequest name + */ + + /** + * Constructs a new DeleteDeidentifyTemplateRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DeleteDeidentifyTemplateRequest. + * @implements IDeleteDeidentifyTemplateRequest + * @constructor + * @param {google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest=} [properties] Properties to set + */ + function DeleteDeidentifyTemplateRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteDeidentifyTemplateRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest + * @instance + */ + DeleteDeidentifyTemplateRequest.prototype.name = ""; + + /** + * Creates a new DeleteDeidentifyTemplateRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest} DeleteDeidentifyTemplateRequest instance + */ + DeleteDeidentifyTemplateRequest.create = function create(properties) { + return new DeleteDeidentifyTemplateRequest(properties); + }; + + /** + * Encodes the specified DeleteDeidentifyTemplateRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest} message DeleteDeidentifyTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDeidentifyTemplateRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteDeidentifyTemplateRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest} message DeleteDeidentifyTemplateRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteDeidentifyTemplateRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteDeidentifyTemplateRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest} DeleteDeidentifyTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDeidentifyTemplateRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteDeidentifyTemplateRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest} DeleteDeidentifyTemplateRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteDeidentifyTemplateRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteDeidentifyTemplateRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteDeidentifyTemplateRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteDeidentifyTemplateRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest} DeleteDeidentifyTemplateRequest + */ + DeleteDeidentifyTemplateRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteDeidentifyTemplateRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest + * @static + * @param {google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest} message DeleteDeidentifyTemplateRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteDeidentifyTemplateRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteDeidentifyTemplateRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteDeidentifyTemplateRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteDeidentifyTemplateRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteDeidentifyTemplateRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest"; + }; + + return DeleteDeidentifyTemplateRequest; + })(); + + v2.LargeCustomDictionaryConfig = (function() { + + /** + * Properties of a LargeCustomDictionaryConfig. + * @memberof google.privacy.dlp.v2 + * @interface ILargeCustomDictionaryConfig + * @property {google.privacy.dlp.v2.ICloudStoragePath|null} [outputPath] LargeCustomDictionaryConfig outputPath + * @property {google.privacy.dlp.v2.ICloudStorageFileSet|null} [cloudStorageFileSet] LargeCustomDictionaryConfig cloudStorageFileSet + * @property {google.privacy.dlp.v2.IBigQueryField|null} [bigQueryField] LargeCustomDictionaryConfig bigQueryField + */ + + /** + * Constructs a new LargeCustomDictionaryConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a LargeCustomDictionaryConfig. + * @implements ILargeCustomDictionaryConfig + * @constructor + * @param {google.privacy.dlp.v2.ILargeCustomDictionaryConfig=} [properties] Properties to set + */ + function LargeCustomDictionaryConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * LargeCustomDictionaryConfig outputPath. + * @member {google.privacy.dlp.v2.ICloudStoragePath|null|undefined} outputPath + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * @instance + */ + LargeCustomDictionaryConfig.prototype.outputPath = null; + + /** + * LargeCustomDictionaryConfig cloudStorageFileSet. + * @member {google.privacy.dlp.v2.ICloudStorageFileSet|null|undefined} cloudStorageFileSet + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * @instance + */ + LargeCustomDictionaryConfig.prototype.cloudStorageFileSet = null; + + /** + * LargeCustomDictionaryConfig bigQueryField. + * @member {google.privacy.dlp.v2.IBigQueryField|null|undefined} bigQueryField + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * @instance + */ + LargeCustomDictionaryConfig.prototype.bigQueryField = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LargeCustomDictionaryConfig source. + * @member {"cloudStorageFileSet"|"bigQueryField"|undefined} source + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * @instance + */ + Object.defineProperty(LargeCustomDictionaryConfig.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["cloudStorageFileSet", "bigQueryField"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LargeCustomDictionaryConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * @static + * @param {google.privacy.dlp.v2.ILargeCustomDictionaryConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.LargeCustomDictionaryConfig} LargeCustomDictionaryConfig instance + */ + LargeCustomDictionaryConfig.create = function create(properties) { + return new LargeCustomDictionaryConfig(properties); + }; + + /** + * Encodes the specified LargeCustomDictionaryConfig message. Does not implicitly {@link google.privacy.dlp.v2.LargeCustomDictionaryConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * @static + * @param {google.privacy.dlp.v2.ILargeCustomDictionaryConfig} message LargeCustomDictionaryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LargeCustomDictionaryConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.outputPath != null && Object.hasOwnProperty.call(message, "outputPath")) + $root.google.privacy.dlp.v2.CloudStoragePath.encode(message.outputPath, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.cloudStorageFileSet != null && Object.hasOwnProperty.call(message, "cloudStorageFileSet")) + $root.google.privacy.dlp.v2.CloudStorageFileSet.encode(message.cloudStorageFileSet, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.bigQueryField != null && Object.hasOwnProperty.call(message, "bigQueryField")) + $root.google.privacy.dlp.v2.BigQueryField.encode(message.bigQueryField, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LargeCustomDictionaryConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.LargeCustomDictionaryConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * @static + * @param {google.privacy.dlp.v2.ILargeCustomDictionaryConfig} message LargeCustomDictionaryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LargeCustomDictionaryConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LargeCustomDictionaryConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.LargeCustomDictionaryConfig} LargeCustomDictionaryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LargeCustomDictionaryConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.LargeCustomDictionaryConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.outputPath = $root.google.privacy.dlp.v2.CloudStoragePath.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.cloudStorageFileSet = $root.google.privacy.dlp.v2.CloudStorageFileSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.bigQueryField = $root.google.privacy.dlp.v2.BigQueryField.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a LargeCustomDictionaryConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.LargeCustomDictionaryConfig} LargeCustomDictionaryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LargeCustomDictionaryConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LargeCustomDictionaryConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LargeCustomDictionaryConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.outputPath != null && message.hasOwnProperty("outputPath")) { + var error = $root.google.privacy.dlp.v2.CloudStoragePath.verify(message.outputPath, long + 1); + if (error) + return "outputPath." + error; + } + if (message.cloudStorageFileSet != null && message.hasOwnProperty("cloudStorageFileSet")) { + properties.source = 1; + { + var error = $root.google.privacy.dlp.v2.CloudStorageFileSet.verify(message.cloudStorageFileSet, long + 1); + if (error) + return "cloudStorageFileSet." + error; + } + } + if (message.bigQueryField != null && message.hasOwnProperty("bigQueryField")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.privacy.dlp.v2.BigQueryField.verify(message.bigQueryField, long + 1); + if (error) + return "bigQueryField." + error; + } + } + return null; + }; + + /** + * Creates a LargeCustomDictionaryConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.LargeCustomDictionaryConfig} LargeCustomDictionaryConfig + */ + LargeCustomDictionaryConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.LargeCustomDictionaryConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.LargeCustomDictionaryConfig(); + if (object.outputPath != null) { + if (typeof object.outputPath !== "object") + throw TypeError(".google.privacy.dlp.v2.LargeCustomDictionaryConfig.outputPath: object expected"); + message.outputPath = $root.google.privacy.dlp.v2.CloudStoragePath.fromObject(object.outputPath, long + 1); + } + if (object.cloudStorageFileSet != null) { + if (typeof object.cloudStorageFileSet !== "object") + throw TypeError(".google.privacy.dlp.v2.LargeCustomDictionaryConfig.cloudStorageFileSet: object expected"); + message.cloudStorageFileSet = $root.google.privacy.dlp.v2.CloudStorageFileSet.fromObject(object.cloudStorageFileSet, long + 1); + } + if (object.bigQueryField != null) { + if (typeof object.bigQueryField !== "object") + throw TypeError(".google.privacy.dlp.v2.LargeCustomDictionaryConfig.bigQueryField: object expected"); + message.bigQueryField = $root.google.privacy.dlp.v2.BigQueryField.fromObject(object.bigQueryField, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a LargeCustomDictionaryConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * @static + * @param {google.privacy.dlp.v2.LargeCustomDictionaryConfig} message LargeCustomDictionaryConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LargeCustomDictionaryConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.outputPath = null; + if (message.outputPath != null && message.hasOwnProperty("outputPath")) + object.outputPath = $root.google.privacy.dlp.v2.CloudStoragePath.toObject(message.outputPath, options); + if (message.cloudStorageFileSet != null && message.hasOwnProperty("cloudStorageFileSet")) { + object.cloudStorageFileSet = $root.google.privacy.dlp.v2.CloudStorageFileSet.toObject(message.cloudStorageFileSet, options); + if (options.oneofs) + object.source = "cloudStorageFileSet"; + } + if (message.bigQueryField != null && message.hasOwnProperty("bigQueryField")) { + object.bigQueryField = $root.google.privacy.dlp.v2.BigQueryField.toObject(message.bigQueryField, options); + if (options.oneofs) + object.source = "bigQueryField"; + } + return object; + }; + + /** + * Converts this LargeCustomDictionaryConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * @instance + * @returns {Object.} JSON object + */ + LargeCustomDictionaryConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LargeCustomDictionaryConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LargeCustomDictionaryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.LargeCustomDictionaryConfig"; + }; + + return LargeCustomDictionaryConfig; + })(); + + v2.LargeCustomDictionaryStats = (function() { + + /** + * Properties of a LargeCustomDictionaryStats. + * @memberof google.privacy.dlp.v2 + * @interface ILargeCustomDictionaryStats + * @property {number|Long|null} [approxNumPhrases] LargeCustomDictionaryStats approxNumPhrases + */ + + /** + * Constructs a new LargeCustomDictionaryStats. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a LargeCustomDictionaryStats. + * @implements ILargeCustomDictionaryStats + * @constructor + * @param {google.privacy.dlp.v2.ILargeCustomDictionaryStats=} [properties] Properties to set + */ + function LargeCustomDictionaryStats(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * LargeCustomDictionaryStats approxNumPhrases. + * @member {number|Long} approxNumPhrases + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats + * @instance + */ + LargeCustomDictionaryStats.prototype.approxNumPhrases = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new LargeCustomDictionaryStats instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats + * @static + * @param {google.privacy.dlp.v2.ILargeCustomDictionaryStats=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.LargeCustomDictionaryStats} LargeCustomDictionaryStats instance + */ + LargeCustomDictionaryStats.create = function create(properties) { + return new LargeCustomDictionaryStats(properties); + }; + + /** + * Encodes the specified LargeCustomDictionaryStats message. Does not implicitly {@link google.privacy.dlp.v2.LargeCustomDictionaryStats.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats + * @static + * @param {google.privacy.dlp.v2.ILargeCustomDictionaryStats} message LargeCustomDictionaryStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LargeCustomDictionaryStats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.approxNumPhrases != null && Object.hasOwnProperty.call(message, "approxNumPhrases")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.approxNumPhrases); + return writer; + }; + + /** + * Encodes the specified LargeCustomDictionaryStats message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.LargeCustomDictionaryStats.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats + * @static + * @param {google.privacy.dlp.v2.ILargeCustomDictionaryStats} message LargeCustomDictionaryStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LargeCustomDictionaryStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LargeCustomDictionaryStats message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.LargeCustomDictionaryStats} LargeCustomDictionaryStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LargeCustomDictionaryStats.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.LargeCustomDictionaryStats(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.approxNumPhrases = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a LargeCustomDictionaryStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.LargeCustomDictionaryStats} LargeCustomDictionaryStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LargeCustomDictionaryStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LargeCustomDictionaryStats message. + * @function verify + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LargeCustomDictionaryStats.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.approxNumPhrases != null && message.hasOwnProperty("approxNumPhrases")) + if (!$util.isInteger(message.approxNumPhrases) && !(message.approxNumPhrases && $util.isInteger(message.approxNumPhrases.low) && $util.isInteger(message.approxNumPhrases.high))) + return "approxNumPhrases: integer|Long expected"; + return null; + }; + + /** + * Creates a LargeCustomDictionaryStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.LargeCustomDictionaryStats} LargeCustomDictionaryStats + */ + LargeCustomDictionaryStats.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.LargeCustomDictionaryStats) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.LargeCustomDictionaryStats(); + if (object.approxNumPhrases != null) + if ($util.Long) + (message.approxNumPhrases = $util.Long.fromValue(object.approxNumPhrases)).unsigned = false; + else if (typeof object.approxNumPhrases === "string") + message.approxNumPhrases = parseInt(object.approxNumPhrases, 10); + else if (typeof object.approxNumPhrases === "number") + message.approxNumPhrases = object.approxNumPhrases; + else if (typeof object.approxNumPhrases === "object") + message.approxNumPhrases = new $util.LongBits(object.approxNumPhrases.low >>> 0, object.approxNumPhrases.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a LargeCustomDictionaryStats message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats + * @static + * @param {google.privacy.dlp.v2.LargeCustomDictionaryStats} message LargeCustomDictionaryStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LargeCustomDictionaryStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.approxNumPhrases = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.approxNumPhrases = options.longs === String ? "0" : 0; + if (message.approxNumPhrases != null && message.hasOwnProperty("approxNumPhrases")) + if (typeof message.approxNumPhrases === "number") + object.approxNumPhrases = options.longs === String ? String(message.approxNumPhrases) : message.approxNumPhrases; + else + object.approxNumPhrases = options.longs === String ? $util.Long.prototype.toString.call(message.approxNumPhrases) : options.longs === Number ? new $util.LongBits(message.approxNumPhrases.low >>> 0, message.approxNumPhrases.high >>> 0).toNumber() : message.approxNumPhrases; + return object; + }; + + /** + * Converts this LargeCustomDictionaryStats to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats + * @instance + * @returns {Object.} JSON object + */ + LargeCustomDictionaryStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LargeCustomDictionaryStats + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.LargeCustomDictionaryStats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LargeCustomDictionaryStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.LargeCustomDictionaryStats"; + }; + + return LargeCustomDictionaryStats; + })(); + + v2.StoredInfoTypeConfig = (function() { + + /** + * Properties of a StoredInfoTypeConfig. + * @memberof google.privacy.dlp.v2 + * @interface IStoredInfoTypeConfig + * @property {string|null} [displayName] StoredInfoTypeConfig displayName + * @property {string|null} [description] StoredInfoTypeConfig description + * @property {google.privacy.dlp.v2.ILargeCustomDictionaryConfig|null} [largeCustomDictionary] StoredInfoTypeConfig largeCustomDictionary + * @property {google.privacy.dlp.v2.CustomInfoType.IDictionary|null} [dictionary] StoredInfoTypeConfig dictionary + * @property {google.privacy.dlp.v2.CustomInfoType.IRegex|null} [regex] StoredInfoTypeConfig regex + */ + + /** + * Constructs a new StoredInfoTypeConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a StoredInfoTypeConfig. + * @implements IStoredInfoTypeConfig + * @constructor + * @param {google.privacy.dlp.v2.IStoredInfoTypeConfig=} [properties] Properties to set + */ + function StoredInfoTypeConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * StoredInfoTypeConfig displayName. + * @member {string} displayName + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @instance + */ + StoredInfoTypeConfig.prototype.displayName = ""; + + /** + * StoredInfoTypeConfig description. + * @member {string} description + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @instance + */ + StoredInfoTypeConfig.prototype.description = ""; + + /** + * StoredInfoTypeConfig largeCustomDictionary. + * @member {google.privacy.dlp.v2.ILargeCustomDictionaryConfig|null|undefined} largeCustomDictionary + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @instance + */ + StoredInfoTypeConfig.prototype.largeCustomDictionary = null; + + /** + * StoredInfoTypeConfig dictionary. + * @member {google.privacy.dlp.v2.CustomInfoType.IDictionary|null|undefined} dictionary + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @instance + */ + StoredInfoTypeConfig.prototype.dictionary = null; + + /** + * StoredInfoTypeConfig regex. + * @member {google.privacy.dlp.v2.CustomInfoType.IRegex|null|undefined} regex + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @instance + */ + StoredInfoTypeConfig.prototype.regex = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * StoredInfoTypeConfig type. + * @member {"largeCustomDictionary"|"dictionary"|"regex"|undefined} type + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @instance + */ + Object.defineProperty(StoredInfoTypeConfig.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["largeCustomDictionary", "dictionary", "regex"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new StoredInfoTypeConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @static + * @param {google.privacy.dlp.v2.IStoredInfoTypeConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.StoredInfoTypeConfig} StoredInfoTypeConfig instance + */ + StoredInfoTypeConfig.create = function create(properties) { + return new StoredInfoTypeConfig(properties); + }; + + /** + * Encodes the specified StoredInfoTypeConfig message. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoTypeConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @static + * @param {google.privacy.dlp.v2.IStoredInfoTypeConfig} message StoredInfoTypeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoredInfoTypeConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.largeCustomDictionary != null && Object.hasOwnProperty.call(message, "largeCustomDictionary")) + $root.google.privacy.dlp.v2.LargeCustomDictionaryConfig.encode(message.largeCustomDictionary, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dictionary != null && Object.hasOwnProperty.call(message, "dictionary")) + $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.encode(message.dictionary, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.regex != null && Object.hasOwnProperty.call(message, "regex")) + $root.google.privacy.dlp.v2.CustomInfoType.Regex.encode(message.regex, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StoredInfoTypeConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoTypeConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @static + * @param {google.privacy.dlp.v2.IStoredInfoTypeConfig} message StoredInfoTypeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoredInfoTypeConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StoredInfoTypeConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.StoredInfoTypeConfig} StoredInfoTypeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoredInfoTypeConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.StoredInfoTypeConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.largeCustomDictionary = $root.google.privacy.dlp.v2.LargeCustomDictionaryConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.dictionary = $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.regex = $root.google.privacy.dlp.v2.CustomInfoType.Regex.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a StoredInfoTypeConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.StoredInfoTypeConfig} StoredInfoTypeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoredInfoTypeConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StoredInfoTypeConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StoredInfoTypeConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.largeCustomDictionary != null && message.hasOwnProperty("largeCustomDictionary")) { + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.LargeCustomDictionaryConfig.verify(message.largeCustomDictionary, long + 1); + if (error) + return "largeCustomDictionary." + error; + } + } + if (message.dictionary != null && message.hasOwnProperty("dictionary")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.verify(message.dictionary, long + 1); + if (error) + return "dictionary." + error; + } + } + if (message.regex != null && message.hasOwnProperty("regex")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.CustomInfoType.Regex.verify(message.regex, long + 1); + if (error) + return "regex." + error; + } + } + return null; + }; + + /** + * Creates a StoredInfoTypeConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.StoredInfoTypeConfig} StoredInfoTypeConfig + */ + StoredInfoTypeConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.StoredInfoTypeConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.StoredInfoTypeConfig(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.description != null) + message.description = String(object.description); + if (object.largeCustomDictionary != null) { + if (typeof object.largeCustomDictionary !== "object") + throw TypeError(".google.privacy.dlp.v2.StoredInfoTypeConfig.largeCustomDictionary: object expected"); + message.largeCustomDictionary = $root.google.privacy.dlp.v2.LargeCustomDictionaryConfig.fromObject(object.largeCustomDictionary, long + 1); + } + if (object.dictionary != null) { + if (typeof object.dictionary !== "object") + throw TypeError(".google.privacy.dlp.v2.StoredInfoTypeConfig.dictionary: object expected"); + message.dictionary = $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.fromObject(object.dictionary, long + 1); + } + if (object.regex != null) { + if (typeof object.regex !== "object") + throw TypeError(".google.privacy.dlp.v2.StoredInfoTypeConfig.regex: object expected"); + message.regex = $root.google.privacy.dlp.v2.CustomInfoType.Regex.fromObject(object.regex, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a StoredInfoTypeConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @static + * @param {google.privacy.dlp.v2.StoredInfoTypeConfig} message StoredInfoTypeConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StoredInfoTypeConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.description = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.largeCustomDictionary != null && message.hasOwnProperty("largeCustomDictionary")) { + object.largeCustomDictionary = $root.google.privacy.dlp.v2.LargeCustomDictionaryConfig.toObject(message.largeCustomDictionary, options); + if (options.oneofs) + object.type = "largeCustomDictionary"; + } + if (message.dictionary != null && message.hasOwnProperty("dictionary")) { + object.dictionary = $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.toObject(message.dictionary, options); + if (options.oneofs) + object.type = "dictionary"; + } + if (message.regex != null && message.hasOwnProperty("regex")) { + object.regex = $root.google.privacy.dlp.v2.CustomInfoType.Regex.toObject(message.regex, options); + if (options.oneofs) + object.type = "regex"; + } + return object; + }; + + /** + * Converts this StoredInfoTypeConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @instance + * @returns {Object.} JSON object + */ + StoredInfoTypeConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StoredInfoTypeConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.StoredInfoTypeConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StoredInfoTypeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.StoredInfoTypeConfig"; + }; + + return StoredInfoTypeConfig; + })(); + + v2.StoredInfoTypeStats = (function() { + + /** + * Properties of a StoredInfoTypeStats. + * @memberof google.privacy.dlp.v2 + * @interface IStoredInfoTypeStats + * @property {google.privacy.dlp.v2.ILargeCustomDictionaryStats|null} [largeCustomDictionary] StoredInfoTypeStats largeCustomDictionary + */ + + /** + * Constructs a new StoredInfoTypeStats. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a StoredInfoTypeStats. + * @implements IStoredInfoTypeStats + * @constructor + * @param {google.privacy.dlp.v2.IStoredInfoTypeStats=} [properties] Properties to set + */ + function StoredInfoTypeStats(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * StoredInfoTypeStats largeCustomDictionary. + * @member {google.privacy.dlp.v2.ILargeCustomDictionaryStats|null|undefined} largeCustomDictionary + * @memberof google.privacy.dlp.v2.StoredInfoTypeStats + * @instance + */ + StoredInfoTypeStats.prototype.largeCustomDictionary = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * StoredInfoTypeStats type. + * @member {"largeCustomDictionary"|undefined} type + * @memberof google.privacy.dlp.v2.StoredInfoTypeStats + * @instance + */ + Object.defineProperty(StoredInfoTypeStats.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["largeCustomDictionary"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new StoredInfoTypeStats instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.StoredInfoTypeStats + * @static + * @param {google.privacy.dlp.v2.IStoredInfoTypeStats=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.StoredInfoTypeStats} StoredInfoTypeStats instance + */ + StoredInfoTypeStats.create = function create(properties) { + return new StoredInfoTypeStats(properties); + }; + + /** + * Encodes the specified StoredInfoTypeStats message. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoTypeStats.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.StoredInfoTypeStats + * @static + * @param {google.privacy.dlp.v2.IStoredInfoTypeStats} message StoredInfoTypeStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoredInfoTypeStats.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.largeCustomDictionary != null && Object.hasOwnProperty.call(message, "largeCustomDictionary")) + $root.google.privacy.dlp.v2.LargeCustomDictionaryStats.encode(message.largeCustomDictionary, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StoredInfoTypeStats message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoTypeStats.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.StoredInfoTypeStats + * @static + * @param {google.privacy.dlp.v2.IStoredInfoTypeStats} message StoredInfoTypeStats message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoredInfoTypeStats.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StoredInfoTypeStats message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.StoredInfoTypeStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.StoredInfoTypeStats} StoredInfoTypeStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoredInfoTypeStats.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.StoredInfoTypeStats(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.largeCustomDictionary = $root.google.privacy.dlp.v2.LargeCustomDictionaryStats.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a StoredInfoTypeStats message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.StoredInfoTypeStats + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.StoredInfoTypeStats} StoredInfoTypeStats + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoredInfoTypeStats.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StoredInfoTypeStats message. + * @function verify + * @memberof google.privacy.dlp.v2.StoredInfoTypeStats + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StoredInfoTypeStats.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.largeCustomDictionary != null && message.hasOwnProperty("largeCustomDictionary")) { + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.LargeCustomDictionaryStats.verify(message.largeCustomDictionary, long + 1); + if (error) + return "largeCustomDictionary." + error; + } + } + return null; + }; + + /** + * Creates a StoredInfoTypeStats message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.StoredInfoTypeStats + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.StoredInfoTypeStats} StoredInfoTypeStats + */ + StoredInfoTypeStats.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.StoredInfoTypeStats) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.StoredInfoTypeStats(); + if (object.largeCustomDictionary != null) { + if (typeof object.largeCustomDictionary !== "object") + throw TypeError(".google.privacy.dlp.v2.StoredInfoTypeStats.largeCustomDictionary: object expected"); + message.largeCustomDictionary = $root.google.privacy.dlp.v2.LargeCustomDictionaryStats.fromObject(object.largeCustomDictionary, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a StoredInfoTypeStats message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.StoredInfoTypeStats + * @static + * @param {google.privacy.dlp.v2.StoredInfoTypeStats} message StoredInfoTypeStats + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StoredInfoTypeStats.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.largeCustomDictionary != null && message.hasOwnProperty("largeCustomDictionary")) { + object.largeCustomDictionary = $root.google.privacy.dlp.v2.LargeCustomDictionaryStats.toObject(message.largeCustomDictionary, options); + if (options.oneofs) + object.type = "largeCustomDictionary"; + } + return object; + }; + + /** + * Converts this StoredInfoTypeStats to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.StoredInfoTypeStats + * @instance + * @returns {Object.} JSON object + */ + StoredInfoTypeStats.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StoredInfoTypeStats + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.StoredInfoTypeStats + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StoredInfoTypeStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.StoredInfoTypeStats"; + }; + + return StoredInfoTypeStats; + })(); + + v2.StoredInfoTypeVersion = (function() { + + /** + * Properties of a StoredInfoTypeVersion. + * @memberof google.privacy.dlp.v2 + * @interface IStoredInfoTypeVersion + * @property {google.privacy.dlp.v2.IStoredInfoTypeConfig|null} [config] StoredInfoTypeVersion config + * @property {google.protobuf.ITimestamp|null} [createTime] StoredInfoTypeVersion createTime + * @property {google.privacy.dlp.v2.StoredInfoTypeState|null} [state] StoredInfoTypeVersion state + * @property {Array.|null} [errors] StoredInfoTypeVersion errors + * @property {google.privacy.dlp.v2.IStoredInfoTypeStats|null} [stats] StoredInfoTypeVersion stats + */ + + /** + * Constructs a new StoredInfoTypeVersion. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a StoredInfoTypeVersion. + * @implements IStoredInfoTypeVersion + * @constructor + * @param {google.privacy.dlp.v2.IStoredInfoTypeVersion=} [properties] Properties to set + */ + function StoredInfoTypeVersion(properties) { + this.errors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * StoredInfoTypeVersion config. + * @member {google.privacy.dlp.v2.IStoredInfoTypeConfig|null|undefined} config + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @instance + */ + StoredInfoTypeVersion.prototype.config = null; + + /** + * StoredInfoTypeVersion createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @instance + */ + StoredInfoTypeVersion.prototype.createTime = null; + + /** + * StoredInfoTypeVersion state. + * @member {google.privacy.dlp.v2.StoredInfoTypeState} state + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @instance + */ + StoredInfoTypeVersion.prototype.state = 0; + + /** + * StoredInfoTypeVersion errors. + * @member {Array.} errors + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @instance + */ + StoredInfoTypeVersion.prototype.errors = $util.emptyArray; + + /** + * StoredInfoTypeVersion stats. + * @member {google.privacy.dlp.v2.IStoredInfoTypeStats|null|undefined} stats + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @instance + */ + StoredInfoTypeVersion.prototype.stats = null; + + /** + * Creates a new StoredInfoTypeVersion instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @static + * @param {google.privacy.dlp.v2.IStoredInfoTypeVersion=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.StoredInfoTypeVersion} StoredInfoTypeVersion instance + */ + StoredInfoTypeVersion.create = function create(properties) { + return new StoredInfoTypeVersion(properties); + }; + + /** + * Encodes the specified StoredInfoTypeVersion message. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoTypeVersion.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @static + * @param {google.privacy.dlp.v2.IStoredInfoTypeVersion} message StoredInfoTypeVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoredInfoTypeVersion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.privacy.dlp.v2.StoredInfoTypeConfig.encode(message.config, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.privacy.dlp.v2.Error.encode(message.errors[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.stats != null && Object.hasOwnProperty.call(message, "stats")) + $root.google.privacy.dlp.v2.StoredInfoTypeStats.encode(message.stats, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StoredInfoTypeVersion message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoTypeVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @static + * @param {google.privacy.dlp.v2.IStoredInfoTypeVersion} message StoredInfoTypeVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoredInfoTypeVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StoredInfoTypeVersion message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.StoredInfoTypeVersion} StoredInfoTypeVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoredInfoTypeVersion.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.StoredInfoTypeVersion(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 4: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.privacy.dlp.v2.Error.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 5: { + message.stats = $root.google.privacy.dlp.v2.StoredInfoTypeStats.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a StoredInfoTypeVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.StoredInfoTypeVersion} StoredInfoTypeVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoredInfoTypeVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StoredInfoTypeVersion message. + * @function verify + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StoredInfoTypeVersion.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.verify(message.config, long + 1); + if (error) + return "config." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime, long + 1); + if (error) + return "createTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.privacy.dlp.v2.Error.verify(message.errors[i], long + 1); + if (error) + return "errors." + error; + } + } + if (message.stats != null && message.hasOwnProperty("stats")) { + var error = $root.google.privacy.dlp.v2.StoredInfoTypeStats.verify(message.stats, long + 1); + if (error) + return "stats." + error; + } + return null; + }; + + /** + * Creates a StoredInfoTypeVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.StoredInfoTypeVersion} StoredInfoTypeVersion + */ + StoredInfoTypeVersion.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.StoredInfoTypeVersion) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.StoredInfoTypeVersion(); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.privacy.dlp.v2.StoredInfoTypeVersion.config: object expected"); + message.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.fromObject(object.config, long + 1); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.privacy.dlp.v2.StoredInfoTypeVersion.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime, long + 1); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STORED_INFO_TYPE_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PENDING": + case 1: + message.state = 1; + break; + case "READY": + case 2: + message.state = 2; + break; + case "FAILED": + case 3: + message.state = 3; + break; + case "INVALID": + case 4: + message.state = 4; + break; + } + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.privacy.dlp.v2.StoredInfoTypeVersion.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.StoredInfoTypeVersion.errors: object expected"); + message.errors[i] = $root.google.privacy.dlp.v2.Error.fromObject(object.errors[i], long + 1); + } + } + if (object.stats != null) { + if (typeof object.stats !== "object") + throw TypeError(".google.privacy.dlp.v2.StoredInfoTypeVersion.stats: object expected"); + message.stats = $root.google.privacy.dlp.v2.StoredInfoTypeStats.fromObject(object.stats, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a StoredInfoTypeVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @static + * @param {google.privacy.dlp.v2.StoredInfoTypeVersion} message StoredInfoTypeVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StoredInfoTypeVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.errors = []; + if (options.defaults) { + object.config = null; + object.createTime = null; + object.state = options.enums === String ? "STORED_INFO_TYPE_STATE_UNSPECIFIED" : 0; + object.stats = null; + } + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.toObject(message.config, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.privacy.dlp.v2.StoredInfoTypeState[message.state] === undefined ? message.state : $root.google.privacy.dlp.v2.StoredInfoTypeState[message.state] : message.state; + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.privacy.dlp.v2.Error.toObject(message.errors[j], options); + } + if (message.stats != null && message.hasOwnProperty("stats")) + object.stats = $root.google.privacy.dlp.v2.StoredInfoTypeStats.toObject(message.stats, options); + return object; + }; + + /** + * Converts this StoredInfoTypeVersion to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @instance + * @returns {Object.} JSON object + */ + StoredInfoTypeVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StoredInfoTypeVersion + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.StoredInfoTypeVersion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StoredInfoTypeVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.StoredInfoTypeVersion"; + }; + + return StoredInfoTypeVersion; + })(); + + v2.StoredInfoType = (function() { + + /** + * Properties of a StoredInfoType. + * @memberof google.privacy.dlp.v2 + * @interface IStoredInfoType + * @property {string|null} [name] StoredInfoType name + * @property {google.privacy.dlp.v2.IStoredInfoTypeVersion|null} [currentVersion] StoredInfoType currentVersion + * @property {Array.|null} [pendingVersions] StoredInfoType pendingVersions + */ + + /** + * Constructs a new StoredInfoType. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a StoredInfoType. + * @implements IStoredInfoType + * @constructor + * @param {google.privacy.dlp.v2.IStoredInfoType=} [properties] Properties to set + */ + function StoredInfoType(properties) { + this.pendingVersions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * StoredInfoType name. + * @member {string} name + * @memberof google.privacy.dlp.v2.StoredInfoType + * @instance + */ + StoredInfoType.prototype.name = ""; + + /** + * StoredInfoType currentVersion. + * @member {google.privacy.dlp.v2.IStoredInfoTypeVersion|null|undefined} currentVersion + * @memberof google.privacy.dlp.v2.StoredInfoType + * @instance + */ + StoredInfoType.prototype.currentVersion = null; + + /** + * StoredInfoType pendingVersions. + * @member {Array.} pendingVersions + * @memberof google.privacy.dlp.v2.StoredInfoType + * @instance + */ + StoredInfoType.prototype.pendingVersions = $util.emptyArray; + + /** + * Creates a new StoredInfoType instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.StoredInfoType + * @static + * @param {google.privacy.dlp.v2.IStoredInfoType=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.StoredInfoType} StoredInfoType instance + */ + StoredInfoType.create = function create(properties) { + return new StoredInfoType(properties); + }; + + /** + * Encodes the specified StoredInfoType message. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoType.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.StoredInfoType + * @static + * @param {google.privacy.dlp.v2.IStoredInfoType} message StoredInfoType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoredInfoType.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.currentVersion != null && Object.hasOwnProperty.call(message, "currentVersion")) + $root.google.privacy.dlp.v2.StoredInfoTypeVersion.encode(message.currentVersion, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pendingVersions != null && message.pendingVersions.length) + for (var i = 0; i < message.pendingVersions.length; ++i) + $root.google.privacy.dlp.v2.StoredInfoTypeVersion.encode(message.pendingVersions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StoredInfoType message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StoredInfoType.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.StoredInfoType + * @static + * @param {google.privacy.dlp.v2.IStoredInfoType} message StoredInfoType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoredInfoType.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StoredInfoType message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.StoredInfoType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.StoredInfoType} StoredInfoType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoredInfoType.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.StoredInfoType(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.currentVersion = $root.google.privacy.dlp.v2.StoredInfoTypeVersion.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + if (!(message.pendingVersions && message.pendingVersions.length)) + message.pendingVersions = []; + message.pendingVersions.push($root.google.privacy.dlp.v2.StoredInfoTypeVersion.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a StoredInfoType message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.StoredInfoType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.StoredInfoType} StoredInfoType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoredInfoType.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StoredInfoType message. + * @function verify + * @memberof google.privacy.dlp.v2.StoredInfoType + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StoredInfoType.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.currentVersion != null && message.hasOwnProperty("currentVersion")) { + var error = $root.google.privacy.dlp.v2.StoredInfoTypeVersion.verify(message.currentVersion, long + 1); + if (error) + return "currentVersion." + error; + } + if (message.pendingVersions != null && message.hasOwnProperty("pendingVersions")) { + if (!Array.isArray(message.pendingVersions)) + return "pendingVersions: array expected"; + for (var i = 0; i < message.pendingVersions.length; ++i) { + var error = $root.google.privacy.dlp.v2.StoredInfoTypeVersion.verify(message.pendingVersions[i], long + 1); + if (error) + return "pendingVersions." + error; + } + } + return null; + }; + + /** + * Creates a StoredInfoType message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.StoredInfoType + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.StoredInfoType} StoredInfoType + */ + StoredInfoType.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.StoredInfoType) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.StoredInfoType(); + if (object.name != null) + message.name = String(object.name); + if (object.currentVersion != null) { + if (typeof object.currentVersion !== "object") + throw TypeError(".google.privacy.dlp.v2.StoredInfoType.currentVersion: object expected"); + message.currentVersion = $root.google.privacy.dlp.v2.StoredInfoTypeVersion.fromObject(object.currentVersion, long + 1); + } + if (object.pendingVersions) { + if (!Array.isArray(object.pendingVersions)) + throw TypeError(".google.privacy.dlp.v2.StoredInfoType.pendingVersions: array expected"); + message.pendingVersions = []; + for (var i = 0; i < object.pendingVersions.length; ++i) { + if (typeof object.pendingVersions[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.StoredInfoType.pendingVersions: object expected"); + message.pendingVersions[i] = $root.google.privacy.dlp.v2.StoredInfoTypeVersion.fromObject(object.pendingVersions[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a StoredInfoType message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.StoredInfoType + * @static + * @param {google.privacy.dlp.v2.StoredInfoType} message StoredInfoType + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StoredInfoType.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.pendingVersions = []; + if (options.defaults) { + object.name = ""; + object.currentVersion = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.currentVersion != null && message.hasOwnProperty("currentVersion")) + object.currentVersion = $root.google.privacy.dlp.v2.StoredInfoTypeVersion.toObject(message.currentVersion, options); + if (message.pendingVersions && message.pendingVersions.length) { + object.pendingVersions = []; + for (var j = 0; j < message.pendingVersions.length; ++j) + object.pendingVersions[j] = $root.google.privacy.dlp.v2.StoredInfoTypeVersion.toObject(message.pendingVersions[j], options); + } + return object; + }; + + /** + * Converts this StoredInfoType to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.StoredInfoType + * @instance + * @returns {Object.} JSON object + */ + StoredInfoType.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StoredInfoType + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.StoredInfoType + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StoredInfoType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.StoredInfoType"; + }; + + return StoredInfoType; + })(); + + v2.CreateStoredInfoTypeRequest = (function() { + + /** + * Properties of a CreateStoredInfoTypeRequest. + * @memberof google.privacy.dlp.v2 + * @interface ICreateStoredInfoTypeRequest + * @property {string|null} [parent] CreateStoredInfoTypeRequest parent + * @property {google.privacy.dlp.v2.IStoredInfoTypeConfig|null} [config] CreateStoredInfoTypeRequest config + * @property {string|null} [storedInfoTypeId] CreateStoredInfoTypeRequest storedInfoTypeId + * @property {string|null} [locationId] CreateStoredInfoTypeRequest locationId + */ + + /** + * Constructs a new CreateStoredInfoTypeRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CreateStoredInfoTypeRequest. + * @implements ICreateStoredInfoTypeRequest + * @constructor + * @param {google.privacy.dlp.v2.ICreateStoredInfoTypeRequest=} [properties] Properties to set + */ + function CreateStoredInfoTypeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateStoredInfoTypeRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @instance + */ + CreateStoredInfoTypeRequest.prototype.parent = ""; + + /** + * CreateStoredInfoTypeRequest config. + * @member {google.privacy.dlp.v2.IStoredInfoTypeConfig|null|undefined} config + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @instance + */ + CreateStoredInfoTypeRequest.prototype.config = null; + + /** + * CreateStoredInfoTypeRequest storedInfoTypeId. + * @member {string} storedInfoTypeId + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @instance + */ + CreateStoredInfoTypeRequest.prototype.storedInfoTypeId = ""; + + /** + * CreateStoredInfoTypeRequest locationId. + * @member {string} locationId + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @instance + */ + CreateStoredInfoTypeRequest.prototype.locationId = ""; + + /** + * Creates a new CreateStoredInfoTypeRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @static + * @param {google.privacy.dlp.v2.ICreateStoredInfoTypeRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CreateStoredInfoTypeRequest} CreateStoredInfoTypeRequest instance + */ + CreateStoredInfoTypeRequest.create = function create(properties) { + return new CreateStoredInfoTypeRequest(properties); + }; + + /** + * Encodes the specified CreateStoredInfoTypeRequest message. Does not implicitly {@link google.privacy.dlp.v2.CreateStoredInfoTypeRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @static + * @param {google.privacy.dlp.v2.ICreateStoredInfoTypeRequest} message CreateStoredInfoTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateStoredInfoTypeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.privacy.dlp.v2.StoredInfoTypeConfig.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.storedInfoTypeId != null && Object.hasOwnProperty.call(message, "storedInfoTypeId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.storedInfoTypeId); + if (message.locationId != null && Object.hasOwnProperty.call(message, "locationId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.locationId); + return writer; + }; + + /** + * Encodes the specified CreateStoredInfoTypeRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CreateStoredInfoTypeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @static + * @param {google.privacy.dlp.v2.ICreateStoredInfoTypeRequest} message CreateStoredInfoTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateStoredInfoTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateStoredInfoTypeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CreateStoredInfoTypeRequest} CreateStoredInfoTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateStoredInfoTypeRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CreateStoredInfoTypeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.storedInfoTypeId = reader.string(); + break; + } + case 4: { + message.locationId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CreateStoredInfoTypeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CreateStoredInfoTypeRequest} CreateStoredInfoTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateStoredInfoTypeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateStoredInfoTypeRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateStoredInfoTypeRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.verify(message.config, long + 1); + if (error) + return "config." + error; + } + if (message.storedInfoTypeId != null && message.hasOwnProperty("storedInfoTypeId")) + if (!$util.isString(message.storedInfoTypeId)) + return "storedInfoTypeId: string expected"; + if (message.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; + return null; + }; + + /** + * Creates a CreateStoredInfoTypeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CreateStoredInfoTypeRequest} CreateStoredInfoTypeRequest + */ + CreateStoredInfoTypeRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CreateStoredInfoTypeRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CreateStoredInfoTypeRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.privacy.dlp.v2.CreateStoredInfoTypeRequest.config: object expected"); + message.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.fromObject(object.config, long + 1); + } + if (object.storedInfoTypeId != null) + message.storedInfoTypeId = String(object.storedInfoTypeId); + if (object.locationId != null) + message.locationId = String(object.locationId); + return message; + }; + + /** + * Creates a plain object from a CreateStoredInfoTypeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @static + * @param {google.privacy.dlp.v2.CreateStoredInfoTypeRequest} message CreateStoredInfoTypeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateStoredInfoTypeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.config = null; + object.storedInfoTypeId = ""; + object.locationId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.toObject(message.config, options); + if (message.storedInfoTypeId != null && message.hasOwnProperty("storedInfoTypeId")) + object.storedInfoTypeId = message.storedInfoTypeId; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; + return object; + }; + + /** + * Converts this CreateStoredInfoTypeRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @instance + * @returns {Object.} JSON object + */ + CreateStoredInfoTypeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateStoredInfoTypeRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CreateStoredInfoTypeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateStoredInfoTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CreateStoredInfoTypeRequest"; + }; + + return CreateStoredInfoTypeRequest; + })(); + + v2.UpdateStoredInfoTypeRequest = (function() { + + /** + * Properties of an UpdateStoredInfoTypeRequest. + * @memberof google.privacy.dlp.v2 + * @interface IUpdateStoredInfoTypeRequest + * @property {string|null} [name] UpdateStoredInfoTypeRequest name + * @property {google.privacy.dlp.v2.IStoredInfoTypeConfig|null} [config] UpdateStoredInfoTypeRequest config + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateStoredInfoTypeRequest updateMask + */ + + /** + * Constructs a new UpdateStoredInfoTypeRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an UpdateStoredInfoTypeRequest. + * @implements IUpdateStoredInfoTypeRequest + * @constructor + * @param {google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest=} [properties] Properties to set + */ + function UpdateStoredInfoTypeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateStoredInfoTypeRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest + * @instance + */ + UpdateStoredInfoTypeRequest.prototype.name = ""; + + /** + * UpdateStoredInfoTypeRequest config. + * @member {google.privacy.dlp.v2.IStoredInfoTypeConfig|null|undefined} config + * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest + * @instance + */ + UpdateStoredInfoTypeRequest.prototype.config = null; + + /** + * UpdateStoredInfoTypeRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest + * @instance + */ + UpdateStoredInfoTypeRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateStoredInfoTypeRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest + * @static + * @param {google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.UpdateStoredInfoTypeRequest} UpdateStoredInfoTypeRequest instance + */ + UpdateStoredInfoTypeRequest.create = function create(properties) { + return new UpdateStoredInfoTypeRequest(properties); + }; + + /** + * Encodes the specified UpdateStoredInfoTypeRequest message. Does not implicitly {@link google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest + * @static + * @param {google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest} message UpdateStoredInfoTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateStoredInfoTypeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.privacy.dlp.v2.StoredInfoTypeConfig.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateStoredInfoTypeRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest + * @static + * @param {google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest} message UpdateStoredInfoTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateStoredInfoTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateStoredInfoTypeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.UpdateStoredInfoTypeRequest} UpdateStoredInfoTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateStoredInfoTypeRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateStoredInfoTypeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.UpdateStoredInfoTypeRequest} UpdateStoredInfoTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateStoredInfoTypeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateStoredInfoTypeRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateStoredInfoTypeRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.config != null && message.hasOwnProperty("config")) { + var error = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.verify(message.config, long + 1); + if (error) + return "config." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateStoredInfoTypeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.UpdateStoredInfoTypeRequest} UpdateStoredInfoTypeRequest + */ + UpdateStoredInfoTypeRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.config: object expected"); + message.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.fromObject(object.config, long + 1); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.privacy.dlp.v2.UpdateStoredInfoTypeRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an UpdateStoredInfoTypeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest + * @static + * @param {google.privacy.dlp.v2.UpdateStoredInfoTypeRequest} message UpdateStoredInfoTypeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateStoredInfoTypeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.config = null; + object.updateMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.privacy.dlp.v2.StoredInfoTypeConfig.toObject(message.config, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateStoredInfoTypeRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateStoredInfoTypeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateStoredInfoTypeRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.UpdateStoredInfoTypeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateStoredInfoTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.UpdateStoredInfoTypeRequest"; + }; + + return UpdateStoredInfoTypeRequest; + })(); + + v2.GetStoredInfoTypeRequest = (function() { + + /** + * Properties of a GetStoredInfoTypeRequest. + * @memberof google.privacy.dlp.v2 + * @interface IGetStoredInfoTypeRequest + * @property {string|null} [name] GetStoredInfoTypeRequest name + */ + + /** + * Constructs a new GetStoredInfoTypeRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a GetStoredInfoTypeRequest. + * @implements IGetStoredInfoTypeRequest + * @constructor + * @param {google.privacy.dlp.v2.IGetStoredInfoTypeRequest=} [properties] Properties to set + */ + function GetStoredInfoTypeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetStoredInfoTypeRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest + * @instance + */ + GetStoredInfoTypeRequest.prototype.name = ""; + + /** + * Creates a new GetStoredInfoTypeRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest + * @static + * @param {google.privacy.dlp.v2.IGetStoredInfoTypeRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.GetStoredInfoTypeRequest} GetStoredInfoTypeRequest instance + */ + GetStoredInfoTypeRequest.create = function create(properties) { + return new GetStoredInfoTypeRequest(properties); + }; + + /** + * Encodes the specified GetStoredInfoTypeRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetStoredInfoTypeRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest + * @static + * @param {google.privacy.dlp.v2.IGetStoredInfoTypeRequest} message GetStoredInfoTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetStoredInfoTypeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetStoredInfoTypeRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetStoredInfoTypeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest + * @static + * @param {google.privacy.dlp.v2.IGetStoredInfoTypeRequest} message GetStoredInfoTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetStoredInfoTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetStoredInfoTypeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.GetStoredInfoTypeRequest} GetStoredInfoTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetStoredInfoTypeRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.GetStoredInfoTypeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetStoredInfoTypeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.GetStoredInfoTypeRequest} GetStoredInfoTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetStoredInfoTypeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetStoredInfoTypeRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetStoredInfoTypeRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetStoredInfoTypeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.GetStoredInfoTypeRequest} GetStoredInfoTypeRequest + */ + GetStoredInfoTypeRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.GetStoredInfoTypeRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.GetStoredInfoTypeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetStoredInfoTypeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest + * @static + * @param {google.privacy.dlp.v2.GetStoredInfoTypeRequest} message GetStoredInfoTypeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetStoredInfoTypeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetStoredInfoTypeRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest + * @instance + * @returns {Object.} JSON object + */ + GetStoredInfoTypeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetStoredInfoTypeRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.GetStoredInfoTypeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetStoredInfoTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.GetStoredInfoTypeRequest"; + }; + + return GetStoredInfoTypeRequest; + })(); + + v2.ListStoredInfoTypesRequest = (function() { + + /** + * Properties of a ListStoredInfoTypesRequest. + * @memberof google.privacy.dlp.v2 + * @interface IListStoredInfoTypesRequest + * @property {string|null} [parent] ListStoredInfoTypesRequest parent + * @property {string|null} [pageToken] ListStoredInfoTypesRequest pageToken + * @property {number|null} [pageSize] ListStoredInfoTypesRequest pageSize + * @property {string|null} [orderBy] ListStoredInfoTypesRequest orderBy + * @property {string|null} [locationId] ListStoredInfoTypesRequest locationId + */ + + /** + * Constructs a new ListStoredInfoTypesRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListStoredInfoTypesRequest. + * @implements IListStoredInfoTypesRequest + * @constructor + * @param {google.privacy.dlp.v2.IListStoredInfoTypesRequest=} [properties] Properties to set + */ + function ListStoredInfoTypesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListStoredInfoTypesRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * @instance + */ + ListStoredInfoTypesRequest.prototype.parent = ""; + + /** + * ListStoredInfoTypesRequest pageToken. + * @member {string} pageToken + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * @instance + */ + ListStoredInfoTypesRequest.prototype.pageToken = ""; + + /** + * ListStoredInfoTypesRequest pageSize. + * @member {number} pageSize + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * @instance + */ + ListStoredInfoTypesRequest.prototype.pageSize = 0; + + /** + * ListStoredInfoTypesRequest orderBy. + * @member {string} orderBy + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * @instance + */ + ListStoredInfoTypesRequest.prototype.orderBy = ""; + + /** + * ListStoredInfoTypesRequest locationId. + * @member {string} locationId + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * @instance + */ + ListStoredInfoTypesRequest.prototype.locationId = ""; + + /** + * Creates a new ListStoredInfoTypesRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * @static + * @param {google.privacy.dlp.v2.IListStoredInfoTypesRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListStoredInfoTypesRequest} ListStoredInfoTypesRequest instance + */ + ListStoredInfoTypesRequest.create = function create(properties) { + return new ListStoredInfoTypesRequest(properties); + }; + + /** + * Encodes the specified ListStoredInfoTypesRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListStoredInfoTypesRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * @static + * @param {google.privacy.dlp.v2.IListStoredInfoTypesRequest} message ListStoredInfoTypesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListStoredInfoTypesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.locationId != null && Object.hasOwnProperty.call(message, "locationId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.locationId); + return writer; + }; + + /** + * Encodes the specified ListStoredInfoTypesRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListStoredInfoTypesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * @static + * @param {google.privacy.dlp.v2.IListStoredInfoTypesRequest} message ListStoredInfoTypesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListStoredInfoTypesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListStoredInfoTypesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ListStoredInfoTypesRequest} ListStoredInfoTypesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListStoredInfoTypesRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListStoredInfoTypesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.locationId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListStoredInfoTypesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListStoredInfoTypesRequest} ListStoredInfoTypesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListStoredInfoTypesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListStoredInfoTypesRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListStoredInfoTypesRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.locationId != null && message.hasOwnProperty("locationId")) + if (!$util.isString(message.locationId)) + return "locationId: string expected"; + return null; + }; + + /** + * Creates a ListStoredInfoTypesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListStoredInfoTypesRequest} ListStoredInfoTypesRequest + */ + ListStoredInfoTypesRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ListStoredInfoTypesRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ListStoredInfoTypesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.locationId != null) + message.locationId = String(object.locationId); + return message; + }; + + /** + * Creates a plain object from a ListStoredInfoTypesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * @static + * @param {google.privacy.dlp.v2.ListStoredInfoTypesRequest} message ListStoredInfoTypesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListStoredInfoTypesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + object.orderBy = ""; + object.locationId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.locationId != null && message.hasOwnProperty("locationId")) + object.locationId = message.locationId; + return object; + }; + + /** + * Converts this ListStoredInfoTypesRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * @instance + * @returns {Object.} JSON object + */ + ListStoredInfoTypesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListStoredInfoTypesRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListStoredInfoTypesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ListStoredInfoTypesRequest"; + }; + + return ListStoredInfoTypesRequest; + })(); + + v2.ListStoredInfoTypesResponse = (function() { + + /** + * Properties of a ListStoredInfoTypesResponse. + * @memberof google.privacy.dlp.v2 + * @interface IListStoredInfoTypesResponse + * @property {Array.|null} [storedInfoTypes] ListStoredInfoTypesResponse storedInfoTypes + * @property {string|null} [nextPageToken] ListStoredInfoTypesResponse nextPageToken + */ + + /** + * Constructs a new ListStoredInfoTypesResponse. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListStoredInfoTypesResponse. + * @implements IListStoredInfoTypesResponse + * @constructor + * @param {google.privacy.dlp.v2.IListStoredInfoTypesResponse=} [properties] Properties to set + */ + function ListStoredInfoTypesResponse(properties) { + this.storedInfoTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListStoredInfoTypesResponse storedInfoTypes. + * @member {Array.} storedInfoTypes + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse + * @instance + */ + ListStoredInfoTypesResponse.prototype.storedInfoTypes = $util.emptyArray; + + /** + * ListStoredInfoTypesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse + * @instance + */ + ListStoredInfoTypesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListStoredInfoTypesResponse instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse + * @static + * @param {google.privacy.dlp.v2.IListStoredInfoTypesResponse=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListStoredInfoTypesResponse} ListStoredInfoTypesResponse instance + */ + ListStoredInfoTypesResponse.create = function create(properties) { + return new ListStoredInfoTypesResponse(properties); + }; + + /** + * Encodes the specified ListStoredInfoTypesResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListStoredInfoTypesResponse.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse + * @static + * @param {google.privacy.dlp.v2.IListStoredInfoTypesResponse} message ListStoredInfoTypesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListStoredInfoTypesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.storedInfoTypes != null && message.storedInfoTypes.length) + for (var i = 0; i < message.storedInfoTypes.length; ++i) + $root.google.privacy.dlp.v2.StoredInfoType.encode(message.storedInfoTypes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListStoredInfoTypesResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListStoredInfoTypesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse + * @static + * @param {google.privacy.dlp.v2.IListStoredInfoTypesResponse} message ListStoredInfoTypesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListStoredInfoTypesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListStoredInfoTypesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ListStoredInfoTypesResponse} ListStoredInfoTypesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListStoredInfoTypesResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListStoredInfoTypesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.storedInfoTypes && message.storedInfoTypes.length)) + message.storedInfoTypes = []; + message.storedInfoTypes.push($root.google.privacy.dlp.v2.StoredInfoType.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListStoredInfoTypesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListStoredInfoTypesResponse} ListStoredInfoTypesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListStoredInfoTypesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListStoredInfoTypesResponse message. + * @function verify + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListStoredInfoTypesResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.storedInfoTypes != null && message.hasOwnProperty("storedInfoTypes")) { + if (!Array.isArray(message.storedInfoTypes)) + return "storedInfoTypes: array expected"; + for (var i = 0; i < message.storedInfoTypes.length; ++i) { + var error = $root.google.privacy.dlp.v2.StoredInfoType.verify(message.storedInfoTypes[i], long + 1); + if (error) + return "storedInfoTypes." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListStoredInfoTypesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListStoredInfoTypesResponse} ListStoredInfoTypesResponse + */ + ListStoredInfoTypesResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ListStoredInfoTypesResponse) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ListStoredInfoTypesResponse(); + if (object.storedInfoTypes) { + if (!Array.isArray(object.storedInfoTypes)) + throw TypeError(".google.privacy.dlp.v2.ListStoredInfoTypesResponse.storedInfoTypes: array expected"); + message.storedInfoTypes = []; + for (var i = 0; i < object.storedInfoTypes.length; ++i) { + if (typeof object.storedInfoTypes[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.ListStoredInfoTypesResponse.storedInfoTypes: object expected"); + message.storedInfoTypes[i] = $root.google.privacy.dlp.v2.StoredInfoType.fromObject(object.storedInfoTypes[i], long + 1); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListStoredInfoTypesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse + * @static + * @param {google.privacy.dlp.v2.ListStoredInfoTypesResponse} message ListStoredInfoTypesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListStoredInfoTypesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.storedInfoTypes = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.storedInfoTypes && message.storedInfoTypes.length) { + object.storedInfoTypes = []; + for (var j = 0; j < message.storedInfoTypes.length; ++j) + object.storedInfoTypes[j] = $root.google.privacy.dlp.v2.StoredInfoType.toObject(message.storedInfoTypes[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListStoredInfoTypesResponse to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse + * @instance + * @returns {Object.} JSON object + */ + ListStoredInfoTypesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListStoredInfoTypesResponse + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ListStoredInfoTypesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListStoredInfoTypesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ListStoredInfoTypesResponse"; + }; + + return ListStoredInfoTypesResponse; + })(); + + v2.DeleteStoredInfoTypeRequest = (function() { + + /** + * Properties of a DeleteStoredInfoTypeRequest. + * @memberof google.privacy.dlp.v2 + * @interface IDeleteStoredInfoTypeRequest + * @property {string|null} [name] DeleteStoredInfoTypeRequest name + */ + + /** + * Constructs a new DeleteStoredInfoTypeRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DeleteStoredInfoTypeRequest. + * @implements IDeleteStoredInfoTypeRequest + * @constructor + * @param {google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest=} [properties] Properties to set + */ + function DeleteStoredInfoTypeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteStoredInfoTypeRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest + * @instance + */ + DeleteStoredInfoTypeRequest.prototype.name = ""; + + /** + * Creates a new DeleteStoredInfoTypeRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DeleteStoredInfoTypeRequest} DeleteStoredInfoTypeRequest instance + */ + DeleteStoredInfoTypeRequest.create = function create(properties) { + return new DeleteStoredInfoTypeRequest(properties); + }; + + /** + * Encodes the specified DeleteStoredInfoTypeRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest} message DeleteStoredInfoTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteStoredInfoTypeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteStoredInfoTypeRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteStoredInfoTypeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest} message DeleteStoredInfoTypeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteStoredInfoTypeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteStoredInfoTypeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DeleteStoredInfoTypeRequest} DeleteStoredInfoTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteStoredInfoTypeRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteStoredInfoTypeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DeleteStoredInfoTypeRequest} DeleteStoredInfoTypeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteStoredInfoTypeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteStoredInfoTypeRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteStoredInfoTypeRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteStoredInfoTypeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DeleteStoredInfoTypeRequest} DeleteStoredInfoTypeRequest + */ + DeleteStoredInfoTypeRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteStoredInfoTypeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest + * @static + * @param {google.privacy.dlp.v2.DeleteStoredInfoTypeRequest} message DeleteStoredInfoTypeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteStoredInfoTypeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteStoredInfoTypeRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteStoredInfoTypeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteStoredInfoTypeRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DeleteStoredInfoTypeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteStoredInfoTypeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DeleteStoredInfoTypeRequest"; + }; + + return DeleteStoredInfoTypeRequest; + })(); + + v2.HybridInspectJobTriggerRequest = (function() { + + /** + * Properties of a HybridInspectJobTriggerRequest. + * @memberof google.privacy.dlp.v2 + * @interface IHybridInspectJobTriggerRequest + * @property {string|null} [name] HybridInspectJobTriggerRequest name + * @property {google.privacy.dlp.v2.IHybridContentItem|null} [hybridItem] HybridInspectJobTriggerRequest hybridItem + */ + + /** + * Constructs a new HybridInspectJobTriggerRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a HybridInspectJobTriggerRequest. + * @implements IHybridInspectJobTriggerRequest + * @constructor + * @param {google.privacy.dlp.v2.IHybridInspectJobTriggerRequest=} [properties] Properties to set + */ + function HybridInspectJobTriggerRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * HybridInspectJobTriggerRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.HybridInspectJobTriggerRequest + * @instance + */ + HybridInspectJobTriggerRequest.prototype.name = ""; + + /** + * HybridInspectJobTriggerRequest hybridItem. + * @member {google.privacy.dlp.v2.IHybridContentItem|null|undefined} hybridItem + * @memberof google.privacy.dlp.v2.HybridInspectJobTriggerRequest + * @instance + */ + HybridInspectJobTriggerRequest.prototype.hybridItem = null; + + /** + * Creates a new HybridInspectJobTriggerRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.HybridInspectJobTriggerRequest + * @static + * @param {google.privacy.dlp.v2.IHybridInspectJobTriggerRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.HybridInspectJobTriggerRequest} HybridInspectJobTriggerRequest instance + */ + HybridInspectJobTriggerRequest.create = function create(properties) { + return new HybridInspectJobTriggerRequest(properties); + }; + + /** + * Encodes the specified HybridInspectJobTriggerRequest message. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectJobTriggerRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.HybridInspectJobTriggerRequest + * @static + * @param {google.privacy.dlp.v2.IHybridInspectJobTriggerRequest} message HybridInspectJobTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HybridInspectJobTriggerRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.hybridItem != null && Object.hasOwnProperty.call(message, "hybridItem")) + $root.google.privacy.dlp.v2.HybridContentItem.encode(message.hybridItem, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified HybridInspectJobTriggerRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectJobTriggerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.HybridInspectJobTriggerRequest + * @static + * @param {google.privacy.dlp.v2.IHybridInspectJobTriggerRequest} message HybridInspectJobTriggerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HybridInspectJobTriggerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HybridInspectJobTriggerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.HybridInspectJobTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.HybridInspectJobTriggerRequest} HybridInspectJobTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HybridInspectJobTriggerRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.HybridInspectJobTriggerRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.hybridItem = $root.google.privacy.dlp.v2.HybridContentItem.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a HybridInspectJobTriggerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.HybridInspectJobTriggerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.HybridInspectJobTriggerRequest} HybridInspectJobTriggerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HybridInspectJobTriggerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HybridInspectJobTriggerRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.HybridInspectJobTriggerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HybridInspectJobTriggerRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.hybridItem != null && message.hasOwnProperty("hybridItem")) { + var error = $root.google.privacy.dlp.v2.HybridContentItem.verify(message.hybridItem, long + 1); + if (error) + return "hybridItem." + error; + } + return null; + }; + + /** + * Creates a HybridInspectJobTriggerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.HybridInspectJobTriggerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.HybridInspectJobTriggerRequest} HybridInspectJobTriggerRequest + */ + HybridInspectJobTriggerRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.HybridInspectJobTriggerRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.HybridInspectJobTriggerRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.hybridItem != null) { + if (typeof object.hybridItem !== "object") + throw TypeError(".google.privacy.dlp.v2.HybridInspectJobTriggerRequest.hybridItem: object expected"); + message.hybridItem = $root.google.privacy.dlp.v2.HybridContentItem.fromObject(object.hybridItem, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a HybridInspectJobTriggerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.HybridInspectJobTriggerRequest + * @static + * @param {google.privacy.dlp.v2.HybridInspectJobTriggerRequest} message HybridInspectJobTriggerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HybridInspectJobTriggerRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.hybridItem = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.hybridItem != null && message.hasOwnProperty("hybridItem")) + object.hybridItem = $root.google.privacy.dlp.v2.HybridContentItem.toObject(message.hybridItem, options); + return object; + }; + + /** + * Converts this HybridInspectJobTriggerRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.HybridInspectJobTriggerRequest + * @instance + * @returns {Object.} JSON object + */ + HybridInspectJobTriggerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HybridInspectJobTriggerRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.HybridInspectJobTriggerRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HybridInspectJobTriggerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.HybridInspectJobTriggerRequest"; + }; + + return HybridInspectJobTriggerRequest; + })(); + + v2.HybridInspectDlpJobRequest = (function() { + + /** + * Properties of a HybridInspectDlpJobRequest. + * @memberof google.privacy.dlp.v2 + * @interface IHybridInspectDlpJobRequest + * @property {string|null} [name] HybridInspectDlpJobRequest name + * @property {google.privacy.dlp.v2.IHybridContentItem|null} [hybridItem] HybridInspectDlpJobRequest hybridItem + */ + + /** + * Constructs a new HybridInspectDlpJobRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a HybridInspectDlpJobRequest. + * @implements IHybridInspectDlpJobRequest + * @constructor + * @param {google.privacy.dlp.v2.IHybridInspectDlpJobRequest=} [properties] Properties to set + */ + function HybridInspectDlpJobRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * HybridInspectDlpJobRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.HybridInspectDlpJobRequest + * @instance + */ + HybridInspectDlpJobRequest.prototype.name = ""; + + /** + * HybridInspectDlpJobRequest hybridItem. + * @member {google.privacy.dlp.v2.IHybridContentItem|null|undefined} hybridItem + * @memberof google.privacy.dlp.v2.HybridInspectDlpJobRequest + * @instance + */ + HybridInspectDlpJobRequest.prototype.hybridItem = null; + + /** + * Creates a new HybridInspectDlpJobRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.HybridInspectDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.IHybridInspectDlpJobRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.HybridInspectDlpJobRequest} HybridInspectDlpJobRequest instance + */ + HybridInspectDlpJobRequest.create = function create(properties) { + return new HybridInspectDlpJobRequest(properties); + }; + + /** + * Encodes the specified HybridInspectDlpJobRequest message. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectDlpJobRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.HybridInspectDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.IHybridInspectDlpJobRequest} message HybridInspectDlpJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HybridInspectDlpJobRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.hybridItem != null && Object.hasOwnProperty.call(message, "hybridItem")) + $root.google.privacy.dlp.v2.HybridContentItem.encode(message.hybridItem, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified HybridInspectDlpJobRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectDlpJobRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.HybridInspectDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.IHybridInspectDlpJobRequest} message HybridInspectDlpJobRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HybridInspectDlpJobRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HybridInspectDlpJobRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.HybridInspectDlpJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.HybridInspectDlpJobRequest} HybridInspectDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HybridInspectDlpJobRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.HybridInspectDlpJobRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.hybridItem = $root.google.privacy.dlp.v2.HybridContentItem.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a HybridInspectDlpJobRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.HybridInspectDlpJobRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.HybridInspectDlpJobRequest} HybridInspectDlpJobRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HybridInspectDlpJobRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HybridInspectDlpJobRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.HybridInspectDlpJobRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HybridInspectDlpJobRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.hybridItem != null && message.hasOwnProperty("hybridItem")) { + var error = $root.google.privacy.dlp.v2.HybridContentItem.verify(message.hybridItem, long + 1); + if (error) + return "hybridItem." + error; + } + return null; + }; + + /** + * Creates a HybridInspectDlpJobRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.HybridInspectDlpJobRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.HybridInspectDlpJobRequest} HybridInspectDlpJobRequest + */ + HybridInspectDlpJobRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.HybridInspectDlpJobRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.HybridInspectDlpJobRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.hybridItem != null) { + if (typeof object.hybridItem !== "object") + throw TypeError(".google.privacy.dlp.v2.HybridInspectDlpJobRequest.hybridItem: object expected"); + message.hybridItem = $root.google.privacy.dlp.v2.HybridContentItem.fromObject(object.hybridItem, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a HybridInspectDlpJobRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.HybridInspectDlpJobRequest + * @static + * @param {google.privacy.dlp.v2.HybridInspectDlpJobRequest} message HybridInspectDlpJobRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HybridInspectDlpJobRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.hybridItem = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.hybridItem != null && message.hasOwnProperty("hybridItem")) + object.hybridItem = $root.google.privacy.dlp.v2.HybridContentItem.toObject(message.hybridItem, options); + return object; + }; + + /** + * Converts this HybridInspectDlpJobRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.HybridInspectDlpJobRequest + * @instance + * @returns {Object.} JSON object + */ + HybridInspectDlpJobRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HybridInspectDlpJobRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.HybridInspectDlpJobRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HybridInspectDlpJobRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.HybridInspectDlpJobRequest"; + }; + + return HybridInspectDlpJobRequest; + })(); + + v2.HybridContentItem = (function() { + + /** + * Properties of a HybridContentItem. + * @memberof google.privacy.dlp.v2 + * @interface IHybridContentItem + * @property {google.privacy.dlp.v2.IContentItem|null} [item] HybridContentItem item + * @property {google.privacy.dlp.v2.IHybridFindingDetails|null} [findingDetails] HybridContentItem findingDetails + */ + + /** + * Constructs a new HybridContentItem. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a HybridContentItem. + * @implements IHybridContentItem + * @constructor + * @param {google.privacy.dlp.v2.IHybridContentItem=} [properties] Properties to set + */ + function HybridContentItem(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * HybridContentItem item. + * @member {google.privacy.dlp.v2.IContentItem|null|undefined} item + * @memberof google.privacy.dlp.v2.HybridContentItem + * @instance + */ + HybridContentItem.prototype.item = null; + + /** + * HybridContentItem findingDetails. + * @member {google.privacy.dlp.v2.IHybridFindingDetails|null|undefined} findingDetails + * @memberof google.privacy.dlp.v2.HybridContentItem + * @instance + */ + HybridContentItem.prototype.findingDetails = null; + + /** + * Creates a new HybridContentItem instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.HybridContentItem + * @static + * @param {google.privacy.dlp.v2.IHybridContentItem=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.HybridContentItem} HybridContentItem instance + */ + HybridContentItem.create = function create(properties) { + return new HybridContentItem(properties); + }; + + /** + * Encodes the specified HybridContentItem message. Does not implicitly {@link google.privacy.dlp.v2.HybridContentItem.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.HybridContentItem + * @static + * @param {google.privacy.dlp.v2.IHybridContentItem} message HybridContentItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HybridContentItem.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.item != null && Object.hasOwnProperty.call(message, "item")) + $root.google.privacy.dlp.v2.ContentItem.encode(message.item, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.findingDetails != null && Object.hasOwnProperty.call(message, "findingDetails")) + $root.google.privacy.dlp.v2.HybridFindingDetails.encode(message.findingDetails, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified HybridContentItem message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridContentItem.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.HybridContentItem + * @static + * @param {google.privacy.dlp.v2.IHybridContentItem} message HybridContentItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HybridContentItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HybridContentItem message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.HybridContentItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.HybridContentItem} HybridContentItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HybridContentItem.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.HybridContentItem(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.item = $root.google.privacy.dlp.v2.ContentItem.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.findingDetails = $root.google.privacy.dlp.v2.HybridFindingDetails.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a HybridContentItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.HybridContentItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.HybridContentItem} HybridContentItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HybridContentItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HybridContentItem message. + * @function verify + * @memberof google.privacy.dlp.v2.HybridContentItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HybridContentItem.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.item != null && message.hasOwnProperty("item")) { + var error = $root.google.privacy.dlp.v2.ContentItem.verify(message.item, long + 1); + if (error) + return "item." + error; + } + if (message.findingDetails != null && message.hasOwnProperty("findingDetails")) { + var error = $root.google.privacy.dlp.v2.HybridFindingDetails.verify(message.findingDetails, long + 1); + if (error) + return "findingDetails." + error; + } + return null; + }; + + /** + * Creates a HybridContentItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.HybridContentItem + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.HybridContentItem} HybridContentItem + */ + HybridContentItem.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.HybridContentItem) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.HybridContentItem(); + if (object.item != null) { + if (typeof object.item !== "object") + throw TypeError(".google.privacy.dlp.v2.HybridContentItem.item: object expected"); + message.item = $root.google.privacy.dlp.v2.ContentItem.fromObject(object.item, long + 1); + } + if (object.findingDetails != null) { + if (typeof object.findingDetails !== "object") + throw TypeError(".google.privacy.dlp.v2.HybridContentItem.findingDetails: object expected"); + message.findingDetails = $root.google.privacy.dlp.v2.HybridFindingDetails.fromObject(object.findingDetails, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a HybridContentItem message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.HybridContentItem + * @static + * @param {google.privacy.dlp.v2.HybridContentItem} message HybridContentItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HybridContentItem.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.item = null; + object.findingDetails = null; + } + if (message.item != null && message.hasOwnProperty("item")) + object.item = $root.google.privacy.dlp.v2.ContentItem.toObject(message.item, options); + if (message.findingDetails != null && message.hasOwnProperty("findingDetails")) + object.findingDetails = $root.google.privacy.dlp.v2.HybridFindingDetails.toObject(message.findingDetails, options); + return object; + }; + + /** + * Converts this HybridContentItem to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.HybridContentItem + * @instance + * @returns {Object.} JSON object + */ + HybridContentItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HybridContentItem + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.HybridContentItem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HybridContentItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.HybridContentItem"; + }; + + return HybridContentItem; + })(); + + v2.HybridFindingDetails = (function() { + + /** + * Properties of a HybridFindingDetails. + * @memberof google.privacy.dlp.v2 + * @interface IHybridFindingDetails + * @property {google.privacy.dlp.v2.IContainer|null} [containerDetails] HybridFindingDetails containerDetails + * @property {number|Long|null} [fileOffset] HybridFindingDetails fileOffset + * @property {number|Long|null} [rowOffset] HybridFindingDetails rowOffset + * @property {google.privacy.dlp.v2.ITableOptions|null} [tableOptions] HybridFindingDetails tableOptions + * @property {Object.|null} [labels] HybridFindingDetails labels + */ + + /** + * Constructs a new HybridFindingDetails. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a HybridFindingDetails. + * @implements IHybridFindingDetails + * @constructor + * @param {google.privacy.dlp.v2.IHybridFindingDetails=} [properties] Properties to set + */ + function HybridFindingDetails(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * HybridFindingDetails containerDetails. + * @member {google.privacy.dlp.v2.IContainer|null|undefined} containerDetails + * @memberof google.privacy.dlp.v2.HybridFindingDetails + * @instance + */ + HybridFindingDetails.prototype.containerDetails = null; + + /** + * HybridFindingDetails fileOffset. + * @member {number|Long} fileOffset + * @memberof google.privacy.dlp.v2.HybridFindingDetails + * @instance + */ + HybridFindingDetails.prototype.fileOffset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * HybridFindingDetails rowOffset. + * @member {number|Long} rowOffset + * @memberof google.privacy.dlp.v2.HybridFindingDetails + * @instance + */ + HybridFindingDetails.prototype.rowOffset = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * HybridFindingDetails tableOptions. + * @member {google.privacy.dlp.v2.ITableOptions|null|undefined} tableOptions + * @memberof google.privacy.dlp.v2.HybridFindingDetails + * @instance + */ + HybridFindingDetails.prototype.tableOptions = null; + + /** + * HybridFindingDetails labels. + * @member {Object.} labels + * @memberof google.privacy.dlp.v2.HybridFindingDetails + * @instance + */ + HybridFindingDetails.prototype.labels = $util.emptyObject; + + /** + * Creates a new HybridFindingDetails instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.HybridFindingDetails + * @static + * @param {google.privacy.dlp.v2.IHybridFindingDetails=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.HybridFindingDetails} HybridFindingDetails instance + */ + HybridFindingDetails.create = function create(properties) { + return new HybridFindingDetails(properties); + }; + + /** + * Encodes the specified HybridFindingDetails message. Does not implicitly {@link google.privacy.dlp.v2.HybridFindingDetails.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.HybridFindingDetails + * @static + * @param {google.privacy.dlp.v2.IHybridFindingDetails} message HybridFindingDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HybridFindingDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.containerDetails != null && Object.hasOwnProperty.call(message, "containerDetails")) + $root.google.privacy.dlp.v2.Container.encode(message.containerDetails, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fileOffset != null && Object.hasOwnProperty.call(message, "fileOffset")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.fileOffset); + if (message.rowOffset != null && Object.hasOwnProperty.call(message, "rowOffset")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.rowOffset); + if (message.tableOptions != null && Object.hasOwnProperty.call(message, "tableOptions")) + $root.google.privacy.dlp.v2.TableOptions.encode(message.tableOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified HybridFindingDetails message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridFindingDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.HybridFindingDetails + * @static + * @param {google.privacy.dlp.v2.IHybridFindingDetails} message HybridFindingDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HybridFindingDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HybridFindingDetails message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.HybridFindingDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.HybridFindingDetails} HybridFindingDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HybridFindingDetails.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.HybridFindingDetails(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.containerDetails = $root.google.privacy.dlp.v2.Container.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.fileOffset = reader.int64(); + break; + } + case 3: { + message.rowOffset = reader.int64(); + break; + } + case 4: { + message.tableOptions = $root.google.privacy.dlp.v2.TableOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.labels, key); + message.labels[key] = value; + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a HybridFindingDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.HybridFindingDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.HybridFindingDetails} HybridFindingDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HybridFindingDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HybridFindingDetails message. + * @function verify + * @memberof google.privacy.dlp.v2.HybridFindingDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HybridFindingDetails.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.containerDetails != null && message.hasOwnProperty("containerDetails")) { + var error = $root.google.privacy.dlp.v2.Container.verify(message.containerDetails, long + 1); + if (error) + return "containerDetails." + error; + } + if (message.fileOffset != null && message.hasOwnProperty("fileOffset")) + if (!$util.isInteger(message.fileOffset) && !(message.fileOffset && $util.isInteger(message.fileOffset.low) && $util.isInteger(message.fileOffset.high))) + return "fileOffset: integer|Long expected"; + if (message.rowOffset != null && message.hasOwnProperty("rowOffset")) + if (!$util.isInteger(message.rowOffset) && !(message.rowOffset && $util.isInteger(message.rowOffset.low) && $util.isInteger(message.rowOffset.high))) + return "rowOffset: integer|Long expected"; + if (message.tableOptions != null && message.hasOwnProperty("tableOptions")) { + var error = $root.google.privacy.dlp.v2.TableOptions.verify(message.tableOptions, long + 1); + if (error) + return "tableOptions." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a HybridFindingDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.HybridFindingDetails + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.HybridFindingDetails} HybridFindingDetails + */ + HybridFindingDetails.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.HybridFindingDetails) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.HybridFindingDetails(); + if (object.containerDetails != null) { + if (typeof object.containerDetails !== "object") + throw TypeError(".google.privacy.dlp.v2.HybridFindingDetails.containerDetails: object expected"); + message.containerDetails = $root.google.privacy.dlp.v2.Container.fromObject(object.containerDetails, long + 1); + } + if (object.fileOffset != null) + if ($util.Long) + (message.fileOffset = $util.Long.fromValue(object.fileOffset)).unsigned = false; + else if (typeof object.fileOffset === "string") + message.fileOffset = parseInt(object.fileOffset, 10); + else if (typeof object.fileOffset === "number") + message.fileOffset = object.fileOffset; + else if (typeof object.fileOffset === "object") + message.fileOffset = new $util.LongBits(object.fileOffset.low >>> 0, object.fileOffset.high >>> 0).toNumber(); + if (object.rowOffset != null) + if ($util.Long) + (message.rowOffset = $util.Long.fromValue(object.rowOffset)).unsigned = false; + else if (typeof object.rowOffset === "string") + message.rowOffset = parseInt(object.rowOffset, 10); + else if (typeof object.rowOffset === "number") + message.rowOffset = object.rowOffset; + else if (typeof object.rowOffset === "object") + message.rowOffset = new $util.LongBits(object.rowOffset.low >>> 0, object.rowOffset.high >>> 0).toNumber(); + if (object.tableOptions != null) { + if (typeof object.tableOptions !== "object") + throw TypeError(".google.privacy.dlp.v2.HybridFindingDetails.tableOptions: object expected"); + message.tableOptions = $root.google.privacy.dlp.v2.TableOptions.fromObject(object.tableOptions, long + 1); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.privacy.dlp.v2.HybridFindingDetails.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.labels, keys[i]); + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a HybridFindingDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.HybridFindingDetails + * @static + * @param {google.privacy.dlp.v2.HybridFindingDetails} message HybridFindingDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HybridFindingDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.containerDetails = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.fileOffset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.fileOffset = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rowOffset = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.rowOffset = options.longs === String ? "0" : 0; + object.tableOptions = null; + } + if (message.containerDetails != null && message.hasOwnProperty("containerDetails")) + object.containerDetails = $root.google.privacy.dlp.v2.Container.toObject(message.containerDetails, options); + if (message.fileOffset != null && message.hasOwnProperty("fileOffset")) + if (typeof message.fileOffset === "number") + object.fileOffset = options.longs === String ? String(message.fileOffset) : message.fileOffset; + else + object.fileOffset = options.longs === String ? $util.Long.prototype.toString.call(message.fileOffset) : options.longs === Number ? new $util.LongBits(message.fileOffset.low >>> 0, message.fileOffset.high >>> 0).toNumber() : message.fileOffset; + if (message.rowOffset != null && message.hasOwnProperty("rowOffset")) + if (typeof message.rowOffset === "number") + object.rowOffset = options.longs === String ? String(message.rowOffset) : message.rowOffset; + else + object.rowOffset = options.longs === String ? $util.Long.prototype.toString.call(message.rowOffset) : options.longs === Number ? new $util.LongBits(message.rowOffset.low >>> 0, message.rowOffset.high >>> 0).toNumber() : message.rowOffset; + if (message.tableOptions != null && message.hasOwnProperty("tableOptions")) + object.tableOptions = $root.google.privacy.dlp.v2.TableOptions.toObject(message.tableOptions, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.labels, keys2[j]); + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + } + return object; + }; + + /** + * Converts this HybridFindingDetails to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.HybridFindingDetails + * @instance + * @returns {Object.} JSON object + */ + HybridFindingDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HybridFindingDetails + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.HybridFindingDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HybridFindingDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.HybridFindingDetails"; + }; + + return HybridFindingDetails; + })(); + + v2.HybridInspectResponse = (function() { + + /** + * Properties of a HybridInspectResponse. + * @memberof google.privacy.dlp.v2 + * @interface IHybridInspectResponse + */ + + /** + * Constructs a new HybridInspectResponse. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a HybridInspectResponse. + * @implements IHybridInspectResponse + * @constructor + * @param {google.privacy.dlp.v2.IHybridInspectResponse=} [properties] Properties to set + */ + function HybridInspectResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new HybridInspectResponse instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.HybridInspectResponse + * @static + * @param {google.privacy.dlp.v2.IHybridInspectResponse=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.HybridInspectResponse} HybridInspectResponse instance + */ + HybridInspectResponse.create = function create(properties) { + return new HybridInspectResponse(properties); + }; + + /** + * Encodes the specified HybridInspectResponse message. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectResponse.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.HybridInspectResponse + * @static + * @param {google.privacy.dlp.v2.IHybridInspectResponse} message HybridInspectResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HybridInspectResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified HybridInspectResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridInspectResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.HybridInspectResponse + * @static + * @param {google.privacy.dlp.v2.IHybridInspectResponse} message HybridInspectResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HybridInspectResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HybridInspectResponse message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.HybridInspectResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.HybridInspectResponse} HybridInspectResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HybridInspectResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.HybridInspectResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a HybridInspectResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.HybridInspectResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.HybridInspectResponse} HybridInspectResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HybridInspectResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HybridInspectResponse message. + * @function verify + * @memberof google.privacy.dlp.v2.HybridInspectResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HybridInspectResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a HybridInspectResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.HybridInspectResponse + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.HybridInspectResponse} HybridInspectResponse + */ + HybridInspectResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.HybridInspectResponse) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.HybridInspectResponse(); + }; + + /** + * Creates a plain object from a HybridInspectResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.HybridInspectResponse + * @static + * @param {google.privacy.dlp.v2.HybridInspectResponse} message HybridInspectResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HybridInspectResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this HybridInspectResponse to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.HybridInspectResponse + * @instance + * @returns {Object.} JSON object + */ + HybridInspectResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HybridInspectResponse + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.HybridInspectResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HybridInspectResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.HybridInspectResponse"; + }; + + return HybridInspectResponse; + })(); + + /** + * RelationalOperator enum. + * @name google.privacy.dlp.v2.RelationalOperator + * @enum {number} + * @property {number} RELATIONAL_OPERATOR_UNSPECIFIED=0 RELATIONAL_OPERATOR_UNSPECIFIED value + * @property {number} EQUAL_TO=1 EQUAL_TO value + * @property {number} NOT_EQUAL_TO=2 NOT_EQUAL_TO value + * @property {number} GREATER_THAN=3 GREATER_THAN value + * @property {number} LESS_THAN=4 LESS_THAN value + * @property {number} GREATER_THAN_OR_EQUALS=5 GREATER_THAN_OR_EQUALS value + * @property {number} LESS_THAN_OR_EQUALS=6 LESS_THAN_OR_EQUALS value + * @property {number} EXISTS=7 EXISTS value + */ + v2.RelationalOperator = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RELATIONAL_OPERATOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "EQUAL_TO"] = 1; + values[valuesById[2] = "NOT_EQUAL_TO"] = 2; + values[valuesById[3] = "GREATER_THAN"] = 3; + values[valuesById[4] = "LESS_THAN"] = 4; + values[valuesById[5] = "GREATER_THAN_OR_EQUALS"] = 5; + values[valuesById[6] = "LESS_THAN_OR_EQUALS"] = 6; + values[valuesById[7] = "EXISTS"] = 7; + return values; + })(); + + /** + * MatchingType enum. + * @name google.privacy.dlp.v2.MatchingType + * @enum {number} + * @property {number} MATCHING_TYPE_UNSPECIFIED=0 MATCHING_TYPE_UNSPECIFIED value + * @property {number} MATCHING_TYPE_FULL_MATCH=1 MATCHING_TYPE_FULL_MATCH value + * @property {number} MATCHING_TYPE_PARTIAL_MATCH=2 MATCHING_TYPE_PARTIAL_MATCH value + * @property {number} MATCHING_TYPE_INVERSE_MATCH=3 MATCHING_TYPE_INVERSE_MATCH value + * @property {number} MATCHING_TYPE_RULE_SPECIFIC=4 MATCHING_TYPE_RULE_SPECIFIC value + */ + v2.MatchingType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MATCHING_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MATCHING_TYPE_FULL_MATCH"] = 1; + values[valuesById[2] = "MATCHING_TYPE_PARTIAL_MATCH"] = 2; + values[valuesById[3] = "MATCHING_TYPE_INVERSE_MATCH"] = 3; + values[valuesById[4] = "MATCHING_TYPE_RULE_SPECIFIC"] = 4; + return values; + })(); + + v2.ImageContainmentType = (function() { + + /** + * Properties of an ImageContainmentType. + * @memberof google.privacy.dlp.v2 + * @interface IImageContainmentType + * @property {google.privacy.dlp.v2.IEncloses|null} [encloses] ImageContainmentType encloses + * @property {google.privacy.dlp.v2.IFullyInside|null} [fullyInside] ImageContainmentType fullyInside + * @property {google.privacy.dlp.v2.IOverlap|null} [overlaps] ImageContainmentType overlaps + */ + + /** + * Constructs a new ImageContainmentType. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an ImageContainmentType. + * @implements IImageContainmentType + * @constructor + * @param {google.privacy.dlp.v2.IImageContainmentType=} [properties] Properties to set + */ + function ImageContainmentType(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImageContainmentType encloses. + * @member {google.privacy.dlp.v2.IEncloses|null|undefined} encloses + * @memberof google.privacy.dlp.v2.ImageContainmentType + * @instance + */ + ImageContainmentType.prototype.encloses = null; + + /** + * ImageContainmentType fullyInside. + * @member {google.privacy.dlp.v2.IFullyInside|null|undefined} fullyInside + * @memberof google.privacy.dlp.v2.ImageContainmentType + * @instance + */ + ImageContainmentType.prototype.fullyInside = null; + + /** + * ImageContainmentType overlaps. + * @member {google.privacy.dlp.v2.IOverlap|null|undefined} overlaps + * @memberof google.privacy.dlp.v2.ImageContainmentType + * @instance + */ + ImageContainmentType.prototype.overlaps = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ImageContainmentType type. + * @member {"encloses"|"fullyInside"|"overlaps"|undefined} type + * @memberof google.privacy.dlp.v2.ImageContainmentType + * @instance + */ + Object.defineProperty(ImageContainmentType.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["encloses", "fullyInside", "overlaps"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImageContainmentType instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ImageContainmentType + * @static + * @param {google.privacy.dlp.v2.IImageContainmentType=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ImageContainmentType} ImageContainmentType instance + */ + ImageContainmentType.create = function create(properties) { + return new ImageContainmentType(properties); + }; + + /** + * Encodes the specified ImageContainmentType message. Does not implicitly {@link google.privacy.dlp.v2.ImageContainmentType.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ImageContainmentType + * @static + * @param {google.privacy.dlp.v2.IImageContainmentType} message ImageContainmentType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageContainmentType.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.encloses != null && Object.hasOwnProperty.call(message, "encloses")) + $root.google.privacy.dlp.v2.Encloses.encode(message.encloses, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyInside != null && Object.hasOwnProperty.call(message, "fullyInside")) + $root.google.privacy.dlp.v2.FullyInside.encode(message.fullyInside, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.overlaps != null && Object.hasOwnProperty.call(message, "overlaps")) + $root.google.privacy.dlp.v2.Overlap.encode(message.overlaps, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ImageContainmentType message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ImageContainmentType.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ImageContainmentType + * @static + * @param {google.privacy.dlp.v2.IImageContainmentType} message ImageContainmentType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageContainmentType.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImageContainmentType message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ImageContainmentType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ImageContainmentType} ImageContainmentType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageContainmentType.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ImageContainmentType(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.encloses = $root.google.privacy.dlp.v2.Encloses.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.fullyInside = $root.google.privacy.dlp.v2.FullyInside.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.overlaps = $root.google.privacy.dlp.v2.Overlap.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an ImageContainmentType message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ImageContainmentType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ImageContainmentType} ImageContainmentType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageContainmentType.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImageContainmentType message. + * @function verify + * @memberof google.privacy.dlp.v2.ImageContainmentType + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImageContainmentType.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.encloses != null && message.hasOwnProperty("encloses")) { + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.Encloses.verify(message.encloses, long + 1); + if (error) + return "encloses." + error; + } + } + if (message.fullyInside != null && message.hasOwnProperty("fullyInside")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.FullyInside.verify(message.fullyInside, long + 1); + if (error) + return "fullyInside." + error; + } + } + if (message.overlaps != null && message.hasOwnProperty("overlaps")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.Overlap.verify(message.overlaps, long + 1); + if (error) + return "overlaps." + error; + } + } + return null; + }; + + /** + * Creates an ImageContainmentType message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ImageContainmentType + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ImageContainmentType} ImageContainmentType + */ + ImageContainmentType.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ImageContainmentType) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ImageContainmentType(); + if (object.encloses != null) { + if (typeof object.encloses !== "object") + throw TypeError(".google.privacy.dlp.v2.ImageContainmentType.encloses: object expected"); + message.encloses = $root.google.privacy.dlp.v2.Encloses.fromObject(object.encloses, long + 1); + } + if (object.fullyInside != null) { + if (typeof object.fullyInside !== "object") + throw TypeError(".google.privacy.dlp.v2.ImageContainmentType.fullyInside: object expected"); + message.fullyInside = $root.google.privacy.dlp.v2.FullyInside.fromObject(object.fullyInside, long + 1); + } + if (object.overlaps != null) { + if (typeof object.overlaps !== "object") + throw TypeError(".google.privacy.dlp.v2.ImageContainmentType.overlaps: object expected"); + message.overlaps = $root.google.privacy.dlp.v2.Overlap.fromObject(object.overlaps, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an ImageContainmentType message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ImageContainmentType + * @static + * @param {google.privacy.dlp.v2.ImageContainmentType} message ImageContainmentType + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImageContainmentType.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.encloses != null && message.hasOwnProperty("encloses")) { + object.encloses = $root.google.privacy.dlp.v2.Encloses.toObject(message.encloses, options); + if (options.oneofs) + object.type = "encloses"; + } + if (message.fullyInside != null && message.hasOwnProperty("fullyInside")) { + object.fullyInside = $root.google.privacy.dlp.v2.FullyInside.toObject(message.fullyInside, options); + if (options.oneofs) + object.type = "fullyInside"; + } + if (message.overlaps != null && message.hasOwnProperty("overlaps")) { + object.overlaps = $root.google.privacy.dlp.v2.Overlap.toObject(message.overlaps, options); + if (options.oneofs) + object.type = "overlaps"; + } + return object; + }; + + /** + * Converts this ImageContainmentType to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ImageContainmentType + * @instance + * @returns {Object.} JSON object + */ + ImageContainmentType.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImageContainmentType + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ImageContainmentType + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImageContainmentType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ImageContainmentType"; + }; + + return ImageContainmentType; + })(); + + v2.Overlap = (function() { + + /** + * Properties of an Overlap. + * @memberof google.privacy.dlp.v2 + * @interface IOverlap + */ + + /** + * Constructs a new Overlap. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an Overlap. + * @implements IOverlap + * @constructor + * @param {google.privacy.dlp.v2.IOverlap=} [properties] Properties to set + */ + function Overlap(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Overlap instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Overlap + * @static + * @param {google.privacy.dlp.v2.IOverlap=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Overlap} Overlap instance + */ + Overlap.create = function create(properties) { + return new Overlap(properties); + }; + + /** + * Encodes the specified Overlap message. Does not implicitly {@link google.privacy.dlp.v2.Overlap.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Overlap + * @static + * @param {google.privacy.dlp.v2.IOverlap} message Overlap message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Overlap.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Overlap message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Overlap.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Overlap + * @static + * @param {google.privacy.dlp.v2.IOverlap} message Overlap message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Overlap.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Overlap message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Overlap + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Overlap} Overlap + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Overlap.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Overlap(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Overlap message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Overlap + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Overlap} Overlap + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Overlap.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Overlap message. + * @function verify + * @memberof google.privacy.dlp.v2.Overlap + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Overlap.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates an Overlap message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Overlap + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Overlap} Overlap + */ + Overlap.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Overlap) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.Overlap(); + }; + + /** + * Creates a plain object from an Overlap message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Overlap + * @static + * @param {google.privacy.dlp.v2.Overlap} message Overlap + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Overlap.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Overlap to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Overlap + * @instance + * @returns {Object.} JSON object + */ + Overlap.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Overlap + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Overlap + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Overlap.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Overlap"; + }; + + return Overlap; + })(); + + v2.Encloses = (function() { + + /** + * Properties of an Encloses. + * @memberof google.privacy.dlp.v2 + * @interface IEncloses + */ + + /** + * Constructs a new Encloses. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an Encloses. + * @implements IEncloses + * @constructor + * @param {google.privacy.dlp.v2.IEncloses=} [properties] Properties to set + */ + function Encloses(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Encloses instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Encloses + * @static + * @param {google.privacy.dlp.v2.IEncloses=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Encloses} Encloses instance + */ + Encloses.create = function create(properties) { + return new Encloses(properties); + }; + + /** + * Encodes the specified Encloses message. Does not implicitly {@link google.privacy.dlp.v2.Encloses.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Encloses + * @static + * @param {google.privacy.dlp.v2.IEncloses} message Encloses message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encloses.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Encloses message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Encloses.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Encloses + * @static + * @param {google.privacy.dlp.v2.IEncloses} message Encloses message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Encloses.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Encloses message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Encloses + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Encloses} Encloses + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encloses.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Encloses(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Encloses message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Encloses + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Encloses} Encloses + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Encloses.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Encloses message. + * @function verify + * @memberof google.privacy.dlp.v2.Encloses + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Encloses.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates an Encloses message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Encloses + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Encloses} Encloses + */ + Encloses.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Encloses) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.Encloses(); + }; + + /** + * Creates a plain object from an Encloses message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Encloses + * @static + * @param {google.privacy.dlp.v2.Encloses} message Encloses + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Encloses.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Encloses to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Encloses + * @instance + * @returns {Object.} JSON object + */ + Encloses.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Encloses + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Encloses + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Encloses.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Encloses"; + }; + + return Encloses; + })(); + + v2.FullyInside = (function() { + + /** + * Properties of a FullyInside. + * @memberof google.privacy.dlp.v2 + * @interface IFullyInside + */ + + /** + * Constructs a new FullyInside. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a FullyInside. + * @implements IFullyInside + * @constructor + * @param {google.privacy.dlp.v2.IFullyInside=} [properties] Properties to set + */ + function FullyInside(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new FullyInside instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.FullyInside + * @static + * @param {google.privacy.dlp.v2.IFullyInside=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.FullyInside} FullyInside instance + */ + FullyInside.create = function create(properties) { + return new FullyInside(properties); + }; + + /** + * Encodes the specified FullyInside message. Does not implicitly {@link google.privacy.dlp.v2.FullyInside.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.FullyInside + * @static + * @param {google.privacy.dlp.v2.IFullyInside} message FullyInside message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FullyInside.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified FullyInside message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FullyInside.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.FullyInside + * @static + * @param {google.privacy.dlp.v2.IFullyInside} message FullyInside message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FullyInside.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FullyInside message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.FullyInside + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.FullyInside} FullyInside + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FullyInside.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.FullyInside(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FullyInside message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.FullyInside + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.FullyInside} FullyInside + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FullyInside.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FullyInside message. + * @function verify + * @memberof google.privacy.dlp.v2.FullyInside + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FullyInside.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a FullyInside message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.FullyInside + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.FullyInside} FullyInside + */ + FullyInside.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.FullyInside) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.FullyInside(); + }; + + /** + * Creates a plain object from a FullyInside message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.FullyInside + * @static + * @param {google.privacy.dlp.v2.FullyInside} message FullyInside + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FullyInside.toObject = function toObject() { + return {}; + }; + + /** + * Converts this FullyInside to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.FullyInside + * @instance + * @returns {Object.} JSON object + */ + FullyInside.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FullyInside + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.FullyInside + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FullyInside.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.FullyInside"; + }; + + return FullyInside; + })(); + + /** + * ContentOption enum. + * @name google.privacy.dlp.v2.ContentOption + * @enum {number} + * @property {number} CONTENT_UNSPECIFIED=0 CONTENT_UNSPECIFIED value + * @property {number} CONTENT_TEXT=1 CONTENT_TEXT value + * @property {number} CONTENT_IMAGE=2 CONTENT_IMAGE value + */ + v2.ContentOption = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONTENT_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONTENT_TEXT"] = 1; + values[valuesById[2] = "CONTENT_IMAGE"] = 2; + return values; + })(); + + /** + * MetadataType enum. + * @name google.privacy.dlp.v2.MetadataType + * @enum {number} + * @property {number} METADATATYPE_UNSPECIFIED=0 METADATATYPE_UNSPECIFIED value + * @property {number} STORAGE_METADATA=2 STORAGE_METADATA value + * @property {number} CONTENT_METADATA=3 CONTENT_METADATA value + * @property {number} CLIENT_PROVIDED_METADATA=4 CLIENT_PROVIDED_METADATA value + */ + v2.MetadataType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METADATATYPE_UNSPECIFIED"] = 0; + values[valuesById[2] = "STORAGE_METADATA"] = 2; + values[valuesById[3] = "CONTENT_METADATA"] = 3; + values[valuesById[4] = "CLIENT_PROVIDED_METADATA"] = 4; + return values; + })(); + + /** + * InfoTypeSupportedBy enum. + * @name google.privacy.dlp.v2.InfoTypeSupportedBy + * @enum {number} + * @property {number} ENUM_TYPE_UNSPECIFIED=0 ENUM_TYPE_UNSPECIFIED value + * @property {number} INSPECT=1 INSPECT value + * @property {number} RISK_ANALYSIS=2 RISK_ANALYSIS value + */ + v2.InfoTypeSupportedBy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENUM_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INSPECT"] = 1; + values[valuesById[2] = "RISK_ANALYSIS"] = 2; + return values; + })(); + + /** + * DlpJobType enum. + * @name google.privacy.dlp.v2.DlpJobType + * @enum {number} + * @property {number} DLP_JOB_TYPE_UNSPECIFIED=0 DLP_JOB_TYPE_UNSPECIFIED value + * @property {number} INSPECT_JOB=1 INSPECT_JOB value + * @property {number} RISK_ANALYSIS_JOB=2 RISK_ANALYSIS_JOB value + */ + v2.DlpJobType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DLP_JOB_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "INSPECT_JOB"] = 1; + values[valuesById[2] = "RISK_ANALYSIS_JOB"] = 2; + return values; + })(); + + /** + * StoredInfoTypeState enum. + * @name google.privacy.dlp.v2.StoredInfoTypeState + * @enum {number} + * @property {number} STORED_INFO_TYPE_STATE_UNSPECIFIED=0 STORED_INFO_TYPE_STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} READY=2 READY value + * @property {number} FAILED=3 FAILED value + * @property {number} INVALID=4 INVALID value + */ + v2.StoredInfoTypeState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STORED_INFO_TYPE_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "READY"] = 2; + values[valuesById[3] = "FAILED"] = 3; + values[valuesById[4] = "INVALID"] = 4; + return values; + })(); + + v2.ListProjectDataProfilesRequest = (function() { + + /** + * Properties of a ListProjectDataProfilesRequest. + * @memberof google.privacy.dlp.v2 + * @interface IListProjectDataProfilesRequest + * @property {string|null} [parent] ListProjectDataProfilesRequest parent + * @property {string|null} [pageToken] ListProjectDataProfilesRequest pageToken + * @property {number|null} [pageSize] ListProjectDataProfilesRequest pageSize + * @property {string|null} [orderBy] ListProjectDataProfilesRequest orderBy + * @property {string|null} [filter] ListProjectDataProfilesRequest filter + */ + + /** + * Constructs a new ListProjectDataProfilesRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListProjectDataProfilesRequest. + * @implements IListProjectDataProfilesRequest + * @constructor + * @param {google.privacy.dlp.v2.IListProjectDataProfilesRequest=} [properties] Properties to set + */ + function ListProjectDataProfilesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListProjectDataProfilesRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesRequest + * @instance + */ + ListProjectDataProfilesRequest.prototype.parent = ""; + + /** + * ListProjectDataProfilesRequest pageToken. + * @member {string} pageToken + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesRequest + * @instance + */ + ListProjectDataProfilesRequest.prototype.pageToken = ""; + + /** + * ListProjectDataProfilesRequest pageSize. + * @member {number} pageSize + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesRequest + * @instance + */ + ListProjectDataProfilesRequest.prototype.pageSize = 0; + + /** + * ListProjectDataProfilesRequest orderBy. + * @member {string} orderBy + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesRequest + * @instance + */ + ListProjectDataProfilesRequest.prototype.orderBy = ""; + + /** + * ListProjectDataProfilesRequest filter. + * @member {string} filter + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesRequest + * @instance + */ + ListProjectDataProfilesRequest.prototype.filter = ""; + + /** + * Creates a new ListProjectDataProfilesRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesRequest + * @static + * @param {google.privacy.dlp.v2.IListProjectDataProfilesRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListProjectDataProfilesRequest} ListProjectDataProfilesRequest instance + */ + ListProjectDataProfilesRequest.create = function create(properties) { + return new ListProjectDataProfilesRequest(properties); + }; + + /** + * Encodes the specified ListProjectDataProfilesRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListProjectDataProfilesRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesRequest + * @static + * @param {google.privacy.dlp.v2.IListProjectDataProfilesRequest} message ListProjectDataProfilesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListProjectDataProfilesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListProjectDataProfilesRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListProjectDataProfilesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesRequest + * @static + * @param {google.privacy.dlp.v2.IListProjectDataProfilesRequest} message ListProjectDataProfilesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListProjectDataProfilesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListProjectDataProfilesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ListProjectDataProfilesRequest} ListProjectDataProfilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListProjectDataProfilesRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListProjectDataProfilesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListProjectDataProfilesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListProjectDataProfilesRequest} ListProjectDataProfilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListProjectDataProfilesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListProjectDataProfilesRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListProjectDataProfilesRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListProjectDataProfilesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListProjectDataProfilesRequest} ListProjectDataProfilesRequest + */ + ListProjectDataProfilesRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ListProjectDataProfilesRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ListProjectDataProfilesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListProjectDataProfilesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesRequest + * @static + * @param {google.privacy.dlp.v2.ListProjectDataProfilesRequest} message ListProjectDataProfilesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListProjectDataProfilesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + object.orderBy = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListProjectDataProfilesRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesRequest + * @instance + * @returns {Object.} JSON object + */ + ListProjectDataProfilesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListProjectDataProfilesRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListProjectDataProfilesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ListProjectDataProfilesRequest"; + }; + + return ListProjectDataProfilesRequest; + })(); + + v2.ListProjectDataProfilesResponse = (function() { + + /** + * Properties of a ListProjectDataProfilesResponse. + * @memberof google.privacy.dlp.v2 + * @interface IListProjectDataProfilesResponse + * @property {Array.|null} [projectDataProfiles] ListProjectDataProfilesResponse projectDataProfiles + * @property {string|null} [nextPageToken] ListProjectDataProfilesResponse nextPageToken + */ + + /** + * Constructs a new ListProjectDataProfilesResponse. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListProjectDataProfilesResponse. + * @implements IListProjectDataProfilesResponse + * @constructor + * @param {google.privacy.dlp.v2.IListProjectDataProfilesResponse=} [properties] Properties to set + */ + function ListProjectDataProfilesResponse(properties) { + this.projectDataProfiles = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListProjectDataProfilesResponse projectDataProfiles. + * @member {Array.} projectDataProfiles + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesResponse + * @instance + */ + ListProjectDataProfilesResponse.prototype.projectDataProfiles = $util.emptyArray; + + /** + * ListProjectDataProfilesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesResponse + * @instance + */ + ListProjectDataProfilesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListProjectDataProfilesResponse instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesResponse + * @static + * @param {google.privacy.dlp.v2.IListProjectDataProfilesResponse=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListProjectDataProfilesResponse} ListProjectDataProfilesResponse instance + */ + ListProjectDataProfilesResponse.create = function create(properties) { + return new ListProjectDataProfilesResponse(properties); + }; + + /** + * Encodes the specified ListProjectDataProfilesResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListProjectDataProfilesResponse.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesResponse + * @static + * @param {google.privacy.dlp.v2.IListProjectDataProfilesResponse} message ListProjectDataProfilesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListProjectDataProfilesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectDataProfiles != null && message.projectDataProfiles.length) + for (var i = 0; i < message.projectDataProfiles.length; ++i) + $root.google.privacy.dlp.v2.ProjectDataProfile.encode(message.projectDataProfiles[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListProjectDataProfilesResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListProjectDataProfilesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesResponse + * @static + * @param {google.privacy.dlp.v2.IListProjectDataProfilesResponse} message ListProjectDataProfilesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListProjectDataProfilesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListProjectDataProfilesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ListProjectDataProfilesResponse} ListProjectDataProfilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListProjectDataProfilesResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListProjectDataProfilesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.projectDataProfiles && message.projectDataProfiles.length)) + message.projectDataProfiles = []; + message.projectDataProfiles.push($root.google.privacy.dlp.v2.ProjectDataProfile.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListProjectDataProfilesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListProjectDataProfilesResponse} ListProjectDataProfilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListProjectDataProfilesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListProjectDataProfilesResponse message. + * @function verify + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListProjectDataProfilesResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.projectDataProfiles != null && message.hasOwnProperty("projectDataProfiles")) { + if (!Array.isArray(message.projectDataProfiles)) + return "projectDataProfiles: array expected"; + for (var i = 0; i < message.projectDataProfiles.length; ++i) { + var error = $root.google.privacy.dlp.v2.ProjectDataProfile.verify(message.projectDataProfiles[i], long + 1); + if (error) + return "projectDataProfiles." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListProjectDataProfilesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListProjectDataProfilesResponse} ListProjectDataProfilesResponse + */ + ListProjectDataProfilesResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ListProjectDataProfilesResponse) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ListProjectDataProfilesResponse(); + if (object.projectDataProfiles) { + if (!Array.isArray(object.projectDataProfiles)) + throw TypeError(".google.privacy.dlp.v2.ListProjectDataProfilesResponse.projectDataProfiles: array expected"); + message.projectDataProfiles = []; + for (var i = 0; i < object.projectDataProfiles.length; ++i) { + if (typeof object.projectDataProfiles[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.ListProjectDataProfilesResponse.projectDataProfiles: object expected"); + message.projectDataProfiles[i] = $root.google.privacy.dlp.v2.ProjectDataProfile.fromObject(object.projectDataProfiles[i], long + 1); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListProjectDataProfilesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesResponse + * @static + * @param {google.privacy.dlp.v2.ListProjectDataProfilesResponse} message ListProjectDataProfilesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListProjectDataProfilesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.projectDataProfiles = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.projectDataProfiles && message.projectDataProfiles.length) { + object.projectDataProfiles = []; + for (var j = 0; j < message.projectDataProfiles.length; ++j) + object.projectDataProfiles[j] = $root.google.privacy.dlp.v2.ProjectDataProfile.toObject(message.projectDataProfiles[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListProjectDataProfilesResponse to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesResponse + * @instance + * @returns {Object.} JSON object + */ + ListProjectDataProfilesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListProjectDataProfilesResponse + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ListProjectDataProfilesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListProjectDataProfilesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ListProjectDataProfilesResponse"; + }; + + return ListProjectDataProfilesResponse; + })(); + + v2.ListTableDataProfilesRequest = (function() { + + /** + * Properties of a ListTableDataProfilesRequest. + * @memberof google.privacy.dlp.v2 + * @interface IListTableDataProfilesRequest + * @property {string|null} [parent] ListTableDataProfilesRequest parent + * @property {string|null} [pageToken] ListTableDataProfilesRequest pageToken + * @property {number|null} [pageSize] ListTableDataProfilesRequest pageSize + * @property {string|null} [orderBy] ListTableDataProfilesRequest orderBy + * @property {string|null} [filter] ListTableDataProfilesRequest filter + */ + + /** + * Constructs a new ListTableDataProfilesRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListTableDataProfilesRequest. + * @implements IListTableDataProfilesRequest + * @constructor + * @param {google.privacy.dlp.v2.IListTableDataProfilesRequest=} [properties] Properties to set + */ + function ListTableDataProfilesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListTableDataProfilesRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.ListTableDataProfilesRequest + * @instance + */ + ListTableDataProfilesRequest.prototype.parent = ""; + + /** + * ListTableDataProfilesRequest pageToken. + * @member {string} pageToken + * @memberof google.privacy.dlp.v2.ListTableDataProfilesRequest + * @instance + */ + ListTableDataProfilesRequest.prototype.pageToken = ""; + + /** + * ListTableDataProfilesRequest pageSize. + * @member {number} pageSize + * @memberof google.privacy.dlp.v2.ListTableDataProfilesRequest + * @instance + */ + ListTableDataProfilesRequest.prototype.pageSize = 0; + + /** + * ListTableDataProfilesRequest orderBy. + * @member {string} orderBy + * @memberof google.privacy.dlp.v2.ListTableDataProfilesRequest + * @instance + */ + ListTableDataProfilesRequest.prototype.orderBy = ""; + + /** + * ListTableDataProfilesRequest filter. + * @member {string} filter + * @memberof google.privacy.dlp.v2.ListTableDataProfilesRequest + * @instance + */ + ListTableDataProfilesRequest.prototype.filter = ""; + + /** + * Creates a new ListTableDataProfilesRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListTableDataProfilesRequest + * @static + * @param {google.privacy.dlp.v2.IListTableDataProfilesRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListTableDataProfilesRequest} ListTableDataProfilesRequest instance + */ + ListTableDataProfilesRequest.create = function create(properties) { + return new ListTableDataProfilesRequest(properties); + }; + + /** + * Encodes the specified ListTableDataProfilesRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListTableDataProfilesRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListTableDataProfilesRequest + * @static + * @param {google.privacy.dlp.v2.IListTableDataProfilesRequest} message ListTableDataProfilesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTableDataProfilesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListTableDataProfilesRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListTableDataProfilesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListTableDataProfilesRequest + * @static + * @param {google.privacy.dlp.v2.IListTableDataProfilesRequest} message ListTableDataProfilesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTableDataProfilesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTableDataProfilesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListTableDataProfilesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ListTableDataProfilesRequest} ListTableDataProfilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTableDataProfilesRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListTableDataProfilesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListTableDataProfilesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListTableDataProfilesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListTableDataProfilesRequest} ListTableDataProfilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTableDataProfilesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTableDataProfilesRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.ListTableDataProfilesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTableDataProfilesRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListTableDataProfilesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListTableDataProfilesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListTableDataProfilesRequest} ListTableDataProfilesRequest + */ + ListTableDataProfilesRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ListTableDataProfilesRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ListTableDataProfilesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListTableDataProfilesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListTableDataProfilesRequest + * @static + * @param {google.privacy.dlp.v2.ListTableDataProfilesRequest} message ListTableDataProfilesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTableDataProfilesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + object.orderBy = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListTableDataProfilesRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListTableDataProfilesRequest + * @instance + * @returns {Object.} JSON object + */ + ListTableDataProfilesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListTableDataProfilesRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ListTableDataProfilesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTableDataProfilesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ListTableDataProfilesRequest"; + }; + + return ListTableDataProfilesRequest; + })(); + + v2.ListTableDataProfilesResponse = (function() { + + /** + * Properties of a ListTableDataProfilesResponse. + * @memberof google.privacy.dlp.v2 + * @interface IListTableDataProfilesResponse + * @property {Array.|null} [tableDataProfiles] ListTableDataProfilesResponse tableDataProfiles + * @property {string|null} [nextPageToken] ListTableDataProfilesResponse nextPageToken + */ + + /** + * Constructs a new ListTableDataProfilesResponse. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListTableDataProfilesResponse. + * @implements IListTableDataProfilesResponse + * @constructor + * @param {google.privacy.dlp.v2.IListTableDataProfilesResponse=} [properties] Properties to set + */ + function ListTableDataProfilesResponse(properties) { + this.tableDataProfiles = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListTableDataProfilesResponse tableDataProfiles. + * @member {Array.} tableDataProfiles + * @memberof google.privacy.dlp.v2.ListTableDataProfilesResponse + * @instance + */ + ListTableDataProfilesResponse.prototype.tableDataProfiles = $util.emptyArray; + + /** + * ListTableDataProfilesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.privacy.dlp.v2.ListTableDataProfilesResponse + * @instance + */ + ListTableDataProfilesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListTableDataProfilesResponse instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListTableDataProfilesResponse + * @static + * @param {google.privacy.dlp.v2.IListTableDataProfilesResponse=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListTableDataProfilesResponse} ListTableDataProfilesResponse instance + */ + ListTableDataProfilesResponse.create = function create(properties) { + return new ListTableDataProfilesResponse(properties); + }; + + /** + * Encodes the specified ListTableDataProfilesResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListTableDataProfilesResponse.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListTableDataProfilesResponse + * @static + * @param {google.privacy.dlp.v2.IListTableDataProfilesResponse} message ListTableDataProfilesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTableDataProfilesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tableDataProfiles != null && message.tableDataProfiles.length) + for (var i = 0; i < message.tableDataProfiles.length; ++i) + $root.google.privacy.dlp.v2.TableDataProfile.encode(message.tableDataProfiles[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListTableDataProfilesResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListTableDataProfilesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListTableDataProfilesResponse + * @static + * @param {google.privacy.dlp.v2.IListTableDataProfilesResponse} message ListTableDataProfilesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListTableDataProfilesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListTableDataProfilesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListTableDataProfilesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ListTableDataProfilesResponse} ListTableDataProfilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTableDataProfilesResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListTableDataProfilesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.tableDataProfiles && message.tableDataProfiles.length)) + message.tableDataProfiles = []; + message.tableDataProfiles.push($root.google.privacy.dlp.v2.TableDataProfile.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListTableDataProfilesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListTableDataProfilesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListTableDataProfilesResponse} ListTableDataProfilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListTableDataProfilesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListTableDataProfilesResponse message. + * @function verify + * @memberof google.privacy.dlp.v2.ListTableDataProfilesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListTableDataProfilesResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.tableDataProfiles != null && message.hasOwnProperty("tableDataProfiles")) { + if (!Array.isArray(message.tableDataProfiles)) + return "tableDataProfiles: array expected"; + for (var i = 0; i < message.tableDataProfiles.length; ++i) { + var error = $root.google.privacy.dlp.v2.TableDataProfile.verify(message.tableDataProfiles[i], long + 1); + if (error) + return "tableDataProfiles." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListTableDataProfilesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListTableDataProfilesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListTableDataProfilesResponse} ListTableDataProfilesResponse + */ + ListTableDataProfilesResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ListTableDataProfilesResponse) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ListTableDataProfilesResponse(); + if (object.tableDataProfiles) { + if (!Array.isArray(object.tableDataProfiles)) + throw TypeError(".google.privacy.dlp.v2.ListTableDataProfilesResponse.tableDataProfiles: array expected"); + message.tableDataProfiles = []; + for (var i = 0; i < object.tableDataProfiles.length; ++i) { + if (typeof object.tableDataProfiles[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.ListTableDataProfilesResponse.tableDataProfiles: object expected"); + message.tableDataProfiles[i] = $root.google.privacy.dlp.v2.TableDataProfile.fromObject(object.tableDataProfiles[i], long + 1); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListTableDataProfilesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListTableDataProfilesResponse + * @static + * @param {google.privacy.dlp.v2.ListTableDataProfilesResponse} message ListTableDataProfilesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListTableDataProfilesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tableDataProfiles = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.tableDataProfiles && message.tableDataProfiles.length) { + object.tableDataProfiles = []; + for (var j = 0; j < message.tableDataProfiles.length; ++j) + object.tableDataProfiles[j] = $root.google.privacy.dlp.v2.TableDataProfile.toObject(message.tableDataProfiles[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListTableDataProfilesResponse to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListTableDataProfilesResponse + * @instance + * @returns {Object.} JSON object + */ + ListTableDataProfilesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListTableDataProfilesResponse + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ListTableDataProfilesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListTableDataProfilesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ListTableDataProfilesResponse"; + }; + + return ListTableDataProfilesResponse; + })(); + + v2.ListColumnDataProfilesRequest = (function() { + + /** + * Properties of a ListColumnDataProfilesRequest. + * @memberof google.privacy.dlp.v2 + * @interface IListColumnDataProfilesRequest + * @property {string|null} [parent] ListColumnDataProfilesRequest parent + * @property {string|null} [pageToken] ListColumnDataProfilesRequest pageToken + * @property {number|null} [pageSize] ListColumnDataProfilesRequest pageSize + * @property {string|null} [orderBy] ListColumnDataProfilesRequest orderBy + * @property {string|null} [filter] ListColumnDataProfilesRequest filter + */ + + /** + * Constructs a new ListColumnDataProfilesRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListColumnDataProfilesRequest. + * @implements IListColumnDataProfilesRequest + * @constructor + * @param {google.privacy.dlp.v2.IListColumnDataProfilesRequest=} [properties] Properties to set + */ + function ListColumnDataProfilesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListColumnDataProfilesRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesRequest + * @instance + */ + ListColumnDataProfilesRequest.prototype.parent = ""; + + /** + * ListColumnDataProfilesRequest pageToken. + * @member {string} pageToken + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesRequest + * @instance + */ + ListColumnDataProfilesRequest.prototype.pageToken = ""; + + /** + * ListColumnDataProfilesRequest pageSize. + * @member {number} pageSize + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesRequest + * @instance + */ + ListColumnDataProfilesRequest.prototype.pageSize = 0; + + /** + * ListColumnDataProfilesRequest orderBy. + * @member {string} orderBy + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesRequest + * @instance + */ + ListColumnDataProfilesRequest.prototype.orderBy = ""; + + /** + * ListColumnDataProfilesRequest filter. + * @member {string} filter + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesRequest + * @instance + */ + ListColumnDataProfilesRequest.prototype.filter = ""; + + /** + * Creates a new ListColumnDataProfilesRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesRequest + * @static + * @param {google.privacy.dlp.v2.IListColumnDataProfilesRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListColumnDataProfilesRequest} ListColumnDataProfilesRequest instance + */ + ListColumnDataProfilesRequest.create = function create(properties) { + return new ListColumnDataProfilesRequest(properties); + }; + + /** + * Encodes the specified ListColumnDataProfilesRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListColumnDataProfilesRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesRequest + * @static + * @param {google.privacy.dlp.v2.IListColumnDataProfilesRequest} message ListColumnDataProfilesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListColumnDataProfilesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListColumnDataProfilesRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListColumnDataProfilesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesRequest + * @static + * @param {google.privacy.dlp.v2.IListColumnDataProfilesRequest} message ListColumnDataProfilesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListColumnDataProfilesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListColumnDataProfilesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ListColumnDataProfilesRequest} ListColumnDataProfilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListColumnDataProfilesRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListColumnDataProfilesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListColumnDataProfilesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListColumnDataProfilesRequest} ListColumnDataProfilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListColumnDataProfilesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListColumnDataProfilesRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListColumnDataProfilesRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListColumnDataProfilesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListColumnDataProfilesRequest} ListColumnDataProfilesRequest + */ + ListColumnDataProfilesRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ListColumnDataProfilesRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ListColumnDataProfilesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListColumnDataProfilesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesRequest + * @static + * @param {google.privacy.dlp.v2.ListColumnDataProfilesRequest} message ListColumnDataProfilesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListColumnDataProfilesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + object.orderBy = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListColumnDataProfilesRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesRequest + * @instance + * @returns {Object.} JSON object + */ + ListColumnDataProfilesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListColumnDataProfilesRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListColumnDataProfilesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ListColumnDataProfilesRequest"; + }; + + return ListColumnDataProfilesRequest; + })(); + + v2.ListColumnDataProfilesResponse = (function() { + + /** + * Properties of a ListColumnDataProfilesResponse. + * @memberof google.privacy.dlp.v2 + * @interface IListColumnDataProfilesResponse + * @property {Array.|null} [columnDataProfiles] ListColumnDataProfilesResponse columnDataProfiles + * @property {string|null} [nextPageToken] ListColumnDataProfilesResponse nextPageToken + */ + + /** + * Constructs a new ListColumnDataProfilesResponse. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListColumnDataProfilesResponse. + * @implements IListColumnDataProfilesResponse + * @constructor + * @param {google.privacy.dlp.v2.IListColumnDataProfilesResponse=} [properties] Properties to set + */ + function ListColumnDataProfilesResponse(properties) { + this.columnDataProfiles = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListColumnDataProfilesResponse columnDataProfiles. + * @member {Array.} columnDataProfiles + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesResponse + * @instance + */ + ListColumnDataProfilesResponse.prototype.columnDataProfiles = $util.emptyArray; + + /** + * ListColumnDataProfilesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesResponse + * @instance + */ + ListColumnDataProfilesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListColumnDataProfilesResponse instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesResponse + * @static + * @param {google.privacy.dlp.v2.IListColumnDataProfilesResponse=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListColumnDataProfilesResponse} ListColumnDataProfilesResponse instance + */ + ListColumnDataProfilesResponse.create = function create(properties) { + return new ListColumnDataProfilesResponse(properties); + }; + + /** + * Encodes the specified ListColumnDataProfilesResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListColumnDataProfilesResponse.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesResponse + * @static + * @param {google.privacy.dlp.v2.IListColumnDataProfilesResponse} message ListColumnDataProfilesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListColumnDataProfilesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.columnDataProfiles != null && message.columnDataProfiles.length) + for (var i = 0; i < message.columnDataProfiles.length; ++i) + $root.google.privacy.dlp.v2.ColumnDataProfile.encode(message.columnDataProfiles[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListColumnDataProfilesResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListColumnDataProfilesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesResponse + * @static + * @param {google.privacy.dlp.v2.IListColumnDataProfilesResponse} message ListColumnDataProfilesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListColumnDataProfilesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListColumnDataProfilesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ListColumnDataProfilesResponse} ListColumnDataProfilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListColumnDataProfilesResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListColumnDataProfilesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.columnDataProfiles && message.columnDataProfiles.length)) + message.columnDataProfiles = []; + message.columnDataProfiles.push($root.google.privacy.dlp.v2.ColumnDataProfile.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListColumnDataProfilesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListColumnDataProfilesResponse} ListColumnDataProfilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListColumnDataProfilesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListColumnDataProfilesResponse message. + * @function verify + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListColumnDataProfilesResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.columnDataProfiles != null && message.hasOwnProperty("columnDataProfiles")) { + if (!Array.isArray(message.columnDataProfiles)) + return "columnDataProfiles: array expected"; + for (var i = 0; i < message.columnDataProfiles.length; ++i) { + var error = $root.google.privacy.dlp.v2.ColumnDataProfile.verify(message.columnDataProfiles[i], long + 1); + if (error) + return "columnDataProfiles." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListColumnDataProfilesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListColumnDataProfilesResponse} ListColumnDataProfilesResponse + */ + ListColumnDataProfilesResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ListColumnDataProfilesResponse) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ListColumnDataProfilesResponse(); + if (object.columnDataProfiles) { + if (!Array.isArray(object.columnDataProfiles)) + throw TypeError(".google.privacy.dlp.v2.ListColumnDataProfilesResponse.columnDataProfiles: array expected"); + message.columnDataProfiles = []; + for (var i = 0; i < object.columnDataProfiles.length; ++i) { + if (typeof object.columnDataProfiles[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.ListColumnDataProfilesResponse.columnDataProfiles: object expected"); + message.columnDataProfiles[i] = $root.google.privacy.dlp.v2.ColumnDataProfile.fromObject(object.columnDataProfiles[i], long + 1); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListColumnDataProfilesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesResponse + * @static + * @param {google.privacy.dlp.v2.ListColumnDataProfilesResponse} message ListColumnDataProfilesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListColumnDataProfilesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.columnDataProfiles = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.columnDataProfiles && message.columnDataProfiles.length) { + object.columnDataProfiles = []; + for (var j = 0; j < message.columnDataProfiles.length; ++j) + object.columnDataProfiles[j] = $root.google.privacy.dlp.v2.ColumnDataProfile.toObject(message.columnDataProfiles[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListColumnDataProfilesResponse to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesResponse + * @instance + * @returns {Object.} JSON object + */ + ListColumnDataProfilesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListColumnDataProfilesResponse + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ListColumnDataProfilesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListColumnDataProfilesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ListColumnDataProfilesResponse"; + }; + + return ListColumnDataProfilesResponse; + })(); + + v2.DataRiskLevel = (function() { + + /** + * Properties of a DataRiskLevel. + * @memberof google.privacy.dlp.v2 + * @interface IDataRiskLevel + * @property {google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore|null} [score] DataRiskLevel score + */ + + /** + * Constructs a new DataRiskLevel. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DataRiskLevel. + * @implements IDataRiskLevel + * @constructor + * @param {google.privacy.dlp.v2.IDataRiskLevel=} [properties] Properties to set + */ + function DataRiskLevel(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataRiskLevel score. + * @member {google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore} score + * @memberof google.privacy.dlp.v2.DataRiskLevel + * @instance + */ + DataRiskLevel.prototype.score = 0; + + /** + * Creates a new DataRiskLevel instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataRiskLevel + * @static + * @param {google.privacy.dlp.v2.IDataRiskLevel=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataRiskLevel} DataRiskLevel instance + */ + DataRiskLevel.create = function create(properties) { + return new DataRiskLevel(properties); + }; + + /** + * Encodes the specified DataRiskLevel message. Does not implicitly {@link google.privacy.dlp.v2.DataRiskLevel.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataRiskLevel + * @static + * @param {google.privacy.dlp.v2.IDataRiskLevel} message DataRiskLevel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataRiskLevel.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.score); + return writer; + }; + + /** + * Encodes the specified DataRiskLevel message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataRiskLevel.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataRiskLevel + * @static + * @param {google.privacy.dlp.v2.IDataRiskLevel} message DataRiskLevel message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataRiskLevel.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataRiskLevel message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataRiskLevel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataRiskLevel} DataRiskLevel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataRiskLevel.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataRiskLevel(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.score = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DataRiskLevel message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataRiskLevel + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataRiskLevel} DataRiskLevel + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataRiskLevel.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataRiskLevel message. + * @function verify + * @memberof google.privacy.dlp.v2.DataRiskLevel + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataRiskLevel.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.score != null && message.hasOwnProperty("score")) + switch (message.score) { + default: + return "score: enum value expected"; + case 0: + case 10: + case 12: + case 20: + case 30: + break; + } + return null; + }; + + /** + * Creates a DataRiskLevel message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataRiskLevel + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataRiskLevel} DataRiskLevel + */ + DataRiskLevel.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DataRiskLevel) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DataRiskLevel(); + switch (object.score) { + default: + if (typeof object.score === "number") { + message.score = object.score; + break; + } + break; + case "RISK_SCORE_UNSPECIFIED": + case 0: + message.score = 0; + break; + case "RISK_LOW": + case 10: + message.score = 10; + break; + case "RISK_UNKNOWN": + case 12: + message.score = 12; + break; + case "RISK_MODERATE": + case 20: + message.score = 20; + break; + case "RISK_HIGH": + case 30: + message.score = 30; + break; + } + return message; + }; + + /** + * Creates a plain object from a DataRiskLevel message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataRiskLevel + * @static + * @param {google.privacy.dlp.v2.DataRiskLevel} message DataRiskLevel + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataRiskLevel.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.score = options.enums === String ? "RISK_SCORE_UNSPECIFIED" : 0; + if (message.score != null && message.hasOwnProperty("score")) + object.score = options.enums === String ? $root.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore[message.score] === undefined ? message.score : $root.google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore[message.score] : message.score; + return object; + }; + + /** + * Converts this DataRiskLevel to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataRiskLevel + * @instance + * @returns {Object.} JSON object + */ + DataRiskLevel.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataRiskLevel + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataRiskLevel + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataRiskLevel.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataRiskLevel"; + }; + + /** + * DataRiskLevelScore enum. + * @name google.privacy.dlp.v2.DataRiskLevel.DataRiskLevelScore + * @enum {number} + * @property {number} RISK_SCORE_UNSPECIFIED=0 RISK_SCORE_UNSPECIFIED value + * @property {number} RISK_LOW=10 RISK_LOW value + * @property {number} RISK_UNKNOWN=12 RISK_UNKNOWN value + * @property {number} RISK_MODERATE=20 RISK_MODERATE value + * @property {number} RISK_HIGH=30 RISK_HIGH value + */ + DataRiskLevel.DataRiskLevelScore = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RISK_SCORE_UNSPECIFIED"] = 0; + values[valuesById[10] = "RISK_LOW"] = 10; + values[valuesById[12] = "RISK_UNKNOWN"] = 12; + values[valuesById[20] = "RISK_MODERATE"] = 20; + values[valuesById[30] = "RISK_HIGH"] = 30; + return values; + })(); + + return DataRiskLevel; + })(); + + v2.ProjectDataProfile = (function() { + + /** + * Properties of a ProjectDataProfile. + * @memberof google.privacy.dlp.v2 + * @interface IProjectDataProfile + * @property {string|null} [name] ProjectDataProfile name + * @property {string|null} [projectId] ProjectDataProfile projectId + * @property {google.protobuf.ITimestamp|null} [profileLastGenerated] ProjectDataProfile profileLastGenerated + * @property {google.privacy.dlp.v2.ISensitivityScore|null} [sensitivityScore] ProjectDataProfile sensitivityScore + * @property {google.privacy.dlp.v2.IDataRiskLevel|null} [dataRiskLevel] ProjectDataProfile dataRiskLevel + * @property {google.privacy.dlp.v2.IProfileStatus|null} [profileStatus] ProjectDataProfile profileStatus + * @property {number|Long|null} [tableDataProfileCount] ProjectDataProfile tableDataProfileCount + * @property {number|Long|null} [fileStoreDataProfileCount] ProjectDataProfile fileStoreDataProfileCount + */ + + /** + * Constructs a new ProjectDataProfile. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ProjectDataProfile. + * @implements IProjectDataProfile + * @constructor + * @param {google.privacy.dlp.v2.IProjectDataProfile=} [properties] Properties to set + */ + function ProjectDataProfile(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProjectDataProfile name. + * @member {string} name + * @memberof google.privacy.dlp.v2.ProjectDataProfile + * @instance + */ + ProjectDataProfile.prototype.name = ""; + + /** + * ProjectDataProfile projectId. + * @member {string} projectId + * @memberof google.privacy.dlp.v2.ProjectDataProfile + * @instance + */ + ProjectDataProfile.prototype.projectId = ""; + + /** + * ProjectDataProfile profileLastGenerated. + * @member {google.protobuf.ITimestamp|null|undefined} profileLastGenerated + * @memberof google.privacy.dlp.v2.ProjectDataProfile + * @instance + */ + ProjectDataProfile.prototype.profileLastGenerated = null; + + /** + * ProjectDataProfile sensitivityScore. + * @member {google.privacy.dlp.v2.ISensitivityScore|null|undefined} sensitivityScore + * @memberof google.privacy.dlp.v2.ProjectDataProfile + * @instance + */ + ProjectDataProfile.prototype.sensitivityScore = null; + + /** + * ProjectDataProfile dataRiskLevel. + * @member {google.privacy.dlp.v2.IDataRiskLevel|null|undefined} dataRiskLevel + * @memberof google.privacy.dlp.v2.ProjectDataProfile + * @instance + */ + ProjectDataProfile.prototype.dataRiskLevel = null; + + /** + * ProjectDataProfile profileStatus. + * @member {google.privacy.dlp.v2.IProfileStatus|null|undefined} profileStatus + * @memberof google.privacy.dlp.v2.ProjectDataProfile + * @instance + */ + ProjectDataProfile.prototype.profileStatus = null; + + /** + * ProjectDataProfile tableDataProfileCount. + * @member {number|Long} tableDataProfileCount + * @memberof google.privacy.dlp.v2.ProjectDataProfile + * @instance + */ + ProjectDataProfile.prototype.tableDataProfileCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * ProjectDataProfile fileStoreDataProfileCount. + * @member {number|Long} fileStoreDataProfileCount + * @memberof google.privacy.dlp.v2.ProjectDataProfile + * @instance + */ + ProjectDataProfile.prototype.fileStoreDataProfileCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new ProjectDataProfile instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ProjectDataProfile + * @static + * @param {google.privacy.dlp.v2.IProjectDataProfile=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ProjectDataProfile} ProjectDataProfile instance + */ + ProjectDataProfile.create = function create(properties) { + return new ProjectDataProfile(properties); + }; + + /** + * Encodes the specified ProjectDataProfile message. Does not implicitly {@link google.privacy.dlp.v2.ProjectDataProfile.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ProjectDataProfile + * @static + * @param {google.privacy.dlp.v2.IProjectDataProfile} message ProjectDataProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProjectDataProfile.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectId); + if (message.profileLastGenerated != null && Object.hasOwnProperty.call(message, "profileLastGenerated")) + $root.google.protobuf.Timestamp.encode(message.profileLastGenerated, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.sensitivityScore != null && Object.hasOwnProperty.call(message, "sensitivityScore")) + $root.google.privacy.dlp.v2.SensitivityScore.encode(message.sensitivityScore, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.dataRiskLevel != null && Object.hasOwnProperty.call(message, "dataRiskLevel")) + $root.google.privacy.dlp.v2.DataRiskLevel.encode(message.dataRiskLevel, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.profileStatus != null && Object.hasOwnProperty.call(message, "profileStatus")) + $root.google.privacy.dlp.v2.ProfileStatus.encode(message.profileStatus, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.tableDataProfileCount != null && Object.hasOwnProperty.call(message, "tableDataProfileCount")) + writer.uint32(/* id 9, wireType 0 =*/72).int64(message.tableDataProfileCount); + if (message.fileStoreDataProfileCount != null && Object.hasOwnProperty.call(message, "fileStoreDataProfileCount")) + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.fileStoreDataProfileCount); + return writer; + }; + + /** + * Encodes the specified ProjectDataProfile message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ProjectDataProfile.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ProjectDataProfile + * @static + * @param {google.privacy.dlp.v2.IProjectDataProfile} message ProjectDataProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProjectDataProfile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProjectDataProfile message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ProjectDataProfile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ProjectDataProfile} ProjectDataProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProjectDataProfile.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ProjectDataProfile(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.projectId = reader.string(); + break; + } + case 3: { + message.profileLastGenerated = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.dataRiskLevel = $root.google.privacy.dlp.v2.DataRiskLevel.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 7: { + message.profileStatus = $root.google.privacy.dlp.v2.ProfileStatus.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 9: { + message.tableDataProfileCount = reader.int64(); + break; + } + case 10: { + message.fileStoreDataProfileCount = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ProjectDataProfile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ProjectDataProfile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ProjectDataProfile} ProjectDataProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProjectDataProfile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProjectDataProfile message. + * @function verify + * @memberof google.privacy.dlp.v2.ProjectDataProfile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProjectDataProfile.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.profileLastGenerated != null && message.hasOwnProperty("profileLastGenerated")) { + var error = $root.google.protobuf.Timestamp.verify(message.profileLastGenerated, long + 1); + if (error) + return "profileLastGenerated." + error; + } + if (message.sensitivityScore != null && message.hasOwnProperty("sensitivityScore")) { + var error = $root.google.privacy.dlp.v2.SensitivityScore.verify(message.sensitivityScore, long + 1); + if (error) + return "sensitivityScore." + error; + } + if (message.dataRiskLevel != null && message.hasOwnProperty("dataRiskLevel")) { + var error = $root.google.privacy.dlp.v2.DataRiskLevel.verify(message.dataRiskLevel, long + 1); + if (error) + return "dataRiskLevel." + error; + } + if (message.profileStatus != null && message.hasOwnProperty("profileStatus")) { + var error = $root.google.privacy.dlp.v2.ProfileStatus.verify(message.profileStatus, long + 1); + if (error) + return "profileStatus." + error; + } + if (message.tableDataProfileCount != null && message.hasOwnProperty("tableDataProfileCount")) + if (!$util.isInteger(message.tableDataProfileCount) && !(message.tableDataProfileCount && $util.isInteger(message.tableDataProfileCount.low) && $util.isInteger(message.tableDataProfileCount.high))) + return "tableDataProfileCount: integer|Long expected"; + if (message.fileStoreDataProfileCount != null && message.hasOwnProperty("fileStoreDataProfileCount")) + if (!$util.isInteger(message.fileStoreDataProfileCount) && !(message.fileStoreDataProfileCount && $util.isInteger(message.fileStoreDataProfileCount.low) && $util.isInteger(message.fileStoreDataProfileCount.high))) + return "fileStoreDataProfileCount: integer|Long expected"; + return null; + }; + + /** + * Creates a ProjectDataProfile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ProjectDataProfile + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ProjectDataProfile} ProjectDataProfile + */ + ProjectDataProfile.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ProjectDataProfile) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ProjectDataProfile(); + if (object.name != null) + message.name = String(object.name); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.profileLastGenerated != null) { + if (typeof object.profileLastGenerated !== "object") + throw TypeError(".google.privacy.dlp.v2.ProjectDataProfile.profileLastGenerated: object expected"); + message.profileLastGenerated = $root.google.protobuf.Timestamp.fromObject(object.profileLastGenerated, long + 1); + } + if (object.sensitivityScore != null) { + if (typeof object.sensitivityScore !== "object") + throw TypeError(".google.privacy.dlp.v2.ProjectDataProfile.sensitivityScore: object expected"); + message.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.fromObject(object.sensitivityScore, long + 1); + } + if (object.dataRiskLevel != null) { + if (typeof object.dataRiskLevel !== "object") + throw TypeError(".google.privacy.dlp.v2.ProjectDataProfile.dataRiskLevel: object expected"); + message.dataRiskLevel = $root.google.privacy.dlp.v2.DataRiskLevel.fromObject(object.dataRiskLevel, long + 1); + } + if (object.profileStatus != null) { + if (typeof object.profileStatus !== "object") + throw TypeError(".google.privacy.dlp.v2.ProjectDataProfile.profileStatus: object expected"); + message.profileStatus = $root.google.privacy.dlp.v2.ProfileStatus.fromObject(object.profileStatus, long + 1); + } + if (object.tableDataProfileCount != null) + if ($util.Long) + (message.tableDataProfileCount = $util.Long.fromValue(object.tableDataProfileCount)).unsigned = false; + else if (typeof object.tableDataProfileCount === "string") + message.tableDataProfileCount = parseInt(object.tableDataProfileCount, 10); + else if (typeof object.tableDataProfileCount === "number") + message.tableDataProfileCount = object.tableDataProfileCount; + else if (typeof object.tableDataProfileCount === "object") + message.tableDataProfileCount = new $util.LongBits(object.tableDataProfileCount.low >>> 0, object.tableDataProfileCount.high >>> 0).toNumber(); + if (object.fileStoreDataProfileCount != null) + if ($util.Long) + (message.fileStoreDataProfileCount = $util.Long.fromValue(object.fileStoreDataProfileCount)).unsigned = false; + else if (typeof object.fileStoreDataProfileCount === "string") + message.fileStoreDataProfileCount = parseInt(object.fileStoreDataProfileCount, 10); + else if (typeof object.fileStoreDataProfileCount === "number") + message.fileStoreDataProfileCount = object.fileStoreDataProfileCount; + else if (typeof object.fileStoreDataProfileCount === "object") + message.fileStoreDataProfileCount = new $util.LongBits(object.fileStoreDataProfileCount.low >>> 0, object.fileStoreDataProfileCount.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a ProjectDataProfile message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ProjectDataProfile + * @static + * @param {google.privacy.dlp.v2.ProjectDataProfile} message ProjectDataProfile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProjectDataProfile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.projectId = ""; + object.profileLastGenerated = null; + object.sensitivityScore = null; + object.dataRiskLevel = null; + object.profileStatus = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.tableDataProfileCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.tableDataProfileCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.fileStoreDataProfileCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.fileStoreDataProfileCount = options.longs === String ? "0" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.profileLastGenerated != null && message.hasOwnProperty("profileLastGenerated")) + object.profileLastGenerated = $root.google.protobuf.Timestamp.toObject(message.profileLastGenerated, options); + if (message.sensitivityScore != null && message.hasOwnProperty("sensitivityScore")) + object.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.toObject(message.sensitivityScore, options); + if (message.dataRiskLevel != null && message.hasOwnProperty("dataRiskLevel")) + object.dataRiskLevel = $root.google.privacy.dlp.v2.DataRiskLevel.toObject(message.dataRiskLevel, options); + if (message.profileStatus != null && message.hasOwnProperty("profileStatus")) + object.profileStatus = $root.google.privacy.dlp.v2.ProfileStatus.toObject(message.profileStatus, options); + if (message.tableDataProfileCount != null && message.hasOwnProperty("tableDataProfileCount")) + if (typeof message.tableDataProfileCount === "number") + object.tableDataProfileCount = options.longs === String ? String(message.tableDataProfileCount) : message.tableDataProfileCount; + else + object.tableDataProfileCount = options.longs === String ? $util.Long.prototype.toString.call(message.tableDataProfileCount) : options.longs === Number ? new $util.LongBits(message.tableDataProfileCount.low >>> 0, message.tableDataProfileCount.high >>> 0).toNumber() : message.tableDataProfileCount; + if (message.fileStoreDataProfileCount != null && message.hasOwnProperty("fileStoreDataProfileCount")) + if (typeof message.fileStoreDataProfileCount === "number") + object.fileStoreDataProfileCount = options.longs === String ? String(message.fileStoreDataProfileCount) : message.fileStoreDataProfileCount; + else + object.fileStoreDataProfileCount = options.longs === String ? $util.Long.prototype.toString.call(message.fileStoreDataProfileCount) : options.longs === Number ? new $util.LongBits(message.fileStoreDataProfileCount.low >>> 0, message.fileStoreDataProfileCount.high >>> 0).toNumber() : message.fileStoreDataProfileCount; + return object; + }; + + /** + * Converts this ProjectDataProfile to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ProjectDataProfile + * @instance + * @returns {Object.} JSON object + */ + ProjectDataProfile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProjectDataProfile + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ProjectDataProfile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProjectDataProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ProjectDataProfile"; + }; + + return ProjectDataProfile; + })(); + + /** + * ResourceVisibility enum. + * @name google.privacy.dlp.v2.ResourceVisibility + * @enum {number} + * @property {number} RESOURCE_VISIBILITY_UNSPECIFIED=0 RESOURCE_VISIBILITY_UNSPECIFIED value + * @property {number} RESOURCE_VISIBILITY_PUBLIC=10 RESOURCE_VISIBILITY_PUBLIC value + * @property {number} RESOURCE_VISIBILITY_INCONCLUSIVE=15 RESOURCE_VISIBILITY_INCONCLUSIVE value + * @property {number} RESOURCE_VISIBILITY_RESTRICTED=20 RESOURCE_VISIBILITY_RESTRICTED value + */ + v2.ResourceVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESOURCE_VISIBILITY_UNSPECIFIED"] = 0; + values[valuesById[10] = "RESOURCE_VISIBILITY_PUBLIC"] = 10; + values[valuesById[15] = "RESOURCE_VISIBILITY_INCONCLUSIVE"] = 15; + values[valuesById[20] = "RESOURCE_VISIBILITY_RESTRICTED"] = 20; + return values; + })(); + + v2.DataProfileConfigSnapshot = (function() { + + /** + * Properties of a DataProfileConfigSnapshot. + * @memberof google.privacy.dlp.v2 + * @interface IDataProfileConfigSnapshot + * @property {google.privacy.dlp.v2.IInspectConfig|null} [inspectConfig] DataProfileConfigSnapshot inspectConfig + * @property {google.privacy.dlp.v2.IDataProfileJobConfig|null} [dataProfileJob] DataProfileConfigSnapshot dataProfileJob + * @property {google.privacy.dlp.v2.IDiscoveryConfig|null} [discoveryConfig] DataProfileConfigSnapshot discoveryConfig + * @property {string|null} [inspectTemplateName] DataProfileConfigSnapshot inspectTemplateName + * @property {google.protobuf.ITimestamp|null} [inspectTemplateModifiedTime] DataProfileConfigSnapshot inspectTemplateModifiedTime + */ + + /** + * Constructs a new DataProfileConfigSnapshot. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DataProfileConfigSnapshot. + * @implements IDataProfileConfigSnapshot + * @constructor + * @param {google.privacy.dlp.v2.IDataProfileConfigSnapshot=} [properties] Properties to set + */ + function DataProfileConfigSnapshot(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataProfileConfigSnapshot inspectConfig. + * @member {google.privacy.dlp.v2.IInspectConfig|null|undefined} inspectConfig + * @memberof google.privacy.dlp.v2.DataProfileConfigSnapshot + * @instance + */ + DataProfileConfigSnapshot.prototype.inspectConfig = null; + + /** + * DataProfileConfigSnapshot dataProfileJob. + * @member {google.privacy.dlp.v2.IDataProfileJobConfig|null|undefined} dataProfileJob + * @memberof google.privacy.dlp.v2.DataProfileConfigSnapshot + * @instance + */ + DataProfileConfigSnapshot.prototype.dataProfileJob = null; + + /** + * DataProfileConfigSnapshot discoveryConfig. + * @member {google.privacy.dlp.v2.IDiscoveryConfig|null|undefined} discoveryConfig + * @memberof google.privacy.dlp.v2.DataProfileConfigSnapshot + * @instance + */ + DataProfileConfigSnapshot.prototype.discoveryConfig = null; + + /** + * DataProfileConfigSnapshot inspectTemplateName. + * @member {string} inspectTemplateName + * @memberof google.privacy.dlp.v2.DataProfileConfigSnapshot + * @instance + */ + DataProfileConfigSnapshot.prototype.inspectTemplateName = ""; + + /** + * DataProfileConfigSnapshot inspectTemplateModifiedTime. + * @member {google.protobuf.ITimestamp|null|undefined} inspectTemplateModifiedTime + * @memberof google.privacy.dlp.v2.DataProfileConfigSnapshot + * @instance + */ + DataProfileConfigSnapshot.prototype.inspectTemplateModifiedTime = null; + + /** + * Creates a new DataProfileConfigSnapshot instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfileConfigSnapshot + * @static + * @param {google.privacy.dlp.v2.IDataProfileConfigSnapshot=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfileConfigSnapshot} DataProfileConfigSnapshot instance + */ + DataProfileConfigSnapshot.create = function create(properties) { + return new DataProfileConfigSnapshot(properties); + }; + + /** + * Encodes the specified DataProfileConfigSnapshot message. Does not implicitly {@link google.privacy.dlp.v2.DataProfileConfigSnapshot.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfileConfigSnapshot + * @static + * @param {google.privacy.dlp.v2.IDataProfileConfigSnapshot} message DataProfileConfigSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileConfigSnapshot.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inspectConfig != null && Object.hasOwnProperty.call(message, "inspectConfig")) + $root.google.privacy.dlp.v2.InspectConfig.encode(message.inspectConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.dataProfileJob != null && Object.hasOwnProperty.call(message, "dataProfileJob")) + $root.google.privacy.dlp.v2.DataProfileJobConfig.encode(message.dataProfileJob, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.discoveryConfig != null && Object.hasOwnProperty.call(message, "discoveryConfig")) + $root.google.privacy.dlp.v2.DiscoveryConfig.encode(message.discoveryConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.inspectTemplateName != null && Object.hasOwnProperty.call(message, "inspectTemplateName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.inspectTemplateName); + if (message.inspectTemplateModifiedTime != null && Object.hasOwnProperty.call(message, "inspectTemplateModifiedTime")) + $root.google.protobuf.Timestamp.encode(message.inspectTemplateModifiedTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataProfileConfigSnapshot message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfileConfigSnapshot.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileConfigSnapshot + * @static + * @param {google.privacy.dlp.v2.IDataProfileConfigSnapshot} message DataProfileConfigSnapshot message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfileConfigSnapshot.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataProfileConfigSnapshot message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfileConfigSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfileConfigSnapshot} DataProfileConfigSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileConfigSnapshot.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfileConfigSnapshot(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.dataProfileJob = $root.google.privacy.dlp.v2.DataProfileJobConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.discoveryConfig = $root.google.privacy.dlp.v2.DiscoveryConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.inspectTemplateName = reader.string(); + break; + } + case 6: { + message.inspectTemplateModifiedTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DataProfileConfigSnapshot message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfileConfigSnapshot + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfileConfigSnapshot} DataProfileConfigSnapshot + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfileConfigSnapshot.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataProfileConfigSnapshot message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfileConfigSnapshot + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataProfileConfigSnapshot.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.inspectConfig != null && message.hasOwnProperty("inspectConfig")) { + var error = $root.google.privacy.dlp.v2.InspectConfig.verify(message.inspectConfig, long + 1); + if (error) + return "inspectConfig." + error; + } + if (message.dataProfileJob != null && message.hasOwnProperty("dataProfileJob")) { + var error = $root.google.privacy.dlp.v2.DataProfileJobConfig.verify(message.dataProfileJob, long + 1); + if (error) + return "dataProfileJob." + error; + } + if (message.discoveryConfig != null && message.hasOwnProperty("discoveryConfig")) { + var error = $root.google.privacy.dlp.v2.DiscoveryConfig.verify(message.discoveryConfig, long + 1); + if (error) + return "discoveryConfig." + error; + } + if (message.inspectTemplateName != null && message.hasOwnProperty("inspectTemplateName")) + if (!$util.isString(message.inspectTemplateName)) + return "inspectTemplateName: string expected"; + if (message.inspectTemplateModifiedTime != null && message.hasOwnProperty("inspectTemplateModifiedTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.inspectTemplateModifiedTime, long + 1); + if (error) + return "inspectTemplateModifiedTime." + error; + } + return null; + }; + + /** + * Creates a DataProfileConfigSnapshot message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfileConfigSnapshot + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfileConfigSnapshot} DataProfileConfigSnapshot + */ + DataProfileConfigSnapshot.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfileConfigSnapshot) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DataProfileConfigSnapshot(); + if (object.inspectConfig != null) { + if (typeof object.inspectConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileConfigSnapshot.inspectConfig: object expected"); + message.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.fromObject(object.inspectConfig, long + 1); + } + if (object.dataProfileJob != null) { + if (typeof object.dataProfileJob !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileConfigSnapshot.dataProfileJob: object expected"); + message.dataProfileJob = $root.google.privacy.dlp.v2.DataProfileJobConfig.fromObject(object.dataProfileJob, long + 1); + } + if (object.discoveryConfig != null) { + if (typeof object.discoveryConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileConfigSnapshot.discoveryConfig: object expected"); + message.discoveryConfig = $root.google.privacy.dlp.v2.DiscoveryConfig.fromObject(object.discoveryConfig, long + 1); + } + if (object.inspectTemplateName != null) + message.inspectTemplateName = String(object.inspectTemplateName); + if (object.inspectTemplateModifiedTime != null) { + if (typeof object.inspectTemplateModifiedTime !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfileConfigSnapshot.inspectTemplateModifiedTime: object expected"); + message.inspectTemplateModifiedTime = $root.google.protobuf.Timestamp.fromObject(object.inspectTemplateModifiedTime, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DataProfileConfigSnapshot message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfileConfigSnapshot + * @static + * @param {google.privacy.dlp.v2.DataProfileConfigSnapshot} message DataProfileConfigSnapshot + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataProfileConfigSnapshot.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.inspectConfig = null; + object.dataProfileJob = null; + object.discoveryConfig = null; + object.inspectTemplateName = ""; + object.inspectTemplateModifiedTime = null; + } + if (message.inspectConfig != null && message.hasOwnProperty("inspectConfig")) + object.inspectConfig = $root.google.privacy.dlp.v2.InspectConfig.toObject(message.inspectConfig, options); + if (message.dataProfileJob != null && message.hasOwnProperty("dataProfileJob")) + object.dataProfileJob = $root.google.privacy.dlp.v2.DataProfileJobConfig.toObject(message.dataProfileJob, options); + if (message.discoveryConfig != null && message.hasOwnProperty("discoveryConfig")) + object.discoveryConfig = $root.google.privacy.dlp.v2.DiscoveryConfig.toObject(message.discoveryConfig, options); + if (message.inspectTemplateName != null && message.hasOwnProperty("inspectTemplateName")) + object.inspectTemplateName = message.inspectTemplateName; + if (message.inspectTemplateModifiedTime != null && message.hasOwnProperty("inspectTemplateModifiedTime")) + object.inspectTemplateModifiedTime = $root.google.protobuf.Timestamp.toObject(message.inspectTemplateModifiedTime, options); + return object; + }; + + /** + * Converts this DataProfileConfigSnapshot to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfileConfigSnapshot + * @instance + * @returns {Object.} JSON object + */ + DataProfileConfigSnapshot.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataProfileConfigSnapshot + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfileConfigSnapshot + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataProfileConfigSnapshot.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfileConfigSnapshot"; + }; + + return DataProfileConfigSnapshot; + })(); + + v2.TableDataProfile = (function() { + + /** + * Properties of a TableDataProfile. + * @memberof google.privacy.dlp.v2 + * @interface ITableDataProfile + * @property {string|null} [name] TableDataProfile name + * @property {google.privacy.dlp.v2.IDataSourceType|null} [dataSourceType] TableDataProfile dataSourceType + * @property {string|null} [projectDataProfile] TableDataProfile projectDataProfile + * @property {string|null} [datasetProjectId] TableDataProfile datasetProjectId + * @property {string|null} [datasetLocation] TableDataProfile datasetLocation + * @property {string|null} [datasetId] TableDataProfile datasetId + * @property {string|null} [tableId] TableDataProfile tableId + * @property {string|null} [fullResource] TableDataProfile fullResource + * @property {google.privacy.dlp.v2.IProfileStatus|null} [profileStatus] TableDataProfile profileStatus + * @property {google.privacy.dlp.v2.TableDataProfile.State|null} [state] TableDataProfile state + * @property {google.privacy.dlp.v2.ISensitivityScore|null} [sensitivityScore] TableDataProfile sensitivityScore + * @property {google.privacy.dlp.v2.IDataRiskLevel|null} [dataRiskLevel] TableDataProfile dataRiskLevel + * @property {Array.|null} [predictedInfoTypes] TableDataProfile predictedInfoTypes + * @property {Array.|null} [otherInfoTypes] TableDataProfile otherInfoTypes + * @property {google.privacy.dlp.v2.IDataProfileConfigSnapshot|null} [configSnapshot] TableDataProfile configSnapshot + * @property {google.protobuf.ITimestamp|null} [lastModifiedTime] TableDataProfile lastModifiedTime + * @property {google.protobuf.ITimestamp|null} [expirationTime] TableDataProfile expirationTime + * @property {number|Long|null} [scannedColumnCount] TableDataProfile scannedColumnCount + * @property {number|Long|null} [failedColumnCount] TableDataProfile failedColumnCount + * @property {number|Long|null} [tableSizeBytes] TableDataProfile tableSizeBytes + * @property {number|Long|null} [rowCount] TableDataProfile rowCount + * @property {google.privacy.dlp.v2.EncryptionStatus|null} [encryptionStatus] TableDataProfile encryptionStatus + * @property {google.privacy.dlp.v2.ResourceVisibility|null} [resourceVisibility] TableDataProfile resourceVisibility + * @property {google.protobuf.ITimestamp|null} [profileLastGenerated] TableDataProfile profileLastGenerated + * @property {Object.|null} [resourceLabels] TableDataProfile resourceLabels + * @property {google.protobuf.ITimestamp|null} [createTime] TableDataProfile createTime + * @property {google.privacy.dlp.v2.IBigQueryTable|null} [sampleFindingsTable] TableDataProfile sampleFindingsTable + * @property {Array.|null} [tags] TableDataProfile tags + * @property {Array.|null} [relatedResources] TableDataProfile relatedResources + * @property {Array.|null} [domains] TableDataProfile domains + */ + + /** + * Constructs a new TableDataProfile. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a TableDataProfile. + * @implements ITableDataProfile + * @constructor + * @param {google.privacy.dlp.v2.ITableDataProfile=} [properties] Properties to set + */ + function TableDataProfile(properties) { + this.predictedInfoTypes = []; + this.otherInfoTypes = []; + this.resourceLabels = {}; + this.tags = []; + this.relatedResources = []; + this.domains = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TableDataProfile name. + * @member {string} name + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.name = ""; + + /** + * TableDataProfile dataSourceType. + * @member {google.privacy.dlp.v2.IDataSourceType|null|undefined} dataSourceType + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.dataSourceType = null; + + /** + * TableDataProfile projectDataProfile. + * @member {string} projectDataProfile + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.projectDataProfile = ""; + + /** + * TableDataProfile datasetProjectId. + * @member {string} datasetProjectId + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.datasetProjectId = ""; + + /** + * TableDataProfile datasetLocation. + * @member {string} datasetLocation + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.datasetLocation = ""; + + /** + * TableDataProfile datasetId. + * @member {string} datasetId + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.datasetId = ""; + + /** + * TableDataProfile tableId. + * @member {string} tableId + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.tableId = ""; + + /** + * TableDataProfile fullResource. + * @member {string} fullResource + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.fullResource = ""; + + /** + * TableDataProfile profileStatus. + * @member {google.privacy.dlp.v2.IProfileStatus|null|undefined} profileStatus + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.profileStatus = null; + + /** + * TableDataProfile state. + * @member {google.privacy.dlp.v2.TableDataProfile.State} state + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.state = 0; + + /** + * TableDataProfile sensitivityScore. + * @member {google.privacy.dlp.v2.ISensitivityScore|null|undefined} sensitivityScore + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.sensitivityScore = null; + + /** + * TableDataProfile dataRiskLevel. + * @member {google.privacy.dlp.v2.IDataRiskLevel|null|undefined} dataRiskLevel + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.dataRiskLevel = null; + + /** + * TableDataProfile predictedInfoTypes. + * @member {Array.} predictedInfoTypes + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.predictedInfoTypes = $util.emptyArray; + + /** + * TableDataProfile otherInfoTypes. + * @member {Array.} otherInfoTypes + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.otherInfoTypes = $util.emptyArray; + + /** + * TableDataProfile configSnapshot. + * @member {google.privacy.dlp.v2.IDataProfileConfigSnapshot|null|undefined} configSnapshot + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.configSnapshot = null; + + /** + * TableDataProfile lastModifiedTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastModifiedTime + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.lastModifiedTime = null; + + /** + * TableDataProfile expirationTime. + * @member {google.protobuf.ITimestamp|null|undefined} expirationTime + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.expirationTime = null; + + /** + * TableDataProfile scannedColumnCount. + * @member {number|Long} scannedColumnCount + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.scannedColumnCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TableDataProfile failedColumnCount. + * @member {number|Long} failedColumnCount + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.failedColumnCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TableDataProfile tableSizeBytes. + * @member {number|Long} tableSizeBytes + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.tableSizeBytes = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TableDataProfile rowCount. + * @member {number|Long} rowCount + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.rowCount = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * TableDataProfile encryptionStatus. + * @member {google.privacy.dlp.v2.EncryptionStatus} encryptionStatus + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.encryptionStatus = 0; + + /** + * TableDataProfile resourceVisibility. + * @member {google.privacy.dlp.v2.ResourceVisibility} resourceVisibility + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.resourceVisibility = 0; + + /** + * TableDataProfile profileLastGenerated. + * @member {google.protobuf.ITimestamp|null|undefined} profileLastGenerated + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.profileLastGenerated = null; + + /** + * TableDataProfile resourceLabels. + * @member {Object.} resourceLabels + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.resourceLabels = $util.emptyObject; + + /** + * TableDataProfile createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.createTime = null; + + /** + * TableDataProfile sampleFindingsTable. + * @member {google.privacy.dlp.v2.IBigQueryTable|null|undefined} sampleFindingsTable + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.sampleFindingsTable = null; + + /** + * TableDataProfile tags. + * @member {Array.} tags + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.tags = $util.emptyArray; + + /** + * TableDataProfile relatedResources. + * @member {Array.} relatedResources + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.relatedResources = $util.emptyArray; + + /** + * TableDataProfile domains. + * @member {Array.} domains + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + */ + TableDataProfile.prototype.domains = $util.emptyArray; + + /** + * Creates a new TableDataProfile instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.TableDataProfile + * @static + * @param {google.privacy.dlp.v2.ITableDataProfile=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.TableDataProfile} TableDataProfile instance + */ + TableDataProfile.create = function create(properties) { + return new TableDataProfile(properties); + }; + + /** + * Encodes the specified TableDataProfile message. Does not implicitly {@link google.privacy.dlp.v2.TableDataProfile.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.TableDataProfile + * @static + * @param {google.privacy.dlp.v2.ITableDataProfile} message TableDataProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableDataProfile.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.projectDataProfile != null && Object.hasOwnProperty.call(message, "projectDataProfile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectDataProfile); + if (message.fullResource != null && Object.hasOwnProperty.call(message, "fullResource")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.fullResource); + if (message.sensitivityScore != null && Object.hasOwnProperty.call(message, "sensitivityScore")) + $root.google.privacy.dlp.v2.SensitivityScore.encode(message.sensitivityScore, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.dataRiskLevel != null && Object.hasOwnProperty.call(message, "dataRiskLevel")) + $root.google.privacy.dlp.v2.DataRiskLevel.encode(message.dataRiskLevel, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.configSnapshot != null && Object.hasOwnProperty.call(message, "configSnapshot")) + $root.google.privacy.dlp.v2.DataProfileConfigSnapshot.encode(message.configSnapshot, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.lastModifiedTime != null && Object.hasOwnProperty.call(message, "lastModifiedTime")) + $root.google.protobuf.Timestamp.encode(message.lastModifiedTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.expirationTime != null && Object.hasOwnProperty.call(message, "expirationTime")) + $root.google.protobuf.Timestamp.encode(message.expirationTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.scannedColumnCount != null && Object.hasOwnProperty.call(message, "scannedColumnCount")) + writer.uint32(/* id 10, wireType 0 =*/80).int64(message.scannedColumnCount); + if (message.failedColumnCount != null && Object.hasOwnProperty.call(message, "failedColumnCount")) + writer.uint32(/* id 11, wireType 0 =*/88).int64(message.failedColumnCount); + if (message.tableSizeBytes != null && Object.hasOwnProperty.call(message, "tableSizeBytes")) + writer.uint32(/* id 12, wireType 0 =*/96).int64(message.tableSizeBytes); + if (message.rowCount != null && Object.hasOwnProperty.call(message, "rowCount")) + writer.uint32(/* id 13, wireType 0 =*/104).int64(message.rowCount); + if (message.encryptionStatus != null && Object.hasOwnProperty.call(message, "encryptionStatus")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.encryptionStatus); + if (message.resourceVisibility != null && Object.hasOwnProperty.call(message, "resourceVisibility")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.resourceVisibility); + if (message.profileLastGenerated != null && Object.hasOwnProperty.call(message, "profileLastGenerated")) + $root.google.protobuf.Timestamp.encode(message.profileLastGenerated, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.resourceLabels != null && Object.hasOwnProperty.call(message, "resourceLabels")) + for (var keys = Object.keys(message.resourceLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 17, wireType 2 =*/138).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.resourceLabels[keys[i]]).ldelim(); + if (message.profileStatus != null && Object.hasOwnProperty.call(message, "profileStatus")) + $root.google.privacy.dlp.v2.ProfileStatus.encode(message.profileStatus, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 22, wireType 0 =*/176).int32(message.state); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.datasetProjectId != null && Object.hasOwnProperty.call(message, "datasetProjectId")) + writer.uint32(/* id 24, wireType 2 =*/194).string(message.datasetProjectId); + if (message.datasetId != null && Object.hasOwnProperty.call(message, "datasetId")) + writer.uint32(/* id 25, wireType 2 =*/202).string(message.datasetId); + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) + writer.uint32(/* id 26, wireType 2 =*/210).string(message.tableId); + if (message.predictedInfoTypes != null && message.predictedInfoTypes.length) + for (var i = 0; i < message.predictedInfoTypes.length; ++i) + $root.google.privacy.dlp.v2.InfoTypeSummary.encode(message.predictedInfoTypes[i], writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.otherInfoTypes != null && message.otherInfoTypes.length) + for (var i = 0; i < message.otherInfoTypes.length; ++i) + $root.google.privacy.dlp.v2.OtherInfoTypeSummary.encode(message.otherInfoTypes[i], writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + if (message.datasetLocation != null && Object.hasOwnProperty.call(message, "datasetLocation")) + writer.uint32(/* id 29, wireType 2 =*/234).string(message.datasetLocation); + if (message.dataSourceType != null && Object.hasOwnProperty.call(message, "dataSourceType")) + $root.google.privacy.dlp.v2.DataSourceType.encode(message.dataSourceType, writer.uint32(/* id 36, wireType 2 =*/290).fork()).ldelim(); + if (message.sampleFindingsTable != null && Object.hasOwnProperty.call(message, "sampleFindingsTable")) + $root.google.privacy.dlp.v2.BigQueryTable.encode(message.sampleFindingsTable, writer.uint32(/* id 37, wireType 2 =*/298).fork()).ldelim(); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + $root.google.privacy.dlp.v2.Tag.encode(message.tags[i], writer.uint32(/* id 39, wireType 2 =*/314).fork()).ldelim(); + if (message.relatedResources != null && message.relatedResources.length) + for (var i = 0; i < message.relatedResources.length; ++i) + $root.google.privacy.dlp.v2.RelatedResource.encode(message.relatedResources[i], writer.uint32(/* id 41, wireType 2 =*/330).fork()).ldelim(); + if (message.domains != null && message.domains.length) + for (var i = 0; i < message.domains.length; ++i) + $root.google.privacy.dlp.v2.Domain.encode(message.domains[i], writer.uint32(/* id 47, wireType 2 =*/378).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TableDataProfile message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TableDataProfile.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.TableDataProfile + * @static + * @param {google.privacy.dlp.v2.ITableDataProfile} message TableDataProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableDataProfile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TableDataProfile message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.TableDataProfile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.TableDataProfile} TableDataProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableDataProfile.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TableDataProfile(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 36: { + message.dataSourceType = $root.google.privacy.dlp.v2.DataSourceType.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.projectDataProfile = reader.string(); + break; + } + case 24: { + message.datasetProjectId = reader.string(); + break; + } + case 29: { + message.datasetLocation = reader.string(); + break; + } + case 25: { + message.datasetId = reader.string(); + break; + } + case 26: { + message.tableId = reader.string(); + break; + } + case 3: { + message.fullResource = reader.string(); + break; + } + case 21: { + message.profileStatus = $root.google.privacy.dlp.v2.ProfileStatus.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 22: { + message.state = reader.int32(); + break; + } + case 5: { + message.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.dataRiskLevel = $root.google.privacy.dlp.v2.DataRiskLevel.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 27: { + if (!(message.predictedInfoTypes && message.predictedInfoTypes.length)) + message.predictedInfoTypes = []; + message.predictedInfoTypes.push($root.google.privacy.dlp.v2.InfoTypeSummary.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 28: { + if (!(message.otherInfoTypes && message.otherInfoTypes.length)) + message.otherInfoTypes = []; + message.otherInfoTypes.push($root.google.privacy.dlp.v2.OtherInfoTypeSummary.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 7: { + message.configSnapshot = $root.google.privacy.dlp.v2.DataProfileConfigSnapshot.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 8: { + message.lastModifiedTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 9: { + message.expirationTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 10: { + message.scannedColumnCount = reader.int64(); + break; + } + case 11: { + message.failedColumnCount = reader.int64(); + break; + } + case 12: { + message.tableSizeBytes = reader.int64(); + break; + } + case 13: { + message.rowCount = reader.int64(); + break; + } + case 14: { + message.encryptionStatus = reader.int32(); + break; + } + case 15: { + message.resourceVisibility = reader.int32(); + break; + } + case 16: { + message.profileLastGenerated = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 17: { + if (message.resourceLabels === $util.emptyObject) + message.resourceLabels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.resourceLabels, key); + message.resourceLabels[key] = value; + break; + } + case 23: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 37: { + message.sampleFindingsTable = $root.google.privacy.dlp.v2.BigQueryTable.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 39: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push($root.google.privacy.dlp.v2.Tag.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 41: { + if (!(message.relatedResources && message.relatedResources.length)) + message.relatedResources = []; + message.relatedResources.push($root.google.privacy.dlp.v2.RelatedResource.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 47: { + if (!(message.domains && message.domains.length)) + message.domains = []; + message.domains.push($root.google.privacy.dlp.v2.Domain.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TableDataProfile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.TableDataProfile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.TableDataProfile} TableDataProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableDataProfile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TableDataProfile message. + * @function verify + * @memberof google.privacy.dlp.v2.TableDataProfile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TableDataProfile.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) { + var error = $root.google.privacy.dlp.v2.DataSourceType.verify(message.dataSourceType, long + 1); + if (error) + return "dataSourceType." + error; + } + if (message.projectDataProfile != null && message.hasOwnProperty("projectDataProfile")) + if (!$util.isString(message.projectDataProfile)) + return "projectDataProfile: string expected"; + if (message.datasetProjectId != null && message.hasOwnProperty("datasetProjectId")) + if (!$util.isString(message.datasetProjectId)) + return "datasetProjectId: string expected"; + if (message.datasetLocation != null && message.hasOwnProperty("datasetLocation")) + if (!$util.isString(message.datasetLocation)) + return "datasetLocation: string expected"; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + if (!$util.isString(message.datasetId)) + return "datasetId: string expected"; + if (message.tableId != null && message.hasOwnProperty("tableId")) + if (!$util.isString(message.tableId)) + return "tableId: string expected"; + if (message.fullResource != null && message.hasOwnProperty("fullResource")) + if (!$util.isString(message.fullResource)) + return "fullResource: string expected"; + if (message.profileStatus != null && message.hasOwnProperty("profileStatus")) { + var error = $root.google.privacy.dlp.v2.ProfileStatus.verify(message.profileStatus, long + 1); + if (error) + return "profileStatus." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.sensitivityScore != null && message.hasOwnProperty("sensitivityScore")) { + var error = $root.google.privacy.dlp.v2.SensitivityScore.verify(message.sensitivityScore, long + 1); + if (error) + return "sensitivityScore." + error; + } + if (message.dataRiskLevel != null && message.hasOwnProperty("dataRiskLevel")) { + var error = $root.google.privacy.dlp.v2.DataRiskLevel.verify(message.dataRiskLevel, long + 1); + if (error) + return "dataRiskLevel." + error; + } + if (message.predictedInfoTypes != null && message.hasOwnProperty("predictedInfoTypes")) { + if (!Array.isArray(message.predictedInfoTypes)) + return "predictedInfoTypes: array expected"; + for (var i = 0; i < message.predictedInfoTypes.length; ++i) { + var error = $root.google.privacy.dlp.v2.InfoTypeSummary.verify(message.predictedInfoTypes[i], long + 1); + if (error) + return "predictedInfoTypes." + error; + } + } + if (message.otherInfoTypes != null && message.hasOwnProperty("otherInfoTypes")) { + if (!Array.isArray(message.otherInfoTypes)) + return "otherInfoTypes: array expected"; + for (var i = 0; i < message.otherInfoTypes.length; ++i) { + var error = $root.google.privacy.dlp.v2.OtherInfoTypeSummary.verify(message.otherInfoTypes[i], long + 1); + if (error) + return "otherInfoTypes." + error; + } + } + if (message.configSnapshot != null && message.hasOwnProperty("configSnapshot")) { + var error = $root.google.privacy.dlp.v2.DataProfileConfigSnapshot.verify(message.configSnapshot, long + 1); + if (error) + return "configSnapshot." + error; + } + if (message.lastModifiedTime != null && message.hasOwnProperty("lastModifiedTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastModifiedTime, long + 1); + if (error) + return "lastModifiedTime." + error; + } + if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expirationTime, long + 1); + if (error) + return "expirationTime." + error; + } + if (message.scannedColumnCount != null && message.hasOwnProperty("scannedColumnCount")) + if (!$util.isInteger(message.scannedColumnCount) && !(message.scannedColumnCount && $util.isInteger(message.scannedColumnCount.low) && $util.isInteger(message.scannedColumnCount.high))) + return "scannedColumnCount: integer|Long expected"; + if (message.failedColumnCount != null && message.hasOwnProperty("failedColumnCount")) + if (!$util.isInteger(message.failedColumnCount) && !(message.failedColumnCount && $util.isInteger(message.failedColumnCount.low) && $util.isInteger(message.failedColumnCount.high))) + return "failedColumnCount: integer|Long expected"; + if (message.tableSizeBytes != null && message.hasOwnProperty("tableSizeBytes")) + if (!$util.isInteger(message.tableSizeBytes) && !(message.tableSizeBytes && $util.isInteger(message.tableSizeBytes.low) && $util.isInteger(message.tableSizeBytes.high))) + return "tableSizeBytes: integer|Long expected"; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (!$util.isInteger(message.rowCount) && !(message.rowCount && $util.isInteger(message.rowCount.low) && $util.isInteger(message.rowCount.high))) + return "rowCount: integer|Long expected"; + if (message.encryptionStatus != null && message.hasOwnProperty("encryptionStatus")) + switch (message.encryptionStatus) { + default: + return "encryptionStatus: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.resourceVisibility != null && message.hasOwnProperty("resourceVisibility")) + switch (message.resourceVisibility) { + default: + return "resourceVisibility: enum value expected"; + case 0: + case 10: + case 15: + case 20: + break; + } + if (message.profileLastGenerated != null && message.hasOwnProperty("profileLastGenerated")) { + var error = $root.google.protobuf.Timestamp.verify(message.profileLastGenerated, long + 1); + if (error) + return "profileLastGenerated." + error; + } + if (message.resourceLabels != null && message.hasOwnProperty("resourceLabels")) { + if (!$util.isObject(message.resourceLabels)) + return "resourceLabels: object expected"; + var key = Object.keys(message.resourceLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.resourceLabels[key[i]])) + return "resourceLabels: string{k:string} expected"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime, long + 1); + if (error) + return "createTime." + error; + } + if (message.sampleFindingsTable != null && message.hasOwnProperty("sampleFindingsTable")) { + var error = $root.google.privacy.dlp.v2.BigQueryTable.verify(message.sampleFindingsTable, long + 1); + if (error) + return "sampleFindingsTable." + error; + } + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) { + var error = $root.google.privacy.dlp.v2.Tag.verify(message.tags[i], long + 1); + if (error) + return "tags." + error; + } + } + if (message.relatedResources != null && message.hasOwnProperty("relatedResources")) { + if (!Array.isArray(message.relatedResources)) + return "relatedResources: array expected"; + for (var i = 0; i < message.relatedResources.length; ++i) { + var error = $root.google.privacy.dlp.v2.RelatedResource.verify(message.relatedResources[i], long + 1); + if (error) + return "relatedResources." + error; + } + } + if (message.domains != null && message.hasOwnProperty("domains")) { + if (!Array.isArray(message.domains)) + return "domains: array expected"; + for (var i = 0; i < message.domains.length; ++i) { + var error = $root.google.privacy.dlp.v2.Domain.verify(message.domains[i], long + 1); + if (error) + return "domains." + error; + } + } + return null; + }; + + /** + * Creates a TableDataProfile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.TableDataProfile + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.TableDataProfile} TableDataProfile + */ + TableDataProfile.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.TableDataProfile) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.TableDataProfile(); + if (object.name != null) + message.name = String(object.name); + if (object.dataSourceType != null) { + if (typeof object.dataSourceType !== "object") + throw TypeError(".google.privacy.dlp.v2.TableDataProfile.dataSourceType: object expected"); + message.dataSourceType = $root.google.privacy.dlp.v2.DataSourceType.fromObject(object.dataSourceType, long + 1); + } + if (object.projectDataProfile != null) + message.projectDataProfile = String(object.projectDataProfile); + if (object.datasetProjectId != null) + message.datasetProjectId = String(object.datasetProjectId); + if (object.datasetLocation != null) + message.datasetLocation = String(object.datasetLocation); + if (object.datasetId != null) + message.datasetId = String(object.datasetId); + if (object.tableId != null) + message.tableId = String(object.tableId); + if (object.fullResource != null) + message.fullResource = String(object.fullResource); + if (object.profileStatus != null) { + if (typeof object.profileStatus !== "object") + throw TypeError(".google.privacy.dlp.v2.TableDataProfile.profileStatus: object expected"); + message.profileStatus = $root.google.privacy.dlp.v2.ProfileStatus.fromObject(object.profileStatus, long + 1); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "DONE": + case 2: + message.state = 2; + break; + } + if (object.sensitivityScore != null) { + if (typeof object.sensitivityScore !== "object") + throw TypeError(".google.privacy.dlp.v2.TableDataProfile.sensitivityScore: object expected"); + message.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.fromObject(object.sensitivityScore, long + 1); + } + if (object.dataRiskLevel != null) { + if (typeof object.dataRiskLevel !== "object") + throw TypeError(".google.privacy.dlp.v2.TableDataProfile.dataRiskLevel: object expected"); + message.dataRiskLevel = $root.google.privacy.dlp.v2.DataRiskLevel.fromObject(object.dataRiskLevel, long + 1); + } + if (object.predictedInfoTypes) { + if (!Array.isArray(object.predictedInfoTypes)) + throw TypeError(".google.privacy.dlp.v2.TableDataProfile.predictedInfoTypes: array expected"); + message.predictedInfoTypes = []; + for (var i = 0; i < object.predictedInfoTypes.length; ++i) { + if (typeof object.predictedInfoTypes[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.TableDataProfile.predictedInfoTypes: object expected"); + message.predictedInfoTypes[i] = $root.google.privacy.dlp.v2.InfoTypeSummary.fromObject(object.predictedInfoTypes[i], long + 1); + } + } + if (object.otherInfoTypes) { + if (!Array.isArray(object.otherInfoTypes)) + throw TypeError(".google.privacy.dlp.v2.TableDataProfile.otherInfoTypes: array expected"); + message.otherInfoTypes = []; + for (var i = 0; i < object.otherInfoTypes.length; ++i) { + if (typeof object.otherInfoTypes[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.TableDataProfile.otherInfoTypes: object expected"); + message.otherInfoTypes[i] = $root.google.privacy.dlp.v2.OtherInfoTypeSummary.fromObject(object.otherInfoTypes[i], long + 1); + } + } + if (object.configSnapshot != null) { + if (typeof object.configSnapshot !== "object") + throw TypeError(".google.privacy.dlp.v2.TableDataProfile.configSnapshot: object expected"); + message.configSnapshot = $root.google.privacy.dlp.v2.DataProfileConfigSnapshot.fromObject(object.configSnapshot, long + 1); + } + if (object.lastModifiedTime != null) { + if (typeof object.lastModifiedTime !== "object") + throw TypeError(".google.privacy.dlp.v2.TableDataProfile.lastModifiedTime: object expected"); + message.lastModifiedTime = $root.google.protobuf.Timestamp.fromObject(object.lastModifiedTime, long + 1); + } + if (object.expirationTime != null) { + if (typeof object.expirationTime !== "object") + throw TypeError(".google.privacy.dlp.v2.TableDataProfile.expirationTime: object expected"); + message.expirationTime = $root.google.protobuf.Timestamp.fromObject(object.expirationTime, long + 1); + } + if (object.scannedColumnCount != null) + if ($util.Long) + (message.scannedColumnCount = $util.Long.fromValue(object.scannedColumnCount)).unsigned = false; + else if (typeof object.scannedColumnCount === "string") + message.scannedColumnCount = parseInt(object.scannedColumnCount, 10); + else if (typeof object.scannedColumnCount === "number") + message.scannedColumnCount = object.scannedColumnCount; + else if (typeof object.scannedColumnCount === "object") + message.scannedColumnCount = new $util.LongBits(object.scannedColumnCount.low >>> 0, object.scannedColumnCount.high >>> 0).toNumber(); + if (object.failedColumnCount != null) + if ($util.Long) + (message.failedColumnCount = $util.Long.fromValue(object.failedColumnCount)).unsigned = false; + else if (typeof object.failedColumnCount === "string") + message.failedColumnCount = parseInt(object.failedColumnCount, 10); + else if (typeof object.failedColumnCount === "number") + message.failedColumnCount = object.failedColumnCount; + else if (typeof object.failedColumnCount === "object") + message.failedColumnCount = new $util.LongBits(object.failedColumnCount.low >>> 0, object.failedColumnCount.high >>> 0).toNumber(); + if (object.tableSizeBytes != null) + if ($util.Long) + (message.tableSizeBytes = $util.Long.fromValue(object.tableSizeBytes)).unsigned = false; + else if (typeof object.tableSizeBytes === "string") + message.tableSizeBytes = parseInt(object.tableSizeBytes, 10); + else if (typeof object.tableSizeBytes === "number") + message.tableSizeBytes = object.tableSizeBytes; + else if (typeof object.tableSizeBytes === "object") + message.tableSizeBytes = new $util.LongBits(object.tableSizeBytes.low >>> 0, object.tableSizeBytes.high >>> 0).toNumber(); + if (object.rowCount != null) + if ($util.Long) + (message.rowCount = $util.Long.fromValue(object.rowCount)).unsigned = false; + else if (typeof object.rowCount === "string") + message.rowCount = parseInt(object.rowCount, 10); + else if (typeof object.rowCount === "number") + message.rowCount = object.rowCount; + else if (typeof object.rowCount === "object") + message.rowCount = new $util.LongBits(object.rowCount.low >>> 0, object.rowCount.high >>> 0).toNumber(); + switch (object.encryptionStatus) { + default: + if (typeof object.encryptionStatus === "number") { + message.encryptionStatus = object.encryptionStatus; + break; + } + break; + case "ENCRYPTION_STATUS_UNSPECIFIED": + case 0: + message.encryptionStatus = 0; + break; + case "ENCRYPTION_GOOGLE_MANAGED": + case 1: + message.encryptionStatus = 1; + break; + case "ENCRYPTION_CUSTOMER_MANAGED": + case 2: + message.encryptionStatus = 2; + break; + } + switch (object.resourceVisibility) { + default: + if (typeof object.resourceVisibility === "number") { + message.resourceVisibility = object.resourceVisibility; + break; + } + break; + case "RESOURCE_VISIBILITY_UNSPECIFIED": + case 0: + message.resourceVisibility = 0; + break; + case "RESOURCE_VISIBILITY_PUBLIC": + case 10: + message.resourceVisibility = 10; + break; + case "RESOURCE_VISIBILITY_INCONCLUSIVE": + case 15: + message.resourceVisibility = 15; + break; + case "RESOURCE_VISIBILITY_RESTRICTED": + case 20: + message.resourceVisibility = 20; + break; + } + if (object.profileLastGenerated != null) { + if (typeof object.profileLastGenerated !== "object") + throw TypeError(".google.privacy.dlp.v2.TableDataProfile.profileLastGenerated: object expected"); + message.profileLastGenerated = $root.google.protobuf.Timestamp.fromObject(object.profileLastGenerated, long + 1); + } + if (object.resourceLabels) { + if (typeof object.resourceLabels !== "object") + throw TypeError(".google.privacy.dlp.v2.TableDataProfile.resourceLabels: object expected"); + message.resourceLabels = {}; + for (var keys = Object.keys(object.resourceLabels), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.resourceLabels, keys[i]); + message.resourceLabels[keys[i]] = String(object.resourceLabels[keys[i]]); + } + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.privacy.dlp.v2.TableDataProfile.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime, long + 1); + } + if (object.sampleFindingsTable != null) { + if (typeof object.sampleFindingsTable !== "object") + throw TypeError(".google.privacy.dlp.v2.TableDataProfile.sampleFindingsTable: object expected"); + message.sampleFindingsTable = $root.google.privacy.dlp.v2.BigQueryTable.fromObject(object.sampleFindingsTable, long + 1); + } + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.privacy.dlp.v2.TableDataProfile.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) { + if (typeof object.tags[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.TableDataProfile.tags: object expected"); + message.tags[i] = $root.google.privacy.dlp.v2.Tag.fromObject(object.tags[i], long + 1); + } + } + if (object.relatedResources) { + if (!Array.isArray(object.relatedResources)) + throw TypeError(".google.privacy.dlp.v2.TableDataProfile.relatedResources: array expected"); + message.relatedResources = []; + for (var i = 0; i < object.relatedResources.length; ++i) { + if (typeof object.relatedResources[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.TableDataProfile.relatedResources: object expected"); + message.relatedResources[i] = $root.google.privacy.dlp.v2.RelatedResource.fromObject(object.relatedResources[i], long + 1); + } + } + if (object.domains) { + if (!Array.isArray(object.domains)) + throw TypeError(".google.privacy.dlp.v2.TableDataProfile.domains: array expected"); + message.domains = []; + for (var i = 0; i < object.domains.length; ++i) { + if (typeof object.domains[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.TableDataProfile.domains: object expected"); + message.domains[i] = $root.google.privacy.dlp.v2.Domain.fromObject(object.domains[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a TableDataProfile message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.TableDataProfile + * @static + * @param {google.privacy.dlp.v2.TableDataProfile} message TableDataProfile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TableDataProfile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.predictedInfoTypes = []; + object.otherInfoTypes = []; + object.tags = []; + object.relatedResources = []; + object.domains = []; + } + if (options.objects || options.defaults) + object.resourceLabels = {}; + if (options.defaults) { + object.name = ""; + object.projectDataProfile = ""; + object.fullResource = ""; + object.sensitivityScore = null; + object.dataRiskLevel = null; + object.configSnapshot = null; + object.lastModifiedTime = null; + object.expirationTime = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.scannedColumnCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.scannedColumnCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.failedColumnCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.failedColumnCount = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.tableSizeBytes = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.tableSizeBytes = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rowCount = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.rowCount = options.longs === String ? "0" : 0; + object.encryptionStatus = options.enums === String ? "ENCRYPTION_STATUS_UNSPECIFIED" : 0; + object.resourceVisibility = options.enums === String ? "RESOURCE_VISIBILITY_UNSPECIFIED" : 0; + object.profileLastGenerated = null; + object.profileStatus = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.createTime = null; + object.datasetProjectId = ""; + object.datasetId = ""; + object.tableId = ""; + object.datasetLocation = ""; + object.dataSourceType = null; + object.sampleFindingsTable = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.projectDataProfile != null && message.hasOwnProperty("projectDataProfile")) + object.projectDataProfile = message.projectDataProfile; + if (message.fullResource != null && message.hasOwnProperty("fullResource")) + object.fullResource = message.fullResource; + if (message.sensitivityScore != null && message.hasOwnProperty("sensitivityScore")) + object.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.toObject(message.sensitivityScore, options); + if (message.dataRiskLevel != null && message.hasOwnProperty("dataRiskLevel")) + object.dataRiskLevel = $root.google.privacy.dlp.v2.DataRiskLevel.toObject(message.dataRiskLevel, options); + if (message.configSnapshot != null && message.hasOwnProperty("configSnapshot")) + object.configSnapshot = $root.google.privacy.dlp.v2.DataProfileConfigSnapshot.toObject(message.configSnapshot, options); + if (message.lastModifiedTime != null && message.hasOwnProperty("lastModifiedTime")) + object.lastModifiedTime = $root.google.protobuf.Timestamp.toObject(message.lastModifiedTime, options); + if (message.expirationTime != null && message.hasOwnProperty("expirationTime")) + object.expirationTime = $root.google.protobuf.Timestamp.toObject(message.expirationTime, options); + if (message.scannedColumnCount != null && message.hasOwnProperty("scannedColumnCount")) + if (typeof message.scannedColumnCount === "number") + object.scannedColumnCount = options.longs === String ? String(message.scannedColumnCount) : message.scannedColumnCount; + else + object.scannedColumnCount = options.longs === String ? $util.Long.prototype.toString.call(message.scannedColumnCount) : options.longs === Number ? new $util.LongBits(message.scannedColumnCount.low >>> 0, message.scannedColumnCount.high >>> 0).toNumber() : message.scannedColumnCount; + if (message.failedColumnCount != null && message.hasOwnProperty("failedColumnCount")) + if (typeof message.failedColumnCount === "number") + object.failedColumnCount = options.longs === String ? String(message.failedColumnCount) : message.failedColumnCount; + else + object.failedColumnCount = options.longs === String ? $util.Long.prototype.toString.call(message.failedColumnCount) : options.longs === Number ? new $util.LongBits(message.failedColumnCount.low >>> 0, message.failedColumnCount.high >>> 0).toNumber() : message.failedColumnCount; + if (message.tableSizeBytes != null && message.hasOwnProperty("tableSizeBytes")) + if (typeof message.tableSizeBytes === "number") + object.tableSizeBytes = options.longs === String ? String(message.tableSizeBytes) : message.tableSizeBytes; + else + object.tableSizeBytes = options.longs === String ? $util.Long.prototype.toString.call(message.tableSizeBytes) : options.longs === Number ? new $util.LongBits(message.tableSizeBytes.low >>> 0, message.tableSizeBytes.high >>> 0).toNumber() : message.tableSizeBytes; + if (message.rowCount != null && message.hasOwnProperty("rowCount")) + if (typeof message.rowCount === "number") + object.rowCount = options.longs === String ? String(message.rowCount) : message.rowCount; + else + object.rowCount = options.longs === String ? $util.Long.prototype.toString.call(message.rowCount) : options.longs === Number ? new $util.LongBits(message.rowCount.low >>> 0, message.rowCount.high >>> 0).toNumber() : message.rowCount; + if (message.encryptionStatus != null && message.hasOwnProperty("encryptionStatus")) + object.encryptionStatus = options.enums === String ? $root.google.privacy.dlp.v2.EncryptionStatus[message.encryptionStatus] === undefined ? message.encryptionStatus : $root.google.privacy.dlp.v2.EncryptionStatus[message.encryptionStatus] : message.encryptionStatus; + if (message.resourceVisibility != null && message.hasOwnProperty("resourceVisibility")) + object.resourceVisibility = options.enums === String ? $root.google.privacy.dlp.v2.ResourceVisibility[message.resourceVisibility] === undefined ? message.resourceVisibility : $root.google.privacy.dlp.v2.ResourceVisibility[message.resourceVisibility] : message.resourceVisibility; + if (message.profileLastGenerated != null && message.hasOwnProperty("profileLastGenerated")) + object.profileLastGenerated = $root.google.protobuf.Timestamp.toObject(message.profileLastGenerated, options); + var keys2; + if (message.resourceLabels && (keys2 = Object.keys(message.resourceLabels)).length) { + object.resourceLabels = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.resourceLabels, keys2[j]); + object.resourceLabels[keys2[j]] = message.resourceLabels[keys2[j]]; + } + } + if (message.profileStatus != null && message.hasOwnProperty("profileStatus")) + object.profileStatus = $root.google.privacy.dlp.v2.ProfileStatus.toObject(message.profileStatus, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.privacy.dlp.v2.TableDataProfile.State[message.state] === undefined ? message.state : $root.google.privacy.dlp.v2.TableDataProfile.State[message.state] : message.state; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.datasetProjectId != null && message.hasOwnProperty("datasetProjectId")) + object.datasetProjectId = message.datasetProjectId; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + object.datasetId = message.datasetId; + if (message.tableId != null && message.hasOwnProperty("tableId")) + object.tableId = message.tableId; + if (message.predictedInfoTypes && message.predictedInfoTypes.length) { + object.predictedInfoTypes = []; + for (var j = 0; j < message.predictedInfoTypes.length; ++j) + object.predictedInfoTypes[j] = $root.google.privacy.dlp.v2.InfoTypeSummary.toObject(message.predictedInfoTypes[j], options); + } + if (message.otherInfoTypes && message.otherInfoTypes.length) { + object.otherInfoTypes = []; + for (var j = 0; j < message.otherInfoTypes.length; ++j) + object.otherInfoTypes[j] = $root.google.privacy.dlp.v2.OtherInfoTypeSummary.toObject(message.otherInfoTypes[j], options); + } + if (message.datasetLocation != null && message.hasOwnProperty("datasetLocation")) + object.datasetLocation = message.datasetLocation; + if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) + object.dataSourceType = $root.google.privacy.dlp.v2.DataSourceType.toObject(message.dataSourceType, options); + if (message.sampleFindingsTable != null && message.hasOwnProperty("sampleFindingsTable")) + object.sampleFindingsTable = $root.google.privacy.dlp.v2.BigQueryTable.toObject(message.sampleFindingsTable, options); + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = $root.google.privacy.dlp.v2.Tag.toObject(message.tags[j], options); + } + if (message.relatedResources && message.relatedResources.length) { + object.relatedResources = []; + for (var j = 0; j < message.relatedResources.length; ++j) + object.relatedResources[j] = $root.google.privacy.dlp.v2.RelatedResource.toObject(message.relatedResources[j], options); + } + if (message.domains && message.domains.length) { + object.domains = []; + for (var j = 0; j < message.domains.length; ++j) + object.domains[j] = $root.google.privacy.dlp.v2.Domain.toObject(message.domains[j], options); + } + return object; + }; + + /** + * Converts this TableDataProfile to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.TableDataProfile + * @instance + * @returns {Object.} JSON object + */ + TableDataProfile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TableDataProfile + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.TableDataProfile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TableDataProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.TableDataProfile"; + }; + + /** + * State enum. + * @name google.privacy.dlp.v2.TableDataProfile.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} DONE=2 DONE value + */ + TableDataProfile.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "DONE"] = 2; + return values; + })(); + + return TableDataProfile; + })(); + + v2.ProfileStatus = (function() { + + /** + * Properties of a ProfileStatus. + * @memberof google.privacy.dlp.v2 + * @interface IProfileStatus + * @property {google.rpc.IStatus|null} [status] ProfileStatus status + * @property {google.protobuf.ITimestamp|null} [timestamp] ProfileStatus timestamp + */ + + /** + * Constructs a new ProfileStatus. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ProfileStatus. + * @implements IProfileStatus + * @constructor + * @param {google.privacy.dlp.v2.IProfileStatus=} [properties] Properties to set + */ + function ProfileStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProfileStatus status. + * @member {google.rpc.IStatus|null|undefined} status + * @memberof google.privacy.dlp.v2.ProfileStatus + * @instance + */ + ProfileStatus.prototype.status = null; + + /** + * ProfileStatus timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof google.privacy.dlp.v2.ProfileStatus + * @instance + */ + ProfileStatus.prototype.timestamp = null; + + /** + * Creates a new ProfileStatus instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ProfileStatus + * @static + * @param {google.privacy.dlp.v2.IProfileStatus=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ProfileStatus} ProfileStatus instance + */ + ProfileStatus.create = function create(properties) { + return new ProfileStatus(properties); + }; + + /** + * Encodes the specified ProfileStatus message. Does not implicitly {@link google.privacy.dlp.v2.ProfileStatus.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ProfileStatus + * @static + * @param {google.privacy.dlp.v2.IProfileStatus} message ProfileStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProfileStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.status != null && Object.hasOwnProperty.call(message, "status")) + $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ProfileStatus message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ProfileStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ProfileStatus + * @static + * @param {google.privacy.dlp.v2.IProfileStatus} message ProfileStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProfileStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProfileStatus message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ProfileStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ProfileStatus} ProfileStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProfileStatus.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ProfileStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.status = $root.google.rpc.Status.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ProfileStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ProfileStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ProfileStatus} ProfileStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProfileStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProfileStatus message. + * @function verify + * @memberof google.privacy.dlp.v2.ProfileStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProfileStatus.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.status != null && message.hasOwnProperty("status")) { + var error = $root.google.rpc.Status.verify(message.status, long + 1); + if (error) + return "status." + error; + } + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp, long + 1); + if (error) + return "timestamp." + error; + } + return null; + }; + + /** + * Creates a ProfileStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ProfileStatus + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ProfileStatus} ProfileStatus + */ + ProfileStatus.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ProfileStatus) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ProfileStatus(); + if (object.status != null) { + if (typeof object.status !== "object") + throw TypeError(".google.privacy.dlp.v2.ProfileStatus.status: object expected"); + message.status = $root.google.rpc.Status.fromObject(object.status, long + 1); + } + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.privacy.dlp.v2.ProfileStatus.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a ProfileStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ProfileStatus + * @static + * @param {google.privacy.dlp.v2.ProfileStatus} message ProfileStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProfileStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.status = null; + object.timestamp = null; + } + if (message.status != null && message.hasOwnProperty("status")) + object.status = $root.google.rpc.Status.toObject(message.status, options); + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + return object; + }; + + /** + * Converts this ProfileStatus to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ProfileStatus + * @instance + * @returns {Object.} JSON object + */ + ProfileStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProfileStatus + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ProfileStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProfileStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ProfileStatus"; + }; + + return ProfileStatus; + })(); + + /** + * EncryptionStatus enum. + * @name google.privacy.dlp.v2.EncryptionStatus + * @enum {number} + * @property {number} ENCRYPTION_STATUS_UNSPECIFIED=0 ENCRYPTION_STATUS_UNSPECIFIED value + * @property {number} ENCRYPTION_GOOGLE_MANAGED=1 ENCRYPTION_GOOGLE_MANAGED value + * @property {number} ENCRYPTION_CUSTOMER_MANAGED=2 ENCRYPTION_CUSTOMER_MANAGED value + */ + v2.EncryptionStatus = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENCRYPTION_STATUS_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENCRYPTION_GOOGLE_MANAGED"] = 1; + values[valuesById[2] = "ENCRYPTION_CUSTOMER_MANAGED"] = 2; + return values; + })(); + + v2.InfoTypeSummary = (function() { + + /** + * Properties of an InfoTypeSummary. + * @memberof google.privacy.dlp.v2 + * @interface IInfoTypeSummary + * @property {google.privacy.dlp.v2.IInfoType|null} [infoType] InfoTypeSummary infoType + * @property {number|null} [estimatedPrevalence] InfoTypeSummary estimatedPrevalence + */ + + /** + * Constructs a new InfoTypeSummary. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an InfoTypeSummary. + * @implements IInfoTypeSummary + * @constructor + * @param {google.privacy.dlp.v2.IInfoTypeSummary=} [properties] Properties to set + */ + function InfoTypeSummary(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * InfoTypeSummary infoType. + * @member {google.privacy.dlp.v2.IInfoType|null|undefined} infoType + * @memberof google.privacy.dlp.v2.InfoTypeSummary + * @instance + */ + InfoTypeSummary.prototype.infoType = null; + + /** + * InfoTypeSummary estimatedPrevalence. + * @member {number} estimatedPrevalence + * @memberof google.privacy.dlp.v2.InfoTypeSummary + * @instance + */ + InfoTypeSummary.prototype.estimatedPrevalence = 0; + + /** + * Creates a new InfoTypeSummary instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.InfoTypeSummary + * @static + * @param {google.privacy.dlp.v2.IInfoTypeSummary=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.InfoTypeSummary} InfoTypeSummary instance + */ + InfoTypeSummary.create = function create(properties) { + return new InfoTypeSummary(properties); + }; + + /** + * Encodes the specified InfoTypeSummary message. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeSummary.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.InfoTypeSummary + * @static + * @param {google.privacy.dlp.v2.IInfoTypeSummary} message InfoTypeSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfoTypeSummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.infoType != null && Object.hasOwnProperty.call(message, "infoType")) + $root.google.privacy.dlp.v2.InfoType.encode(message.infoType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.estimatedPrevalence != null && Object.hasOwnProperty.call(message, "estimatedPrevalence")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.estimatedPrevalence); + return writer; + }; + + /** + * Encodes the specified InfoTypeSummary message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InfoTypeSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.InfoTypeSummary + * @static + * @param {google.privacy.dlp.v2.IInfoTypeSummary} message InfoTypeSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfoTypeSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InfoTypeSummary message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.InfoTypeSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.InfoTypeSummary} InfoTypeSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfoTypeSummary.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.InfoTypeSummary(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.infoType = $root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.estimatedPrevalence = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an InfoTypeSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.InfoTypeSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.InfoTypeSummary} InfoTypeSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfoTypeSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InfoTypeSummary message. + * @function verify + * @memberof google.privacy.dlp.v2.InfoTypeSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InfoTypeSummary.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.infoType != null && message.hasOwnProperty("infoType")) { + var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infoType, long + 1); + if (error) + return "infoType." + error; + } + if (message.estimatedPrevalence != null && message.hasOwnProperty("estimatedPrevalence")) + if (!$util.isInteger(message.estimatedPrevalence)) + return "estimatedPrevalence: integer expected"; + return null; + }; + + /** + * Creates an InfoTypeSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.InfoTypeSummary + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.InfoTypeSummary} InfoTypeSummary + */ + InfoTypeSummary.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.InfoTypeSummary) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.InfoTypeSummary(); + if (object.infoType != null) { + if (typeof object.infoType !== "object") + throw TypeError(".google.privacy.dlp.v2.InfoTypeSummary.infoType: object expected"); + message.infoType = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoType, long + 1); + } + if (object.estimatedPrevalence != null) + message.estimatedPrevalence = object.estimatedPrevalence | 0; + return message; + }; + + /** + * Creates a plain object from an InfoTypeSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.InfoTypeSummary + * @static + * @param {google.privacy.dlp.v2.InfoTypeSummary} message InfoTypeSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InfoTypeSummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.infoType = null; + object.estimatedPrevalence = 0; + } + if (message.infoType != null && message.hasOwnProperty("infoType")) + object.infoType = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoType, options); + if (message.estimatedPrevalence != null && message.hasOwnProperty("estimatedPrevalence")) + object.estimatedPrevalence = message.estimatedPrevalence; + return object; + }; + + /** + * Converts this InfoTypeSummary to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.InfoTypeSummary + * @instance + * @returns {Object.} JSON object + */ + InfoTypeSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InfoTypeSummary + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.InfoTypeSummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InfoTypeSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.InfoTypeSummary"; + }; + + return InfoTypeSummary; + })(); + + v2.OtherInfoTypeSummary = (function() { + + /** + * Properties of an OtherInfoTypeSummary. + * @memberof google.privacy.dlp.v2 + * @interface IOtherInfoTypeSummary + * @property {google.privacy.dlp.v2.IInfoType|null} [infoType] OtherInfoTypeSummary infoType + * @property {number|null} [estimatedPrevalence] OtherInfoTypeSummary estimatedPrevalence + * @property {boolean|null} [excludedFromAnalysis] OtherInfoTypeSummary excludedFromAnalysis + */ + + /** + * Constructs a new OtherInfoTypeSummary. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an OtherInfoTypeSummary. + * @implements IOtherInfoTypeSummary + * @constructor + * @param {google.privacy.dlp.v2.IOtherInfoTypeSummary=} [properties] Properties to set + */ + function OtherInfoTypeSummary(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * OtherInfoTypeSummary infoType. + * @member {google.privacy.dlp.v2.IInfoType|null|undefined} infoType + * @memberof google.privacy.dlp.v2.OtherInfoTypeSummary + * @instance + */ + OtherInfoTypeSummary.prototype.infoType = null; + + /** + * OtherInfoTypeSummary estimatedPrevalence. + * @member {number} estimatedPrevalence + * @memberof google.privacy.dlp.v2.OtherInfoTypeSummary + * @instance + */ + OtherInfoTypeSummary.prototype.estimatedPrevalence = 0; + + /** + * OtherInfoTypeSummary excludedFromAnalysis. + * @member {boolean} excludedFromAnalysis + * @memberof google.privacy.dlp.v2.OtherInfoTypeSummary + * @instance + */ + OtherInfoTypeSummary.prototype.excludedFromAnalysis = false; + + /** + * Creates a new OtherInfoTypeSummary instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.OtherInfoTypeSummary + * @static + * @param {google.privacy.dlp.v2.IOtherInfoTypeSummary=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.OtherInfoTypeSummary} OtherInfoTypeSummary instance + */ + OtherInfoTypeSummary.create = function create(properties) { + return new OtherInfoTypeSummary(properties); + }; + + /** + * Encodes the specified OtherInfoTypeSummary message. Does not implicitly {@link google.privacy.dlp.v2.OtherInfoTypeSummary.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.OtherInfoTypeSummary + * @static + * @param {google.privacy.dlp.v2.IOtherInfoTypeSummary} message OtherInfoTypeSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OtherInfoTypeSummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.infoType != null && Object.hasOwnProperty.call(message, "infoType")) + $root.google.privacy.dlp.v2.InfoType.encode(message.infoType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.estimatedPrevalence != null && Object.hasOwnProperty.call(message, "estimatedPrevalence")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.estimatedPrevalence); + if (message.excludedFromAnalysis != null && Object.hasOwnProperty.call(message, "excludedFromAnalysis")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.excludedFromAnalysis); + return writer; + }; + + /** + * Encodes the specified OtherInfoTypeSummary message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.OtherInfoTypeSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.OtherInfoTypeSummary + * @static + * @param {google.privacy.dlp.v2.IOtherInfoTypeSummary} message OtherInfoTypeSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OtherInfoTypeSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OtherInfoTypeSummary message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.OtherInfoTypeSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.OtherInfoTypeSummary} OtherInfoTypeSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OtherInfoTypeSummary.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.OtherInfoTypeSummary(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.infoType = $root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.estimatedPrevalence = reader.int32(); + break; + } + case 3: { + message.excludedFromAnalysis = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OtherInfoTypeSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.OtherInfoTypeSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.OtherInfoTypeSummary} OtherInfoTypeSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OtherInfoTypeSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OtherInfoTypeSummary message. + * @function verify + * @memberof google.privacy.dlp.v2.OtherInfoTypeSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OtherInfoTypeSummary.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.infoType != null && message.hasOwnProperty("infoType")) { + var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infoType, long + 1); + if (error) + return "infoType." + error; + } + if (message.estimatedPrevalence != null && message.hasOwnProperty("estimatedPrevalence")) + if (!$util.isInteger(message.estimatedPrevalence)) + return "estimatedPrevalence: integer expected"; + if (message.excludedFromAnalysis != null && message.hasOwnProperty("excludedFromAnalysis")) + if (typeof message.excludedFromAnalysis !== "boolean") + return "excludedFromAnalysis: boolean expected"; + return null; + }; + + /** + * Creates an OtherInfoTypeSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.OtherInfoTypeSummary + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.OtherInfoTypeSummary} OtherInfoTypeSummary + */ + OtherInfoTypeSummary.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.OtherInfoTypeSummary) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.OtherInfoTypeSummary(); + if (object.infoType != null) { + if (typeof object.infoType !== "object") + throw TypeError(".google.privacy.dlp.v2.OtherInfoTypeSummary.infoType: object expected"); + message.infoType = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoType, long + 1); + } + if (object.estimatedPrevalence != null) + message.estimatedPrevalence = object.estimatedPrevalence | 0; + if (object.excludedFromAnalysis != null) + message.excludedFromAnalysis = Boolean(object.excludedFromAnalysis); + return message; + }; + + /** + * Creates a plain object from an OtherInfoTypeSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.OtherInfoTypeSummary + * @static + * @param {google.privacy.dlp.v2.OtherInfoTypeSummary} message OtherInfoTypeSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OtherInfoTypeSummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.infoType = null; + object.estimatedPrevalence = 0; + object.excludedFromAnalysis = false; + } + if (message.infoType != null && message.hasOwnProperty("infoType")) + object.infoType = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoType, options); + if (message.estimatedPrevalence != null && message.hasOwnProperty("estimatedPrevalence")) + object.estimatedPrevalence = message.estimatedPrevalence; + if (message.excludedFromAnalysis != null && message.hasOwnProperty("excludedFromAnalysis")) + object.excludedFromAnalysis = message.excludedFromAnalysis; + return object; + }; + + /** + * Converts this OtherInfoTypeSummary to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.OtherInfoTypeSummary + * @instance + * @returns {Object.} JSON object + */ + OtherInfoTypeSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OtherInfoTypeSummary + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.OtherInfoTypeSummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OtherInfoTypeSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.OtherInfoTypeSummary"; + }; + + return OtherInfoTypeSummary; + })(); + + /** + * NullPercentageLevel enum. + * @name google.privacy.dlp.v2.NullPercentageLevel + * @enum {number} + * @property {number} NULL_PERCENTAGE_LEVEL_UNSPECIFIED=0 NULL_PERCENTAGE_LEVEL_UNSPECIFIED value + * @property {number} NULL_PERCENTAGE_VERY_LOW=1 NULL_PERCENTAGE_VERY_LOW value + * @property {number} NULL_PERCENTAGE_LOW=2 NULL_PERCENTAGE_LOW value + * @property {number} NULL_PERCENTAGE_MEDIUM=3 NULL_PERCENTAGE_MEDIUM value + * @property {number} NULL_PERCENTAGE_HIGH=4 NULL_PERCENTAGE_HIGH value + */ + v2.NullPercentageLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NULL_PERCENTAGE_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "NULL_PERCENTAGE_VERY_LOW"] = 1; + values[valuesById[2] = "NULL_PERCENTAGE_LOW"] = 2; + values[valuesById[3] = "NULL_PERCENTAGE_MEDIUM"] = 3; + values[valuesById[4] = "NULL_PERCENTAGE_HIGH"] = 4; + return values; + })(); + + /** + * UniquenessScoreLevel enum. + * @name google.privacy.dlp.v2.UniquenessScoreLevel + * @enum {number} + * @property {number} UNIQUENESS_SCORE_LEVEL_UNSPECIFIED=0 UNIQUENESS_SCORE_LEVEL_UNSPECIFIED value + * @property {number} UNIQUENESS_SCORE_LOW=1 UNIQUENESS_SCORE_LOW value + * @property {number} UNIQUENESS_SCORE_MEDIUM=2 UNIQUENESS_SCORE_MEDIUM value + * @property {number} UNIQUENESS_SCORE_HIGH=3 UNIQUENESS_SCORE_HIGH value + */ + v2.UniquenessScoreLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNIQUENESS_SCORE_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "UNIQUENESS_SCORE_LOW"] = 1; + values[valuesById[2] = "UNIQUENESS_SCORE_MEDIUM"] = 2; + values[valuesById[3] = "UNIQUENESS_SCORE_HIGH"] = 3; + return values; + })(); + + v2.ColumnDataProfile = (function() { + + /** + * Properties of a ColumnDataProfile. + * @memberof google.privacy.dlp.v2 + * @interface IColumnDataProfile + * @property {string|null} [name] ColumnDataProfile name + * @property {google.privacy.dlp.v2.IProfileStatus|null} [profileStatus] ColumnDataProfile profileStatus + * @property {google.privacy.dlp.v2.ColumnDataProfile.State|null} [state] ColumnDataProfile state + * @property {google.protobuf.ITimestamp|null} [profileLastGenerated] ColumnDataProfile profileLastGenerated + * @property {string|null} [tableDataProfile] ColumnDataProfile tableDataProfile + * @property {string|null} [tableFullResource] ColumnDataProfile tableFullResource + * @property {string|null} [datasetProjectId] ColumnDataProfile datasetProjectId + * @property {string|null} [datasetLocation] ColumnDataProfile datasetLocation + * @property {string|null} [datasetId] ColumnDataProfile datasetId + * @property {string|null} [tableId] ColumnDataProfile tableId + * @property {string|null} [column] ColumnDataProfile column + * @property {google.privacy.dlp.v2.ISensitivityScore|null} [sensitivityScore] ColumnDataProfile sensitivityScore + * @property {google.privacy.dlp.v2.IDataRiskLevel|null} [dataRiskLevel] ColumnDataProfile dataRiskLevel + * @property {google.privacy.dlp.v2.IInfoTypeSummary|null} [columnInfoType] ColumnDataProfile columnInfoType + * @property {Array.|null} [otherMatches] ColumnDataProfile otherMatches + * @property {google.privacy.dlp.v2.NullPercentageLevel|null} [estimatedNullPercentage] ColumnDataProfile estimatedNullPercentage + * @property {google.privacy.dlp.v2.UniquenessScoreLevel|null} [estimatedUniquenessScore] ColumnDataProfile estimatedUniquenessScore + * @property {number|null} [freeTextScore] ColumnDataProfile freeTextScore + * @property {google.privacy.dlp.v2.ColumnDataProfile.ColumnDataType|null} [columnType] ColumnDataProfile columnType + * @property {google.privacy.dlp.v2.ColumnDataProfile.ColumnPolicyState|null} [policyState] ColumnDataProfile policyState + */ + + /** + * Constructs a new ColumnDataProfile. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ColumnDataProfile. + * @implements IColumnDataProfile + * @constructor + * @param {google.privacy.dlp.v2.IColumnDataProfile=} [properties] Properties to set + */ + function ColumnDataProfile(properties) { + this.otherMatches = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ColumnDataProfile name. + * @member {string} name + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @instance + */ + ColumnDataProfile.prototype.name = ""; + + /** + * ColumnDataProfile profileStatus. + * @member {google.privacy.dlp.v2.IProfileStatus|null|undefined} profileStatus + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @instance + */ + ColumnDataProfile.prototype.profileStatus = null; + + /** + * ColumnDataProfile state. + * @member {google.privacy.dlp.v2.ColumnDataProfile.State} state + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @instance + */ + ColumnDataProfile.prototype.state = 0; + + /** + * ColumnDataProfile profileLastGenerated. + * @member {google.protobuf.ITimestamp|null|undefined} profileLastGenerated + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @instance + */ + ColumnDataProfile.prototype.profileLastGenerated = null; + + /** + * ColumnDataProfile tableDataProfile. + * @member {string} tableDataProfile + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @instance + */ + ColumnDataProfile.prototype.tableDataProfile = ""; + + /** + * ColumnDataProfile tableFullResource. + * @member {string} tableFullResource + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @instance + */ + ColumnDataProfile.prototype.tableFullResource = ""; + + /** + * ColumnDataProfile datasetProjectId. + * @member {string} datasetProjectId + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @instance + */ + ColumnDataProfile.prototype.datasetProjectId = ""; + + /** + * ColumnDataProfile datasetLocation. + * @member {string} datasetLocation + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @instance + */ + ColumnDataProfile.prototype.datasetLocation = ""; + + /** + * ColumnDataProfile datasetId. + * @member {string} datasetId + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @instance + */ + ColumnDataProfile.prototype.datasetId = ""; + + /** + * ColumnDataProfile tableId. + * @member {string} tableId + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @instance + */ + ColumnDataProfile.prototype.tableId = ""; + + /** + * ColumnDataProfile column. + * @member {string} column + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @instance + */ + ColumnDataProfile.prototype.column = ""; + + /** + * ColumnDataProfile sensitivityScore. + * @member {google.privacy.dlp.v2.ISensitivityScore|null|undefined} sensitivityScore + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @instance + */ + ColumnDataProfile.prototype.sensitivityScore = null; + + /** + * ColumnDataProfile dataRiskLevel. + * @member {google.privacy.dlp.v2.IDataRiskLevel|null|undefined} dataRiskLevel + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @instance + */ + ColumnDataProfile.prototype.dataRiskLevel = null; + + /** + * ColumnDataProfile columnInfoType. + * @member {google.privacy.dlp.v2.IInfoTypeSummary|null|undefined} columnInfoType + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @instance + */ + ColumnDataProfile.prototype.columnInfoType = null; + + /** + * ColumnDataProfile otherMatches. + * @member {Array.} otherMatches + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @instance + */ + ColumnDataProfile.prototype.otherMatches = $util.emptyArray; + + /** + * ColumnDataProfile estimatedNullPercentage. + * @member {google.privacy.dlp.v2.NullPercentageLevel} estimatedNullPercentage + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @instance + */ + ColumnDataProfile.prototype.estimatedNullPercentage = 0; + + /** + * ColumnDataProfile estimatedUniquenessScore. + * @member {google.privacy.dlp.v2.UniquenessScoreLevel} estimatedUniquenessScore + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @instance + */ + ColumnDataProfile.prototype.estimatedUniquenessScore = 0; + + /** + * ColumnDataProfile freeTextScore. + * @member {number} freeTextScore + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @instance + */ + ColumnDataProfile.prototype.freeTextScore = 0; + + /** + * ColumnDataProfile columnType. + * @member {google.privacy.dlp.v2.ColumnDataProfile.ColumnDataType} columnType + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @instance + */ + ColumnDataProfile.prototype.columnType = 0; + + /** + * ColumnDataProfile policyState. + * @member {google.privacy.dlp.v2.ColumnDataProfile.ColumnPolicyState} policyState + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @instance + */ + ColumnDataProfile.prototype.policyState = 0; + + /** + * Creates a new ColumnDataProfile instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @static + * @param {google.privacy.dlp.v2.IColumnDataProfile=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ColumnDataProfile} ColumnDataProfile instance + */ + ColumnDataProfile.create = function create(properties) { + return new ColumnDataProfile(properties); + }; + + /** + * Encodes the specified ColumnDataProfile message. Does not implicitly {@link google.privacy.dlp.v2.ColumnDataProfile.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @static + * @param {google.privacy.dlp.v2.IColumnDataProfile} message ColumnDataProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnDataProfile.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.profileLastGenerated != null && Object.hasOwnProperty.call(message, "profileLastGenerated")) + $root.google.protobuf.Timestamp.encode(message.profileLastGenerated, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.tableDataProfile != null && Object.hasOwnProperty.call(message, "tableDataProfile")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.tableDataProfile); + if (message.tableFullResource != null && Object.hasOwnProperty.call(message, "tableFullResource")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.tableFullResource); + if (message.column != null && Object.hasOwnProperty.call(message, "column")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.column); + if (message.sensitivityScore != null && Object.hasOwnProperty.call(message, "sensitivityScore")) + $root.google.privacy.dlp.v2.SensitivityScore.encode(message.sensitivityScore, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.dataRiskLevel != null && Object.hasOwnProperty.call(message, "dataRiskLevel")) + $root.google.privacy.dlp.v2.DataRiskLevel.encode(message.dataRiskLevel, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.columnInfoType != null && Object.hasOwnProperty.call(message, "columnInfoType")) + $root.google.privacy.dlp.v2.InfoTypeSummary.encode(message.columnInfoType, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.otherMatches != null && message.otherMatches.length) + for (var i = 0; i < message.otherMatches.length; ++i) + $root.google.privacy.dlp.v2.OtherInfoTypeSummary.encode(message.otherMatches[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.freeTextScore != null && Object.hasOwnProperty.call(message, "freeTextScore")) + writer.uint32(/* id 13, wireType 1 =*/105).double(message.freeTextScore); + if (message.columnType != null && Object.hasOwnProperty.call(message, "columnType")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.columnType); + if (message.policyState != null && Object.hasOwnProperty.call(message, "policyState")) + writer.uint32(/* id 15, wireType 0 =*/120).int32(message.policyState); + if (message.profileStatus != null && Object.hasOwnProperty.call(message, "profileStatus")) + $root.google.privacy.dlp.v2.ProfileStatus.encode(message.profileStatus, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 18, wireType 0 =*/144).int32(message.state); + if (message.datasetProjectId != null && Object.hasOwnProperty.call(message, "datasetProjectId")) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.datasetProjectId); + if (message.datasetLocation != null && Object.hasOwnProperty.call(message, "datasetLocation")) + writer.uint32(/* id 20, wireType 2 =*/162).string(message.datasetLocation); + if (message.datasetId != null && Object.hasOwnProperty.call(message, "datasetId")) + writer.uint32(/* id 21, wireType 2 =*/170).string(message.datasetId); + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) + writer.uint32(/* id 22, wireType 2 =*/178).string(message.tableId); + if (message.estimatedNullPercentage != null && Object.hasOwnProperty.call(message, "estimatedNullPercentage")) + writer.uint32(/* id 23, wireType 0 =*/184).int32(message.estimatedNullPercentage); + if (message.estimatedUniquenessScore != null && Object.hasOwnProperty.call(message, "estimatedUniquenessScore")) + writer.uint32(/* id 24, wireType 0 =*/192).int32(message.estimatedUniquenessScore); + return writer; + }; + + /** + * Encodes the specified ColumnDataProfile message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ColumnDataProfile.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @static + * @param {google.privacy.dlp.v2.IColumnDataProfile} message ColumnDataProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ColumnDataProfile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ColumnDataProfile message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ColumnDataProfile} ColumnDataProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnDataProfile.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ColumnDataProfile(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 17: { + message.profileStatus = $root.google.privacy.dlp.v2.ProfileStatus.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 18: { + message.state = reader.int32(); + break; + } + case 3: { + message.profileLastGenerated = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.tableDataProfile = reader.string(); + break; + } + case 5: { + message.tableFullResource = reader.string(); + break; + } + case 19: { + message.datasetProjectId = reader.string(); + break; + } + case 20: { + message.datasetLocation = reader.string(); + break; + } + case 21: { + message.datasetId = reader.string(); + break; + } + case 22: { + message.tableId = reader.string(); + break; + } + case 6: { + message.column = reader.string(); + break; + } + case 7: { + message.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 8: { + message.dataRiskLevel = $root.google.privacy.dlp.v2.DataRiskLevel.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 9: { + message.columnInfoType = $root.google.privacy.dlp.v2.InfoTypeSummary.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 10: { + if (!(message.otherMatches && message.otherMatches.length)) + message.otherMatches = []; + message.otherMatches.push($root.google.privacy.dlp.v2.OtherInfoTypeSummary.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 23: { + message.estimatedNullPercentage = reader.int32(); + break; + } + case 24: { + message.estimatedUniquenessScore = reader.int32(); + break; + } + case 13: { + message.freeTextScore = reader.double(); + break; + } + case 14: { + message.columnType = reader.int32(); + break; + } + case 15: { + message.policyState = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ColumnDataProfile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ColumnDataProfile} ColumnDataProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ColumnDataProfile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ColumnDataProfile message. + * @function verify + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ColumnDataProfile.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.profileStatus != null && message.hasOwnProperty("profileStatus")) { + var error = $root.google.privacy.dlp.v2.ProfileStatus.verify(message.profileStatus, long + 1); + if (error) + return "profileStatus." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.profileLastGenerated != null && message.hasOwnProperty("profileLastGenerated")) { + var error = $root.google.protobuf.Timestamp.verify(message.profileLastGenerated, long + 1); + if (error) + return "profileLastGenerated." + error; + } + if (message.tableDataProfile != null && message.hasOwnProperty("tableDataProfile")) + if (!$util.isString(message.tableDataProfile)) + return "tableDataProfile: string expected"; + if (message.tableFullResource != null && message.hasOwnProperty("tableFullResource")) + if (!$util.isString(message.tableFullResource)) + return "tableFullResource: string expected"; + if (message.datasetProjectId != null && message.hasOwnProperty("datasetProjectId")) + if (!$util.isString(message.datasetProjectId)) + return "datasetProjectId: string expected"; + if (message.datasetLocation != null && message.hasOwnProperty("datasetLocation")) + if (!$util.isString(message.datasetLocation)) + return "datasetLocation: string expected"; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + if (!$util.isString(message.datasetId)) + return "datasetId: string expected"; + if (message.tableId != null && message.hasOwnProperty("tableId")) + if (!$util.isString(message.tableId)) + return "tableId: string expected"; + if (message.column != null && message.hasOwnProperty("column")) + if (!$util.isString(message.column)) + return "column: string expected"; + if (message.sensitivityScore != null && message.hasOwnProperty("sensitivityScore")) { + var error = $root.google.privacy.dlp.v2.SensitivityScore.verify(message.sensitivityScore, long + 1); + if (error) + return "sensitivityScore." + error; + } + if (message.dataRiskLevel != null && message.hasOwnProperty("dataRiskLevel")) { + var error = $root.google.privacy.dlp.v2.DataRiskLevel.verify(message.dataRiskLevel, long + 1); + if (error) + return "dataRiskLevel." + error; + } + if (message.columnInfoType != null && message.hasOwnProperty("columnInfoType")) { + var error = $root.google.privacy.dlp.v2.InfoTypeSummary.verify(message.columnInfoType, long + 1); + if (error) + return "columnInfoType." + error; + } + if (message.otherMatches != null && message.hasOwnProperty("otherMatches")) { + if (!Array.isArray(message.otherMatches)) + return "otherMatches: array expected"; + for (var i = 0; i < message.otherMatches.length; ++i) { + var error = $root.google.privacy.dlp.v2.OtherInfoTypeSummary.verify(message.otherMatches[i], long + 1); + if (error) + return "otherMatches." + error; + } + } + if (message.estimatedNullPercentage != null && message.hasOwnProperty("estimatedNullPercentage")) + switch (message.estimatedNullPercentage) { + default: + return "estimatedNullPercentage: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.estimatedUniquenessScore != null && message.hasOwnProperty("estimatedUniquenessScore")) + switch (message.estimatedUniquenessScore) { + default: + return "estimatedUniquenessScore: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.freeTextScore != null && message.hasOwnProperty("freeTextScore")) + if (typeof message.freeTextScore !== "number") + return "freeTextScore: number expected"; + if (message.columnType != null && message.hasOwnProperty("columnType")) + switch (message.columnType) { + default: + return "columnType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.policyState != null && message.hasOwnProperty("policyState")) + switch (message.policyState) { + default: + return "policyState: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates a ColumnDataProfile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ColumnDataProfile} ColumnDataProfile + */ + ColumnDataProfile.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ColumnDataProfile) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ColumnDataProfile(); + if (object.name != null) + message.name = String(object.name); + if (object.profileStatus != null) { + if (typeof object.profileStatus !== "object") + throw TypeError(".google.privacy.dlp.v2.ColumnDataProfile.profileStatus: object expected"); + message.profileStatus = $root.google.privacy.dlp.v2.ProfileStatus.fromObject(object.profileStatus, long + 1); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "DONE": + case 2: + message.state = 2; + break; + } + if (object.profileLastGenerated != null) { + if (typeof object.profileLastGenerated !== "object") + throw TypeError(".google.privacy.dlp.v2.ColumnDataProfile.profileLastGenerated: object expected"); + message.profileLastGenerated = $root.google.protobuf.Timestamp.fromObject(object.profileLastGenerated, long + 1); + } + if (object.tableDataProfile != null) + message.tableDataProfile = String(object.tableDataProfile); + if (object.tableFullResource != null) + message.tableFullResource = String(object.tableFullResource); + if (object.datasetProjectId != null) + message.datasetProjectId = String(object.datasetProjectId); + if (object.datasetLocation != null) + message.datasetLocation = String(object.datasetLocation); + if (object.datasetId != null) + message.datasetId = String(object.datasetId); + if (object.tableId != null) + message.tableId = String(object.tableId); + if (object.column != null) + message.column = String(object.column); + if (object.sensitivityScore != null) { + if (typeof object.sensitivityScore !== "object") + throw TypeError(".google.privacy.dlp.v2.ColumnDataProfile.sensitivityScore: object expected"); + message.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.fromObject(object.sensitivityScore, long + 1); + } + if (object.dataRiskLevel != null) { + if (typeof object.dataRiskLevel !== "object") + throw TypeError(".google.privacy.dlp.v2.ColumnDataProfile.dataRiskLevel: object expected"); + message.dataRiskLevel = $root.google.privacy.dlp.v2.DataRiskLevel.fromObject(object.dataRiskLevel, long + 1); + } + if (object.columnInfoType != null) { + if (typeof object.columnInfoType !== "object") + throw TypeError(".google.privacy.dlp.v2.ColumnDataProfile.columnInfoType: object expected"); + message.columnInfoType = $root.google.privacy.dlp.v2.InfoTypeSummary.fromObject(object.columnInfoType, long + 1); + } + if (object.otherMatches) { + if (!Array.isArray(object.otherMatches)) + throw TypeError(".google.privacy.dlp.v2.ColumnDataProfile.otherMatches: array expected"); + message.otherMatches = []; + for (var i = 0; i < object.otherMatches.length; ++i) { + if (typeof object.otherMatches[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.ColumnDataProfile.otherMatches: object expected"); + message.otherMatches[i] = $root.google.privacy.dlp.v2.OtherInfoTypeSummary.fromObject(object.otherMatches[i], long + 1); + } + } + switch (object.estimatedNullPercentage) { + default: + if (typeof object.estimatedNullPercentage === "number") { + message.estimatedNullPercentage = object.estimatedNullPercentage; + break; + } + break; + case "NULL_PERCENTAGE_LEVEL_UNSPECIFIED": + case 0: + message.estimatedNullPercentage = 0; + break; + case "NULL_PERCENTAGE_VERY_LOW": + case 1: + message.estimatedNullPercentage = 1; + break; + case "NULL_PERCENTAGE_LOW": + case 2: + message.estimatedNullPercentage = 2; + break; + case "NULL_PERCENTAGE_MEDIUM": + case 3: + message.estimatedNullPercentage = 3; + break; + case "NULL_PERCENTAGE_HIGH": + case 4: + message.estimatedNullPercentage = 4; + break; + } + switch (object.estimatedUniquenessScore) { + default: + if (typeof object.estimatedUniquenessScore === "number") { + message.estimatedUniquenessScore = object.estimatedUniquenessScore; + break; + } + break; + case "UNIQUENESS_SCORE_LEVEL_UNSPECIFIED": + case 0: + message.estimatedUniquenessScore = 0; + break; + case "UNIQUENESS_SCORE_LOW": + case 1: + message.estimatedUniquenessScore = 1; + break; + case "UNIQUENESS_SCORE_MEDIUM": + case 2: + message.estimatedUniquenessScore = 2; + break; + case "UNIQUENESS_SCORE_HIGH": + case 3: + message.estimatedUniquenessScore = 3; + break; + } + if (object.freeTextScore != null) + message.freeTextScore = Number(object.freeTextScore); + switch (object.columnType) { + default: + if (typeof object.columnType === "number") { + message.columnType = object.columnType; + break; + } + break; + case "COLUMN_DATA_TYPE_UNSPECIFIED": + case 0: + message.columnType = 0; + break; + case "TYPE_INT64": + case 1: + message.columnType = 1; + break; + case "TYPE_BOOL": + case 2: + message.columnType = 2; + break; + case "TYPE_FLOAT64": + case 3: + message.columnType = 3; + break; + case "TYPE_STRING": + case 4: + message.columnType = 4; + break; + case "TYPE_BYTES": + case 5: + message.columnType = 5; + break; + case "TYPE_TIMESTAMP": + case 6: + message.columnType = 6; + break; + case "TYPE_DATE": + case 7: + message.columnType = 7; + break; + case "TYPE_TIME": + case 8: + message.columnType = 8; + break; + case "TYPE_DATETIME": + case 9: + message.columnType = 9; + break; + case "TYPE_GEOGRAPHY": + case 10: + message.columnType = 10; + break; + case "TYPE_NUMERIC": + case 11: + message.columnType = 11; + break; + case "TYPE_RECORD": + case 12: + message.columnType = 12; + break; + case "TYPE_BIGNUMERIC": + case 13: + message.columnType = 13; + break; + case "TYPE_JSON": + case 14: + message.columnType = 14; + break; + case "TYPE_INTERVAL": + case 15: + message.columnType = 15; + break; + case "TYPE_RANGE_DATE": + case 16: + message.columnType = 16; + break; + case "TYPE_RANGE_DATETIME": + case 17: + message.columnType = 17; + break; + case "TYPE_RANGE_TIMESTAMP": + case 18: + message.columnType = 18; + break; + } + switch (object.policyState) { + default: + if (typeof object.policyState === "number") { + message.policyState = object.policyState; + break; + } + break; + case "COLUMN_POLICY_STATE_UNSPECIFIED": + case 0: + message.policyState = 0; + break; + case "COLUMN_POLICY_TAGGED": + case 1: + message.policyState = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from a ColumnDataProfile message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @static + * @param {google.privacy.dlp.v2.ColumnDataProfile} message ColumnDataProfile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ColumnDataProfile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.otherMatches = []; + if (options.defaults) { + object.name = ""; + object.profileLastGenerated = null; + object.tableDataProfile = ""; + object.tableFullResource = ""; + object.column = ""; + object.sensitivityScore = null; + object.dataRiskLevel = null; + object.columnInfoType = null; + object.freeTextScore = 0; + object.columnType = options.enums === String ? "COLUMN_DATA_TYPE_UNSPECIFIED" : 0; + object.policyState = options.enums === String ? "COLUMN_POLICY_STATE_UNSPECIFIED" : 0; + object.profileStatus = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.datasetProjectId = ""; + object.datasetLocation = ""; + object.datasetId = ""; + object.tableId = ""; + object.estimatedNullPercentage = options.enums === String ? "NULL_PERCENTAGE_LEVEL_UNSPECIFIED" : 0; + object.estimatedUniquenessScore = options.enums === String ? "UNIQUENESS_SCORE_LEVEL_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.profileLastGenerated != null && message.hasOwnProperty("profileLastGenerated")) + object.profileLastGenerated = $root.google.protobuf.Timestamp.toObject(message.profileLastGenerated, options); + if (message.tableDataProfile != null && message.hasOwnProperty("tableDataProfile")) + object.tableDataProfile = message.tableDataProfile; + if (message.tableFullResource != null && message.hasOwnProperty("tableFullResource")) + object.tableFullResource = message.tableFullResource; + if (message.column != null && message.hasOwnProperty("column")) + object.column = message.column; + if (message.sensitivityScore != null && message.hasOwnProperty("sensitivityScore")) + object.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.toObject(message.sensitivityScore, options); + if (message.dataRiskLevel != null && message.hasOwnProperty("dataRiskLevel")) + object.dataRiskLevel = $root.google.privacy.dlp.v2.DataRiskLevel.toObject(message.dataRiskLevel, options); + if (message.columnInfoType != null && message.hasOwnProperty("columnInfoType")) + object.columnInfoType = $root.google.privacy.dlp.v2.InfoTypeSummary.toObject(message.columnInfoType, options); + if (message.otherMatches && message.otherMatches.length) { + object.otherMatches = []; + for (var j = 0; j < message.otherMatches.length; ++j) + object.otherMatches[j] = $root.google.privacy.dlp.v2.OtherInfoTypeSummary.toObject(message.otherMatches[j], options); + } + if (message.freeTextScore != null && message.hasOwnProperty("freeTextScore")) + object.freeTextScore = options.json && !isFinite(message.freeTextScore) ? String(message.freeTextScore) : message.freeTextScore; + if (message.columnType != null && message.hasOwnProperty("columnType")) + object.columnType = options.enums === String ? $root.google.privacy.dlp.v2.ColumnDataProfile.ColumnDataType[message.columnType] === undefined ? message.columnType : $root.google.privacy.dlp.v2.ColumnDataProfile.ColumnDataType[message.columnType] : message.columnType; + if (message.policyState != null && message.hasOwnProperty("policyState")) + object.policyState = options.enums === String ? $root.google.privacy.dlp.v2.ColumnDataProfile.ColumnPolicyState[message.policyState] === undefined ? message.policyState : $root.google.privacy.dlp.v2.ColumnDataProfile.ColumnPolicyState[message.policyState] : message.policyState; + if (message.profileStatus != null && message.hasOwnProperty("profileStatus")) + object.profileStatus = $root.google.privacy.dlp.v2.ProfileStatus.toObject(message.profileStatus, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.privacy.dlp.v2.ColumnDataProfile.State[message.state] === undefined ? message.state : $root.google.privacy.dlp.v2.ColumnDataProfile.State[message.state] : message.state; + if (message.datasetProjectId != null && message.hasOwnProperty("datasetProjectId")) + object.datasetProjectId = message.datasetProjectId; + if (message.datasetLocation != null && message.hasOwnProperty("datasetLocation")) + object.datasetLocation = message.datasetLocation; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + object.datasetId = message.datasetId; + if (message.tableId != null && message.hasOwnProperty("tableId")) + object.tableId = message.tableId; + if (message.estimatedNullPercentage != null && message.hasOwnProperty("estimatedNullPercentage")) + object.estimatedNullPercentage = options.enums === String ? $root.google.privacy.dlp.v2.NullPercentageLevel[message.estimatedNullPercentage] === undefined ? message.estimatedNullPercentage : $root.google.privacy.dlp.v2.NullPercentageLevel[message.estimatedNullPercentage] : message.estimatedNullPercentage; + if (message.estimatedUniquenessScore != null && message.hasOwnProperty("estimatedUniquenessScore")) + object.estimatedUniquenessScore = options.enums === String ? $root.google.privacy.dlp.v2.UniquenessScoreLevel[message.estimatedUniquenessScore] === undefined ? message.estimatedUniquenessScore : $root.google.privacy.dlp.v2.UniquenessScoreLevel[message.estimatedUniquenessScore] : message.estimatedUniquenessScore; + return object; + }; + + /** + * Converts this ColumnDataProfile to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @instance + * @returns {Object.} JSON object + */ + ColumnDataProfile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ColumnDataProfile + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ColumnDataProfile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ColumnDataProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ColumnDataProfile"; + }; + + /** + * State enum. + * @name google.privacy.dlp.v2.ColumnDataProfile.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} DONE=2 DONE value + */ + ColumnDataProfile.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "DONE"] = 2; + return values; + })(); + + /** + * ColumnDataType enum. + * @name google.privacy.dlp.v2.ColumnDataProfile.ColumnDataType + * @enum {number} + * @property {number} COLUMN_DATA_TYPE_UNSPECIFIED=0 COLUMN_DATA_TYPE_UNSPECIFIED value + * @property {number} TYPE_INT64=1 TYPE_INT64 value + * @property {number} TYPE_BOOL=2 TYPE_BOOL value + * @property {number} TYPE_FLOAT64=3 TYPE_FLOAT64 value + * @property {number} TYPE_STRING=4 TYPE_STRING value + * @property {number} TYPE_BYTES=5 TYPE_BYTES value + * @property {number} TYPE_TIMESTAMP=6 TYPE_TIMESTAMP value + * @property {number} TYPE_DATE=7 TYPE_DATE value + * @property {number} TYPE_TIME=8 TYPE_TIME value + * @property {number} TYPE_DATETIME=9 TYPE_DATETIME value + * @property {number} TYPE_GEOGRAPHY=10 TYPE_GEOGRAPHY value + * @property {number} TYPE_NUMERIC=11 TYPE_NUMERIC value + * @property {number} TYPE_RECORD=12 TYPE_RECORD value + * @property {number} TYPE_BIGNUMERIC=13 TYPE_BIGNUMERIC value + * @property {number} TYPE_JSON=14 TYPE_JSON value + * @property {number} TYPE_INTERVAL=15 TYPE_INTERVAL value + * @property {number} TYPE_RANGE_DATE=16 TYPE_RANGE_DATE value + * @property {number} TYPE_RANGE_DATETIME=17 TYPE_RANGE_DATETIME value + * @property {number} TYPE_RANGE_TIMESTAMP=18 TYPE_RANGE_TIMESTAMP value + */ + ColumnDataProfile.ColumnDataType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COLUMN_DATA_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "TYPE_INT64"] = 1; + values[valuesById[2] = "TYPE_BOOL"] = 2; + values[valuesById[3] = "TYPE_FLOAT64"] = 3; + values[valuesById[4] = "TYPE_STRING"] = 4; + values[valuesById[5] = "TYPE_BYTES"] = 5; + values[valuesById[6] = "TYPE_TIMESTAMP"] = 6; + values[valuesById[7] = "TYPE_DATE"] = 7; + values[valuesById[8] = "TYPE_TIME"] = 8; + values[valuesById[9] = "TYPE_DATETIME"] = 9; + values[valuesById[10] = "TYPE_GEOGRAPHY"] = 10; + values[valuesById[11] = "TYPE_NUMERIC"] = 11; + values[valuesById[12] = "TYPE_RECORD"] = 12; + values[valuesById[13] = "TYPE_BIGNUMERIC"] = 13; + values[valuesById[14] = "TYPE_JSON"] = 14; + values[valuesById[15] = "TYPE_INTERVAL"] = 15; + values[valuesById[16] = "TYPE_RANGE_DATE"] = 16; + values[valuesById[17] = "TYPE_RANGE_DATETIME"] = 17; + values[valuesById[18] = "TYPE_RANGE_TIMESTAMP"] = 18; + return values; + })(); + + /** + * ColumnPolicyState enum. + * @name google.privacy.dlp.v2.ColumnDataProfile.ColumnPolicyState + * @enum {number} + * @property {number} COLUMN_POLICY_STATE_UNSPECIFIED=0 COLUMN_POLICY_STATE_UNSPECIFIED value + * @property {number} COLUMN_POLICY_TAGGED=1 COLUMN_POLICY_TAGGED value + */ + ColumnDataProfile.ColumnPolicyState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COLUMN_POLICY_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "COLUMN_POLICY_TAGGED"] = 1; + return values; + })(); + + return ColumnDataProfile; + })(); + + v2.FileStoreDataProfile = (function() { + + /** + * Properties of a FileStoreDataProfile. + * @memberof google.privacy.dlp.v2 + * @interface IFileStoreDataProfile + * @property {string|null} [name] FileStoreDataProfile name + * @property {google.privacy.dlp.v2.IDataSourceType|null} [dataSourceType] FileStoreDataProfile dataSourceType + * @property {string|null} [projectDataProfile] FileStoreDataProfile projectDataProfile + * @property {string|null} [projectId] FileStoreDataProfile projectId + * @property {string|null} [fileStoreLocation] FileStoreDataProfile fileStoreLocation + * @property {Array.|null} [dataStorageLocations] FileStoreDataProfile dataStorageLocations + * @property {string|null} [locationType] FileStoreDataProfile locationType + * @property {string|null} [fileStorePath] FileStoreDataProfile fileStorePath + * @property {string|null} [fullResource] FileStoreDataProfile fullResource + * @property {google.privacy.dlp.v2.IDataProfileConfigSnapshot|null} [configSnapshot] FileStoreDataProfile configSnapshot + * @property {google.privacy.dlp.v2.IProfileStatus|null} [profileStatus] FileStoreDataProfile profileStatus + * @property {google.privacy.dlp.v2.FileStoreDataProfile.State|null} [state] FileStoreDataProfile state + * @property {google.protobuf.ITimestamp|null} [profileLastGenerated] FileStoreDataProfile profileLastGenerated + * @property {google.privacy.dlp.v2.ResourceVisibility|null} [resourceVisibility] FileStoreDataProfile resourceVisibility + * @property {google.privacy.dlp.v2.ISensitivityScore|null} [sensitivityScore] FileStoreDataProfile sensitivityScore + * @property {google.privacy.dlp.v2.IDataRiskLevel|null} [dataRiskLevel] FileStoreDataProfile dataRiskLevel + * @property {google.protobuf.ITimestamp|null} [createTime] FileStoreDataProfile createTime + * @property {google.protobuf.ITimestamp|null} [lastModifiedTime] FileStoreDataProfile lastModifiedTime + * @property {Array.|null} [fileClusterSummaries] FileStoreDataProfile fileClusterSummaries + * @property {Object.|null} [resourceAttributes] FileStoreDataProfile resourceAttributes + * @property {Object.|null} [resourceLabels] FileStoreDataProfile resourceLabels + * @property {Array.|null} [fileStoreInfoTypeSummaries] FileStoreDataProfile fileStoreInfoTypeSummaries + * @property {google.privacy.dlp.v2.IBigQueryTable|null} [sampleFindingsTable] FileStoreDataProfile sampleFindingsTable + * @property {boolean|null} [fileStoreIsEmpty] FileStoreDataProfile fileStoreIsEmpty + * @property {Array.|null} [tags] FileStoreDataProfile tags + * @property {Array.|null} [relatedResources] FileStoreDataProfile relatedResources + * @property {Array.|null} [domains] FileStoreDataProfile domains + */ + + /** + * Constructs a new FileStoreDataProfile. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a FileStoreDataProfile. + * @implements IFileStoreDataProfile + * @constructor + * @param {google.privacy.dlp.v2.IFileStoreDataProfile=} [properties] Properties to set + */ + function FileStoreDataProfile(properties) { + this.dataStorageLocations = []; + this.fileClusterSummaries = []; + this.resourceAttributes = {}; + this.resourceLabels = {}; + this.fileStoreInfoTypeSummaries = []; + this.tags = []; + this.relatedResources = []; + this.domains = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileStoreDataProfile name. + * @member {string} name + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.name = ""; + + /** + * FileStoreDataProfile dataSourceType. + * @member {google.privacy.dlp.v2.IDataSourceType|null|undefined} dataSourceType + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.dataSourceType = null; + + /** + * FileStoreDataProfile projectDataProfile. + * @member {string} projectDataProfile + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.projectDataProfile = ""; + + /** + * FileStoreDataProfile projectId. + * @member {string} projectId + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.projectId = ""; + + /** + * FileStoreDataProfile fileStoreLocation. + * @member {string} fileStoreLocation + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.fileStoreLocation = ""; + + /** + * FileStoreDataProfile dataStorageLocations. + * @member {Array.} dataStorageLocations + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.dataStorageLocations = $util.emptyArray; + + /** + * FileStoreDataProfile locationType. + * @member {string} locationType + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.locationType = ""; + + /** + * FileStoreDataProfile fileStorePath. + * @member {string} fileStorePath + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.fileStorePath = ""; + + /** + * FileStoreDataProfile fullResource. + * @member {string} fullResource + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.fullResource = ""; + + /** + * FileStoreDataProfile configSnapshot. + * @member {google.privacy.dlp.v2.IDataProfileConfigSnapshot|null|undefined} configSnapshot + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.configSnapshot = null; + + /** + * FileStoreDataProfile profileStatus. + * @member {google.privacy.dlp.v2.IProfileStatus|null|undefined} profileStatus + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.profileStatus = null; + + /** + * FileStoreDataProfile state. + * @member {google.privacy.dlp.v2.FileStoreDataProfile.State} state + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.state = 0; + + /** + * FileStoreDataProfile profileLastGenerated. + * @member {google.protobuf.ITimestamp|null|undefined} profileLastGenerated + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.profileLastGenerated = null; + + /** + * FileStoreDataProfile resourceVisibility. + * @member {google.privacy.dlp.v2.ResourceVisibility} resourceVisibility + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.resourceVisibility = 0; + + /** + * FileStoreDataProfile sensitivityScore. + * @member {google.privacy.dlp.v2.ISensitivityScore|null|undefined} sensitivityScore + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.sensitivityScore = null; + + /** + * FileStoreDataProfile dataRiskLevel. + * @member {google.privacy.dlp.v2.IDataRiskLevel|null|undefined} dataRiskLevel + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.dataRiskLevel = null; + + /** + * FileStoreDataProfile createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.createTime = null; + + /** + * FileStoreDataProfile lastModifiedTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastModifiedTime + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.lastModifiedTime = null; + + /** + * FileStoreDataProfile fileClusterSummaries. + * @member {Array.} fileClusterSummaries + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.fileClusterSummaries = $util.emptyArray; + + /** + * FileStoreDataProfile resourceAttributes. + * @member {Object.} resourceAttributes + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.resourceAttributes = $util.emptyObject; + + /** + * FileStoreDataProfile resourceLabels. + * @member {Object.} resourceLabels + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.resourceLabels = $util.emptyObject; + + /** + * FileStoreDataProfile fileStoreInfoTypeSummaries. + * @member {Array.} fileStoreInfoTypeSummaries + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.fileStoreInfoTypeSummaries = $util.emptyArray; + + /** + * FileStoreDataProfile sampleFindingsTable. + * @member {google.privacy.dlp.v2.IBigQueryTable|null|undefined} sampleFindingsTable + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.sampleFindingsTable = null; + + /** + * FileStoreDataProfile fileStoreIsEmpty. + * @member {boolean} fileStoreIsEmpty + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.fileStoreIsEmpty = false; + + /** + * FileStoreDataProfile tags. + * @member {Array.} tags + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.tags = $util.emptyArray; + + /** + * FileStoreDataProfile relatedResources. + * @member {Array.} relatedResources + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.relatedResources = $util.emptyArray; + + /** + * FileStoreDataProfile domains. + * @member {Array.} domains + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + */ + FileStoreDataProfile.prototype.domains = $util.emptyArray; + + /** + * Creates a new FileStoreDataProfile instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @static + * @param {google.privacy.dlp.v2.IFileStoreDataProfile=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.FileStoreDataProfile} FileStoreDataProfile instance + */ + FileStoreDataProfile.create = function create(properties) { + return new FileStoreDataProfile(properties); + }; + + /** + * Encodes the specified FileStoreDataProfile message. Does not implicitly {@link google.privacy.dlp.v2.FileStoreDataProfile.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @static + * @param {google.privacy.dlp.v2.IFileStoreDataProfile} message FileStoreDataProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileStoreDataProfile.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.dataSourceType != null && Object.hasOwnProperty.call(message, "dataSourceType")) + $root.google.privacy.dlp.v2.DataSourceType.encode(message.dataSourceType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.projectDataProfile != null && Object.hasOwnProperty.call(message, "projectDataProfile")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.projectDataProfile); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.projectId); + if (message.fileStoreLocation != null && Object.hasOwnProperty.call(message, "fileStoreLocation")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.fileStoreLocation); + if (message.fileStorePath != null && Object.hasOwnProperty.call(message, "fileStorePath")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.fileStorePath); + if (message.configSnapshot != null && Object.hasOwnProperty.call(message, "configSnapshot")) + $root.google.privacy.dlp.v2.DataProfileConfigSnapshot.encode(message.configSnapshot, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.profileStatus != null && Object.hasOwnProperty.call(message, "profileStatus")) + $root.google.privacy.dlp.v2.ProfileStatus.encode(message.profileStatus, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.state); + if (message.profileLastGenerated != null && Object.hasOwnProperty.call(message, "profileLastGenerated")) + $root.google.protobuf.Timestamp.encode(message.profileLastGenerated, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.resourceVisibility != null && Object.hasOwnProperty.call(message, "resourceVisibility")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.resourceVisibility); + if (message.sensitivityScore != null && Object.hasOwnProperty.call(message, "sensitivityScore")) + $root.google.privacy.dlp.v2.SensitivityScore.encode(message.sensitivityScore, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.dataRiskLevel != null && Object.hasOwnProperty.call(message, "dataRiskLevel")) + $root.google.privacy.dlp.v2.DataRiskLevel.encode(message.dataRiskLevel, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.lastModifiedTime != null && Object.hasOwnProperty.call(message, "lastModifiedTime")) + $root.google.protobuf.Timestamp.encode(message.lastModifiedTime, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.fileClusterSummaries != null && message.fileClusterSummaries.length) + for (var i = 0; i < message.fileClusterSummaries.length; ++i) + $root.google.privacy.dlp.v2.FileClusterSummary.encode(message.fileClusterSummaries[i], writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.resourceAttributes != null && Object.hasOwnProperty.call(message, "resourceAttributes")) + for (var keys = Object.keys(message.resourceAttributes), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 17, wireType 2 =*/138).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.privacy.dlp.v2.Value.encode(message.resourceAttributes[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.resourceLabels != null && Object.hasOwnProperty.call(message, "resourceLabels")) + for (var keys = Object.keys(message.resourceLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 18, wireType 2 =*/146).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.resourceLabels[keys[i]]).ldelim(); + if (message.dataStorageLocations != null && message.dataStorageLocations.length) + for (var i = 0; i < message.dataStorageLocations.length; ++i) + writer.uint32(/* id 19, wireType 2 =*/154).string(message.dataStorageLocations[i]); + if (message.locationType != null && Object.hasOwnProperty.call(message, "locationType")) + writer.uint32(/* id 20, wireType 2 =*/162).string(message.locationType); + if (message.fileStoreInfoTypeSummaries != null && message.fileStoreInfoTypeSummaries.length) + for (var i = 0; i < message.fileStoreInfoTypeSummaries.length; ++i) + $root.google.privacy.dlp.v2.FileStoreInfoTypeSummary.encode(message.fileStoreInfoTypeSummaries[i], writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.sampleFindingsTable != null && Object.hasOwnProperty.call(message, "sampleFindingsTable")) + $root.google.privacy.dlp.v2.BigQueryTable.encode(message.sampleFindingsTable, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.fileStoreIsEmpty != null && Object.hasOwnProperty.call(message, "fileStoreIsEmpty")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.fileStoreIsEmpty); + if (message.fullResource != null && Object.hasOwnProperty.call(message, "fullResource")) + writer.uint32(/* id 24, wireType 2 =*/194).string(message.fullResource); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + $root.google.privacy.dlp.v2.Tag.encode(message.tags[i], writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.relatedResources != null && message.relatedResources.length) + for (var i = 0; i < message.relatedResources.length; ++i) + $root.google.privacy.dlp.v2.RelatedResource.encode(message.relatedResources[i], writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.domains != null && message.domains.length) + for (var i = 0; i < message.domains.length; ++i) + $root.google.privacy.dlp.v2.Domain.encode(message.domains[i], writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileStoreDataProfile message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FileStoreDataProfile.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @static + * @param {google.privacy.dlp.v2.IFileStoreDataProfile} message FileStoreDataProfile message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileStoreDataProfile.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileStoreDataProfile message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.FileStoreDataProfile} FileStoreDataProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileStoreDataProfile.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.FileStoreDataProfile(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.dataSourceType = $root.google.privacy.dlp.v2.DataSourceType.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.projectDataProfile = reader.string(); + break; + } + case 4: { + message.projectId = reader.string(); + break; + } + case 5: { + message.fileStoreLocation = reader.string(); + break; + } + case 19: { + if (!(message.dataStorageLocations && message.dataStorageLocations.length)) + message.dataStorageLocations = []; + message.dataStorageLocations.push(reader.string()); + break; + } + case 20: { + message.locationType = reader.string(); + break; + } + case 6: { + message.fileStorePath = reader.string(); + break; + } + case 24: { + message.fullResource = reader.string(); + break; + } + case 7: { + message.configSnapshot = $root.google.privacy.dlp.v2.DataProfileConfigSnapshot.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 8: { + message.profileStatus = $root.google.privacy.dlp.v2.ProfileStatus.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 9: { + message.state = reader.int32(); + break; + } + case 10: { + message.profileLastGenerated = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 11: { + message.resourceVisibility = reader.int32(); + break; + } + case 12: { + message.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 13: { + message.dataRiskLevel = $root.google.privacy.dlp.v2.DataRiskLevel.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 14: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 15: { + message.lastModifiedTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 16: { + if (!(message.fileClusterSummaries && message.fileClusterSummaries.length)) + message.fileClusterSummaries = []; + message.fileClusterSummaries.push($root.google.privacy.dlp.v2.FileClusterSummary.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 17: { + if (message.resourceAttributes === $util.emptyObject) + message.resourceAttributes = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.privacy.dlp.v2.Value.decode(reader, reader.uint32(), undefined, long + 1); + break; + default: + reader.skipType(tag2 & 7, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.resourceAttributes, key); + message.resourceAttributes[key] = value; + break; + } + case 18: { + if (message.resourceLabels === $util.emptyObject) + message.resourceLabels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.resourceLabels, key); + message.resourceLabels[key] = value; + break; + } + case 21: { + if (!(message.fileStoreInfoTypeSummaries && message.fileStoreInfoTypeSummaries.length)) + message.fileStoreInfoTypeSummaries = []; + message.fileStoreInfoTypeSummaries.push($root.google.privacy.dlp.v2.FileStoreInfoTypeSummary.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 22: { + message.sampleFindingsTable = $root.google.privacy.dlp.v2.BigQueryTable.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 23: { + message.fileStoreIsEmpty = reader.bool(); + break; + } + case 25: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push($root.google.privacy.dlp.v2.Tag.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 26: { + if (!(message.relatedResources && message.relatedResources.length)) + message.relatedResources = []; + message.relatedResources.push($root.google.privacy.dlp.v2.RelatedResource.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 27: { + if (!(message.domains && message.domains.length)) + message.domains = []; + message.domains.push($root.google.privacy.dlp.v2.Domain.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FileStoreDataProfile message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.FileStoreDataProfile} FileStoreDataProfile + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileStoreDataProfile.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileStoreDataProfile message. + * @function verify + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileStoreDataProfile.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) { + var error = $root.google.privacy.dlp.v2.DataSourceType.verify(message.dataSourceType, long + 1); + if (error) + return "dataSourceType." + error; + } + if (message.projectDataProfile != null && message.hasOwnProperty("projectDataProfile")) + if (!$util.isString(message.projectDataProfile)) + return "projectDataProfile: string expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.fileStoreLocation != null && message.hasOwnProperty("fileStoreLocation")) + if (!$util.isString(message.fileStoreLocation)) + return "fileStoreLocation: string expected"; + if (message.dataStorageLocations != null && message.hasOwnProperty("dataStorageLocations")) { + if (!Array.isArray(message.dataStorageLocations)) + return "dataStorageLocations: array expected"; + for (var i = 0; i < message.dataStorageLocations.length; ++i) + if (!$util.isString(message.dataStorageLocations[i])) + return "dataStorageLocations: string[] expected"; + } + if (message.locationType != null && message.hasOwnProperty("locationType")) + if (!$util.isString(message.locationType)) + return "locationType: string expected"; + if (message.fileStorePath != null && message.hasOwnProperty("fileStorePath")) + if (!$util.isString(message.fileStorePath)) + return "fileStorePath: string expected"; + if (message.fullResource != null && message.hasOwnProperty("fullResource")) + if (!$util.isString(message.fullResource)) + return "fullResource: string expected"; + if (message.configSnapshot != null && message.hasOwnProperty("configSnapshot")) { + var error = $root.google.privacy.dlp.v2.DataProfileConfigSnapshot.verify(message.configSnapshot, long + 1); + if (error) + return "configSnapshot." + error; + } + if (message.profileStatus != null && message.hasOwnProperty("profileStatus")) { + var error = $root.google.privacy.dlp.v2.ProfileStatus.verify(message.profileStatus, long + 1); + if (error) + return "profileStatus." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.profileLastGenerated != null && message.hasOwnProperty("profileLastGenerated")) { + var error = $root.google.protobuf.Timestamp.verify(message.profileLastGenerated, long + 1); + if (error) + return "profileLastGenerated." + error; + } + if (message.resourceVisibility != null && message.hasOwnProperty("resourceVisibility")) + switch (message.resourceVisibility) { + default: + return "resourceVisibility: enum value expected"; + case 0: + case 10: + case 15: + case 20: + break; + } + if (message.sensitivityScore != null && message.hasOwnProperty("sensitivityScore")) { + var error = $root.google.privacy.dlp.v2.SensitivityScore.verify(message.sensitivityScore, long + 1); + if (error) + return "sensitivityScore." + error; + } + if (message.dataRiskLevel != null && message.hasOwnProperty("dataRiskLevel")) { + var error = $root.google.privacy.dlp.v2.DataRiskLevel.verify(message.dataRiskLevel, long + 1); + if (error) + return "dataRiskLevel." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime, long + 1); + if (error) + return "createTime." + error; + } + if (message.lastModifiedTime != null && message.hasOwnProperty("lastModifiedTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastModifiedTime, long + 1); + if (error) + return "lastModifiedTime." + error; + } + if (message.fileClusterSummaries != null && message.hasOwnProperty("fileClusterSummaries")) { + if (!Array.isArray(message.fileClusterSummaries)) + return "fileClusterSummaries: array expected"; + for (var i = 0; i < message.fileClusterSummaries.length; ++i) { + var error = $root.google.privacy.dlp.v2.FileClusterSummary.verify(message.fileClusterSummaries[i], long + 1); + if (error) + return "fileClusterSummaries." + error; + } + } + if (message.resourceAttributes != null && message.hasOwnProperty("resourceAttributes")) { + if (!$util.isObject(message.resourceAttributes)) + return "resourceAttributes: object expected"; + var key = Object.keys(message.resourceAttributes); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.privacy.dlp.v2.Value.verify(message.resourceAttributes[key[i]], long + 1); + if (error) + return "resourceAttributes." + error; + } + } + if (message.resourceLabels != null && message.hasOwnProperty("resourceLabels")) { + if (!$util.isObject(message.resourceLabels)) + return "resourceLabels: object expected"; + var key = Object.keys(message.resourceLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.resourceLabels[key[i]])) + return "resourceLabels: string{k:string} expected"; + } + if (message.fileStoreInfoTypeSummaries != null && message.hasOwnProperty("fileStoreInfoTypeSummaries")) { + if (!Array.isArray(message.fileStoreInfoTypeSummaries)) + return "fileStoreInfoTypeSummaries: array expected"; + for (var i = 0; i < message.fileStoreInfoTypeSummaries.length; ++i) { + var error = $root.google.privacy.dlp.v2.FileStoreInfoTypeSummary.verify(message.fileStoreInfoTypeSummaries[i], long + 1); + if (error) + return "fileStoreInfoTypeSummaries." + error; + } + } + if (message.sampleFindingsTable != null && message.hasOwnProperty("sampleFindingsTable")) { + var error = $root.google.privacy.dlp.v2.BigQueryTable.verify(message.sampleFindingsTable, long + 1); + if (error) + return "sampleFindingsTable." + error; + } + if (message.fileStoreIsEmpty != null && message.hasOwnProperty("fileStoreIsEmpty")) + if (typeof message.fileStoreIsEmpty !== "boolean") + return "fileStoreIsEmpty: boolean expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) { + var error = $root.google.privacy.dlp.v2.Tag.verify(message.tags[i], long + 1); + if (error) + return "tags." + error; + } + } + if (message.relatedResources != null && message.hasOwnProperty("relatedResources")) { + if (!Array.isArray(message.relatedResources)) + return "relatedResources: array expected"; + for (var i = 0; i < message.relatedResources.length; ++i) { + var error = $root.google.privacy.dlp.v2.RelatedResource.verify(message.relatedResources[i], long + 1); + if (error) + return "relatedResources." + error; + } + } + if (message.domains != null && message.hasOwnProperty("domains")) { + if (!Array.isArray(message.domains)) + return "domains: array expected"; + for (var i = 0; i < message.domains.length; ++i) { + var error = $root.google.privacy.dlp.v2.Domain.verify(message.domains[i], long + 1); + if (error) + return "domains." + error; + } + } + return null; + }; + + /** + * Creates a FileStoreDataProfile message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.FileStoreDataProfile} FileStoreDataProfile + */ + FileStoreDataProfile.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.FileStoreDataProfile) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.FileStoreDataProfile(); + if (object.name != null) + message.name = String(object.name); + if (object.dataSourceType != null) { + if (typeof object.dataSourceType !== "object") + throw TypeError(".google.privacy.dlp.v2.FileStoreDataProfile.dataSourceType: object expected"); + message.dataSourceType = $root.google.privacy.dlp.v2.DataSourceType.fromObject(object.dataSourceType, long + 1); + } + if (object.projectDataProfile != null) + message.projectDataProfile = String(object.projectDataProfile); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.fileStoreLocation != null) + message.fileStoreLocation = String(object.fileStoreLocation); + if (object.dataStorageLocations) { + if (!Array.isArray(object.dataStorageLocations)) + throw TypeError(".google.privacy.dlp.v2.FileStoreDataProfile.dataStorageLocations: array expected"); + message.dataStorageLocations = []; + for (var i = 0; i < object.dataStorageLocations.length; ++i) + message.dataStorageLocations[i] = String(object.dataStorageLocations[i]); + } + if (object.locationType != null) + message.locationType = String(object.locationType); + if (object.fileStorePath != null) + message.fileStorePath = String(object.fileStorePath); + if (object.fullResource != null) + message.fullResource = String(object.fullResource); + if (object.configSnapshot != null) { + if (typeof object.configSnapshot !== "object") + throw TypeError(".google.privacy.dlp.v2.FileStoreDataProfile.configSnapshot: object expected"); + message.configSnapshot = $root.google.privacy.dlp.v2.DataProfileConfigSnapshot.fromObject(object.configSnapshot, long + 1); + } + if (object.profileStatus != null) { + if (typeof object.profileStatus !== "object") + throw TypeError(".google.privacy.dlp.v2.FileStoreDataProfile.profileStatus: object expected"); + message.profileStatus = $root.google.privacy.dlp.v2.ProfileStatus.fromObject(object.profileStatus, long + 1); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "RUNNING": + case 1: + message.state = 1; + break; + case "DONE": + case 2: + message.state = 2; + break; + } + if (object.profileLastGenerated != null) { + if (typeof object.profileLastGenerated !== "object") + throw TypeError(".google.privacy.dlp.v2.FileStoreDataProfile.profileLastGenerated: object expected"); + message.profileLastGenerated = $root.google.protobuf.Timestamp.fromObject(object.profileLastGenerated, long + 1); + } + switch (object.resourceVisibility) { + default: + if (typeof object.resourceVisibility === "number") { + message.resourceVisibility = object.resourceVisibility; + break; + } + break; + case "RESOURCE_VISIBILITY_UNSPECIFIED": + case 0: + message.resourceVisibility = 0; + break; + case "RESOURCE_VISIBILITY_PUBLIC": + case 10: + message.resourceVisibility = 10; + break; + case "RESOURCE_VISIBILITY_INCONCLUSIVE": + case 15: + message.resourceVisibility = 15; + break; + case "RESOURCE_VISIBILITY_RESTRICTED": + case 20: + message.resourceVisibility = 20; + break; + } + if (object.sensitivityScore != null) { + if (typeof object.sensitivityScore !== "object") + throw TypeError(".google.privacy.dlp.v2.FileStoreDataProfile.sensitivityScore: object expected"); + message.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.fromObject(object.sensitivityScore, long + 1); + } + if (object.dataRiskLevel != null) { + if (typeof object.dataRiskLevel !== "object") + throw TypeError(".google.privacy.dlp.v2.FileStoreDataProfile.dataRiskLevel: object expected"); + message.dataRiskLevel = $root.google.privacy.dlp.v2.DataRiskLevel.fromObject(object.dataRiskLevel, long + 1); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.privacy.dlp.v2.FileStoreDataProfile.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime, long + 1); + } + if (object.lastModifiedTime != null) { + if (typeof object.lastModifiedTime !== "object") + throw TypeError(".google.privacy.dlp.v2.FileStoreDataProfile.lastModifiedTime: object expected"); + message.lastModifiedTime = $root.google.protobuf.Timestamp.fromObject(object.lastModifiedTime, long + 1); + } + if (object.fileClusterSummaries) { + if (!Array.isArray(object.fileClusterSummaries)) + throw TypeError(".google.privacy.dlp.v2.FileStoreDataProfile.fileClusterSummaries: array expected"); + message.fileClusterSummaries = []; + for (var i = 0; i < object.fileClusterSummaries.length; ++i) { + if (typeof object.fileClusterSummaries[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.FileStoreDataProfile.fileClusterSummaries: object expected"); + message.fileClusterSummaries[i] = $root.google.privacy.dlp.v2.FileClusterSummary.fromObject(object.fileClusterSummaries[i], long + 1); + } + } + if (object.resourceAttributes) { + if (typeof object.resourceAttributes !== "object") + throw TypeError(".google.privacy.dlp.v2.FileStoreDataProfile.resourceAttributes: object expected"); + message.resourceAttributes = {}; + for (var keys = Object.keys(object.resourceAttributes), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.resourceAttributes, keys[i]); + if (typeof object.resourceAttributes[keys[i]] !== "object") + throw TypeError(".google.privacy.dlp.v2.FileStoreDataProfile.resourceAttributes: object expected"); + message.resourceAttributes[keys[i]] = $root.google.privacy.dlp.v2.Value.fromObject(object.resourceAttributes[keys[i]], long + 1); + } + } + if (object.resourceLabels) { + if (typeof object.resourceLabels !== "object") + throw TypeError(".google.privacy.dlp.v2.FileStoreDataProfile.resourceLabels: object expected"); + message.resourceLabels = {}; + for (var keys = Object.keys(object.resourceLabels), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.resourceLabels, keys[i]); + message.resourceLabels[keys[i]] = String(object.resourceLabels[keys[i]]); + } + } + if (object.fileStoreInfoTypeSummaries) { + if (!Array.isArray(object.fileStoreInfoTypeSummaries)) + throw TypeError(".google.privacy.dlp.v2.FileStoreDataProfile.fileStoreInfoTypeSummaries: array expected"); + message.fileStoreInfoTypeSummaries = []; + for (var i = 0; i < object.fileStoreInfoTypeSummaries.length; ++i) { + if (typeof object.fileStoreInfoTypeSummaries[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.FileStoreDataProfile.fileStoreInfoTypeSummaries: object expected"); + message.fileStoreInfoTypeSummaries[i] = $root.google.privacy.dlp.v2.FileStoreInfoTypeSummary.fromObject(object.fileStoreInfoTypeSummaries[i], long + 1); + } + } + if (object.sampleFindingsTable != null) { + if (typeof object.sampleFindingsTable !== "object") + throw TypeError(".google.privacy.dlp.v2.FileStoreDataProfile.sampleFindingsTable: object expected"); + message.sampleFindingsTable = $root.google.privacy.dlp.v2.BigQueryTable.fromObject(object.sampleFindingsTable, long + 1); + } + if (object.fileStoreIsEmpty != null) + message.fileStoreIsEmpty = Boolean(object.fileStoreIsEmpty); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.privacy.dlp.v2.FileStoreDataProfile.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) { + if (typeof object.tags[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.FileStoreDataProfile.tags: object expected"); + message.tags[i] = $root.google.privacy.dlp.v2.Tag.fromObject(object.tags[i], long + 1); + } + } + if (object.relatedResources) { + if (!Array.isArray(object.relatedResources)) + throw TypeError(".google.privacy.dlp.v2.FileStoreDataProfile.relatedResources: array expected"); + message.relatedResources = []; + for (var i = 0; i < object.relatedResources.length; ++i) { + if (typeof object.relatedResources[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.FileStoreDataProfile.relatedResources: object expected"); + message.relatedResources[i] = $root.google.privacy.dlp.v2.RelatedResource.fromObject(object.relatedResources[i], long + 1); + } + } + if (object.domains) { + if (!Array.isArray(object.domains)) + throw TypeError(".google.privacy.dlp.v2.FileStoreDataProfile.domains: array expected"); + message.domains = []; + for (var i = 0; i < object.domains.length; ++i) { + if (typeof object.domains[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.FileStoreDataProfile.domains: object expected"); + message.domains[i] = $root.google.privacy.dlp.v2.Domain.fromObject(object.domains[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a FileStoreDataProfile message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @static + * @param {google.privacy.dlp.v2.FileStoreDataProfile} message FileStoreDataProfile + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileStoreDataProfile.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.fileClusterSummaries = []; + object.dataStorageLocations = []; + object.fileStoreInfoTypeSummaries = []; + object.tags = []; + object.relatedResources = []; + object.domains = []; + } + if (options.objects || options.defaults) { + object.resourceAttributes = {}; + object.resourceLabels = {}; + } + if (options.defaults) { + object.name = ""; + object.dataSourceType = null; + object.projectDataProfile = ""; + object.projectId = ""; + object.fileStoreLocation = ""; + object.fileStorePath = ""; + object.configSnapshot = null; + object.profileStatus = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.profileLastGenerated = null; + object.resourceVisibility = options.enums === String ? "RESOURCE_VISIBILITY_UNSPECIFIED" : 0; + object.sensitivityScore = null; + object.dataRiskLevel = null; + object.createTime = null; + object.lastModifiedTime = null; + object.locationType = ""; + object.sampleFindingsTable = null; + object.fileStoreIsEmpty = false; + object.fullResource = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.dataSourceType != null && message.hasOwnProperty("dataSourceType")) + object.dataSourceType = $root.google.privacy.dlp.v2.DataSourceType.toObject(message.dataSourceType, options); + if (message.projectDataProfile != null && message.hasOwnProperty("projectDataProfile")) + object.projectDataProfile = message.projectDataProfile; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.fileStoreLocation != null && message.hasOwnProperty("fileStoreLocation")) + object.fileStoreLocation = message.fileStoreLocation; + if (message.fileStorePath != null && message.hasOwnProperty("fileStorePath")) + object.fileStorePath = message.fileStorePath; + if (message.configSnapshot != null && message.hasOwnProperty("configSnapshot")) + object.configSnapshot = $root.google.privacy.dlp.v2.DataProfileConfigSnapshot.toObject(message.configSnapshot, options); + if (message.profileStatus != null && message.hasOwnProperty("profileStatus")) + object.profileStatus = $root.google.privacy.dlp.v2.ProfileStatus.toObject(message.profileStatus, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.privacy.dlp.v2.FileStoreDataProfile.State[message.state] === undefined ? message.state : $root.google.privacy.dlp.v2.FileStoreDataProfile.State[message.state] : message.state; + if (message.profileLastGenerated != null && message.hasOwnProperty("profileLastGenerated")) + object.profileLastGenerated = $root.google.protobuf.Timestamp.toObject(message.profileLastGenerated, options); + if (message.resourceVisibility != null && message.hasOwnProperty("resourceVisibility")) + object.resourceVisibility = options.enums === String ? $root.google.privacy.dlp.v2.ResourceVisibility[message.resourceVisibility] === undefined ? message.resourceVisibility : $root.google.privacy.dlp.v2.ResourceVisibility[message.resourceVisibility] : message.resourceVisibility; + if (message.sensitivityScore != null && message.hasOwnProperty("sensitivityScore")) + object.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.toObject(message.sensitivityScore, options); + if (message.dataRiskLevel != null && message.hasOwnProperty("dataRiskLevel")) + object.dataRiskLevel = $root.google.privacy.dlp.v2.DataRiskLevel.toObject(message.dataRiskLevel, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.lastModifiedTime != null && message.hasOwnProperty("lastModifiedTime")) + object.lastModifiedTime = $root.google.protobuf.Timestamp.toObject(message.lastModifiedTime, options); + if (message.fileClusterSummaries && message.fileClusterSummaries.length) { + object.fileClusterSummaries = []; + for (var j = 0; j < message.fileClusterSummaries.length; ++j) + object.fileClusterSummaries[j] = $root.google.privacy.dlp.v2.FileClusterSummary.toObject(message.fileClusterSummaries[j], options); + } + var keys2; + if (message.resourceAttributes && (keys2 = Object.keys(message.resourceAttributes)).length) { + object.resourceAttributes = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.resourceAttributes, keys2[j]); + object.resourceAttributes[keys2[j]] = $root.google.privacy.dlp.v2.Value.toObject(message.resourceAttributes[keys2[j]], options); + } + } + if (message.resourceLabels && (keys2 = Object.keys(message.resourceLabels)).length) { + object.resourceLabels = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.resourceLabels, keys2[j]); + object.resourceLabels[keys2[j]] = message.resourceLabels[keys2[j]]; + } + } + if (message.dataStorageLocations && message.dataStorageLocations.length) { + object.dataStorageLocations = []; + for (var j = 0; j < message.dataStorageLocations.length; ++j) + object.dataStorageLocations[j] = message.dataStorageLocations[j]; + } + if (message.locationType != null && message.hasOwnProperty("locationType")) + object.locationType = message.locationType; + if (message.fileStoreInfoTypeSummaries && message.fileStoreInfoTypeSummaries.length) { + object.fileStoreInfoTypeSummaries = []; + for (var j = 0; j < message.fileStoreInfoTypeSummaries.length; ++j) + object.fileStoreInfoTypeSummaries[j] = $root.google.privacy.dlp.v2.FileStoreInfoTypeSummary.toObject(message.fileStoreInfoTypeSummaries[j], options); + } + if (message.sampleFindingsTable != null && message.hasOwnProperty("sampleFindingsTable")) + object.sampleFindingsTable = $root.google.privacy.dlp.v2.BigQueryTable.toObject(message.sampleFindingsTable, options); + if (message.fileStoreIsEmpty != null && message.hasOwnProperty("fileStoreIsEmpty")) + object.fileStoreIsEmpty = message.fileStoreIsEmpty; + if (message.fullResource != null && message.hasOwnProperty("fullResource")) + object.fullResource = message.fullResource; + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = $root.google.privacy.dlp.v2.Tag.toObject(message.tags[j], options); + } + if (message.relatedResources && message.relatedResources.length) { + object.relatedResources = []; + for (var j = 0; j < message.relatedResources.length; ++j) + object.relatedResources[j] = $root.google.privacy.dlp.v2.RelatedResource.toObject(message.relatedResources[j], options); + } + if (message.domains && message.domains.length) { + object.domains = []; + for (var j = 0; j < message.domains.length; ++j) + object.domains[j] = $root.google.privacy.dlp.v2.Domain.toObject(message.domains[j], options); + } + return object; + }; + + /** + * Converts this FileStoreDataProfile to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @instance + * @returns {Object.} JSON object + */ + FileStoreDataProfile.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileStoreDataProfile + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.FileStoreDataProfile + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileStoreDataProfile.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.FileStoreDataProfile"; + }; + + /** + * State enum. + * @name google.privacy.dlp.v2.FileStoreDataProfile.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} RUNNING=1 RUNNING value + * @property {number} DONE=2 DONE value + */ + FileStoreDataProfile.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RUNNING"] = 1; + values[valuesById[2] = "DONE"] = 2; + return values; + })(); + + return FileStoreDataProfile; + })(); + + v2.Tag = (function() { + + /** + * Properties of a Tag. + * @memberof google.privacy.dlp.v2 + * @interface ITag + * @property {string|null} [namespacedTagValue] Tag namespacedTagValue + * @property {string|null} [key] Tag key + * @property {string|null} [value] Tag value + */ + + /** + * Constructs a new Tag. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a Tag. + * @implements ITag + * @constructor + * @param {google.privacy.dlp.v2.ITag=} [properties] Properties to set + */ + function Tag(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Tag namespacedTagValue. + * @member {string} namespacedTagValue + * @memberof google.privacy.dlp.v2.Tag + * @instance + */ + Tag.prototype.namespacedTagValue = ""; + + /** + * Tag key. + * @member {string} key + * @memberof google.privacy.dlp.v2.Tag + * @instance + */ + Tag.prototype.key = ""; + + /** + * Tag value. + * @member {string} value + * @memberof google.privacy.dlp.v2.Tag + * @instance + */ + Tag.prototype.value = ""; + + /** + * Creates a new Tag instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Tag + * @static + * @param {google.privacy.dlp.v2.ITag=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Tag} Tag instance + */ + Tag.create = function create(properties) { + return new Tag(properties); + }; + + /** + * Encodes the specified Tag message. Does not implicitly {@link google.privacy.dlp.v2.Tag.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Tag + * @static + * @param {google.privacy.dlp.v2.ITag} message Tag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tag.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.namespacedTagValue != null && Object.hasOwnProperty.call(message, "namespacedTagValue")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namespacedTagValue); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.key); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.value); + return writer; + }; + + /** + * Encodes the specified Tag message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Tag.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Tag + * @static + * @param {google.privacy.dlp.v2.ITag} message Tag message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Tag.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Tag message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Tag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Tag} Tag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tag.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Tag(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.namespacedTagValue = reader.string(); + break; + } + case 2: { + message.key = reader.string(); + break; + } + case 3: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Tag message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Tag + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Tag} Tag + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Tag.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Tag message. + * @function verify + * @memberof google.privacy.dlp.v2.Tag + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Tag.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.namespacedTagValue != null && message.hasOwnProperty("namespacedTagValue")) + if (!$util.isString(message.namespacedTagValue)) + return "namespacedTagValue: string expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates a Tag message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Tag + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Tag} Tag + */ + Tag.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Tag) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.Tag(); + if (object.namespacedTagValue != null) + message.namespacedTagValue = String(object.namespacedTagValue); + if (object.key != null) + message.key = String(object.key); + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from a Tag message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Tag + * @static + * @param {google.privacy.dlp.v2.Tag} message Tag + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Tag.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namespacedTagValue = ""; + object.key = ""; + object.value = ""; + } + if (message.namespacedTagValue != null && message.hasOwnProperty("namespacedTagValue")) + object.namespacedTagValue = message.namespacedTagValue; + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + return object; + }; + + /** + * Converts this Tag to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Tag + * @instance + * @returns {Object.} JSON object + */ + Tag.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Tag + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Tag + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Tag.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Tag"; + }; + + return Tag; + })(); + + v2.TagFilters = (function() { + + /** + * Properties of a TagFilters. + * @memberof google.privacy.dlp.v2 + * @interface ITagFilters + * @property {Array.|null} [tagFilters] TagFilters tagFilters + */ + + /** + * Constructs a new TagFilters. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a TagFilters. + * @implements ITagFilters + * @constructor + * @param {google.privacy.dlp.v2.ITagFilters=} [properties] Properties to set + */ + function TagFilters(properties) { + this.tagFilters = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TagFilters tagFilters. + * @member {Array.} tagFilters + * @memberof google.privacy.dlp.v2.TagFilters + * @instance + */ + TagFilters.prototype.tagFilters = $util.emptyArray; + + /** + * Creates a new TagFilters instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.TagFilters + * @static + * @param {google.privacy.dlp.v2.ITagFilters=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.TagFilters} TagFilters instance + */ + TagFilters.create = function create(properties) { + return new TagFilters(properties); + }; + + /** + * Encodes the specified TagFilters message. Does not implicitly {@link google.privacy.dlp.v2.TagFilters.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.TagFilters + * @static + * @param {google.privacy.dlp.v2.ITagFilters} message TagFilters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TagFilters.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tagFilters != null && message.tagFilters.length) + for (var i = 0; i < message.tagFilters.length; ++i) + $root.google.privacy.dlp.v2.TagFilter.encode(message.tagFilters[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TagFilters message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TagFilters.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.TagFilters + * @static + * @param {google.privacy.dlp.v2.ITagFilters} message TagFilters message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TagFilters.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TagFilters message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.TagFilters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.TagFilters} TagFilters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TagFilters.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TagFilters(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.tagFilters && message.tagFilters.length)) + message.tagFilters = []; + message.tagFilters.push($root.google.privacy.dlp.v2.TagFilter.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TagFilters message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.TagFilters + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.TagFilters} TagFilters + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TagFilters.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TagFilters message. + * @function verify + * @memberof google.privacy.dlp.v2.TagFilters + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TagFilters.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.tagFilters != null && message.hasOwnProperty("tagFilters")) { + if (!Array.isArray(message.tagFilters)) + return "tagFilters: array expected"; + for (var i = 0; i < message.tagFilters.length; ++i) { + var error = $root.google.privacy.dlp.v2.TagFilter.verify(message.tagFilters[i], long + 1); + if (error) + return "tagFilters." + error; + } + } + return null; + }; + + /** + * Creates a TagFilters message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.TagFilters + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.TagFilters} TagFilters + */ + TagFilters.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.TagFilters) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.TagFilters(); + if (object.tagFilters) { + if (!Array.isArray(object.tagFilters)) + throw TypeError(".google.privacy.dlp.v2.TagFilters.tagFilters: array expected"); + message.tagFilters = []; + for (var i = 0; i < object.tagFilters.length; ++i) { + if (typeof object.tagFilters[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.TagFilters.tagFilters: object expected"); + message.tagFilters[i] = $root.google.privacy.dlp.v2.TagFilter.fromObject(object.tagFilters[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a TagFilters message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.TagFilters + * @static + * @param {google.privacy.dlp.v2.TagFilters} message TagFilters + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TagFilters.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.tagFilters = []; + if (message.tagFilters && message.tagFilters.length) { + object.tagFilters = []; + for (var j = 0; j < message.tagFilters.length; ++j) + object.tagFilters[j] = $root.google.privacy.dlp.v2.TagFilter.toObject(message.tagFilters[j], options); + } + return object; + }; + + /** + * Converts this TagFilters to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.TagFilters + * @instance + * @returns {Object.} JSON object + */ + TagFilters.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TagFilters + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.TagFilters + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TagFilters.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.TagFilters"; + }; + + return TagFilters; + })(); + + v2.TagFilter = (function() { + + /** + * Properties of a TagFilter. + * @memberof google.privacy.dlp.v2 + * @interface ITagFilter + * @property {string|null} [namespacedTagValue] TagFilter namespacedTagValue + * @property {string|null} [namespacedTagKey] TagFilter namespacedTagKey + */ + + /** + * Constructs a new TagFilter. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a TagFilter. + * @implements ITagFilter + * @constructor + * @param {google.privacy.dlp.v2.ITagFilter=} [properties] Properties to set + */ + function TagFilter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TagFilter namespacedTagValue. + * @member {string|null|undefined} namespacedTagValue + * @memberof google.privacy.dlp.v2.TagFilter + * @instance + */ + TagFilter.prototype.namespacedTagValue = null; + + /** + * TagFilter namespacedTagKey. + * @member {string|null|undefined} namespacedTagKey + * @memberof google.privacy.dlp.v2.TagFilter + * @instance + */ + TagFilter.prototype.namespacedTagKey = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TagFilter format. + * @member {"namespacedTagValue"|"namespacedTagKey"|undefined} format + * @memberof google.privacy.dlp.v2.TagFilter + * @instance + */ + Object.defineProperty(TagFilter.prototype, "format", { + get: $util.oneOfGetter($oneOfFields = ["namespacedTagValue", "namespacedTagKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TagFilter instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.TagFilter + * @static + * @param {google.privacy.dlp.v2.ITagFilter=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.TagFilter} TagFilter instance + */ + TagFilter.create = function create(properties) { + return new TagFilter(properties); + }; + + /** + * Encodes the specified TagFilter message. Does not implicitly {@link google.privacy.dlp.v2.TagFilter.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.TagFilter + * @static + * @param {google.privacy.dlp.v2.ITagFilter} message TagFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TagFilter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.namespacedTagValue != null && Object.hasOwnProperty.call(message, "namespacedTagValue")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namespacedTagValue); + if (message.namespacedTagKey != null && Object.hasOwnProperty.call(message, "namespacedTagKey")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.namespacedTagKey); + return writer; + }; + + /** + * Encodes the specified TagFilter message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TagFilter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.TagFilter + * @static + * @param {google.privacy.dlp.v2.ITagFilter} message TagFilter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TagFilter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TagFilter message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.TagFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.TagFilter} TagFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TagFilter.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TagFilter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.namespacedTagValue = reader.string(); + break; + } + case 2: { + message.namespacedTagKey = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TagFilter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.TagFilter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.TagFilter} TagFilter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TagFilter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TagFilter message. + * @function verify + * @memberof google.privacy.dlp.v2.TagFilter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TagFilter.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.namespacedTagValue != null && message.hasOwnProperty("namespacedTagValue")) { + properties.format = 1; + if (!$util.isString(message.namespacedTagValue)) + return "namespacedTagValue: string expected"; + } + if (message.namespacedTagKey != null && message.hasOwnProperty("namespacedTagKey")) { + if (properties.format === 1) + return "format: multiple values"; + properties.format = 1; + if (!$util.isString(message.namespacedTagKey)) + return "namespacedTagKey: string expected"; + } + return null; + }; + + /** + * Creates a TagFilter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.TagFilter + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.TagFilter} TagFilter + */ + TagFilter.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.TagFilter) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.TagFilter(); + if (object.namespacedTagValue != null) + message.namespacedTagValue = String(object.namespacedTagValue); + if (object.namespacedTagKey != null) + message.namespacedTagKey = String(object.namespacedTagKey); + return message; + }; + + /** + * Creates a plain object from a TagFilter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.TagFilter + * @static + * @param {google.privacy.dlp.v2.TagFilter} message TagFilter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TagFilter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.namespacedTagValue != null && message.hasOwnProperty("namespacedTagValue")) { + object.namespacedTagValue = message.namespacedTagValue; + if (options.oneofs) + object.format = "namespacedTagValue"; + } + if (message.namespacedTagKey != null && message.hasOwnProperty("namespacedTagKey")) { + object.namespacedTagKey = message.namespacedTagKey; + if (options.oneofs) + object.format = "namespacedTagKey"; + } + return object; + }; + + /** + * Converts this TagFilter to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.TagFilter + * @instance + * @returns {Object.} JSON object + */ + TagFilter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TagFilter + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.TagFilter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TagFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.TagFilter"; + }; + + return TagFilter; + })(); + + v2.RelatedResource = (function() { + + /** + * Properties of a RelatedResource. + * @memberof google.privacy.dlp.v2 + * @interface IRelatedResource + * @property {string|null} [fullResource] RelatedResource fullResource + */ + + /** + * Constructs a new RelatedResource. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a RelatedResource. + * @implements IRelatedResource + * @constructor + * @param {google.privacy.dlp.v2.IRelatedResource=} [properties] Properties to set + */ + function RelatedResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RelatedResource fullResource. + * @member {string} fullResource + * @memberof google.privacy.dlp.v2.RelatedResource + * @instance + */ + RelatedResource.prototype.fullResource = ""; + + /** + * Creates a new RelatedResource instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.RelatedResource + * @static + * @param {google.privacy.dlp.v2.IRelatedResource=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.RelatedResource} RelatedResource instance + */ + RelatedResource.create = function create(properties) { + return new RelatedResource(properties); + }; + + /** + * Encodes the specified RelatedResource message. Does not implicitly {@link google.privacy.dlp.v2.RelatedResource.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.RelatedResource + * @static + * @param {google.privacy.dlp.v2.IRelatedResource} message RelatedResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RelatedResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fullResource != null && Object.hasOwnProperty.call(message, "fullResource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fullResource); + return writer; + }; + + /** + * Encodes the specified RelatedResource message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RelatedResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.RelatedResource + * @static + * @param {google.privacy.dlp.v2.IRelatedResource} message RelatedResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RelatedResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RelatedResource message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.RelatedResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.RelatedResource} RelatedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RelatedResource.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.RelatedResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fullResource = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RelatedResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.RelatedResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.RelatedResource} RelatedResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RelatedResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RelatedResource message. + * @function verify + * @memberof google.privacy.dlp.v2.RelatedResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RelatedResource.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.fullResource != null && message.hasOwnProperty("fullResource")) + if (!$util.isString(message.fullResource)) + return "fullResource: string expected"; + return null; + }; + + /** + * Creates a RelatedResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.RelatedResource + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.RelatedResource} RelatedResource + */ + RelatedResource.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.RelatedResource) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.RelatedResource(); + if (object.fullResource != null) + message.fullResource = String(object.fullResource); + return message; + }; + + /** + * Creates a plain object from a RelatedResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.RelatedResource + * @static + * @param {google.privacy.dlp.v2.RelatedResource} message RelatedResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RelatedResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.fullResource = ""; + if (message.fullResource != null && message.hasOwnProperty("fullResource")) + object.fullResource = message.fullResource; + return object; + }; + + /** + * Converts this RelatedResource to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.RelatedResource + * @instance + * @returns {Object.} JSON object + */ + RelatedResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RelatedResource + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.RelatedResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RelatedResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.RelatedResource"; + }; + + return RelatedResource; + })(); + + v2.FileStoreInfoTypeSummary = (function() { + + /** + * Properties of a FileStoreInfoTypeSummary. + * @memberof google.privacy.dlp.v2 + * @interface IFileStoreInfoTypeSummary + * @property {google.privacy.dlp.v2.IInfoType|null} [infoType] FileStoreInfoTypeSummary infoType + */ + + /** + * Constructs a new FileStoreInfoTypeSummary. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a FileStoreInfoTypeSummary. + * @implements IFileStoreInfoTypeSummary + * @constructor + * @param {google.privacy.dlp.v2.IFileStoreInfoTypeSummary=} [properties] Properties to set + */ + function FileStoreInfoTypeSummary(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileStoreInfoTypeSummary infoType. + * @member {google.privacy.dlp.v2.IInfoType|null|undefined} infoType + * @memberof google.privacy.dlp.v2.FileStoreInfoTypeSummary + * @instance + */ + FileStoreInfoTypeSummary.prototype.infoType = null; + + /** + * Creates a new FileStoreInfoTypeSummary instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.FileStoreInfoTypeSummary + * @static + * @param {google.privacy.dlp.v2.IFileStoreInfoTypeSummary=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.FileStoreInfoTypeSummary} FileStoreInfoTypeSummary instance + */ + FileStoreInfoTypeSummary.create = function create(properties) { + return new FileStoreInfoTypeSummary(properties); + }; + + /** + * Encodes the specified FileStoreInfoTypeSummary message. Does not implicitly {@link google.privacy.dlp.v2.FileStoreInfoTypeSummary.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.FileStoreInfoTypeSummary + * @static + * @param {google.privacy.dlp.v2.IFileStoreInfoTypeSummary} message FileStoreInfoTypeSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileStoreInfoTypeSummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.infoType != null && Object.hasOwnProperty.call(message, "infoType")) + $root.google.privacy.dlp.v2.InfoType.encode(message.infoType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileStoreInfoTypeSummary message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FileStoreInfoTypeSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.FileStoreInfoTypeSummary + * @static + * @param {google.privacy.dlp.v2.IFileStoreInfoTypeSummary} message FileStoreInfoTypeSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileStoreInfoTypeSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileStoreInfoTypeSummary message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.FileStoreInfoTypeSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.FileStoreInfoTypeSummary} FileStoreInfoTypeSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileStoreInfoTypeSummary.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.FileStoreInfoTypeSummary(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.infoType = $root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FileStoreInfoTypeSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.FileStoreInfoTypeSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.FileStoreInfoTypeSummary} FileStoreInfoTypeSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileStoreInfoTypeSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileStoreInfoTypeSummary message. + * @function verify + * @memberof google.privacy.dlp.v2.FileStoreInfoTypeSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileStoreInfoTypeSummary.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.infoType != null && message.hasOwnProperty("infoType")) { + var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infoType, long + 1); + if (error) + return "infoType." + error; + } + return null; + }; + + /** + * Creates a FileStoreInfoTypeSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.FileStoreInfoTypeSummary + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.FileStoreInfoTypeSummary} FileStoreInfoTypeSummary + */ + FileStoreInfoTypeSummary.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.FileStoreInfoTypeSummary) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.FileStoreInfoTypeSummary(); + if (object.infoType != null) { + if (typeof object.infoType !== "object") + throw TypeError(".google.privacy.dlp.v2.FileStoreInfoTypeSummary.infoType: object expected"); + message.infoType = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoType, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a FileStoreInfoTypeSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.FileStoreInfoTypeSummary + * @static + * @param {google.privacy.dlp.v2.FileStoreInfoTypeSummary} message FileStoreInfoTypeSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileStoreInfoTypeSummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.infoType = null; + if (message.infoType != null && message.hasOwnProperty("infoType")) + object.infoType = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoType, options); + return object; + }; + + /** + * Converts this FileStoreInfoTypeSummary to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.FileStoreInfoTypeSummary + * @instance + * @returns {Object.} JSON object + */ + FileStoreInfoTypeSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileStoreInfoTypeSummary + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.FileStoreInfoTypeSummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileStoreInfoTypeSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.FileStoreInfoTypeSummary"; + }; + + return FileStoreInfoTypeSummary; + })(); + + v2.FileExtensionInfo = (function() { + + /** + * Properties of a FileExtensionInfo. + * @memberof google.privacy.dlp.v2 + * @interface IFileExtensionInfo + * @property {string|null} [fileExtension] FileExtensionInfo fileExtension + */ + + /** + * Constructs a new FileExtensionInfo. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a FileExtensionInfo. + * @implements IFileExtensionInfo + * @constructor + * @param {google.privacy.dlp.v2.IFileExtensionInfo=} [properties] Properties to set + */ + function FileExtensionInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileExtensionInfo fileExtension. + * @member {string} fileExtension + * @memberof google.privacy.dlp.v2.FileExtensionInfo + * @instance + */ + FileExtensionInfo.prototype.fileExtension = ""; + + /** + * Creates a new FileExtensionInfo instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.FileExtensionInfo + * @static + * @param {google.privacy.dlp.v2.IFileExtensionInfo=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.FileExtensionInfo} FileExtensionInfo instance + */ + FileExtensionInfo.create = function create(properties) { + return new FileExtensionInfo(properties); + }; + + /** + * Encodes the specified FileExtensionInfo message. Does not implicitly {@link google.privacy.dlp.v2.FileExtensionInfo.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.FileExtensionInfo + * @static + * @param {google.privacy.dlp.v2.IFileExtensionInfo} message FileExtensionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileExtensionInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fileExtension != null && Object.hasOwnProperty.call(message, "fileExtension")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.fileExtension); + return writer; + }; + + /** + * Encodes the specified FileExtensionInfo message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FileExtensionInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.FileExtensionInfo + * @static + * @param {google.privacy.dlp.v2.IFileExtensionInfo} message FileExtensionInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileExtensionInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileExtensionInfo message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.FileExtensionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.FileExtensionInfo} FileExtensionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileExtensionInfo.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.FileExtensionInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fileExtension = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FileExtensionInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.FileExtensionInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.FileExtensionInfo} FileExtensionInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileExtensionInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileExtensionInfo message. + * @function verify + * @memberof google.privacy.dlp.v2.FileExtensionInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileExtensionInfo.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.fileExtension != null && message.hasOwnProperty("fileExtension")) + if (!$util.isString(message.fileExtension)) + return "fileExtension: string expected"; + return null; + }; + + /** + * Creates a FileExtensionInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.FileExtensionInfo + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.FileExtensionInfo} FileExtensionInfo + */ + FileExtensionInfo.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.FileExtensionInfo) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.FileExtensionInfo(); + if (object.fileExtension != null) + message.fileExtension = String(object.fileExtension); + return message; + }; + + /** + * Creates a plain object from a FileExtensionInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.FileExtensionInfo + * @static + * @param {google.privacy.dlp.v2.FileExtensionInfo} message FileExtensionInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileExtensionInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.fileExtension = ""; + if (message.fileExtension != null && message.hasOwnProperty("fileExtension")) + object.fileExtension = message.fileExtension; + return object; + }; + + /** + * Converts this FileExtensionInfo to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.FileExtensionInfo + * @instance + * @returns {Object.} JSON object + */ + FileExtensionInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileExtensionInfo + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.FileExtensionInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileExtensionInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.FileExtensionInfo"; + }; + + return FileExtensionInfo; + })(); + + v2.FileClusterSummary = (function() { + + /** + * Properties of a FileClusterSummary. + * @memberof google.privacy.dlp.v2 + * @interface IFileClusterSummary + * @property {google.privacy.dlp.v2.IFileClusterType|null} [fileClusterType] FileClusterSummary fileClusterType + * @property {Array.|null} [fileStoreInfoTypeSummaries] FileClusterSummary fileStoreInfoTypeSummaries + * @property {google.privacy.dlp.v2.ISensitivityScore|null} [sensitivityScore] FileClusterSummary sensitivityScore + * @property {google.privacy.dlp.v2.IDataRiskLevel|null} [dataRiskLevel] FileClusterSummary dataRiskLevel + * @property {Array.|null} [errors] FileClusterSummary errors + * @property {Array.|null} [fileExtensionsScanned] FileClusterSummary fileExtensionsScanned + * @property {Array.|null} [fileExtensionsSeen] FileClusterSummary fileExtensionsSeen + * @property {boolean|null} [noFilesExist] FileClusterSummary noFilesExist + */ + + /** + * Constructs a new FileClusterSummary. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a FileClusterSummary. + * @implements IFileClusterSummary + * @constructor + * @param {google.privacy.dlp.v2.IFileClusterSummary=} [properties] Properties to set + */ + function FileClusterSummary(properties) { + this.fileStoreInfoTypeSummaries = []; + this.errors = []; + this.fileExtensionsScanned = []; + this.fileExtensionsSeen = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileClusterSummary fileClusterType. + * @member {google.privacy.dlp.v2.IFileClusterType|null|undefined} fileClusterType + * @memberof google.privacy.dlp.v2.FileClusterSummary + * @instance + */ + FileClusterSummary.prototype.fileClusterType = null; + + /** + * FileClusterSummary fileStoreInfoTypeSummaries. + * @member {Array.} fileStoreInfoTypeSummaries + * @memberof google.privacy.dlp.v2.FileClusterSummary + * @instance + */ + FileClusterSummary.prototype.fileStoreInfoTypeSummaries = $util.emptyArray; + + /** + * FileClusterSummary sensitivityScore. + * @member {google.privacy.dlp.v2.ISensitivityScore|null|undefined} sensitivityScore + * @memberof google.privacy.dlp.v2.FileClusterSummary + * @instance + */ + FileClusterSummary.prototype.sensitivityScore = null; + + /** + * FileClusterSummary dataRiskLevel. + * @member {google.privacy.dlp.v2.IDataRiskLevel|null|undefined} dataRiskLevel + * @memberof google.privacy.dlp.v2.FileClusterSummary + * @instance + */ + FileClusterSummary.prototype.dataRiskLevel = null; + + /** + * FileClusterSummary errors. + * @member {Array.} errors + * @memberof google.privacy.dlp.v2.FileClusterSummary + * @instance + */ + FileClusterSummary.prototype.errors = $util.emptyArray; + + /** + * FileClusterSummary fileExtensionsScanned. + * @member {Array.} fileExtensionsScanned + * @memberof google.privacy.dlp.v2.FileClusterSummary + * @instance + */ + FileClusterSummary.prototype.fileExtensionsScanned = $util.emptyArray; + + /** + * FileClusterSummary fileExtensionsSeen. + * @member {Array.} fileExtensionsSeen + * @memberof google.privacy.dlp.v2.FileClusterSummary + * @instance + */ + FileClusterSummary.prototype.fileExtensionsSeen = $util.emptyArray; + + /** + * FileClusterSummary noFilesExist. + * @member {boolean} noFilesExist + * @memberof google.privacy.dlp.v2.FileClusterSummary + * @instance + */ + FileClusterSummary.prototype.noFilesExist = false; + + /** + * Creates a new FileClusterSummary instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.FileClusterSummary + * @static + * @param {google.privacy.dlp.v2.IFileClusterSummary=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.FileClusterSummary} FileClusterSummary instance + */ + FileClusterSummary.create = function create(properties) { + return new FileClusterSummary(properties); + }; + + /** + * Encodes the specified FileClusterSummary message. Does not implicitly {@link google.privacy.dlp.v2.FileClusterSummary.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.FileClusterSummary + * @static + * @param {google.privacy.dlp.v2.IFileClusterSummary} message FileClusterSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileClusterSummary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fileClusterType != null && Object.hasOwnProperty.call(message, "fileClusterType")) + $root.google.privacy.dlp.v2.FileClusterType.encode(message.fileClusterType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fileStoreInfoTypeSummaries != null && message.fileStoreInfoTypeSummaries.length) + for (var i = 0; i < message.fileStoreInfoTypeSummaries.length; ++i) + $root.google.privacy.dlp.v2.FileStoreInfoTypeSummary.encode(message.fileStoreInfoTypeSummaries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.sensitivityScore != null && Object.hasOwnProperty.call(message, "sensitivityScore")) + $root.google.privacy.dlp.v2.SensitivityScore.encode(message.sensitivityScore, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.dataRiskLevel != null && Object.hasOwnProperty.call(message, "dataRiskLevel")) + $root.google.privacy.dlp.v2.DataRiskLevel.encode(message.dataRiskLevel, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.privacy.dlp.v2.Error.encode(message.errors[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.fileExtensionsScanned != null && message.fileExtensionsScanned.length) + for (var i = 0; i < message.fileExtensionsScanned.length; ++i) + $root.google.privacy.dlp.v2.FileExtensionInfo.encode(message.fileExtensionsScanned[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.fileExtensionsSeen != null && message.fileExtensionsSeen.length) + for (var i = 0; i < message.fileExtensionsSeen.length; ++i) + $root.google.privacy.dlp.v2.FileExtensionInfo.encode(message.fileExtensionsSeen[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.noFilesExist != null && Object.hasOwnProperty.call(message, "noFilesExist")) + writer.uint32(/* id 9, wireType 0 =*/72).bool(message.noFilesExist); + return writer; + }; + + /** + * Encodes the specified FileClusterSummary message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FileClusterSummary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.FileClusterSummary + * @static + * @param {google.privacy.dlp.v2.IFileClusterSummary} message FileClusterSummary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileClusterSummary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileClusterSummary message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.FileClusterSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.FileClusterSummary} FileClusterSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileClusterSummary.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.FileClusterSummary(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fileClusterType = $root.google.privacy.dlp.v2.FileClusterType.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + if (!(message.fileStoreInfoTypeSummaries && message.fileStoreInfoTypeSummaries.length)) + message.fileStoreInfoTypeSummaries = []; + message.fileStoreInfoTypeSummaries.push($root.google.privacy.dlp.v2.FileStoreInfoTypeSummary.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 3: { + message.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.dataRiskLevel = $root.google.privacy.dlp.v2.DataRiskLevel.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.privacy.dlp.v2.Error.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 7: { + if (!(message.fileExtensionsScanned && message.fileExtensionsScanned.length)) + message.fileExtensionsScanned = []; + message.fileExtensionsScanned.push($root.google.privacy.dlp.v2.FileExtensionInfo.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 8: { + if (!(message.fileExtensionsSeen && message.fileExtensionsSeen.length)) + message.fileExtensionsSeen = []; + message.fileExtensionsSeen.push($root.google.privacy.dlp.v2.FileExtensionInfo.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 9: { + message.noFilesExist = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FileClusterSummary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.FileClusterSummary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.FileClusterSummary} FileClusterSummary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileClusterSummary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileClusterSummary message. + * @function verify + * @memberof google.privacy.dlp.v2.FileClusterSummary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileClusterSummary.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.fileClusterType != null && message.hasOwnProperty("fileClusterType")) { + var error = $root.google.privacy.dlp.v2.FileClusterType.verify(message.fileClusterType, long + 1); + if (error) + return "fileClusterType." + error; + } + if (message.fileStoreInfoTypeSummaries != null && message.hasOwnProperty("fileStoreInfoTypeSummaries")) { + if (!Array.isArray(message.fileStoreInfoTypeSummaries)) + return "fileStoreInfoTypeSummaries: array expected"; + for (var i = 0; i < message.fileStoreInfoTypeSummaries.length; ++i) { + var error = $root.google.privacy.dlp.v2.FileStoreInfoTypeSummary.verify(message.fileStoreInfoTypeSummaries[i], long + 1); + if (error) + return "fileStoreInfoTypeSummaries." + error; + } + } + if (message.sensitivityScore != null && message.hasOwnProperty("sensitivityScore")) { + var error = $root.google.privacy.dlp.v2.SensitivityScore.verify(message.sensitivityScore, long + 1); + if (error) + return "sensitivityScore." + error; + } + if (message.dataRiskLevel != null && message.hasOwnProperty("dataRiskLevel")) { + var error = $root.google.privacy.dlp.v2.DataRiskLevel.verify(message.dataRiskLevel, long + 1); + if (error) + return "dataRiskLevel." + error; + } + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.privacy.dlp.v2.Error.verify(message.errors[i], long + 1); + if (error) + return "errors." + error; + } + } + if (message.fileExtensionsScanned != null && message.hasOwnProperty("fileExtensionsScanned")) { + if (!Array.isArray(message.fileExtensionsScanned)) + return "fileExtensionsScanned: array expected"; + for (var i = 0; i < message.fileExtensionsScanned.length; ++i) { + var error = $root.google.privacy.dlp.v2.FileExtensionInfo.verify(message.fileExtensionsScanned[i], long + 1); + if (error) + return "fileExtensionsScanned." + error; + } + } + if (message.fileExtensionsSeen != null && message.hasOwnProperty("fileExtensionsSeen")) { + if (!Array.isArray(message.fileExtensionsSeen)) + return "fileExtensionsSeen: array expected"; + for (var i = 0; i < message.fileExtensionsSeen.length; ++i) { + var error = $root.google.privacy.dlp.v2.FileExtensionInfo.verify(message.fileExtensionsSeen[i], long + 1); + if (error) + return "fileExtensionsSeen." + error; + } + } + if (message.noFilesExist != null && message.hasOwnProperty("noFilesExist")) + if (typeof message.noFilesExist !== "boolean") + return "noFilesExist: boolean expected"; + return null; + }; + + /** + * Creates a FileClusterSummary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.FileClusterSummary + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.FileClusterSummary} FileClusterSummary + */ + FileClusterSummary.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.FileClusterSummary) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.FileClusterSummary(); + if (object.fileClusterType != null) { + if (typeof object.fileClusterType !== "object") + throw TypeError(".google.privacy.dlp.v2.FileClusterSummary.fileClusterType: object expected"); + message.fileClusterType = $root.google.privacy.dlp.v2.FileClusterType.fromObject(object.fileClusterType, long + 1); + } + if (object.fileStoreInfoTypeSummaries) { + if (!Array.isArray(object.fileStoreInfoTypeSummaries)) + throw TypeError(".google.privacy.dlp.v2.FileClusterSummary.fileStoreInfoTypeSummaries: array expected"); + message.fileStoreInfoTypeSummaries = []; + for (var i = 0; i < object.fileStoreInfoTypeSummaries.length; ++i) { + if (typeof object.fileStoreInfoTypeSummaries[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.FileClusterSummary.fileStoreInfoTypeSummaries: object expected"); + message.fileStoreInfoTypeSummaries[i] = $root.google.privacy.dlp.v2.FileStoreInfoTypeSummary.fromObject(object.fileStoreInfoTypeSummaries[i], long + 1); + } + } + if (object.sensitivityScore != null) { + if (typeof object.sensitivityScore !== "object") + throw TypeError(".google.privacy.dlp.v2.FileClusterSummary.sensitivityScore: object expected"); + message.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.fromObject(object.sensitivityScore, long + 1); + } + if (object.dataRiskLevel != null) { + if (typeof object.dataRiskLevel !== "object") + throw TypeError(".google.privacy.dlp.v2.FileClusterSummary.dataRiskLevel: object expected"); + message.dataRiskLevel = $root.google.privacy.dlp.v2.DataRiskLevel.fromObject(object.dataRiskLevel, long + 1); + } + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.privacy.dlp.v2.FileClusterSummary.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.FileClusterSummary.errors: object expected"); + message.errors[i] = $root.google.privacy.dlp.v2.Error.fromObject(object.errors[i], long + 1); + } + } + if (object.fileExtensionsScanned) { + if (!Array.isArray(object.fileExtensionsScanned)) + throw TypeError(".google.privacy.dlp.v2.FileClusterSummary.fileExtensionsScanned: array expected"); + message.fileExtensionsScanned = []; + for (var i = 0; i < object.fileExtensionsScanned.length; ++i) { + if (typeof object.fileExtensionsScanned[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.FileClusterSummary.fileExtensionsScanned: object expected"); + message.fileExtensionsScanned[i] = $root.google.privacy.dlp.v2.FileExtensionInfo.fromObject(object.fileExtensionsScanned[i], long + 1); + } + } + if (object.fileExtensionsSeen) { + if (!Array.isArray(object.fileExtensionsSeen)) + throw TypeError(".google.privacy.dlp.v2.FileClusterSummary.fileExtensionsSeen: array expected"); + message.fileExtensionsSeen = []; + for (var i = 0; i < object.fileExtensionsSeen.length; ++i) { + if (typeof object.fileExtensionsSeen[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.FileClusterSummary.fileExtensionsSeen: object expected"); + message.fileExtensionsSeen[i] = $root.google.privacy.dlp.v2.FileExtensionInfo.fromObject(object.fileExtensionsSeen[i], long + 1); + } + } + if (object.noFilesExist != null) + message.noFilesExist = Boolean(object.noFilesExist); + return message; + }; + + /** + * Creates a plain object from a FileClusterSummary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.FileClusterSummary + * @static + * @param {google.privacy.dlp.v2.FileClusterSummary} message FileClusterSummary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileClusterSummary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.fileStoreInfoTypeSummaries = []; + object.errors = []; + object.fileExtensionsScanned = []; + object.fileExtensionsSeen = []; + } + if (options.defaults) { + object.fileClusterType = null; + object.sensitivityScore = null; + object.dataRiskLevel = null; + object.noFilesExist = false; + } + if (message.fileClusterType != null && message.hasOwnProperty("fileClusterType")) + object.fileClusterType = $root.google.privacy.dlp.v2.FileClusterType.toObject(message.fileClusterType, options); + if (message.fileStoreInfoTypeSummaries && message.fileStoreInfoTypeSummaries.length) { + object.fileStoreInfoTypeSummaries = []; + for (var j = 0; j < message.fileStoreInfoTypeSummaries.length; ++j) + object.fileStoreInfoTypeSummaries[j] = $root.google.privacy.dlp.v2.FileStoreInfoTypeSummary.toObject(message.fileStoreInfoTypeSummaries[j], options); + } + if (message.sensitivityScore != null && message.hasOwnProperty("sensitivityScore")) + object.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.toObject(message.sensitivityScore, options); + if (message.dataRiskLevel != null && message.hasOwnProperty("dataRiskLevel")) + object.dataRiskLevel = $root.google.privacy.dlp.v2.DataRiskLevel.toObject(message.dataRiskLevel, options); + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.privacy.dlp.v2.Error.toObject(message.errors[j], options); + } + if (message.fileExtensionsScanned && message.fileExtensionsScanned.length) { + object.fileExtensionsScanned = []; + for (var j = 0; j < message.fileExtensionsScanned.length; ++j) + object.fileExtensionsScanned[j] = $root.google.privacy.dlp.v2.FileExtensionInfo.toObject(message.fileExtensionsScanned[j], options); + } + if (message.fileExtensionsSeen && message.fileExtensionsSeen.length) { + object.fileExtensionsSeen = []; + for (var j = 0; j < message.fileExtensionsSeen.length; ++j) + object.fileExtensionsSeen[j] = $root.google.privacy.dlp.v2.FileExtensionInfo.toObject(message.fileExtensionsSeen[j], options); + } + if (message.noFilesExist != null && message.hasOwnProperty("noFilesExist")) + object.noFilesExist = message.noFilesExist; + return object; + }; + + /** + * Converts this FileClusterSummary to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.FileClusterSummary + * @instance + * @returns {Object.} JSON object + */ + FileClusterSummary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileClusterSummary + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.FileClusterSummary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileClusterSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.FileClusterSummary"; + }; + + return FileClusterSummary; + })(); + + v2.GetProjectDataProfileRequest = (function() { + + /** + * Properties of a GetProjectDataProfileRequest. + * @memberof google.privacy.dlp.v2 + * @interface IGetProjectDataProfileRequest + * @property {string|null} [name] GetProjectDataProfileRequest name + */ + + /** + * Constructs a new GetProjectDataProfileRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a GetProjectDataProfileRequest. + * @implements IGetProjectDataProfileRequest + * @constructor + * @param {google.privacy.dlp.v2.IGetProjectDataProfileRequest=} [properties] Properties to set + */ + function GetProjectDataProfileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetProjectDataProfileRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.GetProjectDataProfileRequest + * @instance + */ + GetProjectDataProfileRequest.prototype.name = ""; + + /** + * Creates a new GetProjectDataProfileRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.GetProjectDataProfileRequest + * @static + * @param {google.privacy.dlp.v2.IGetProjectDataProfileRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.GetProjectDataProfileRequest} GetProjectDataProfileRequest instance + */ + GetProjectDataProfileRequest.create = function create(properties) { + return new GetProjectDataProfileRequest(properties); + }; + + /** + * Encodes the specified GetProjectDataProfileRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetProjectDataProfileRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.GetProjectDataProfileRequest + * @static + * @param {google.privacy.dlp.v2.IGetProjectDataProfileRequest} message GetProjectDataProfileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetProjectDataProfileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetProjectDataProfileRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetProjectDataProfileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.GetProjectDataProfileRequest + * @static + * @param {google.privacy.dlp.v2.IGetProjectDataProfileRequest} message GetProjectDataProfileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetProjectDataProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetProjectDataProfileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.GetProjectDataProfileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.GetProjectDataProfileRequest} GetProjectDataProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetProjectDataProfileRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.GetProjectDataProfileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetProjectDataProfileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.GetProjectDataProfileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.GetProjectDataProfileRequest} GetProjectDataProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetProjectDataProfileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetProjectDataProfileRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.GetProjectDataProfileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetProjectDataProfileRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetProjectDataProfileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.GetProjectDataProfileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.GetProjectDataProfileRequest} GetProjectDataProfileRequest + */ + GetProjectDataProfileRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.GetProjectDataProfileRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.GetProjectDataProfileRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetProjectDataProfileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.GetProjectDataProfileRequest + * @static + * @param {google.privacy.dlp.v2.GetProjectDataProfileRequest} message GetProjectDataProfileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetProjectDataProfileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetProjectDataProfileRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.GetProjectDataProfileRequest + * @instance + * @returns {Object.} JSON object + */ + GetProjectDataProfileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetProjectDataProfileRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.GetProjectDataProfileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetProjectDataProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.GetProjectDataProfileRequest"; + }; + + return GetProjectDataProfileRequest; + })(); + + v2.GetFileStoreDataProfileRequest = (function() { + + /** + * Properties of a GetFileStoreDataProfileRequest. + * @memberof google.privacy.dlp.v2 + * @interface IGetFileStoreDataProfileRequest + * @property {string|null} [name] GetFileStoreDataProfileRequest name + */ + + /** + * Constructs a new GetFileStoreDataProfileRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a GetFileStoreDataProfileRequest. + * @implements IGetFileStoreDataProfileRequest + * @constructor + * @param {google.privacy.dlp.v2.IGetFileStoreDataProfileRequest=} [properties] Properties to set + */ + function GetFileStoreDataProfileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetFileStoreDataProfileRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.GetFileStoreDataProfileRequest + * @instance + */ + GetFileStoreDataProfileRequest.prototype.name = ""; + + /** + * Creates a new GetFileStoreDataProfileRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.GetFileStoreDataProfileRequest + * @static + * @param {google.privacy.dlp.v2.IGetFileStoreDataProfileRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.GetFileStoreDataProfileRequest} GetFileStoreDataProfileRequest instance + */ + GetFileStoreDataProfileRequest.create = function create(properties) { + return new GetFileStoreDataProfileRequest(properties); + }; + + /** + * Encodes the specified GetFileStoreDataProfileRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetFileStoreDataProfileRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.GetFileStoreDataProfileRequest + * @static + * @param {google.privacy.dlp.v2.IGetFileStoreDataProfileRequest} message GetFileStoreDataProfileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFileStoreDataProfileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetFileStoreDataProfileRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetFileStoreDataProfileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.GetFileStoreDataProfileRequest + * @static + * @param {google.privacy.dlp.v2.IGetFileStoreDataProfileRequest} message GetFileStoreDataProfileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFileStoreDataProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetFileStoreDataProfileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.GetFileStoreDataProfileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.GetFileStoreDataProfileRequest} GetFileStoreDataProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFileStoreDataProfileRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.GetFileStoreDataProfileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetFileStoreDataProfileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.GetFileStoreDataProfileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.GetFileStoreDataProfileRequest} GetFileStoreDataProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFileStoreDataProfileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetFileStoreDataProfileRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.GetFileStoreDataProfileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetFileStoreDataProfileRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetFileStoreDataProfileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.GetFileStoreDataProfileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.GetFileStoreDataProfileRequest} GetFileStoreDataProfileRequest + */ + GetFileStoreDataProfileRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.GetFileStoreDataProfileRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.GetFileStoreDataProfileRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetFileStoreDataProfileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.GetFileStoreDataProfileRequest + * @static + * @param {google.privacy.dlp.v2.GetFileStoreDataProfileRequest} message GetFileStoreDataProfileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetFileStoreDataProfileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetFileStoreDataProfileRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.GetFileStoreDataProfileRequest + * @instance + * @returns {Object.} JSON object + */ + GetFileStoreDataProfileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetFileStoreDataProfileRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.GetFileStoreDataProfileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetFileStoreDataProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.GetFileStoreDataProfileRequest"; + }; + + return GetFileStoreDataProfileRequest; + })(); + + v2.ListFileStoreDataProfilesRequest = (function() { + + /** + * Properties of a ListFileStoreDataProfilesRequest. + * @memberof google.privacy.dlp.v2 + * @interface IListFileStoreDataProfilesRequest + * @property {string|null} [parent] ListFileStoreDataProfilesRequest parent + * @property {string|null} [pageToken] ListFileStoreDataProfilesRequest pageToken + * @property {number|null} [pageSize] ListFileStoreDataProfilesRequest pageSize + * @property {string|null} [orderBy] ListFileStoreDataProfilesRequest orderBy + * @property {string|null} [filter] ListFileStoreDataProfilesRequest filter + */ + + /** + * Constructs a new ListFileStoreDataProfilesRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListFileStoreDataProfilesRequest. + * @implements IListFileStoreDataProfilesRequest + * @constructor + * @param {google.privacy.dlp.v2.IListFileStoreDataProfilesRequest=} [properties] Properties to set + */ + function ListFileStoreDataProfilesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFileStoreDataProfilesRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesRequest + * @instance + */ + ListFileStoreDataProfilesRequest.prototype.parent = ""; + + /** + * ListFileStoreDataProfilesRequest pageToken. + * @member {string} pageToken + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesRequest + * @instance + */ + ListFileStoreDataProfilesRequest.prototype.pageToken = ""; + + /** + * ListFileStoreDataProfilesRequest pageSize. + * @member {number} pageSize + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesRequest + * @instance + */ + ListFileStoreDataProfilesRequest.prototype.pageSize = 0; + + /** + * ListFileStoreDataProfilesRequest orderBy. + * @member {string} orderBy + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesRequest + * @instance + */ + ListFileStoreDataProfilesRequest.prototype.orderBy = ""; + + /** + * ListFileStoreDataProfilesRequest filter. + * @member {string} filter + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesRequest + * @instance + */ + ListFileStoreDataProfilesRequest.prototype.filter = ""; + + /** + * Creates a new ListFileStoreDataProfilesRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesRequest + * @static + * @param {google.privacy.dlp.v2.IListFileStoreDataProfilesRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListFileStoreDataProfilesRequest} ListFileStoreDataProfilesRequest instance + */ + ListFileStoreDataProfilesRequest.create = function create(properties) { + return new ListFileStoreDataProfilesRequest(properties); + }; + + /** + * Encodes the specified ListFileStoreDataProfilesRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListFileStoreDataProfilesRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesRequest + * @static + * @param {google.privacy.dlp.v2.IListFileStoreDataProfilesRequest} message ListFileStoreDataProfilesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFileStoreDataProfilesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.orderBy); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListFileStoreDataProfilesRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListFileStoreDataProfilesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesRequest + * @static + * @param {google.privacy.dlp.v2.IListFileStoreDataProfilesRequest} message ListFileStoreDataProfilesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFileStoreDataProfilesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFileStoreDataProfilesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ListFileStoreDataProfilesRequest} ListFileStoreDataProfilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFileStoreDataProfilesRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListFileStoreDataProfilesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.orderBy = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListFileStoreDataProfilesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListFileStoreDataProfilesRequest} ListFileStoreDataProfilesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFileStoreDataProfilesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFileStoreDataProfilesRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFileStoreDataProfilesRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListFileStoreDataProfilesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListFileStoreDataProfilesRequest} ListFileStoreDataProfilesRequest + */ + ListFileStoreDataProfilesRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ListFileStoreDataProfilesRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ListFileStoreDataProfilesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListFileStoreDataProfilesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesRequest + * @static + * @param {google.privacy.dlp.v2.ListFileStoreDataProfilesRequest} message ListFileStoreDataProfilesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFileStoreDataProfilesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + object.orderBy = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListFileStoreDataProfilesRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesRequest + * @instance + * @returns {Object.} JSON object + */ + ListFileStoreDataProfilesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFileStoreDataProfilesRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFileStoreDataProfilesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ListFileStoreDataProfilesRequest"; + }; + + return ListFileStoreDataProfilesRequest; + })(); + + v2.ListFileStoreDataProfilesResponse = (function() { + + /** + * Properties of a ListFileStoreDataProfilesResponse. + * @memberof google.privacy.dlp.v2 + * @interface IListFileStoreDataProfilesResponse + * @property {Array.|null} [fileStoreDataProfiles] ListFileStoreDataProfilesResponse fileStoreDataProfiles + * @property {string|null} [nextPageToken] ListFileStoreDataProfilesResponse nextPageToken + */ + + /** + * Constructs a new ListFileStoreDataProfilesResponse. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListFileStoreDataProfilesResponse. + * @implements IListFileStoreDataProfilesResponse + * @constructor + * @param {google.privacy.dlp.v2.IListFileStoreDataProfilesResponse=} [properties] Properties to set + */ + function ListFileStoreDataProfilesResponse(properties) { + this.fileStoreDataProfiles = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFileStoreDataProfilesResponse fileStoreDataProfiles. + * @member {Array.} fileStoreDataProfiles + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesResponse + * @instance + */ + ListFileStoreDataProfilesResponse.prototype.fileStoreDataProfiles = $util.emptyArray; + + /** + * ListFileStoreDataProfilesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesResponse + * @instance + */ + ListFileStoreDataProfilesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListFileStoreDataProfilesResponse instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesResponse + * @static + * @param {google.privacy.dlp.v2.IListFileStoreDataProfilesResponse=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListFileStoreDataProfilesResponse} ListFileStoreDataProfilesResponse instance + */ + ListFileStoreDataProfilesResponse.create = function create(properties) { + return new ListFileStoreDataProfilesResponse(properties); + }; + + /** + * Encodes the specified ListFileStoreDataProfilesResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListFileStoreDataProfilesResponse.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesResponse + * @static + * @param {google.privacy.dlp.v2.IListFileStoreDataProfilesResponse} message ListFileStoreDataProfilesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFileStoreDataProfilesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fileStoreDataProfiles != null && message.fileStoreDataProfiles.length) + for (var i = 0; i < message.fileStoreDataProfiles.length; ++i) + $root.google.privacy.dlp.v2.FileStoreDataProfile.encode(message.fileStoreDataProfiles[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListFileStoreDataProfilesResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListFileStoreDataProfilesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesResponse + * @static + * @param {google.privacy.dlp.v2.IListFileStoreDataProfilesResponse} message ListFileStoreDataProfilesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFileStoreDataProfilesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFileStoreDataProfilesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ListFileStoreDataProfilesResponse} ListFileStoreDataProfilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFileStoreDataProfilesResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListFileStoreDataProfilesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.fileStoreDataProfiles && message.fileStoreDataProfiles.length)) + message.fileStoreDataProfiles = []; + message.fileStoreDataProfiles.push($root.google.privacy.dlp.v2.FileStoreDataProfile.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListFileStoreDataProfilesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListFileStoreDataProfilesResponse} ListFileStoreDataProfilesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFileStoreDataProfilesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFileStoreDataProfilesResponse message. + * @function verify + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFileStoreDataProfilesResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.fileStoreDataProfiles != null && message.hasOwnProperty("fileStoreDataProfiles")) { + if (!Array.isArray(message.fileStoreDataProfiles)) + return "fileStoreDataProfiles: array expected"; + for (var i = 0; i < message.fileStoreDataProfiles.length; ++i) { + var error = $root.google.privacy.dlp.v2.FileStoreDataProfile.verify(message.fileStoreDataProfiles[i], long + 1); + if (error) + return "fileStoreDataProfiles." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListFileStoreDataProfilesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListFileStoreDataProfilesResponse} ListFileStoreDataProfilesResponse + */ + ListFileStoreDataProfilesResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ListFileStoreDataProfilesResponse) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ListFileStoreDataProfilesResponse(); + if (object.fileStoreDataProfiles) { + if (!Array.isArray(object.fileStoreDataProfiles)) + throw TypeError(".google.privacy.dlp.v2.ListFileStoreDataProfilesResponse.fileStoreDataProfiles: array expected"); + message.fileStoreDataProfiles = []; + for (var i = 0; i < object.fileStoreDataProfiles.length; ++i) { + if (typeof object.fileStoreDataProfiles[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.ListFileStoreDataProfilesResponse.fileStoreDataProfiles: object expected"); + message.fileStoreDataProfiles[i] = $root.google.privacy.dlp.v2.FileStoreDataProfile.fromObject(object.fileStoreDataProfiles[i], long + 1); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListFileStoreDataProfilesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesResponse + * @static + * @param {google.privacy.dlp.v2.ListFileStoreDataProfilesResponse} message ListFileStoreDataProfilesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFileStoreDataProfilesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fileStoreDataProfiles = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.fileStoreDataProfiles && message.fileStoreDataProfiles.length) { + object.fileStoreDataProfiles = []; + for (var j = 0; j < message.fileStoreDataProfiles.length; ++j) + object.fileStoreDataProfiles[j] = $root.google.privacy.dlp.v2.FileStoreDataProfile.toObject(message.fileStoreDataProfiles[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListFileStoreDataProfilesResponse to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesResponse + * @instance + * @returns {Object.} JSON object + */ + ListFileStoreDataProfilesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFileStoreDataProfilesResponse + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ListFileStoreDataProfilesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFileStoreDataProfilesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ListFileStoreDataProfilesResponse"; + }; + + return ListFileStoreDataProfilesResponse; + })(); + + v2.DeleteFileStoreDataProfileRequest = (function() { + + /** + * Properties of a DeleteFileStoreDataProfileRequest. + * @memberof google.privacy.dlp.v2 + * @interface IDeleteFileStoreDataProfileRequest + * @property {string|null} [name] DeleteFileStoreDataProfileRequest name + */ + + /** + * Constructs a new DeleteFileStoreDataProfileRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DeleteFileStoreDataProfileRequest. + * @implements IDeleteFileStoreDataProfileRequest + * @constructor + * @param {google.privacy.dlp.v2.IDeleteFileStoreDataProfileRequest=} [properties] Properties to set + */ + function DeleteFileStoreDataProfileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteFileStoreDataProfileRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest + * @instance + */ + DeleteFileStoreDataProfileRequest.prototype.name = ""; + + /** + * Creates a new DeleteFileStoreDataProfileRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteFileStoreDataProfileRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest} DeleteFileStoreDataProfileRequest instance + */ + DeleteFileStoreDataProfileRequest.create = function create(properties) { + return new DeleteFileStoreDataProfileRequest(properties); + }; + + /** + * Encodes the specified DeleteFileStoreDataProfileRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteFileStoreDataProfileRequest} message DeleteFileStoreDataProfileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFileStoreDataProfileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteFileStoreDataProfileRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteFileStoreDataProfileRequest} message DeleteFileStoreDataProfileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFileStoreDataProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteFileStoreDataProfileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest} DeleteFileStoreDataProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFileStoreDataProfileRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteFileStoreDataProfileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest} DeleteFileStoreDataProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFileStoreDataProfileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteFileStoreDataProfileRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteFileStoreDataProfileRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteFileStoreDataProfileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest} DeleteFileStoreDataProfileRequest + */ + DeleteFileStoreDataProfileRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteFileStoreDataProfileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest + * @static + * @param {google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest} message DeleteFileStoreDataProfileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteFileStoreDataProfileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteFileStoreDataProfileRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteFileStoreDataProfileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteFileStoreDataProfileRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteFileStoreDataProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest"; + }; + + return DeleteFileStoreDataProfileRequest; + })(); + + v2.GetTableDataProfileRequest = (function() { + + /** + * Properties of a GetTableDataProfileRequest. + * @memberof google.privacy.dlp.v2 + * @interface IGetTableDataProfileRequest + * @property {string|null} [name] GetTableDataProfileRequest name + */ + + /** + * Constructs a new GetTableDataProfileRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a GetTableDataProfileRequest. + * @implements IGetTableDataProfileRequest + * @constructor + * @param {google.privacy.dlp.v2.IGetTableDataProfileRequest=} [properties] Properties to set + */ + function GetTableDataProfileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetTableDataProfileRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.GetTableDataProfileRequest + * @instance + */ + GetTableDataProfileRequest.prototype.name = ""; + + /** + * Creates a new GetTableDataProfileRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.GetTableDataProfileRequest + * @static + * @param {google.privacy.dlp.v2.IGetTableDataProfileRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.GetTableDataProfileRequest} GetTableDataProfileRequest instance + */ + GetTableDataProfileRequest.create = function create(properties) { + return new GetTableDataProfileRequest(properties); + }; + + /** + * Encodes the specified GetTableDataProfileRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetTableDataProfileRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.GetTableDataProfileRequest + * @static + * @param {google.privacy.dlp.v2.IGetTableDataProfileRequest} message GetTableDataProfileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTableDataProfileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetTableDataProfileRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetTableDataProfileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.GetTableDataProfileRequest + * @static + * @param {google.privacy.dlp.v2.IGetTableDataProfileRequest} message GetTableDataProfileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetTableDataProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetTableDataProfileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.GetTableDataProfileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.GetTableDataProfileRequest} GetTableDataProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTableDataProfileRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.GetTableDataProfileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetTableDataProfileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.GetTableDataProfileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.GetTableDataProfileRequest} GetTableDataProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetTableDataProfileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetTableDataProfileRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.GetTableDataProfileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetTableDataProfileRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetTableDataProfileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.GetTableDataProfileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.GetTableDataProfileRequest} GetTableDataProfileRequest + */ + GetTableDataProfileRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.GetTableDataProfileRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.GetTableDataProfileRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetTableDataProfileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.GetTableDataProfileRequest + * @static + * @param {google.privacy.dlp.v2.GetTableDataProfileRequest} message GetTableDataProfileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetTableDataProfileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetTableDataProfileRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.GetTableDataProfileRequest + * @instance + * @returns {Object.} JSON object + */ + GetTableDataProfileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetTableDataProfileRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.GetTableDataProfileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetTableDataProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.GetTableDataProfileRequest"; + }; + + return GetTableDataProfileRequest; + })(); + + v2.GetColumnDataProfileRequest = (function() { + + /** + * Properties of a GetColumnDataProfileRequest. + * @memberof google.privacy.dlp.v2 + * @interface IGetColumnDataProfileRequest + * @property {string|null} [name] GetColumnDataProfileRequest name + */ + + /** + * Constructs a new GetColumnDataProfileRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a GetColumnDataProfileRequest. + * @implements IGetColumnDataProfileRequest + * @constructor + * @param {google.privacy.dlp.v2.IGetColumnDataProfileRequest=} [properties] Properties to set + */ + function GetColumnDataProfileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetColumnDataProfileRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.GetColumnDataProfileRequest + * @instance + */ + GetColumnDataProfileRequest.prototype.name = ""; + + /** + * Creates a new GetColumnDataProfileRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.GetColumnDataProfileRequest + * @static + * @param {google.privacy.dlp.v2.IGetColumnDataProfileRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.GetColumnDataProfileRequest} GetColumnDataProfileRequest instance + */ + GetColumnDataProfileRequest.create = function create(properties) { + return new GetColumnDataProfileRequest(properties); + }; + + /** + * Encodes the specified GetColumnDataProfileRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetColumnDataProfileRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.GetColumnDataProfileRequest + * @static + * @param {google.privacy.dlp.v2.IGetColumnDataProfileRequest} message GetColumnDataProfileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetColumnDataProfileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetColumnDataProfileRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetColumnDataProfileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.GetColumnDataProfileRequest + * @static + * @param {google.privacy.dlp.v2.IGetColumnDataProfileRequest} message GetColumnDataProfileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetColumnDataProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetColumnDataProfileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.GetColumnDataProfileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.GetColumnDataProfileRequest} GetColumnDataProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetColumnDataProfileRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.GetColumnDataProfileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetColumnDataProfileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.GetColumnDataProfileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.GetColumnDataProfileRequest} GetColumnDataProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetColumnDataProfileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetColumnDataProfileRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.GetColumnDataProfileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetColumnDataProfileRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetColumnDataProfileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.GetColumnDataProfileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.GetColumnDataProfileRequest} GetColumnDataProfileRequest + */ + GetColumnDataProfileRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.GetColumnDataProfileRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.GetColumnDataProfileRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetColumnDataProfileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.GetColumnDataProfileRequest + * @static + * @param {google.privacy.dlp.v2.GetColumnDataProfileRequest} message GetColumnDataProfileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetColumnDataProfileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetColumnDataProfileRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.GetColumnDataProfileRequest + * @instance + * @returns {Object.} JSON object + */ + GetColumnDataProfileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetColumnDataProfileRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.GetColumnDataProfileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetColumnDataProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.GetColumnDataProfileRequest"; + }; + + return GetColumnDataProfileRequest; + })(); + + v2.DataProfilePubSubCondition = (function() { + + /** + * Properties of a DataProfilePubSubCondition. + * @memberof google.privacy.dlp.v2 + * @interface IDataProfilePubSubCondition + * @property {google.privacy.dlp.v2.DataProfilePubSubCondition.IPubSubExpressions|null} [expressions] DataProfilePubSubCondition expressions + */ + + /** + * Constructs a new DataProfilePubSubCondition. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DataProfilePubSubCondition. + * @implements IDataProfilePubSubCondition + * @constructor + * @param {google.privacy.dlp.v2.IDataProfilePubSubCondition=} [properties] Properties to set + */ + function DataProfilePubSubCondition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataProfilePubSubCondition expressions. + * @member {google.privacy.dlp.v2.DataProfilePubSubCondition.IPubSubExpressions|null|undefined} expressions + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition + * @instance + */ + DataProfilePubSubCondition.prototype.expressions = null; + + /** + * Creates a new DataProfilePubSubCondition instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition + * @static + * @param {google.privacy.dlp.v2.IDataProfilePubSubCondition=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfilePubSubCondition} DataProfilePubSubCondition instance + */ + DataProfilePubSubCondition.create = function create(properties) { + return new DataProfilePubSubCondition(properties); + }; + + /** + * Encodes the specified DataProfilePubSubCondition message. Does not implicitly {@link google.privacy.dlp.v2.DataProfilePubSubCondition.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition + * @static + * @param {google.privacy.dlp.v2.IDataProfilePubSubCondition} message DataProfilePubSubCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfilePubSubCondition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expressions != null && Object.hasOwnProperty.call(message, "expressions")) + $root.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.encode(message.expressions, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataProfilePubSubCondition message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfilePubSubCondition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition + * @static + * @param {google.privacy.dlp.v2.IDataProfilePubSubCondition} message DataProfilePubSubCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfilePubSubCondition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataProfilePubSubCondition message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfilePubSubCondition} DataProfilePubSubCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfilePubSubCondition.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfilePubSubCondition(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.expressions = $root.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DataProfilePubSubCondition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfilePubSubCondition} DataProfilePubSubCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfilePubSubCondition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataProfilePubSubCondition message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataProfilePubSubCondition.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.expressions != null && message.hasOwnProperty("expressions")) { + var error = $root.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.verify(message.expressions, long + 1); + if (error) + return "expressions." + error; + } + return null; + }; + + /** + * Creates a DataProfilePubSubCondition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfilePubSubCondition} DataProfilePubSubCondition + */ + DataProfilePubSubCondition.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfilePubSubCondition) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DataProfilePubSubCondition(); + if (object.expressions != null) { + if (typeof object.expressions !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfilePubSubCondition.expressions: object expected"); + message.expressions = $root.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.fromObject(object.expressions, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DataProfilePubSubCondition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition + * @static + * @param {google.privacy.dlp.v2.DataProfilePubSubCondition} message DataProfilePubSubCondition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataProfilePubSubCondition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.expressions = null; + if (message.expressions != null && message.hasOwnProperty("expressions")) + object.expressions = $root.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.toObject(message.expressions, options); + return object; + }; + + /** + * Converts this DataProfilePubSubCondition to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition + * @instance + * @returns {Object.} JSON object + */ + DataProfilePubSubCondition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataProfilePubSubCondition + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataProfilePubSubCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfilePubSubCondition"; + }; + + /** + * ProfileScoreBucket enum. + * @name google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket + * @enum {number} + * @property {number} PROFILE_SCORE_BUCKET_UNSPECIFIED=0 PROFILE_SCORE_BUCKET_UNSPECIFIED value + * @property {number} HIGH=1 HIGH value + * @property {number} MEDIUM_OR_HIGH=2 MEDIUM_OR_HIGH value + */ + DataProfilePubSubCondition.ProfileScoreBucket = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "PROFILE_SCORE_BUCKET_UNSPECIFIED"] = 0; + values[valuesById[1] = "HIGH"] = 1; + values[valuesById[2] = "MEDIUM_OR_HIGH"] = 2; + return values; + })(); + + DataProfilePubSubCondition.PubSubCondition = (function() { + + /** + * Properties of a PubSubCondition. + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition + * @interface IPubSubCondition + * @property {google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket|null} [minimumRiskScore] PubSubCondition minimumRiskScore + * @property {google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket|null} [minimumSensitivityScore] PubSubCondition minimumSensitivityScore + */ + + /** + * Constructs a new PubSubCondition. + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition + * @classdesc Represents a PubSubCondition. + * @implements IPubSubCondition + * @constructor + * @param {google.privacy.dlp.v2.DataProfilePubSubCondition.IPubSubCondition=} [properties] Properties to set + */ + function PubSubCondition(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * PubSubCondition minimumRiskScore. + * @member {google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket|null|undefined} minimumRiskScore + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition + * @instance + */ + PubSubCondition.prototype.minimumRiskScore = null; + + /** + * PubSubCondition minimumSensitivityScore. + * @member {google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket|null|undefined} minimumSensitivityScore + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition + * @instance + */ + PubSubCondition.prototype.minimumSensitivityScore = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PubSubCondition value. + * @member {"minimumRiskScore"|"minimumSensitivityScore"|undefined} value + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition + * @instance + */ + Object.defineProperty(PubSubCondition.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["minimumRiskScore", "minimumSensitivityScore"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PubSubCondition instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition + * @static + * @param {google.privacy.dlp.v2.DataProfilePubSubCondition.IPubSubCondition=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition} PubSubCondition instance + */ + PubSubCondition.create = function create(properties) { + return new PubSubCondition(properties); + }; + + /** + * Encodes the specified PubSubCondition message. Does not implicitly {@link google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition + * @static + * @param {google.privacy.dlp.v2.DataProfilePubSubCondition.IPubSubCondition} message PubSubCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubSubCondition.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minimumRiskScore != null && Object.hasOwnProperty.call(message, "minimumRiskScore")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.minimumRiskScore); + if (message.minimumSensitivityScore != null && Object.hasOwnProperty.call(message, "minimumSensitivityScore")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minimumSensitivityScore); + return writer; + }; + + /** + * Encodes the specified PubSubCondition message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition + * @static + * @param {google.privacy.dlp.v2.DataProfilePubSubCondition.IPubSubCondition} message PubSubCondition message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubSubCondition.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PubSubCondition message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition} PubSubCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubSubCondition.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.minimumRiskScore = reader.int32(); + break; + } + case 2: { + message.minimumSensitivityScore = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PubSubCondition message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition} PubSubCondition + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubSubCondition.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PubSubCondition message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PubSubCondition.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.minimumRiskScore != null && message.hasOwnProperty("minimumRiskScore")) { + properties.value = 1; + switch (message.minimumRiskScore) { + default: + return "minimumRiskScore: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + if (message.minimumSensitivityScore != null && message.hasOwnProperty("minimumSensitivityScore")) { + if (properties.value === 1) + return "value: multiple values"; + properties.value = 1; + switch (message.minimumSensitivityScore) { + default: + return "minimumSensitivityScore: enum value expected"; + case 0: + case 1: + case 2: + break; + } + } + return null; + }; + + /** + * Creates a PubSubCondition message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition} PubSubCondition + */ + PubSubCondition.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition(); + switch (object.minimumRiskScore) { + default: + if (typeof object.minimumRiskScore === "number") { + message.minimumRiskScore = object.minimumRiskScore; + break; + } + break; + case "PROFILE_SCORE_BUCKET_UNSPECIFIED": + case 0: + message.minimumRiskScore = 0; + break; + case "HIGH": + case 1: + message.minimumRiskScore = 1; + break; + case "MEDIUM_OR_HIGH": + case 2: + message.minimumRiskScore = 2; + break; + } + switch (object.minimumSensitivityScore) { + default: + if (typeof object.minimumSensitivityScore === "number") { + message.minimumSensitivityScore = object.minimumSensitivityScore; + break; + } + break; + case "PROFILE_SCORE_BUCKET_UNSPECIFIED": + case 0: + message.minimumSensitivityScore = 0; + break; + case "HIGH": + case 1: + message.minimumSensitivityScore = 1; + break; + case "MEDIUM_OR_HIGH": + case 2: + message.minimumSensitivityScore = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a PubSubCondition message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition + * @static + * @param {google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition} message PubSubCondition + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PubSubCondition.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.minimumRiskScore != null && message.hasOwnProperty("minimumRiskScore")) { + object.minimumRiskScore = options.enums === String ? $root.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket[message.minimumRiskScore] === undefined ? message.minimumRiskScore : $root.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket[message.minimumRiskScore] : message.minimumRiskScore; + if (options.oneofs) + object.value = "minimumRiskScore"; + } + if (message.minimumSensitivityScore != null && message.hasOwnProperty("minimumSensitivityScore")) { + object.minimumSensitivityScore = options.enums === String ? $root.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket[message.minimumSensitivityScore] === undefined ? message.minimumSensitivityScore : $root.google.privacy.dlp.v2.DataProfilePubSubCondition.ProfileScoreBucket[message.minimumSensitivityScore] : message.minimumSensitivityScore; + if (options.oneofs) + object.value = "minimumSensitivityScore"; + } + return object; + }; + + /** + * Converts this PubSubCondition to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition + * @instance + * @returns {Object.} JSON object + */ + PubSubCondition.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PubSubCondition + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PubSubCondition.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition"; + }; + + return PubSubCondition; + })(); + + DataProfilePubSubCondition.PubSubExpressions = (function() { + + /** + * Properties of a PubSubExpressions. + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition + * @interface IPubSubExpressions + * @property {google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator|null} [logicalOperator] PubSubExpressions logicalOperator + * @property {Array.|null} [conditions] PubSubExpressions conditions + */ + + /** + * Constructs a new PubSubExpressions. + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition + * @classdesc Represents a PubSubExpressions. + * @implements IPubSubExpressions + * @constructor + * @param {google.privacy.dlp.v2.DataProfilePubSubCondition.IPubSubExpressions=} [properties] Properties to set + */ + function PubSubExpressions(properties) { + this.conditions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * PubSubExpressions logicalOperator. + * @member {google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator} logicalOperator + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions + * @instance + */ + PubSubExpressions.prototype.logicalOperator = 0; + + /** + * PubSubExpressions conditions. + * @member {Array.} conditions + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions + * @instance + */ + PubSubExpressions.prototype.conditions = $util.emptyArray; + + /** + * Creates a new PubSubExpressions instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions + * @static + * @param {google.privacy.dlp.v2.DataProfilePubSubCondition.IPubSubExpressions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions} PubSubExpressions instance + */ + PubSubExpressions.create = function create(properties) { + return new PubSubExpressions(properties); + }; + + /** + * Encodes the specified PubSubExpressions message. Does not implicitly {@link google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions + * @static + * @param {google.privacy.dlp.v2.DataProfilePubSubCondition.IPubSubExpressions} message PubSubExpressions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubSubExpressions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.logicalOperator != null && Object.hasOwnProperty.call(message, "logicalOperator")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.logicalOperator); + if (message.conditions != null && message.conditions.length) + for (var i = 0; i < message.conditions.length; ++i) + $root.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.encode(message.conditions[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PubSubExpressions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions + * @static + * @param {google.privacy.dlp.v2.DataProfilePubSubCondition.IPubSubExpressions} message PubSubExpressions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PubSubExpressions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PubSubExpressions message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions} PubSubExpressions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubSubExpressions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.logicalOperator = reader.int32(); + break; + } + case 2: { + if (!(message.conditions && message.conditions.length)) + message.conditions = []; + message.conditions.push($root.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PubSubExpressions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions} PubSubExpressions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PubSubExpressions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PubSubExpressions message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PubSubExpressions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.logicalOperator != null && message.hasOwnProperty("logicalOperator")) + switch (message.logicalOperator) { + default: + return "logicalOperator: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.conditions != null && message.hasOwnProperty("conditions")) { + if (!Array.isArray(message.conditions)) + return "conditions: array expected"; + for (var i = 0; i < message.conditions.length; ++i) { + var error = $root.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.verify(message.conditions[i], long + 1); + if (error) + return "conditions." + error; + } + } + return null; + }; + + /** + * Creates a PubSubExpressions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions} PubSubExpressions + */ + PubSubExpressions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions(); + switch (object.logicalOperator) { + default: + if (typeof object.logicalOperator === "number") { + message.logicalOperator = object.logicalOperator; + break; + } + break; + case "LOGICAL_OPERATOR_UNSPECIFIED": + case 0: + message.logicalOperator = 0; + break; + case "OR": + case 1: + message.logicalOperator = 1; + break; + case "AND": + case 2: + message.logicalOperator = 2; + break; + } + if (object.conditions) { + if (!Array.isArray(object.conditions)) + throw TypeError(".google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.conditions: array expected"); + message.conditions = []; + for (var i = 0; i < object.conditions.length; ++i) { + if (typeof object.conditions[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.conditions: object expected"); + message.conditions[i] = $root.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.fromObject(object.conditions[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a PubSubExpressions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions + * @static + * @param {google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions} message PubSubExpressions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PubSubExpressions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.conditions = []; + if (options.defaults) + object.logicalOperator = options.enums === String ? "LOGICAL_OPERATOR_UNSPECIFIED" : 0; + if (message.logicalOperator != null && message.hasOwnProperty("logicalOperator")) + object.logicalOperator = options.enums === String ? $root.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator[message.logicalOperator] === undefined ? message.logicalOperator : $root.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator[message.logicalOperator] : message.logicalOperator; + if (message.conditions && message.conditions.length) { + object.conditions = []; + for (var j = 0; j < message.conditions.length; ++j) + object.conditions[j] = $root.google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubCondition.toObject(message.conditions[j], options); + } + return object; + }; + + /** + * Converts this PubSubExpressions to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions + * @instance + * @returns {Object.} JSON object + */ + PubSubExpressions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PubSubExpressions + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PubSubExpressions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions"; + }; + + /** + * PubSubLogicalOperator enum. + * @name google.privacy.dlp.v2.DataProfilePubSubCondition.PubSubExpressions.PubSubLogicalOperator + * @enum {number} + * @property {number} LOGICAL_OPERATOR_UNSPECIFIED=0 LOGICAL_OPERATOR_UNSPECIFIED value + * @property {number} OR=1 OR value + * @property {number} AND=2 AND value + */ + PubSubExpressions.PubSubLogicalOperator = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LOGICAL_OPERATOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OR"] = 1; + values[valuesById[2] = "AND"] = 2; + return values; + })(); + + return PubSubExpressions; + })(); + + return DataProfilePubSubCondition; + })(); + + v2.DataProfilePubSubMessage = (function() { + + /** + * Properties of a DataProfilePubSubMessage. + * @memberof google.privacy.dlp.v2 + * @interface IDataProfilePubSubMessage + * @property {google.privacy.dlp.v2.ITableDataProfile|null} [profile] DataProfilePubSubMessage profile + * @property {google.privacy.dlp.v2.IFileStoreDataProfile|null} [fileStoreProfile] DataProfilePubSubMessage fileStoreProfile + * @property {google.privacy.dlp.v2.DataProfileAction.EventType|null} [event] DataProfilePubSubMessage event + */ + + /** + * Constructs a new DataProfilePubSubMessage. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DataProfilePubSubMessage. + * @implements IDataProfilePubSubMessage + * @constructor + * @param {google.privacy.dlp.v2.IDataProfilePubSubMessage=} [properties] Properties to set + */ + function DataProfilePubSubMessage(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataProfilePubSubMessage profile. + * @member {google.privacy.dlp.v2.ITableDataProfile|null|undefined} profile + * @memberof google.privacy.dlp.v2.DataProfilePubSubMessage + * @instance + */ + DataProfilePubSubMessage.prototype.profile = null; + + /** + * DataProfilePubSubMessage fileStoreProfile. + * @member {google.privacy.dlp.v2.IFileStoreDataProfile|null|undefined} fileStoreProfile + * @memberof google.privacy.dlp.v2.DataProfilePubSubMessage + * @instance + */ + DataProfilePubSubMessage.prototype.fileStoreProfile = null; + + /** + * DataProfilePubSubMessage event. + * @member {google.privacy.dlp.v2.DataProfileAction.EventType} event + * @memberof google.privacy.dlp.v2.DataProfilePubSubMessage + * @instance + */ + DataProfilePubSubMessage.prototype.event = 0; + + /** + * Creates a new DataProfilePubSubMessage instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataProfilePubSubMessage + * @static + * @param {google.privacy.dlp.v2.IDataProfilePubSubMessage=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataProfilePubSubMessage} DataProfilePubSubMessage instance + */ + DataProfilePubSubMessage.create = function create(properties) { + return new DataProfilePubSubMessage(properties); + }; + + /** + * Encodes the specified DataProfilePubSubMessage message. Does not implicitly {@link google.privacy.dlp.v2.DataProfilePubSubMessage.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataProfilePubSubMessage + * @static + * @param {google.privacy.dlp.v2.IDataProfilePubSubMessage} message DataProfilePubSubMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfilePubSubMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.profile != null && Object.hasOwnProperty.call(message, "profile")) + $root.google.privacy.dlp.v2.TableDataProfile.encode(message.profile, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.event != null && Object.hasOwnProperty.call(message, "event")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.event); + if (message.fileStoreProfile != null && Object.hasOwnProperty.call(message, "fileStoreProfile")) + $root.google.privacy.dlp.v2.FileStoreDataProfile.encode(message.fileStoreProfile, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataProfilePubSubMessage message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataProfilePubSubMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataProfilePubSubMessage + * @static + * @param {google.privacy.dlp.v2.IDataProfilePubSubMessage} message DataProfilePubSubMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataProfilePubSubMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataProfilePubSubMessage message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataProfilePubSubMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataProfilePubSubMessage} DataProfilePubSubMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfilePubSubMessage.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataProfilePubSubMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.profile = $root.google.privacy.dlp.v2.TableDataProfile.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.fileStoreProfile = $root.google.privacy.dlp.v2.FileStoreDataProfile.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.event = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DataProfilePubSubMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataProfilePubSubMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataProfilePubSubMessage} DataProfilePubSubMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataProfilePubSubMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataProfilePubSubMessage message. + * @function verify + * @memberof google.privacy.dlp.v2.DataProfilePubSubMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataProfilePubSubMessage.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.profile != null && message.hasOwnProperty("profile")) { + var error = $root.google.privacy.dlp.v2.TableDataProfile.verify(message.profile, long + 1); + if (error) + return "profile." + error; + } + if (message.fileStoreProfile != null && message.hasOwnProperty("fileStoreProfile")) { + var error = $root.google.privacy.dlp.v2.FileStoreDataProfile.verify(message.fileStoreProfile, long + 1); + if (error) + return "fileStoreProfile." + error; + } + if (message.event != null && message.hasOwnProperty("event")) + switch (message.event) { + default: + return "event: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a DataProfilePubSubMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataProfilePubSubMessage + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataProfilePubSubMessage} DataProfilePubSubMessage + */ + DataProfilePubSubMessage.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DataProfilePubSubMessage) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DataProfilePubSubMessage(); + if (object.profile != null) { + if (typeof object.profile !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfilePubSubMessage.profile: object expected"); + message.profile = $root.google.privacy.dlp.v2.TableDataProfile.fromObject(object.profile, long + 1); + } + if (object.fileStoreProfile != null) { + if (typeof object.fileStoreProfile !== "object") + throw TypeError(".google.privacy.dlp.v2.DataProfilePubSubMessage.fileStoreProfile: object expected"); + message.fileStoreProfile = $root.google.privacy.dlp.v2.FileStoreDataProfile.fromObject(object.fileStoreProfile, long + 1); + } + switch (object.event) { + default: + if (typeof object.event === "number") { + message.event = object.event; + break; + } + break; + case "EVENT_TYPE_UNSPECIFIED": + case 0: + message.event = 0; + break; + case "NEW_PROFILE": + case 1: + message.event = 1; + break; + case "CHANGED_PROFILE": + case 2: + message.event = 2; + break; + case "SCORE_INCREASED": + case 3: + message.event = 3; + break; + case "ERROR_CHANGED": + case 4: + message.event = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a DataProfilePubSubMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataProfilePubSubMessage + * @static + * @param {google.privacy.dlp.v2.DataProfilePubSubMessage} message DataProfilePubSubMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataProfilePubSubMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.profile = null; + object.event = options.enums === String ? "EVENT_TYPE_UNSPECIFIED" : 0; + object.fileStoreProfile = null; + } + if (message.profile != null && message.hasOwnProperty("profile")) + object.profile = $root.google.privacy.dlp.v2.TableDataProfile.toObject(message.profile, options); + if (message.event != null && message.hasOwnProperty("event")) + object.event = options.enums === String ? $root.google.privacy.dlp.v2.DataProfileAction.EventType[message.event] === undefined ? message.event : $root.google.privacy.dlp.v2.DataProfileAction.EventType[message.event] : message.event; + if (message.fileStoreProfile != null && message.hasOwnProperty("fileStoreProfile")) + object.fileStoreProfile = $root.google.privacy.dlp.v2.FileStoreDataProfile.toObject(message.fileStoreProfile, options); + return object; + }; + + /** + * Converts this DataProfilePubSubMessage to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataProfilePubSubMessage + * @instance + * @returns {Object.} JSON object + */ + DataProfilePubSubMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataProfilePubSubMessage + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataProfilePubSubMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataProfilePubSubMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataProfilePubSubMessage"; + }; + + return DataProfilePubSubMessage; + })(); + + v2.CreateConnectionRequest = (function() { + + /** + * Properties of a CreateConnectionRequest. + * @memberof google.privacy.dlp.v2 + * @interface ICreateConnectionRequest + * @property {string|null} [parent] CreateConnectionRequest parent + * @property {google.privacy.dlp.v2.IConnection|null} [connection] CreateConnectionRequest connection + */ + + /** + * Constructs a new CreateConnectionRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CreateConnectionRequest. + * @implements ICreateConnectionRequest + * @constructor + * @param {google.privacy.dlp.v2.ICreateConnectionRequest=} [properties] Properties to set + */ + function CreateConnectionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateConnectionRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.CreateConnectionRequest + * @instance + */ + CreateConnectionRequest.prototype.parent = ""; + + /** + * CreateConnectionRequest connection. + * @member {google.privacy.dlp.v2.IConnection|null|undefined} connection + * @memberof google.privacy.dlp.v2.CreateConnectionRequest + * @instance + */ + CreateConnectionRequest.prototype.connection = null; + + /** + * Creates a new CreateConnectionRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CreateConnectionRequest + * @static + * @param {google.privacy.dlp.v2.ICreateConnectionRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CreateConnectionRequest} CreateConnectionRequest instance + */ + CreateConnectionRequest.create = function create(properties) { + return new CreateConnectionRequest(properties); + }; + + /** + * Encodes the specified CreateConnectionRequest message. Does not implicitly {@link google.privacy.dlp.v2.CreateConnectionRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CreateConnectionRequest + * @static + * @param {google.privacy.dlp.v2.ICreateConnectionRequest} message CreateConnectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConnectionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.connection != null && Object.hasOwnProperty.call(message, "connection")) + $root.google.privacy.dlp.v2.Connection.encode(message.connection, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateConnectionRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CreateConnectionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CreateConnectionRequest + * @static + * @param {google.privacy.dlp.v2.ICreateConnectionRequest} message CreateConnectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateConnectionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CreateConnectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CreateConnectionRequest} CreateConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConnectionRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CreateConnectionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.connection = $root.google.privacy.dlp.v2.Connection.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CreateConnectionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CreateConnectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CreateConnectionRequest} CreateConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateConnectionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateConnectionRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.CreateConnectionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateConnectionRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.connection != null && message.hasOwnProperty("connection")) { + var error = $root.google.privacy.dlp.v2.Connection.verify(message.connection, long + 1); + if (error) + return "connection." + error; + } + return null; + }; + + /** + * Creates a CreateConnectionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CreateConnectionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CreateConnectionRequest} CreateConnectionRequest + */ + CreateConnectionRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CreateConnectionRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CreateConnectionRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.connection != null) { + if (typeof object.connection !== "object") + throw TypeError(".google.privacy.dlp.v2.CreateConnectionRequest.connection: object expected"); + message.connection = $root.google.privacy.dlp.v2.Connection.fromObject(object.connection, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CreateConnectionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CreateConnectionRequest + * @static + * @param {google.privacy.dlp.v2.CreateConnectionRequest} message CreateConnectionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateConnectionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.connection = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.connection != null && message.hasOwnProperty("connection")) + object.connection = $root.google.privacy.dlp.v2.Connection.toObject(message.connection, options); + return object; + }; + + /** + * Converts this CreateConnectionRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CreateConnectionRequest + * @instance + * @returns {Object.} JSON object + */ + CreateConnectionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateConnectionRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CreateConnectionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CreateConnectionRequest"; + }; + + return CreateConnectionRequest; + })(); + + v2.GetConnectionRequest = (function() { + + /** + * Properties of a GetConnectionRequest. + * @memberof google.privacy.dlp.v2 + * @interface IGetConnectionRequest + * @property {string|null} [name] GetConnectionRequest name + */ + + /** + * Constructs a new GetConnectionRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a GetConnectionRequest. + * @implements IGetConnectionRequest + * @constructor + * @param {google.privacy.dlp.v2.IGetConnectionRequest=} [properties] Properties to set + */ + function GetConnectionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetConnectionRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.GetConnectionRequest + * @instance + */ + GetConnectionRequest.prototype.name = ""; + + /** + * Creates a new GetConnectionRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.GetConnectionRequest + * @static + * @param {google.privacy.dlp.v2.IGetConnectionRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.GetConnectionRequest} GetConnectionRequest instance + */ + GetConnectionRequest.create = function create(properties) { + return new GetConnectionRequest(properties); + }; + + /** + * Encodes the specified GetConnectionRequest message. Does not implicitly {@link google.privacy.dlp.v2.GetConnectionRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.GetConnectionRequest + * @static + * @param {google.privacy.dlp.v2.IGetConnectionRequest} message GetConnectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConnectionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetConnectionRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.GetConnectionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.GetConnectionRequest + * @static + * @param {google.privacy.dlp.v2.IGetConnectionRequest} message GetConnectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetConnectionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.GetConnectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.GetConnectionRequest} GetConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConnectionRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.GetConnectionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GetConnectionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.GetConnectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.GetConnectionRequest} GetConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetConnectionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetConnectionRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.GetConnectionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetConnectionRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetConnectionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.GetConnectionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.GetConnectionRequest} GetConnectionRequest + */ + GetConnectionRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.GetConnectionRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.GetConnectionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetConnectionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.GetConnectionRequest + * @static + * @param {google.privacy.dlp.v2.GetConnectionRequest} message GetConnectionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetConnectionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetConnectionRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.GetConnectionRequest + * @instance + * @returns {Object.} JSON object + */ + GetConnectionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetConnectionRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.GetConnectionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.GetConnectionRequest"; + }; + + return GetConnectionRequest; + })(); + + v2.ListConnectionsRequest = (function() { + + /** + * Properties of a ListConnectionsRequest. + * @memberof google.privacy.dlp.v2 + * @interface IListConnectionsRequest + * @property {string|null} [parent] ListConnectionsRequest parent + * @property {number|null} [pageSize] ListConnectionsRequest pageSize + * @property {string|null} [pageToken] ListConnectionsRequest pageToken + * @property {string|null} [filter] ListConnectionsRequest filter + */ + + /** + * Constructs a new ListConnectionsRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListConnectionsRequest. + * @implements IListConnectionsRequest + * @constructor + * @param {google.privacy.dlp.v2.IListConnectionsRequest=} [properties] Properties to set + */ + function ListConnectionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListConnectionsRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.ListConnectionsRequest + * @instance + */ + ListConnectionsRequest.prototype.parent = ""; + + /** + * ListConnectionsRequest pageSize. + * @member {number} pageSize + * @memberof google.privacy.dlp.v2.ListConnectionsRequest + * @instance + */ + ListConnectionsRequest.prototype.pageSize = 0; + + /** + * ListConnectionsRequest pageToken. + * @member {string} pageToken + * @memberof google.privacy.dlp.v2.ListConnectionsRequest + * @instance + */ + ListConnectionsRequest.prototype.pageToken = ""; + + /** + * ListConnectionsRequest filter. + * @member {string} filter + * @memberof google.privacy.dlp.v2.ListConnectionsRequest + * @instance + */ + ListConnectionsRequest.prototype.filter = ""; + + /** + * Creates a new ListConnectionsRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListConnectionsRequest + * @static + * @param {google.privacy.dlp.v2.IListConnectionsRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListConnectionsRequest} ListConnectionsRequest instance + */ + ListConnectionsRequest.create = function create(properties) { + return new ListConnectionsRequest(properties); + }; + + /** + * Encodes the specified ListConnectionsRequest message. Does not implicitly {@link google.privacy.dlp.v2.ListConnectionsRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListConnectionsRequest + * @static + * @param {google.privacy.dlp.v2.IListConnectionsRequest} message ListConnectionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListConnectionsRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListConnectionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListConnectionsRequest + * @static + * @param {google.privacy.dlp.v2.IListConnectionsRequest} message ListConnectionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConnectionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListConnectionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ListConnectionsRequest} ListConnectionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectionsRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListConnectionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListConnectionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListConnectionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListConnectionsRequest} ListConnectionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConnectionsRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.ListConnectionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConnectionsRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListConnectionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListConnectionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListConnectionsRequest} ListConnectionsRequest + */ + ListConnectionsRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ListConnectionsRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ListConnectionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListConnectionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListConnectionsRequest + * @static + * @param {google.privacy.dlp.v2.ListConnectionsRequest} message ListConnectionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConnectionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListConnectionsRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListConnectionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListConnectionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConnectionsRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ListConnectionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConnectionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ListConnectionsRequest"; + }; + + return ListConnectionsRequest; + })(); + + v2.SearchConnectionsRequest = (function() { + + /** + * Properties of a SearchConnectionsRequest. + * @memberof google.privacy.dlp.v2 + * @interface ISearchConnectionsRequest + * @property {string|null} [parent] SearchConnectionsRequest parent + * @property {number|null} [pageSize] SearchConnectionsRequest pageSize + * @property {string|null} [pageToken] SearchConnectionsRequest pageToken + * @property {string|null} [filter] SearchConnectionsRequest filter + */ + + /** + * Constructs a new SearchConnectionsRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a SearchConnectionsRequest. + * @implements ISearchConnectionsRequest + * @constructor + * @param {google.privacy.dlp.v2.ISearchConnectionsRequest=} [properties] Properties to set + */ + function SearchConnectionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchConnectionsRequest parent. + * @member {string} parent + * @memberof google.privacy.dlp.v2.SearchConnectionsRequest + * @instance + */ + SearchConnectionsRequest.prototype.parent = ""; + + /** + * SearchConnectionsRequest pageSize. + * @member {number} pageSize + * @memberof google.privacy.dlp.v2.SearchConnectionsRequest + * @instance + */ + SearchConnectionsRequest.prototype.pageSize = 0; + + /** + * SearchConnectionsRequest pageToken. + * @member {string} pageToken + * @memberof google.privacy.dlp.v2.SearchConnectionsRequest + * @instance + */ + SearchConnectionsRequest.prototype.pageToken = ""; + + /** + * SearchConnectionsRequest filter. + * @member {string} filter + * @memberof google.privacy.dlp.v2.SearchConnectionsRequest + * @instance + */ + SearchConnectionsRequest.prototype.filter = ""; + + /** + * Creates a new SearchConnectionsRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.SearchConnectionsRequest + * @static + * @param {google.privacy.dlp.v2.ISearchConnectionsRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.SearchConnectionsRequest} SearchConnectionsRequest instance + */ + SearchConnectionsRequest.create = function create(properties) { + return new SearchConnectionsRequest(properties); + }; + + /** + * Encodes the specified SearchConnectionsRequest message. Does not implicitly {@link google.privacy.dlp.v2.SearchConnectionsRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.SearchConnectionsRequest + * @static + * @param {google.privacy.dlp.v2.ISearchConnectionsRequest} message SearchConnectionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchConnectionsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified SearchConnectionsRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.SearchConnectionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.SearchConnectionsRequest + * @static + * @param {google.privacy.dlp.v2.ISearchConnectionsRequest} message SearchConnectionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchConnectionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchConnectionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.SearchConnectionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.SearchConnectionsRequest} SearchConnectionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchConnectionsRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.SearchConnectionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SearchConnectionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.SearchConnectionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.SearchConnectionsRequest} SearchConnectionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchConnectionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchConnectionsRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.SearchConnectionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchConnectionsRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a SearchConnectionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.SearchConnectionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.SearchConnectionsRequest} SearchConnectionsRequest + */ + SearchConnectionsRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.SearchConnectionsRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.SearchConnectionsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a SearchConnectionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.SearchConnectionsRequest + * @static + * @param {google.privacy.dlp.v2.SearchConnectionsRequest} message SearchConnectionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchConnectionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this SearchConnectionsRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.SearchConnectionsRequest + * @instance + * @returns {Object.} JSON object + */ + SearchConnectionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchConnectionsRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.SearchConnectionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchConnectionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.SearchConnectionsRequest"; + }; + + return SearchConnectionsRequest; + })(); + + v2.ListConnectionsResponse = (function() { + + /** + * Properties of a ListConnectionsResponse. + * @memberof google.privacy.dlp.v2 + * @interface IListConnectionsResponse + * @property {Array.|null} [connections] ListConnectionsResponse connections + * @property {string|null} [nextPageToken] ListConnectionsResponse nextPageToken + */ + + /** + * Constructs a new ListConnectionsResponse. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ListConnectionsResponse. + * @implements IListConnectionsResponse + * @constructor + * @param {google.privacy.dlp.v2.IListConnectionsResponse=} [properties] Properties to set + */ + function ListConnectionsResponse(properties) { + this.connections = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListConnectionsResponse connections. + * @member {Array.} connections + * @memberof google.privacy.dlp.v2.ListConnectionsResponse + * @instance + */ + ListConnectionsResponse.prototype.connections = $util.emptyArray; + + /** + * ListConnectionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.privacy.dlp.v2.ListConnectionsResponse + * @instance + */ + ListConnectionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListConnectionsResponse instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ListConnectionsResponse + * @static + * @param {google.privacy.dlp.v2.IListConnectionsResponse=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ListConnectionsResponse} ListConnectionsResponse instance + */ + ListConnectionsResponse.create = function create(properties) { + return new ListConnectionsResponse(properties); + }; + + /** + * Encodes the specified ListConnectionsResponse message. Does not implicitly {@link google.privacy.dlp.v2.ListConnectionsResponse.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ListConnectionsResponse + * @static + * @param {google.privacy.dlp.v2.IListConnectionsResponse} message ListConnectionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connections != null && message.connections.length) + for (var i = 0; i < message.connections.length; ++i) + $root.google.privacy.dlp.v2.Connection.encode(message.connections[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListConnectionsResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ListConnectionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ListConnectionsResponse + * @static + * @param {google.privacy.dlp.v2.IListConnectionsResponse} message ListConnectionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListConnectionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListConnectionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ListConnectionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ListConnectionsResponse} ListConnectionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectionsResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ListConnectionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.connections && message.connections.length)) + message.connections = []; + message.connections.push($root.google.privacy.dlp.v2.Connection.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ListConnectionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ListConnectionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ListConnectionsResponse} ListConnectionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListConnectionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListConnectionsResponse message. + * @function verify + * @memberof google.privacy.dlp.v2.ListConnectionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListConnectionsResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.connections != null && message.hasOwnProperty("connections")) { + if (!Array.isArray(message.connections)) + return "connections: array expected"; + for (var i = 0; i < message.connections.length; ++i) { + var error = $root.google.privacy.dlp.v2.Connection.verify(message.connections[i], long + 1); + if (error) + return "connections." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListConnectionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ListConnectionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ListConnectionsResponse} ListConnectionsResponse + */ + ListConnectionsResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ListConnectionsResponse) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ListConnectionsResponse(); + if (object.connections) { + if (!Array.isArray(object.connections)) + throw TypeError(".google.privacy.dlp.v2.ListConnectionsResponse.connections: array expected"); + message.connections = []; + for (var i = 0; i < object.connections.length; ++i) { + if (typeof object.connections[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.ListConnectionsResponse.connections: object expected"); + message.connections[i] = $root.google.privacy.dlp.v2.Connection.fromObject(object.connections[i], long + 1); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListConnectionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ListConnectionsResponse + * @static + * @param {google.privacy.dlp.v2.ListConnectionsResponse} message ListConnectionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListConnectionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.connections = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.connections && message.connections.length) { + object.connections = []; + for (var j = 0; j < message.connections.length; ++j) + object.connections[j] = $root.google.privacy.dlp.v2.Connection.toObject(message.connections[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListConnectionsResponse to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ListConnectionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListConnectionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListConnectionsResponse + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ListConnectionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListConnectionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ListConnectionsResponse"; + }; + + return ListConnectionsResponse; + })(); + + v2.SearchConnectionsResponse = (function() { + + /** + * Properties of a SearchConnectionsResponse. + * @memberof google.privacy.dlp.v2 + * @interface ISearchConnectionsResponse + * @property {Array.|null} [connections] SearchConnectionsResponse connections + * @property {string|null} [nextPageToken] SearchConnectionsResponse nextPageToken + */ + + /** + * Constructs a new SearchConnectionsResponse. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a SearchConnectionsResponse. + * @implements ISearchConnectionsResponse + * @constructor + * @param {google.privacy.dlp.v2.ISearchConnectionsResponse=} [properties] Properties to set + */ + function SearchConnectionsResponse(properties) { + this.connections = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SearchConnectionsResponse connections. + * @member {Array.} connections + * @memberof google.privacy.dlp.v2.SearchConnectionsResponse + * @instance + */ + SearchConnectionsResponse.prototype.connections = $util.emptyArray; + + /** + * SearchConnectionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.privacy.dlp.v2.SearchConnectionsResponse + * @instance + */ + SearchConnectionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new SearchConnectionsResponse instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.SearchConnectionsResponse + * @static + * @param {google.privacy.dlp.v2.ISearchConnectionsResponse=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.SearchConnectionsResponse} SearchConnectionsResponse instance + */ + SearchConnectionsResponse.create = function create(properties) { + return new SearchConnectionsResponse(properties); + }; + + /** + * Encodes the specified SearchConnectionsResponse message. Does not implicitly {@link google.privacy.dlp.v2.SearchConnectionsResponse.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.SearchConnectionsResponse + * @static + * @param {google.privacy.dlp.v2.ISearchConnectionsResponse} message SearchConnectionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchConnectionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connections != null && message.connections.length) + for (var i = 0; i < message.connections.length; ++i) + $root.google.privacy.dlp.v2.Connection.encode(message.connections[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified SearchConnectionsResponse message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.SearchConnectionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.SearchConnectionsResponse + * @static + * @param {google.privacy.dlp.v2.ISearchConnectionsResponse} message SearchConnectionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SearchConnectionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SearchConnectionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.SearchConnectionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.SearchConnectionsResponse} SearchConnectionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchConnectionsResponse.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.SearchConnectionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.connections && message.connections.length)) + message.connections = []; + message.connections.push($root.google.privacy.dlp.v2.Connection.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SearchConnectionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.SearchConnectionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.SearchConnectionsResponse} SearchConnectionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SearchConnectionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SearchConnectionsResponse message. + * @function verify + * @memberof google.privacy.dlp.v2.SearchConnectionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SearchConnectionsResponse.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.connections != null && message.hasOwnProperty("connections")) { + if (!Array.isArray(message.connections)) + return "connections: array expected"; + for (var i = 0; i < message.connections.length; ++i) { + var error = $root.google.privacy.dlp.v2.Connection.verify(message.connections[i], long + 1); + if (error) + return "connections." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a SearchConnectionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.SearchConnectionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.SearchConnectionsResponse} SearchConnectionsResponse + */ + SearchConnectionsResponse.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.SearchConnectionsResponse) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.SearchConnectionsResponse(); + if (object.connections) { + if (!Array.isArray(object.connections)) + throw TypeError(".google.privacy.dlp.v2.SearchConnectionsResponse.connections: array expected"); + message.connections = []; + for (var i = 0; i < object.connections.length; ++i) { + if (typeof object.connections[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.SearchConnectionsResponse.connections: object expected"); + message.connections[i] = $root.google.privacy.dlp.v2.Connection.fromObject(object.connections[i], long + 1); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a SearchConnectionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.SearchConnectionsResponse + * @static + * @param {google.privacy.dlp.v2.SearchConnectionsResponse} message SearchConnectionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SearchConnectionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.connections = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.connections && message.connections.length) { + object.connections = []; + for (var j = 0; j < message.connections.length; ++j) + object.connections[j] = $root.google.privacy.dlp.v2.Connection.toObject(message.connections[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this SearchConnectionsResponse to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.SearchConnectionsResponse + * @instance + * @returns {Object.} JSON object + */ + SearchConnectionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SearchConnectionsResponse + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.SearchConnectionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SearchConnectionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.SearchConnectionsResponse"; + }; + + return SearchConnectionsResponse; + })(); + + v2.UpdateConnectionRequest = (function() { + + /** + * Properties of an UpdateConnectionRequest. + * @memberof google.privacy.dlp.v2 + * @interface IUpdateConnectionRequest + * @property {string|null} [name] UpdateConnectionRequest name + * @property {google.privacy.dlp.v2.IConnection|null} [connection] UpdateConnectionRequest connection + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateConnectionRequest updateMask + */ + + /** + * Constructs a new UpdateConnectionRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an UpdateConnectionRequest. + * @implements IUpdateConnectionRequest + * @constructor + * @param {google.privacy.dlp.v2.IUpdateConnectionRequest=} [properties] Properties to set + */ + function UpdateConnectionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateConnectionRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.UpdateConnectionRequest + * @instance + */ + UpdateConnectionRequest.prototype.name = ""; + + /** + * UpdateConnectionRequest connection. + * @member {google.privacy.dlp.v2.IConnection|null|undefined} connection + * @memberof google.privacy.dlp.v2.UpdateConnectionRequest + * @instance + */ + UpdateConnectionRequest.prototype.connection = null; + + /** + * UpdateConnectionRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.privacy.dlp.v2.UpdateConnectionRequest + * @instance + */ + UpdateConnectionRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateConnectionRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.UpdateConnectionRequest + * @static + * @param {google.privacy.dlp.v2.IUpdateConnectionRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.UpdateConnectionRequest} UpdateConnectionRequest instance + */ + UpdateConnectionRequest.create = function create(properties) { + return new UpdateConnectionRequest(properties); + }; + + /** + * Encodes the specified UpdateConnectionRequest message. Does not implicitly {@link google.privacy.dlp.v2.UpdateConnectionRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.UpdateConnectionRequest + * @static + * @param {google.privacy.dlp.v2.IUpdateConnectionRequest} message UpdateConnectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateConnectionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.connection != null && Object.hasOwnProperty.call(message, "connection")) + $root.google.privacy.dlp.v2.Connection.encode(message.connection, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateConnectionRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.UpdateConnectionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.UpdateConnectionRequest + * @static + * @param {google.privacy.dlp.v2.IUpdateConnectionRequest} message UpdateConnectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateConnectionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.UpdateConnectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.UpdateConnectionRequest} UpdateConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateConnectionRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.UpdateConnectionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.connection = $root.google.privacy.dlp.v2.Connection.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateConnectionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.UpdateConnectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.UpdateConnectionRequest} UpdateConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateConnectionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateConnectionRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.UpdateConnectionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateConnectionRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.connection != null && message.hasOwnProperty("connection")) { + var error = $root.google.privacy.dlp.v2.Connection.verify(message.connection, long + 1); + if (error) + return "connection." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask, long + 1); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateConnectionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.UpdateConnectionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.UpdateConnectionRequest} UpdateConnectionRequest + */ + UpdateConnectionRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.UpdateConnectionRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.UpdateConnectionRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.connection != null) { + if (typeof object.connection !== "object") + throw TypeError(".google.privacy.dlp.v2.UpdateConnectionRequest.connection: object expected"); + message.connection = $root.google.privacy.dlp.v2.Connection.fromObject(object.connection, long + 1); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.privacy.dlp.v2.UpdateConnectionRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an UpdateConnectionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.UpdateConnectionRequest + * @static + * @param {google.privacy.dlp.v2.UpdateConnectionRequest} message UpdateConnectionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateConnectionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.connection = null; + object.updateMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.connection != null && message.hasOwnProperty("connection")) + object.connection = $root.google.privacy.dlp.v2.Connection.toObject(message.connection, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateConnectionRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.UpdateConnectionRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateConnectionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateConnectionRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.UpdateConnectionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.UpdateConnectionRequest"; + }; + + return UpdateConnectionRequest; + })(); + + v2.DeleteConnectionRequest = (function() { + + /** + * Properties of a DeleteConnectionRequest. + * @memberof google.privacy.dlp.v2 + * @interface IDeleteConnectionRequest + * @property {string|null} [name] DeleteConnectionRequest name + */ + + /** + * Constructs a new DeleteConnectionRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DeleteConnectionRequest. + * @implements IDeleteConnectionRequest + * @constructor + * @param {google.privacy.dlp.v2.IDeleteConnectionRequest=} [properties] Properties to set + */ + function DeleteConnectionRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteConnectionRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.DeleteConnectionRequest + * @instance + */ + DeleteConnectionRequest.prototype.name = ""; + + /** + * Creates a new DeleteConnectionRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DeleteConnectionRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteConnectionRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DeleteConnectionRequest} DeleteConnectionRequest instance + */ + DeleteConnectionRequest.create = function create(properties) { + return new DeleteConnectionRequest(properties); + }; + + /** + * Encodes the specified DeleteConnectionRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteConnectionRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DeleteConnectionRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteConnectionRequest} message DeleteConnectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConnectionRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteConnectionRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteConnectionRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DeleteConnectionRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteConnectionRequest} message DeleteConnectionRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteConnectionRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteConnectionRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DeleteConnectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DeleteConnectionRequest} DeleteConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConnectionRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DeleteConnectionRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteConnectionRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DeleteConnectionRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DeleteConnectionRequest} DeleteConnectionRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteConnectionRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteConnectionRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.DeleteConnectionRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteConnectionRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteConnectionRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DeleteConnectionRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DeleteConnectionRequest} DeleteConnectionRequest + */ + DeleteConnectionRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DeleteConnectionRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DeleteConnectionRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteConnectionRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DeleteConnectionRequest + * @static + * @param {google.privacy.dlp.v2.DeleteConnectionRequest} message DeleteConnectionRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteConnectionRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteConnectionRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DeleteConnectionRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteConnectionRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteConnectionRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DeleteConnectionRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteConnectionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DeleteConnectionRequest"; + }; + + return DeleteConnectionRequest; + })(); + + v2.Connection = (function() { + + /** + * Properties of a Connection. + * @memberof google.privacy.dlp.v2 + * @interface IConnection + * @property {string|null} [name] Connection name + * @property {google.privacy.dlp.v2.ConnectionState|null} [state] Connection state + * @property {Array.|null} [errors] Connection errors + * @property {google.privacy.dlp.v2.ICloudSqlProperties|null} [cloudSql] Connection cloudSql + */ + + /** + * Constructs a new Connection. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a Connection. + * @implements IConnection + * @constructor + * @param {google.privacy.dlp.v2.IConnection=} [properties] Properties to set + */ + function Connection(properties) { + this.errors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Connection name. + * @member {string} name + * @memberof google.privacy.dlp.v2.Connection + * @instance + */ + Connection.prototype.name = ""; + + /** + * Connection state. + * @member {google.privacy.dlp.v2.ConnectionState} state + * @memberof google.privacy.dlp.v2.Connection + * @instance + */ + Connection.prototype.state = 0; + + /** + * Connection errors. + * @member {Array.} errors + * @memberof google.privacy.dlp.v2.Connection + * @instance + */ + Connection.prototype.errors = $util.emptyArray; + + /** + * Connection cloudSql. + * @member {google.privacy.dlp.v2.ICloudSqlProperties|null|undefined} cloudSql + * @memberof google.privacy.dlp.v2.Connection + * @instance + */ + Connection.prototype.cloudSql = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Connection properties. + * @member {"cloudSql"|undefined} properties + * @memberof google.privacy.dlp.v2.Connection + * @instance + */ + Object.defineProperty(Connection.prototype, "properties", { + get: $util.oneOfGetter($oneOfFields = ["cloudSql"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Connection instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Connection + * @static + * @param {google.privacy.dlp.v2.IConnection=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Connection} Connection instance + */ + Connection.create = function create(properties) { + return new Connection(properties); + }; + + /** + * Encodes the specified Connection message. Does not implicitly {@link google.privacy.dlp.v2.Connection.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Connection + * @static + * @param {google.privacy.dlp.v2.IConnection} message Connection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Connection.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.state); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.privacy.dlp.v2.Error.encode(message.errors[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.cloudSql != null && Object.hasOwnProperty.call(message, "cloudSql")) + $root.google.privacy.dlp.v2.CloudSqlProperties.encode(message.cloudSql, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Connection message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Connection.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Connection + * @static + * @param {google.privacy.dlp.v2.IConnection} message Connection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Connection.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Connection message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Connection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Connection} Connection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Connection.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Connection(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.state = reader.int32(); + break; + } + case 3: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.privacy.dlp.v2.Error.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 4: { + message.cloudSql = $root.google.privacy.dlp.v2.CloudSqlProperties.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Connection message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Connection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Connection} Connection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Connection.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Connection message. + * @function verify + * @memberof google.privacy.dlp.v2.Connection + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Connection.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.privacy.dlp.v2.Error.verify(message.errors[i], long + 1); + if (error) + return "errors." + error; + } + } + if (message.cloudSql != null && message.hasOwnProperty("cloudSql")) { + properties.properties = 1; + { + var error = $root.google.privacy.dlp.v2.CloudSqlProperties.verify(message.cloudSql, long + 1); + if (error) + return "cloudSql." + error; + } + } + return null; + }; + + /** + * Creates a Connection message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Connection + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Connection} Connection + */ + Connection.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Connection) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.Connection(); + if (object.name != null) + message.name = String(object.name); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "CONNECTION_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "MISSING_CREDENTIALS": + case 1: + message.state = 1; + break; + case "AVAILABLE": + case 2: + message.state = 2; + break; + case "ERROR": + case 3: + message.state = 3; + break; + } + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.privacy.dlp.v2.Connection.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.Connection.errors: object expected"); + message.errors[i] = $root.google.privacy.dlp.v2.Error.fromObject(object.errors[i], long + 1); + } + } + if (object.cloudSql != null) { + if (typeof object.cloudSql !== "object") + throw TypeError(".google.privacy.dlp.v2.Connection.cloudSql: object expected"); + message.cloudSql = $root.google.privacy.dlp.v2.CloudSqlProperties.fromObject(object.cloudSql, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Connection message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Connection + * @static + * @param {google.privacy.dlp.v2.Connection} message Connection + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Connection.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.errors = []; + if (options.defaults) { + object.name = ""; + object.state = options.enums === String ? "CONNECTION_STATE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.privacy.dlp.v2.ConnectionState[message.state] === undefined ? message.state : $root.google.privacy.dlp.v2.ConnectionState[message.state] : message.state; + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.privacy.dlp.v2.Error.toObject(message.errors[j], options); + } + if (message.cloudSql != null && message.hasOwnProperty("cloudSql")) { + object.cloudSql = $root.google.privacy.dlp.v2.CloudSqlProperties.toObject(message.cloudSql, options); + if (options.oneofs) + object.properties = "cloudSql"; + } + return object; + }; + + /** + * Converts this Connection to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Connection + * @instance + * @returns {Object.} JSON object + */ + Connection.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Connection + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Connection + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Connection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Connection"; + }; + + return Connection; + })(); + + /** + * ConnectionState enum. + * @name google.privacy.dlp.v2.ConnectionState + * @enum {number} + * @property {number} CONNECTION_STATE_UNSPECIFIED=0 CONNECTION_STATE_UNSPECIFIED value + * @property {number} MISSING_CREDENTIALS=1 MISSING_CREDENTIALS value + * @property {number} AVAILABLE=2 AVAILABLE value + * @property {number} ERROR=3 ERROR value + */ + v2.ConnectionState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONNECTION_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "MISSING_CREDENTIALS"] = 1; + values[valuesById[2] = "AVAILABLE"] = 2; + values[valuesById[3] = "ERROR"] = 3; + return values; + })(); + + v2.SecretManagerCredential = (function() { + + /** + * Properties of a SecretManagerCredential. + * @memberof google.privacy.dlp.v2 + * @interface ISecretManagerCredential + * @property {string|null} [username] SecretManagerCredential username + * @property {string|null} [passwordSecretVersionName] SecretManagerCredential passwordSecretVersionName + */ + + /** + * Constructs a new SecretManagerCredential. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a SecretManagerCredential. + * @implements ISecretManagerCredential + * @constructor + * @param {google.privacy.dlp.v2.ISecretManagerCredential=} [properties] Properties to set + */ + function SecretManagerCredential(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SecretManagerCredential username. + * @member {string} username + * @memberof google.privacy.dlp.v2.SecretManagerCredential + * @instance + */ + SecretManagerCredential.prototype.username = ""; + + /** + * SecretManagerCredential passwordSecretVersionName. + * @member {string} passwordSecretVersionName + * @memberof google.privacy.dlp.v2.SecretManagerCredential + * @instance + */ + SecretManagerCredential.prototype.passwordSecretVersionName = ""; + + /** + * Creates a new SecretManagerCredential instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.SecretManagerCredential + * @static + * @param {google.privacy.dlp.v2.ISecretManagerCredential=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.SecretManagerCredential} SecretManagerCredential instance + */ + SecretManagerCredential.create = function create(properties) { + return new SecretManagerCredential(properties); + }; + + /** + * Encodes the specified SecretManagerCredential message. Does not implicitly {@link google.privacy.dlp.v2.SecretManagerCredential.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.SecretManagerCredential + * @static + * @param {google.privacy.dlp.v2.ISecretManagerCredential} message SecretManagerCredential message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecretManagerCredential.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.username != null && Object.hasOwnProperty.call(message, "username")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.username); + if (message.passwordSecretVersionName != null && Object.hasOwnProperty.call(message, "passwordSecretVersionName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.passwordSecretVersionName); + return writer; + }; + + /** + * Encodes the specified SecretManagerCredential message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.SecretManagerCredential.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.SecretManagerCredential + * @static + * @param {google.privacy.dlp.v2.ISecretManagerCredential} message SecretManagerCredential message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecretManagerCredential.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecretManagerCredential message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.SecretManagerCredential + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.SecretManagerCredential} SecretManagerCredential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecretManagerCredential.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.SecretManagerCredential(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.username = reader.string(); + break; + } + case 2: { + message.passwordSecretVersionName = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SecretManagerCredential message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.SecretManagerCredential + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.SecretManagerCredential} SecretManagerCredential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecretManagerCredential.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecretManagerCredential message. + * @function verify + * @memberof google.privacy.dlp.v2.SecretManagerCredential + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecretManagerCredential.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.username != null && message.hasOwnProperty("username")) + if (!$util.isString(message.username)) + return "username: string expected"; + if (message.passwordSecretVersionName != null && message.hasOwnProperty("passwordSecretVersionName")) + if (!$util.isString(message.passwordSecretVersionName)) + return "passwordSecretVersionName: string expected"; + return null; + }; + + /** + * Creates a SecretManagerCredential message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.SecretManagerCredential + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.SecretManagerCredential} SecretManagerCredential + */ + SecretManagerCredential.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.SecretManagerCredential) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.SecretManagerCredential(); + if (object.username != null) + message.username = String(object.username); + if (object.passwordSecretVersionName != null) + message.passwordSecretVersionName = String(object.passwordSecretVersionName); + return message; + }; + + /** + * Creates a plain object from a SecretManagerCredential message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.SecretManagerCredential + * @static + * @param {google.privacy.dlp.v2.SecretManagerCredential} message SecretManagerCredential + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecretManagerCredential.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.username = ""; + object.passwordSecretVersionName = ""; + } + if (message.username != null && message.hasOwnProperty("username")) + object.username = message.username; + if (message.passwordSecretVersionName != null && message.hasOwnProperty("passwordSecretVersionName")) + object.passwordSecretVersionName = message.passwordSecretVersionName; + return object; + }; + + /** + * Converts this SecretManagerCredential to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.SecretManagerCredential + * @instance + * @returns {Object.} JSON object + */ + SecretManagerCredential.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecretManagerCredential + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.SecretManagerCredential + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecretManagerCredential.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.SecretManagerCredential"; + }; + + return SecretManagerCredential; + })(); + + v2.CloudSqlIamCredential = (function() { + + /** + * Properties of a CloudSqlIamCredential. + * @memberof google.privacy.dlp.v2 + * @interface ICloudSqlIamCredential + */ + + /** + * Constructs a new CloudSqlIamCredential. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CloudSqlIamCredential. + * @implements ICloudSqlIamCredential + * @constructor + * @param {google.privacy.dlp.v2.ICloudSqlIamCredential=} [properties] Properties to set + */ + function CloudSqlIamCredential(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new CloudSqlIamCredential instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CloudSqlIamCredential + * @static + * @param {google.privacy.dlp.v2.ICloudSqlIamCredential=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CloudSqlIamCredential} CloudSqlIamCredential instance + */ + CloudSqlIamCredential.create = function create(properties) { + return new CloudSqlIamCredential(properties); + }; + + /** + * Encodes the specified CloudSqlIamCredential message. Does not implicitly {@link google.privacy.dlp.v2.CloudSqlIamCredential.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CloudSqlIamCredential + * @static + * @param {google.privacy.dlp.v2.ICloudSqlIamCredential} message CloudSqlIamCredential message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudSqlIamCredential.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified CloudSqlIamCredential message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudSqlIamCredential.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CloudSqlIamCredential + * @static + * @param {google.privacy.dlp.v2.ICloudSqlIamCredential} message CloudSqlIamCredential message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudSqlIamCredential.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudSqlIamCredential message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CloudSqlIamCredential + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CloudSqlIamCredential} CloudSqlIamCredential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudSqlIamCredential.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CloudSqlIamCredential(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CloudSqlIamCredential message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CloudSqlIamCredential + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CloudSqlIamCredential} CloudSqlIamCredential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudSqlIamCredential.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudSqlIamCredential message. + * @function verify + * @memberof google.privacy.dlp.v2.CloudSqlIamCredential + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudSqlIamCredential.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a CloudSqlIamCredential message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CloudSqlIamCredential + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CloudSqlIamCredential} CloudSqlIamCredential + */ + CloudSqlIamCredential.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CloudSqlIamCredential) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.CloudSqlIamCredential(); + }; + + /** + * Creates a plain object from a CloudSqlIamCredential message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CloudSqlIamCredential + * @static + * @param {google.privacy.dlp.v2.CloudSqlIamCredential} message CloudSqlIamCredential + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudSqlIamCredential.toObject = function toObject() { + return {}; + }; + + /** + * Converts this CloudSqlIamCredential to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CloudSqlIamCredential + * @instance + * @returns {Object.} JSON object + */ + CloudSqlIamCredential.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudSqlIamCredential + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CloudSqlIamCredential + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudSqlIamCredential.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CloudSqlIamCredential"; + }; + + return CloudSqlIamCredential; + })(); + + v2.CloudSqlProperties = (function() { + + /** + * Properties of a CloudSqlProperties. + * @memberof google.privacy.dlp.v2 + * @interface ICloudSqlProperties + * @property {string|null} [connectionName] CloudSqlProperties connectionName + * @property {google.privacy.dlp.v2.ISecretManagerCredential|null} [usernamePassword] CloudSqlProperties usernamePassword + * @property {google.privacy.dlp.v2.ICloudSqlIamCredential|null} [cloudSqlIam] CloudSqlProperties cloudSqlIam + * @property {number|null} [maxConnections] CloudSqlProperties maxConnections + * @property {google.privacy.dlp.v2.CloudSqlProperties.DatabaseEngine|null} [databaseEngine] CloudSqlProperties databaseEngine + */ + + /** + * Constructs a new CloudSqlProperties. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CloudSqlProperties. + * @implements ICloudSqlProperties + * @constructor + * @param {google.privacy.dlp.v2.ICloudSqlProperties=} [properties] Properties to set + */ + function CloudSqlProperties(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudSqlProperties connectionName. + * @member {string} connectionName + * @memberof google.privacy.dlp.v2.CloudSqlProperties + * @instance + */ + CloudSqlProperties.prototype.connectionName = ""; + + /** + * CloudSqlProperties usernamePassword. + * @member {google.privacy.dlp.v2.ISecretManagerCredential|null|undefined} usernamePassword + * @memberof google.privacy.dlp.v2.CloudSqlProperties + * @instance + */ + CloudSqlProperties.prototype.usernamePassword = null; + + /** + * CloudSqlProperties cloudSqlIam. + * @member {google.privacy.dlp.v2.ICloudSqlIamCredential|null|undefined} cloudSqlIam + * @memberof google.privacy.dlp.v2.CloudSqlProperties + * @instance + */ + CloudSqlProperties.prototype.cloudSqlIam = null; + + /** + * CloudSqlProperties maxConnections. + * @member {number} maxConnections + * @memberof google.privacy.dlp.v2.CloudSqlProperties + * @instance + */ + CloudSqlProperties.prototype.maxConnections = 0; + + /** + * CloudSqlProperties databaseEngine. + * @member {google.privacy.dlp.v2.CloudSqlProperties.DatabaseEngine} databaseEngine + * @memberof google.privacy.dlp.v2.CloudSqlProperties + * @instance + */ + CloudSqlProperties.prototype.databaseEngine = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CloudSqlProperties credential. + * @member {"usernamePassword"|"cloudSqlIam"|undefined} credential + * @memberof google.privacy.dlp.v2.CloudSqlProperties + * @instance + */ + Object.defineProperty(CloudSqlProperties.prototype, "credential", { + get: $util.oneOfGetter($oneOfFields = ["usernamePassword", "cloudSqlIam"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CloudSqlProperties instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CloudSqlProperties + * @static + * @param {google.privacy.dlp.v2.ICloudSqlProperties=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CloudSqlProperties} CloudSqlProperties instance + */ + CloudSqlProperties.create = function create(properties) { + return new CloudSqlProperties(properties); + }; + + /** + * Encodes the specified CloudSqlProperties message. Does not implicitly {@link google.privacy.dlp.v2.CloudSqlProperties.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CloudSqlProperties + * @static + * @param {google.privacy.dlp.v2.ICloudSqlProperties} message CloudSqlProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudSqlProperties.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connectionName != null && Object.hasOwnProperty.call(message, "connectionName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.connectionName); + if (message.usernamePassword != null && Object.hasOwnProperty.call(message, "usernamePassword")) + $root.google.privacy.dlp.v2.SecretManagerCredential.encode(message.usernamePassword, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.cloudSqlIam != null && Object.hasOwnProperty.call(message, "cloudSqlIam")) + $root.google.privacy.dlp.v2.CloudSqlIamCredential.encode(message.cloudSqlIam, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.maxConnections != null && Object.hasOwnProperty.call(message, "maxConnections")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.maxConnections); + if (message.databaseEngine != null && Object.hasOwnProperty.call(message, "databaseEngine")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.databaseEngine); + return writer; + }; + + /** + * Encodes the specified CloudSqlProperties message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudSqlProperties.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CloudSqlProperties + * @static + * @param {google.privacy.dlp.v2.ICloudSqlProperties} message CloudSqlProperties message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudSqlProperties.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudSqlProperties message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CloudSqlProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CloudSqlProperties} CloudSqlProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudSqlProperties.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CloudSqlProperties(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.connectionName = reader.string(); + break; + } + case 2: { + message.usernamePassword = $root.google.privacy.dlp.v2.SecretManagerCredential.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.cloudSqlIam = $root.google.privacy.dlp.v2.CloudSqlIamCredential.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.maxConnections = reader.int32(); + break; + } + case 7: { + message.databaseEngine = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CloudSqlProperties message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CloudSqlProperties + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CloudSqlProperties} CloudSqlProperties + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudSqlProperties.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudSqlProperties message. + * @function verify + * @memberof google.privacy.dlp.v2.CloudSqlProperties + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudSqlProperties.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.connectionName != null && message.hasOwnProperty("connectionName")) + if (!$util.isString(message.connectionName)) + return "connectionName: string expected"; + if (message.usernamePassword != null && message.hasOwnProperty("usernamePassword")) { + properties.credential = 1; + { + var error = $root.google.privacy.dlp.v2.SecretManagerCredential.verify(message.usernamePassword, long + 1); + if (error) + return "usernamePassword." + error; + } + } + if (message.cloudSqlIam != null && message.hasOwnProperty("cloudSqlIam")) { + if (properties.credential === 1) + return "credential: multiple values"; + properties.credential = 1; + { + var error = $root.google.privacy.dlp.v2.CloudSqlIamCredential.verify(message.cloudSqlIam, long + 1); + if (error) + return "cloudSqlIam." + error; + } + } + if (message.maxConnections != null && message.hasOwnProperty("maxConnections")) + if (!$util.isInteger(message.maxConnections)) + return "maxConnections: integer expected"; + if (message.databaseEngine != null && message.hasOwnProperty("databaseEngine")) + switch (message.databaseEngine) { + default: + return "databaseEngine: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a CloudSqlProperties message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CloudSqlProperties + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CloudSqlProperties} CloudSqlProperties + */ + CloudSqlProperties.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CloudSqlProperties) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CloudSqlProperties(); + if (object.connectionName != null) + message.connectionName = String(object.connectionName); + if (object.usernamePassword != null) { + if (typeof object.usernamePassword !== "object") + throw TypeError(".google.privacy.dlp.v2.CloudSqlProperties.usernamePassword: object expected"); + message.usernamePassword = $root.google.privacy.dlp.v2.SecretManagerCredential.fromObject(object.usernamePassword, long + 1); + } + if (object.cloudSqlIam != null) { + if (typeof object.cloudSqlIam !== "object") + throw TypeError(".google.privacy.dlp.v2.CloudSqlProperties.cloudSqlIam: object expected"); + message.cloudSqlIam = $root.google.privacy.dlp.v2.CloudSqlIamCredential.fromObject(object.cloudSqlIam, long + 1); + } + if (object.maxConnections != null) + message.maxConnections = object.maxConnections | 0; + switch (object.databaseEngine) { + default: + if (typeof object.databaseEngine === "number") { + message.databaseEngine = object.databaseEngine; + break; + } + break; + case "DATABASE_ENGINE_UNKNOWN": + case 0: + message.databaseEngine = 0; + break; + case "DATABASE_ENGINE_MYSQL": + case 1: + message.databaseEngine = 1; + break; + case "DATABASE_ENGINE_POSTGRES": + case 2: + message.databaseEngine = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a CloudSqlProperties message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CloudSqlProperties + * @static + * @param {google.privacy.dlp.v2.CloudSqlProperties} message CloudSqlProperties + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudSqlProperties.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.connectionName = ""; + object.maxConnections = 0; + object.databaseEngine = options.enums === String ? "DATABASE_ENGINE_UNKNOWN" : 0; + } + if (message.connectionName != null && message.hasOwnProperty("connectionName")) + object.connectionName = message.connectionName; + if (message.usernamePassword != null && message.hasOwnProperty("usernamePassword")) { + object.usernamePassword = $root.google.privacy.dlp.v2.SecretManagerCredential.toObject(message.usernamePassword, options); + if (options.oneofs) + object.credential = "usernamePassword"; + } + if (message.cloudSqlIam != null && message.hasOwnProperty("cloudSqlIam")) { + object.cloudSqlIam = $root.google.privacy.dlp.v2.CloudSqlIamCredential.toObject(message.cloudSqlIam, options); + if (options.oneofs) + object.credential = "cloudSqlIam"; + } + if (message.maxConnections != null && message.hasOwnProperty("maxConnections")) + object.maxConnections = message.maxConnections; + if (message.databaseEngine != null && message.hasOwnProperty("databaseEngine")) + object.databaseEngine = options.enums === String ? $root.google.privacy.dlp.v2.CloudSqlProperties.DatabaseEngine[message.databaseEngine] === undefined ? message.databaseEngine : $root.google.privacy.dlp.v2.CloudSqlProperties.DatabaseEngine[message.databaseEngine] : message.databaseEngine; + return object; + }; + + /** + * Converts this CloudSqlProperties to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CloudSqlProperties + * @instance + * @returns {Object.} JSON object + */ + CloudSqlProperties.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudSqlProperties + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CloudSqlProperties + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudSqlProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CloudSqlProperties"; + }; + + /** + * DatabaseEngine enum. + * @name google.privacy.dlp.v2.CloudSqlProperties.DatabaseEngine + * @enum {number} + * @property {number} DATABASE_ENGINE_UNKNOWN=0 DATABASE_ENGINE_UNKNOWN value + * @property {number} DATABASE_ENGINE_MYSQL=1 DATABASE_ENGINE_MYSQL value + * @property {number} DATABASE_ENGINE_POSTGRES=2 DATABASE_ENGINE_POSTGRES value + */ + CloudSqlProperties.DatabaseEngine = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATABASE_ENGINE_UNKNOWN"] = 0; + values[valuesById[1] = "DATABASE_ENGINE_MYSQL"] = 1; + values[valuesById[2] = "DATABASE_ENGINE_POSTGRES"] = 2; + return values; + })(); + + return CloudSqlProperties; + })(); + + v2.DeleteTableDataProfileRequest = (function() { + + /** + * Properties of a DeleteTableDataProfileRequest. + * @memberof google.privacy.dlp.v2 + * @interface IDeleteTableDataProfileRequest + * @property {string|null} [name] DeleteTableDataProfileRequest name + */ + + /** + * Constructs a new DeleteTableDataProfileRequest. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DeleteTableDataProfileRequest. + * @implements IDeleteTableDataProfileRequest + * @constructor + * @param {google.privacy.dlp.v2.IDeleteTableDataProfileRequest=} [properties] Properties to set + */ + function DeleteTableDataProfileRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteTableDataProfileRequest name. + * @member {string} name + * @memberof google.privacy.dlp.v2.DeleteTableDataProfileRequest + * @instance + */ + DeleteTableDataProfileRequest.prototype.name = ""; + + /** + * Creates a new DeleteTableDataProfileRequest instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DeleteTableDataProfileRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteTableDataProfileRequest=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DeleteTableDataProfileRequest} DeleteTableDataProfileRequest instance + */ + DeleteTableDataProfileRequest.create = function create(properties) { + return new DeleteTableDataProfileRequest(properties); + }; + + /** + * Encodes the specified DeleteTableDataProfileRequest message. Does not implicitly {@link google.privacy.dlp.v2.DeleteTableDataProfileRequest.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DeleteTableDataProfileRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteTableDataProfileRequest} message DeleteTableDataProfileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTableDataProfileRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteTableDataProfileRequest message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DeleteTableDataProfileRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DeleteTableDataProfileRequest + * @static + * @param {google.privacy.dlp.v2.IDeleteTableDataProfileRequest} message DeleteTableDataProfileRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteTableDataProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteTableDataProfileRequest message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DeleteTableDataProfileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DeleteTableDataProfileRequest} DeleteTableDataProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTableDataProfileRequest.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DeleteTableDataProfileRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteTableDataProfileRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DeleteTableDataProfileRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DeleteTableDataProfileRequest} DeleteTableDataProfileRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteTableDataProfileRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteTableDataProfileRequest message. + * @function verify + * @memberof google.privacy.dlp.v2.DeleteTableDataProfileRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteTableDataProfileRequest.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteTableDataProfileRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DeleteTableDataProfileRequest + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DeleteTableDataProfileRequest} DeleteTableDataProfileRequest + */ + DeleteTableDataProfileRequest.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DeleteTableDataProfileRequest) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DeleteTableDataProfileRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteTableDataProfileRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DeleteTableDataProfileRequest + * @static + * @param {google.privacy.dlp.v2.DeleteTableDataProfileRequest} message DeleteTableDataProfileRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteTableDataProfileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteTableDataProfileRequest to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DeleteTableDataProfileRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteTableDataProfileRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteTableDataProfileRequest + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DeleteTableDataProfileRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteTableDataProfileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DeleteTableDataProfileRequest"; + }; + + return DeleteTableDataProfileRequest; + })(); + + v2.DataSourceType = (function() { + + /** + * Properties of a DataSourceType. + * @memberof google.privacy.dlp.v2 + * @interface IDataSourceType + * @property {string|null} [dataSource] DataSourceType dataSource + */ + + /** + * Constructs a new DataSourceType. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DataSourceType. + * @implements IDataSourceType + * @constructor + * @param {google.privacy.dlp.v2.IDataSourceType=} [properties] Properties to set + */ + function DataSourceType(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataSourceType dataSource. + * @member {string} dataSource + * @memberof google.privacy.dlp.v2.DataSourceType + * @instance + */ + DataSourceType.prototype.dataSource = ""; + + /** + * Creates a new DataSourceType instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DataSourceType + * @static + * @param {google.privacy.dlp.v2.IDataSourceType=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DataSourceType} DataSourceType instance + */ + DataSourceType.create = function create(properties) { + return new DataSourceType(properties); + }; + + /** + * Encodes the specified DataSourceType message. Does not implicitly {@link google.privacy.dlp.v2.DataSourceType.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DataSourceType + * @static + * @param {google.privacy.dlp.v2.IDataSourceType} message DataSourceType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSourceType.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.dataSource); + return writer; + }; + + /** + * Encodes the specified DataSourceType message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DataSourceType.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DataSourceType + * @static + * @param {google.privacy.dlp.v2.IDataSourceType} message DataSourceType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataSourceType.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataSourceType message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DataSourceType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DataSourceType} DataSourceType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSourceType.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DataSourceType(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.dataSource = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DataSourceType message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DataSourceType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DataSourceType} DataSourceType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataSourceType.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataSourceType message. + * @function verify + * @memberof google.privacy.dlp.v2.DataSourceType + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataSourceType.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: string expected"; + return null; + }; + + /** + * Creates a DataSourceType message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DataSourceType + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DataSourceType} DataSourceType + */ + DataSourceType.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DataSourceType) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DataSourceType(); + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + return message; + }; + + /** + * Creates a plain object from a DataSourceType message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DataSourceType + * @static + * @param {google.privacy.dlp.v2.DataSourceType} message DataSourceType + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataSourceType.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.dataSource = ""; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + return object; + }; + + /** + * Converts this DataSourceType to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DataSourceType + * @instance + * @returns {Object.} JSON object + */ + DataSourceType.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataSourceType + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DataSourceType + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataSourceType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DataSourceType"; + }; + + return DataSourceType; + })(); + + v2.FileClusterType = (function() { + + /** + * Properties of a FileClusterType. + * @memberof google.privacy.dlp.v2 + * @interface IFileClusterType + * @property {google.privacy.dlp.v2.FileClusterType.Cluster|null} [cluster] FileClusterType cluster + */ + + /** + * Constructs a new FileClusterType. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a FileClusterType. + * @implements IFileClusterType + * @constructor + * @param {google.privacy.dlp.v2.IFileClusterType=} [properties] Properties to set + */ + function FileClusterType(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileClusterType cluster. + * @member {google.privacy.dlp.v2.FileClusterType.Cluster|null|undefined} cluster + * @memberof google.privacy.dlp.v2.FileClusterType + * @instance + */ + FileClusterType.prototype.cluster = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * FileClusterType fileClusterType. + * @member {"cluster"|undefined} fileClusterType + * @memberof google.privacy.dlp.v2.FileClusterType + * @instance + */ + Object.defineProperty(FileClusterType.prototype, "fileClusterType", { + get: $util.oneOfGetter($oneOfFields = ["cluster"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new FileClusterType instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.FileClusterType + * @static + * @param {google.privacy.dlp.v2.IFileClusterType=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.FileClusterType} FileClusterType instance + */ + FileClusterType.create = function create(properties) { + return new FileClusterType(properties); + }; + + /** + * Encodes the specified FileClusterType message. Does not implicitly {@link google.privacy.dlp.v2.FileClusterType.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.FileClusterType + * @static + * @param {google.privacy.dlp.v2.IFileClusterType} message FileClusterType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileClusterType.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.cluster); + return writer; + }; + + /** + * Encodes the specified FileClusterType message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FileClusterType.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.FileClusterType + * @static + * @param {google.privacy.dlp.v2.IFileClusterType} message FileClusterType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileClusterType.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileClusterType message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.FileClusterType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.FileClusterType} FileClusterType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileClusterType.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.FileClusterType(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.cluster = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FileClusterType message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.FileClusterType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.FileClusterType} FileClusterType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileClusterType.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileClusterType message. + * @function verify + * @memberof google.privacy.dlp.v2.FileClusterType + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileClusterType.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.cluster != null && message.hasOwnProperty("cluster")) { + properties.fileClusterType = 1; + switch (message.cluster) { + default: + return "cluster: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + break; + } + } + return null; + }; + + /** + * Creates a FileClusterType message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.FileClusterType + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.FileClusterType} FileClusterType + */ + FileClusterType.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.FileClusterType) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.FileClusterType(); + switch (object.cluster) { + default: + if (typeof object.cluster === "number") { + message.cluster = object.cluster; + break; + } + break; + case "CLUSTER_UNSPECIFIED": + case 0: + message.cluster = 0; + break; + case "CLUSTER_UNKNOWN": + case 1: + message.cluster = 1; + break; + case "CLUSTER_TEXT": + case 2: + message.cluster = 2; + break; + case "CLUSTER_STRUCTURED_DATA": + case 3: + message.cluster = 3; + break; + case "CLUSTER_SOURCE_CODE": + case 4: + message.cluster = 4; + break; + case "CLUSTER_RICH_DOCUMENT": + case 5: + message.cluster = 5; + break; + case "CLUSTER_IMAGE": + case 6: + message.cluster = 6; + break; + case "CLUSTER_ARCHIVE": + case 7: + message.cluster = 7; + break; + case "CLUSTER_MULTIMEDIA": + case 8: + message.cluster = 8; + break; + case "CLUSTER_EXECUTABLE": + case 9: + message.cluster = 9; + break; + case "CLUSTER_AI_MODEL": + case 10: + message.cluster = 10; + break; + } + return message; + }; + + /** + * Creates a plain object from a FileClusterType message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.FileClusterType + * @static + * @param {google.privacy.dlp.v2.FileClusterType} message FileClusterType + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileClusterType.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.cluster != null && message.hasOwnProperty("cluster")) { + object.cluster = options.enums === String ? $root.google.privacy.dlp.v2.FileClusterType.Cluster[message.cluster] === undefined ? message.cluster : $root.google.privacy.dlp.v2.FileClusterType.Cluster[message.cluster] : message.cluster; + if (options.oneofs) + object.fileClusterType = "cluster"; + } + return object; + }; + + /** + * Converts this FileClusterType to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.FileClusterType + * @instance + * @returns {Object.} JSON object + */ + FileClusterType.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileClusterType + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.FileClusterType + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileClusterType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.FileClusterType"; + }; + + /** + * Cluster enum. + * @name google.privacy.dlp.v2.FileClusterType.Cluster + * @enum {number} + * @property {number} CLUSTER_UNSPECIFIED=0 CLUSTER_UNSPECIFIED value + * @property {number} CLUSTER_UNKNOWN=1 CLUSTER_UNKNOWN value + * @property {number} CLUSTER_TEXT=2 CLUSTER_TEXT value + * @property {number} CLUSTER_STRUCTURED_DATA=3 CLUSTER_STRUCTURED_DATA value + * @property {number} CLUSTER_SOURCE_CODE=4 CLUSTER_SOURCE_CODE value + * @property {number} CLUSTER_RICH_DOCUMENT=5 CLUSTER_RICH_DOCUMENT value + * @property {number} CLUSTER_IMAGE=6 CLUSTER_IMAGE value + * @property {number} CLUSTER_ARCHIVE=7 CLUSTER_ARCHIVE value + * @property {number} CLUSTER_MULTIMEDIA=8 CLUSTER_MULTIMEDIA value + * @property {number} CLUSTER_EXECUTABLE=9 CLUSTER_EXECUTABLE value + * @property {number} CLUSTER_AI_MODEL=10 CLUSTER_AI_MODEL value + */ + FileClusterType.Cluster = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLUSTER_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLUSTER_UNKNOWN"] = 1; + values[valuesById[2] = "CLUSTER_TEXT"] = 2; + values[valuesById[3] = "CLUSTER_STRUCTURED_DATA"] = 3; + values[valuesById[4] = "CLUSTER_SOURCE_CODE"] = 4; + values[valuesById[5] = "CLUSTER_RICH_DOCUMENT"] = 5; + values[valuesById[6] = "CLUSTER_IMAGE"] = 6; + values[valuesById[7] = "CLUSTER_ARCHIVE"] = 7; + values[valuesById[8] = "CLUSTER_MULTIMEDIA"] = 8; + values[valuesById[9] = "CLUSTER_EXECUTABLE"] = 9; + values[valuesById[10] = "CLUSTER_AI_MODEL"] = 10; + return values; + })(); + + return FileClusterType; + })(); + + v2.ProcessingLocation = (function() { + + /** + * Properties of a ProcessingLocation. + * @memberof google.privacy.dlp.v2 + * @interface IProcessingLocation + * @property {google.privacy.dlp.v2.ProcessingLocation.IImageFallbackLocation|null} [imageFallbackLocation] ProcessingLocation imageFallbackLocation + * @property {google.privacy.dlp.v2.ProcessingLocation.IDocumentFallbackLocation|null} [documentFallbackLocation] ProcessingLocation documentFallbackLocation + */ + + /** + * Constructs a new ProcessingLocation. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a ProcessingLocation. + * @implements IProcessingLocation + * @constructor + * @param {google.privacy.dlp.v2.IProcessingLocation=} [properties] Properties to set + */ + function ProcessingLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ProcessingLocation imageFallbackLocation. + * @member {google.privacy.dlp.v2.ProcessingLocation.IImageFallbackLocation|null|undefined} imageFallbackLocation + * @memberof google.privacy.dlp.v2.ProcessingLocation + * @instance + */ + ProcessingLocation.prototype.imageFallbackLocation = null; + + /** + * ProcessingLocation documentFallbackLocation. + * @member {google.privacy.dlp.v2.ProcessingLocation.IDocumentFallbackLocation|null|undefined} documentFallbackLocation + * @memberof google.privacy.dlp.v2.ProcessingLocation + * @instance + */ + ProcessingLocation.prototype.documentFallbackLocation = null; + + /** + * Creates a new ProcessingLocation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ProcessingLocation + * @static + * @param {google.privacy.dlp.v2.IProcessingLocation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ProcessingLocation} ProcessingLocation instance + */ + ProcessingLocation.create = function create(properties) { + return new ProcessingLocation(properties); + }; + + /** + * Encodes the specified ProcessingLocation message. Does not implicitly {@link google.privacy.dlp.v2.ProcessingLocation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ProcessingLocation + * @static + * @param {google.privacy.dlp.v2.IProcessingLocation} message ProcessingLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProcessingLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.imageFallbackLocation != null && Object.hasOwnProperty.call(message, "imageFallbackLocation")) + $root.google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation.encode(message.imageFallbackLocation, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.documentFallbackLocation != null && Object.hasOwnProperty.call(message, "documentFallbackLocation")) + $root.google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation.encode(message.documentFallbackLocation, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ProcessingLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ProcessingLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ProcessingLocation + * @static + * @param {google.privacy.dlp.v2.IProcessingLocation} message ProcessingLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ProcessingLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ProcessingLocation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ProcessingLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ProcessingLocation} ProcessingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProcessingLocation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ProcessingLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.imageFallbackLocation = $root.google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.documentFallbackLocation = $root.google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ProcessingLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ProcessingLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ProcessingLocation} ProcessingLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ProcessingLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ProcessingLocation message. + * @function verify + * @memberof google.privacy.dlp.v2.ProcessingLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ProcessingLocation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.imageFallbackLocation != null && message.hasOwnProperty("imageFallbackLocation")) { + var error = $root.google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation.verify(message.imageFallbackLocation, long + 1); + if (error) + return "imageFallbackLocation." + error; + } + if (message.documentFallbackLocation != null && message.hasOwnProperty("documentFallbackLocation")) { + var error = $root.google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation.verify(message.documentFallbackLocation, long + 1); + if (error) + return "documentFallbackLocation." + error; + } + return null; + }; + + /** + * Creates a ProcessingLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ProcessingLocation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ProcessingLocation} ProcessingLocation + */ + ProcessingLocation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ProcessingLocation) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ProcessingLocation(); + if (object.imageFallbackLocation != null) { + if (typeof object.imageFallbackLocation !== "object") + throw TypeError(".google.privacy.dlp.v2.ProcessingLocation.imageFallbackLocation: object expected"); + message.imageFallbackLocation = $root.google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation.fromObject(object.imageFallbackLocation, long + 1); + } + if (object.documentFallbackLocation != null) { + if (typeof object.documentFallbackLocation !== "object") + throw TypeError(".google.privacy.dlp.v2.ProcessingLocation.documentFallbackLocation: object expected"); + message.documentFallbackLocation = $root.google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation.fromObject(object.documentFallbackLocation, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a ProcessingLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ProcessingLocation + * @static + * @param {google.privacy.dlp.v2.ProcessingLocation} message ProcessingLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ProcessingLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.imageFallbackLocation = null; + object.documentFallbackLocation = null; + } + if (message.imageFallbackLocation != null && message.hasOwnProperty("imageFallbackLocation")) + object.imageFallbackLocation = $root.google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation.toObject(message.imageFallbackLocation, options); + if (message.documentFallbackLocation != null && message.hasOwnProperty("documentFallbackLocation")) + object.documentFallbackLocation = $root.google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation.toObject(message.documentFallbackLocation, options); + return object; + }; + + /** + * Converts this ProcessingLocation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ProcessingLocation + * @instance + * @returns {Object.} JSON object + */ + ProcessingLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ProcessingLocation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ProcessingLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ProcessingLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ProcessingLocation"; + }; + + ProcessingLocation.MultiRegionProcessing = (function() { + + /** + * Properties of a MultiRegionProcessing. + * @memberof google.privacy.dlp.v2.ProcessingLocation + * @interface IMultiRegionProcessing + */ + + /** + * Constructs a new MultiRegionProcessing. + * @memberof google.privacy.dlp.v2.ProcessingLocation + * @classdesc Represents a MultiRegionProcessing. + * @implements IMultiRegionProcessing + * @constructor + * @param {google.privacy.dlp.v2.ProcessingLocation.IMultiRegionProcessing=} [properties] Properties to set + */ + function MultiRegionProcessing(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new MultiRegionProcessing instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing + * @static + * @param {google.privacy.dlp.v2.ProcessingLocation.IMultiRegionProcessing=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing} MultiRegionProcessing instance + */ + MultiRegionProcessing.create = function create(properties) { + return new MultiRegionProcessing(properties); + }; + + /** + * Encodes the specified MultiRegionProcessing message. Does not implicitly {@link google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing + * @static + * @param {google.privacy.dlp.v2.ProcessingLocation.IMultiRegionProcessing} message MultiRegionProcessing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MultiRegionProcessing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MultiRegionProcessing message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing + * @static + * @param {google.privacy.dlp.v2.ProcessingLocation.IMultiRegionProcessing} message MultiRegionProcessing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MultiRegionProcessing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MultiRegionProcessing message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing} MultiRegionProcessing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MultiRegionProcessing.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a MultiRegionProcessing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing} MultiRegionProcessing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MultiRegionProcessing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MultiRegionProcessing message. + * @function verify + * @memberof google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MultiRegionProcessing.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a MultiRegionProcessing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing} MultiRegionProcessing + */ + MultiRegionProcessing.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing(); + }; + + /** + * Creates a plain object from a MultiRegionProcessing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing + * @static + * @param {google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing} message MultiRegionProcessing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MultiRegionProcessing.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MultiRegionProcessing to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing + * @instance + * @returns {Object.} JSON object + */ + MultiRegionProcessing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MultiRegionProcessing + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MultiRegionProcessing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing"; + }; + + return MultiRegionProcessing; + })(); + + ProcessingLocation.GlobalProcessing = (function() { + + /** + * Properties of a GlobalProcessing. + * @memberof google.privacy.dlp.v2.ProcessingLocation + * @interface IGlobalProcessing + */ + + /** + * Constructs a new GlobalProcessing. + * @memberof google.privacy.dlp.v2.ProcessingLocation + * @classdesc Represents a GlobalProcessing. + * @implements IGlobalProcessing + * @constructor + * @param {google.privacy.dlp.v2.ProcessingLocation.IGlobalProcessing=} [properties] Properties to set + */ + function GlobalProcessing(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new GlobalProcessing instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing + * @static + * @param {google.privacy.dlp.v2.ProcessingLocation.IGlobalProcessing=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing} GlobalProcessing instance + */ + GlobalProcessing.create = function create(properties) { + return new GlobalProcessing(properties); + }; + + /** + * Encodes the specified GlobalProcessing message. Does not implicitly {@link google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing + * @static + * @param {google.privacy.dlp.v2.ProcessingLocation.IGlobalProcessing} message GlobalProcessing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GlobalProcessing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified GlobalProcessing message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing + * @static + * @param {google.privacy.dlp.v2.ProcessingLocation.IGlobalProcessing} message GlobalProcessing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GlobalProcessing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GlobalProcessing message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing} GlobalProcessing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GlobalProcessing.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GlobalProcessing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing} GlobalProcessing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GlobalProcessing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GlobalProcessing message. + * @function verify + * @memberof google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GlobalProcessing.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a GlobalProcessing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing} GlobalProcessing + */ + GlobalProcessing.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing(); + }; + + /** + * Creates a plain object from a GlobalProcessing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing + * @static + * @param {google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing} message GlobalProcessing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GlobalProcessing.toObject = function toObject() { + return {}; + }; + + /** + * Converts this GlobalProcessing to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing + * @instance + * @returns {Object.} JSON object + */ + GlobalProcessing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GlobalProcessing + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GlobalProcessing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing"; + }; + + return GlobalProcessing; + })(); + + ProcessingLocation.ImageFallbackLocation = (function() { + + /** + * Properties of an ImageFallbackLocation. + * @memberof google.privacy.dlp.v2.ProcessingLocation + * @interface IImageFallbackLocation + * @property {google.privacy.dlp.v2.ProcessingLocation.IMultiRegionProcessing|null} [multiRegionProcessing] ImageFallbackLocation multiRegionProcessing + * @property {google.privacy.dlp.v2.ProcessingLocation.IGlobalProcessing|null} [globalProcessing] ImageFallbackLocation globalProcessing + */ + + /** + * Constructs a new ImageFallbackLocation. + * @memberof google.privacy.dlp.v2.ProcessingLocation + * @classdesc Represents an ImageFallbackLocation. + * @implements IImageFallbackLocation + * @constructor + * @param {google.privacy.dlp.v2.ProcessingLocation.IImageFallbackLocation=} [properties] Properties to set + */ + function ImageFallbackLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImageFallbackLocation multiRegionProcessing. + * @member {google.privacy.dlp.v2.ProcessingLocation.IMultiRegionProcessing|null|undefined} multiRegionProcessing + * @memberof google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation + * @instance + */ + ImageFallbackLocation.prototype.multiRegionProcessing = null; + + /** + * ImageFallbackLocation globalProcessing. + * @member {google.privacy.dlp.v2.ProcessingLocation.IGlobalProcessing|null|undefined} globalProcessing + * @memberof google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation + * @instance + */ + ImageFallbackLocation.prototype.globalProcessing = null; + + /** + * Creates a new ImageFallbackLocation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation + * @static + * @param {google.privacy.dlp.v2.ProcessingLocation.IImageFallbackLocation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation} ImageFallbackLocation instance + */ + ImageFallbackLocation.create = function create(properties) { + return new ImageFallbackLocation(properties); + }; + + /** + * Encodes the specified ImageFallbackLocation message. Does not implicitly {@link google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation + * @static + * @param {google.privacy.dlp.v2.ProcessingLocation.IImageFallbackLocation} message ImageFallbackLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageFallbackLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.multiRegionProcessing != null && Object.hasOwnProperty.call(message, "multiRegionProcessing")) + $root.google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing.encode(message.multiRegionProcessing, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.globalProcessing != null && Object.hasOwnProperty.call(message, "globalProcessing")) + $root.google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing.encode(message.globalProcessing, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ImageFallbackLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation + * @static + * @param {google.privacy.dlp.v2.ProcessingLocation.IImageFallbackLocation} message ImageFallbackLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageFallbackLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImageFallbackLocation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation} ImageFallbackLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageFallbackLocation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 100: { + message.multiRegionProcessing = $root.google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 200: { + message.globalProcessing = $root.google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an ImageFallbackLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation} ImageFallbackLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageFallbackLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImageFallbackLocation message. + * @function verify + * @memberof google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImageFallbackLocation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.multiRegionProcessing != null && message.hasOwnProperty("multiRegionProcessing")) { + var error = $root.google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing.verify(message.multiRegionProcessing, long + 1); + if (error) + return "multiRegionProcessing." + error; + } + if (message.globalProcessing != null && message.hasOwnProperty("globalProcessing")) { + var error = $root.google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing.verify(message.globalProcessing, long + 1); + if (error) + return "globalProcessing." + error; + } + return null; + }; + + /** + * Creates an ImageFallbackLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation} ImageFallbackLocation + */ + ImageFallbackLocation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation(); + if (object.multiRegionProcessing != null) { + if (typeof object.multiRegionProcessing !== "object") + throw TypeError(".google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation.multiRegionProcessing: object expected"); + message.multiRegionProcessing = $root.google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing.fromObject(object.multiRegionProcessing, long + 1); + } + if (object.globalProcessing != null) { + if (typeof object.globalProcessing !== "object") + throw TypeError(".google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation.globalProcessing: object expected"); + message.globalProcessing = $root.google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing.fromObject(object.globalProcessing, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an ImageFallbackLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation + * @static + * @param {google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation} message ImageFallbackLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImageFallbackLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.multiRegionProcessing = null; + object.globalProcessing = null; + } + if (message.multiRegionProcessing != null && message.hasOwnProperty("multiRegionProcessing")) + object.multiRegionProcessing = $root.google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing.toObject(message.multiRegionProcessing, options); + if (message.globalProcessing != null && message.hasOwnProperty("globalProcessing")) + object.globalProcessing = $root.google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing.toObject(message.globalProcessing, options); + return object; + }; + + /** + * Converts this ImageFallbackLocation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation + * @instance + * @returns {Object.} JSON object + */ + ImageFallbackLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImageFallbackLocation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImageFallbackLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ProcessingLocation.ImageFallbackLocation"; + }; + + return ImageFallbackLocation; + })(); + + ProcessingLocation.DocumentFallbackLocation = (function() { + + /** + * Properties of a DocumentFallbackLocation. + * @memberof google.privacy.dlp.v2.ProcessingLocation + * @interface IDocumentFallbackLocation + * @property {google.privacy.dlp.v2.ProcessingLocation.IMultiRegionProcessing|null} [multiRegionProcessing] DocumentFallbackLocation multiRegionProcessing + * @property {google.privacy.dlp.v2.ProcessingLocation.IGlobalProcessing|null} [globalProcessing] DocumentFallbackLocation globalProcessing + */ + + /** + * Constructs a new DocumentFallbackLocation. + * @memberof google.privacy.dlp.v2.ProcessingLocation + * @classdesc Represents a DocumentFallbackLocation. + * @implements IDocumentFallbackLocation + * @constructor + * @param {google.privacy.dlp.v2.ProcessingLocation.IDocumentFallbackLocation=} [properties] Properties to set + */ + function DocumentFallbackLocation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DocumentFallbackLocation multiRegionProcessing. + * @member {google.privacy.dlp.v2.ProcessingLocation.IMultiRegionProcessing|null|undefined} multiRegionProcessing + * @memberof google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation + * @instance + */ + DocumentFallbackLocation.prototype.multiRegionProcessing = null; + + /** + * DocumentFallbackLocation globalProcessing. + * @member {google.privacy.dlp.v2.ProcessingLocation.IGlobalProcessing|null|undefined} globalProcessing + * @memberof google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation + * @instance + */ + DocumentFallbackLocation.prototype.globalProcessing = null; + + /** + * Creates a new DocumentFallbackLocation instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation + * @static + * @param {google.privacy.dlp.v2.ProcessingLocation.IDocumentFallbackLocation=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation} DocumentFallbackLocation instance + */ + DocumentFallbackLocation.create = function create(properties) { + return new DocumentFallbackLocation(properties); + }; + + /** + * Encodes the specified DocumentFallbackLocation message. Does not implicitly {@link google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation + * @static + * @param {google.privacy.dlp.v2.ProcessingLocation.IDocumentFallbackLocation} message DocumentFallbackLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentFallbackLocation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.multiRegionProcessing != null && Object.hasOwnProperty.call(message, "multiRegionProcessing")) + $root.google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing.encode(message.multiRegionProcessing, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.globalProcessing != null && Object.hasOwnProperty.call(message, "globalProcessing")) + $root.google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing.encode(message.globalProcessing, writer.uint32(/* id 200, wireType 2 =*/1602).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DocumentFallbackLocation message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation + * @static + * @param {google.privacy.dlp.v2.ProcessingLocation.IDocumentFallbackLocation} message DocumentFallbackLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DocumentFallbackLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DocumentFallbackLocation message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation} DocumentFallbackLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentFallbackLocation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 100: { + message.multiRegionProcessing = $root.google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 200: { + message.globalProcessing = $root.google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DocumentFallbackLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation} DocumentFallbackLocation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DocumentFallbackLocation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DocumentFallbackLocation message. + * @function verify + * @memberof google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DocumentFallbackLocation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.multiRegionProcessing != null && message.hasOwnProperty("multiRegionProcessing")) { + var error = $root.google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing.verify(message.multiRegionProcessing, long + 1); + if (error) + return "multiRegionProcessing." + error; + } + if (message.globalProcessing != null && message.hasOwnProperty("globalProcessing")) { + var error = $root.google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing.verify(message.globalProcessing, long + 1); + if (error) + return "globalProcessing." + error; + } + return null; + }; + + /** + * Creates a DocumentFallbackLocation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation} DocumentFallbackLocation + */ + DocumentFallbackLocation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation(); + if (object.multiRegionProcessing != null) { + if (typeof object.multiRegionProcessing !== "object") + throw TypeError(".google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation.multiRegionProcessing: object expected"); + message.multiRegionProcessing = $root.google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing.fromObject(object.multiRegionProcessing, long + 1); + } + if (object.globalProcessing != null) { + if (typeof object.globalProcessing !== "object") + throw TypeError(".google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation.globalProcessing: object expected"); + message.globalProcessing = $root.google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing.fromObject(object.globalProcessing, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DocumentFallbackLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation + * @static + * @param {google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation} message DocumentFallbackLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DocumentFallbackLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.multiRegionProcessing = null; + object.globalProcessing = null; + } + if (message.multiRegionProcessing != null && message.hasOwnProperty("multiRegionProcessing")) + object.multiRegionProcessing = $root.google.privacy.dlp.v2.ProcessingLocation.MultiRegionProcessing.toObject(message.multiRegionProcessing, options); + if (message.globalProcessing != null && message.hasOwnProperty("globalProcessing")) + object.globalProcessing = $root.google.privacy.dlp.v2.ProcessingLocation.GlobalProcessing.toObject(message.globalProcessing, options); + return object; + }; + + /** + * Converts this DocumentFallbackLocation to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation + * @instance + * @returns {Object.} JSON object + */ + DocumentFallbackLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DocumentFallbackLocation + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DocumentFallbackLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.ProcessingLocation.DocumentFallbackLocation"; + }; + + return DocumentFallbackLocation; + })(); + + return ProcessingLocation; + })(); + + v2.SaveToGcsFindingsOutput = (function() { + + /** + * Properties of a SaveToGcsFindingsOutput. + * @memberof google.privacy.dlp.v2 + * @interface ISaveToGcsFindingsOutput + * @property {Array.|null} [findings] SaveToGcsFindingsOutput findings + */ + + /** + * Constructs a new SaveToGcsFindingsOutput. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a SaveToGcsFindingsOutput. + * @implements ISaveToGcsFindingsOutput + * @constructor + * @param {google.privacy.dlp.v2.ISaveToGcsFindingsOutput=} [properties] Properties to set + */ + function SaveToGcsFindingsOutput(properties) { + this.findings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveToGcsFindingsOutput findings. + * @member {Array.} findings + * @memberof google.privacy.dlp.v2.SaveToGcsFindingsOutput + * @instance + */ + SaveToGcsFindingsOutput.prototype.findings = $util.emptyArray; + + /** + * Creates a new SaveToGcsFindingsOutput instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.SaveToGcsFindingsOutput + * @static + * @param {google.privacy.dlp.v2.ISaveToGcsFindingsOutput=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.SaveToGcsFindingsOutput} SaveToGcsFindingsOutput instance + */ + SaveToGcsFindingsOutput.create = function create(properties) { + return new SaveToGcsFindingsOutput(properties); + }; + + /** + * Encodes the specified SaveToGcsFindingsOutput message. Does not implicitly {@link google.privacy.dlp.v2.SaveToGcsFindingsOutput.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.SaveToGcsFindingsOutput + * @static + * @param {google.privacy.dlp.v2.ISaveToGcsFindingsOutput} message SaveToGcsFindingsOutput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveToGcsFindingsOutput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.findings != null && message.findings.length) + for (var i = 0; i < message.findings.length; ++i) + $root.google.privacy.dlp.v2.Finding.encode(message.findings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SaveToGcsFindingsOutput message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.SaveToGcsFindingsOutput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.SaveToGcsFindingsOutput + * @static + * @param {google.privacy.dlp.v2.ISaveToGcsFindingsOutput} message SaveToGcsFindingsOutput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveToGcsFindingsOutput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveToGcsFindingsOutput message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.SaveToGcsFindingsOutput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.SaveToGcsFindingsOutput} SaveToGcsFindingsOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveToGcsFindingsOutput.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.SaveToGcsFindingsOutput(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.findings && message.findings.length)) + message.findings = []; + message.findings.push($root.google.privacy.dlp.v2.Finding.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SaveToGcsFindingsOutput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.SaveToGcsFindingsOutput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.SaveToGcsFindingsOutput} SaveToGcsFindingsOutput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveToGcsFindingsOutput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveToGcsFindingsOutput message. + * @function verify + * @memberof google.privacy.dlp.v2.SaveToGcsFindingsOutput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveToGcsFindingsOutput.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.findings != null && message.hasOwnProperty("findings")) { + if (!Array.isArray(message.findings)) + return "findings: array expected"; + for (var i = 0; i < message.findings.length; ++i) { + var error = $root.google.privacy.dlp.v2.Finding.verify(message.findings[i], long + 1); + if (error) + return "findings." + error; + } + } + return null; + }; + + /** + * Creates a SaveToGcsFindingsOutput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.SaveToGcsFindingsOutput + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.SaveToGcsFindingsOutput} SaveToGcsFindingsOutput + */ + SaveToGcsFindingsOutput.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.SaveToGcsFindingsOutput) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.SaveToGcsFindingsOutput(); + if (object.findings) { + if (!Array.isArray(object.findings)) + throw TypeError(".google.privacy.dlp.v2.SaveToGcsFindingsOutput.findings: array expected"); + message.findings = []; + for (var i = 0; i < object.findings.length; ++i) { + if (typeof object.findings[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.SaveToGcsFindingsOutput.findings: object expected"); + message.findings[i] = $root.google.privacy.dlp.v2.Finding.fromObject(object.findings[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a SaveToGcsFindingsOutput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.SaveToGcsFindingsOutput + * @static + * @param {google.privacy.dlp.v2.SaveToGcsFindingsOutput} message SaveToGcsFindingsOutput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveToGcsFindingsOutput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.findings = []; + if (message.findings && message.findings.length) { + object.findings = []; + for (var j = 0; j < message.findings.length; ++j) + object.findings[j] = $root.google.privacy.dlp.v2.Finding.toObject(message.findings[j], options); + } + return object; + }; + + /** + * Converts this SaveToGcsFindingsOutput to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.SaveToGcsFindingsOutput + * @instance + * @returns {Object.} JSON object + */ + SaveToGcsFindingsOutput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveToGcsFindingsOutput + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.SaveToGcsFindingsOutput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveToGcsFindingsOutput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.SaveToGcsFindingsOutput"; + }; + + return SaveToGcsFindingsOutput; + })(); + + v2.Domain = (function() { + + /** + * Properties of a Domain. + * @memberof google.privacy.dlp.v2 + * @interface IDomain + * @property {google.privacy.dlp.v2.Domain.Category|null} [category] Domain category + * @property {Array.|null} [signals] Domain signals + */ + + /** + * Constructs a new Domain. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a Domain. + * @implements IDomain + * @constructor + * @param {google.privacy.dlp.v2.IDomain=} [properties] Properties to set + */ + function Domain(properties) { + this.signals = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Domain category. + * @member {google.privacy.dlp.v2.Domain.Category} category + * @memberof google.privacy.dlp.v2.Domain + * @instance + */ + Domain.prototype.category = 0; + + /** + * Domain signals. + * @member {Array.} signals + * @memberof google.privacy.dlp.v2.Domain + * @instance + */ + Domain.prototype.signals = $util.emptyArray; + + /** + * Creates a new Domain instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Domain + * @static + * @param {google.privacy.dlp.v2.IDomain=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Domain} Domain instance + */ + Domain.create = function create(properties) { + return new Domain(properties); + }; + + /** + * Encodes the specified Domain message. Does not implicitly {@link google.privacy.dlp.v2.Domain.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Domain + * @static + * @param {google.privacy.dlp.v2.IDomain} message Domain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Domain.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.category != null && Object.hasOwnProperty.call(message, "category")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.category); + if (message.signals != null && message.signals.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.signals.length; ++i) + writer.int32(message.signals[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Domain message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Domain.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Domain + * @static + * @param {google.privacy.dlp.v2.IDomain} message Domain message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Domain.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Domain message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Domain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Domain} Domain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Domain.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Domain(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.category = reader.int32(); + break; + } + case 2: { + if (!(message.signals && message.signals.length)) + message.signals = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.signals.push(reader.int32()); + } else + message.signals.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Domain message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Domain + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Domain} Domain + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Domain.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Domain message. + * @function verify + * @memberof google.privacy.dlp.v2.Domain + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Domain.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.category != null && message.hasOwnProperty("category")) + switch (message.category) { + default: + return "category: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.signals != null && message.hasOwnProperty("signals")) { + if (!Array.isArray(message.signals)) + return "signals: array expected"; + for (var i = 0; i < message.signals.length; ++i) + switch (message.signals[i]) { + default: + return "signals: enum value[] expected"; + case 0: + case 1: + case 2: + case 7: + case 3: + case 4: + case 5: + case 6: + break; + } + } + return null; + }; + + /** + * Creates a Domain message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Domain + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Domain} Domain + */ + Domain.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Domain) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.Domain(); + switch (object.category) { + default: + if (typeof object.category === "number") { + message.category = object.category; + break; + } + break; + case "CATEGORY_UNSPECIFIED": + case 0: + message.category = 0; + break; + case "AI": + case 1: + message.category = 1; + break; + case "CODE": + case 2: + message.category = 2; + break; + } + if (object.signals) { + if (!Array.isArray(object.signals)) + throw TypeError(".google.privacy.dlp.v2.Domain.signals: array expected"); + message.signals = []; + for (var i = 0; i < object.signals.length; ++i) + switch (object.signals[i]) { + default: + if (typeof object.signals[i] === "number") { + message.signals[i] = object.signals[i]; + break; + } + case "SIGNAL_UNSPECIFIED": + case 0: + message.signals[i] = 0; + break; + case "MODEL": + case 1: + message.signals[i] = 1; + break; + case "TEXT_EMBEDDING": + case 2: + message.signals[i] = 2; + break; + case "EMBEDDING": + case 7: + message.signals[i] = 7; + break; + case "VERTEX_PLUGIN": + case 3: + message.signals[i] = 3; + break; + case "VECTOR_PLUGIN": + case 4: + message.signals[i] = 4; + break; + case "SOURCE_CODE": + case 5: + message.signals[i] = 5; + break; + case "SERVICE": + case 6: + message.signals[i] = 6; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a Domain message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Domain + * @static + * @param {google.privacy.dlp.v2.Domain} message Domain + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Domain.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.signals = []; + if (options.defaults) + object.category = options.enums === String ? "CATEGORY_UNSPECIFIED" : 0; + if (message.category != null && message.hasOwnProperty("category")) + object.category = options.enums === String ? $root.google.privacy.dlp.v2.Domain.Category[message.category] === undefined ? message.category : $root.google.privacy.dlp.v2.Domain.Category[message.category] : message.category; + if (message.signals && message.signals.length) { + object.signals = []; + for (var j = 0; j < message.signals.length; ++j) + object.signals[j] = options.enums === String ? $root.google.privacy.dlp.v2.Domain.Signal[message.signals[j]] === undefined ? message.signals[j] : $root.google.privacy.dlp.v2.Domain.Signal[message.signals[j]] : message.signals[j]; + } + return object; + }; + + /** + * Converts this Domain to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Domain + * @instance + * @returns {Object.} JSON object + */ + Domain.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Domain + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Domain + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Domain.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Domain"; + }; + + /** + * Category enum. + * @name google.privacy.dlp.v2.Domain.Category + * @enum {number} + * @property {number} CATEGORY_UNSPECIFIED=0 CATEGORY_UNSPECIFIED value + * @property {number} AI=1 AI value + * @property {number} CODE=2 CODE value + */ + Domain.Category = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CATEGORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "AI"] = 1; + values[valuesById[2] = "CODE"] = 2; + return values; + })(); + + /** + * Signal enum. + * @name google.privacy.dlp.v2.Domain.Signal + * @enum {number} + * @property {number} SIGNAL_UNSPECIFIED=0 SIGNAL_UNSPECIFIED value + * @property {number} MODEL=1 MODEL value + * @property {number} TEXT_EMBEDDING=2 TEXT_EMBEDDING value + * @property {number} EMBEDDING=7 EMBEDDING value + * @property {number} VERTEX_PLUGIN=3 VERTEX_PLUGIN value + * @property {number} VECTOR_PLUGIN=4 VECTOR_PLUGIN value + * @property {number} SOURCE_CODE=5 SOURCE_CODE value + * @property {number} SERVICE=6 SERVICE value + */ + Domain.Signal = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SIGNAL_UNSPECIFIED"] = 0; + values[valuesById[1] = "MODEL"] = 1; + values[valuesById[2] = "TEXT_EMBEDDING"] = 2; + values[valuesById[7] = "EMBEDDING"] = 7; + values[valuesById[3] = "VERTEX_PLUGIN"] = 3; + values[valuesById[4] = "VECTOR_PLUGIN"] = 4; + values[valuesById[5] = "SOURCE_CODE"] = 5; + values[valuesById[6] = "SERVICE"] = 6; + return values; + })(); + + return Domain; + })(); + + v2.InfoType = (function() { + + /** + * Properties of an InfoType. + * @memberof google.privacy.dlp.v2 + * @interface IInfoType + * @property {string|null} [name] InfoType name + * @property {string|null} [version] InfoType version + * @property {google.privacy.dlp.v2.ISensitivityScore|null} [sensitivityScore] InfoType sensitivityScore + */ + + /** + * Constructs a new InfoType. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an InfoType. + * @implements IInfoType + * @constructor + * @param {google.privacy.dlp.v2.IInfoType=} [properties] Properties to set + */ + function InfoType(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * InfoType name. + * @member {string} name + * @memberof google.privacy.dlp.v2.InfoType + * @instance + */ + InfoType.prototype.name = ""; + + /** + * InfoType version. + * @member {string} version + * @memberof google.privacy.dlp.v2.InfoType + * @instance + */ + InfoType.prototype.version = ""; + + /** + * InfoType sensitivityScore. + * @member {google.privacy.dlp.v2.ISensitivityScore|null|undefined} sensitivityScore + * @memberof google.privacy.dlp.v2.InfoType + * @instance + */ + InfoType.prototype.sensitivityScore = null; + + /** + * Creates a new InfoType instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.InfoType + * @static + * @param {google.privacy.dlp.v2.IInfoType=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.InfoType} InfoType instance + */ + InfoType.create = function create(properties) { + return new InfoType(properties); + }; + + /** + * Encodes the specified InfoType message. Does not implicitly {@link google.privacy.dlp.v2.InfoType.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.InfoType + * @static + * @param {google.privacy.dlp.v2.IInfoType} message InfoType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfoType.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.version); + if (message.sensitivityScore != null && Object.hasOwnProperty.call(message, "sensitivityScore")) + $root.google.privacy.dlp.v2.SensitivityScore.encode(message.sensitivityScore, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified InfoType message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.InfoType.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.InfoType + * @static + * @param {google.privacy.dlp.v2.IInfoType} message InfoType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + InfoType.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an InfoType message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.InfoType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.InfoType} InfoType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfoType.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.InfoType(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.version = reader.string(); + break; + } + case 3: { + message.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an InfoType message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.InfoType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.InfoType} InfoType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + InfoType.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an InfoType message. + * @function verify + * @memberof google.privacy.dlp.v2.InfoType + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + InfoType.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.sensitivityScore != null && message.hasOwnProperty("sensitivityScore")) { + var error = $root.google.privacy.dlp.v2.SensitivityScore.verify(message.sensitivityScore, long + 1); + if (error) + return "sensitivityScore." + error; + } + return null; + }; + + /** + * Creates an InfoType message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.InfoType + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.InfoType} InfoType + */ + InfoType.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.InfoType) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.InfoType(); + if (object.name != null) + message.name = String(object.name); + if (object.version != null) + message.version = String(object.version); + if (object.sensitivityScore != null) { + if (typeof object.sensitivityScore !== "object") + throw TypeError(".google.privacy.dlp.v2.InfoType.sensitivityScore: object expected"); + message.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.fromObject(object.sensitivityScore, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an InfoType message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.InfoType + * @static + * @param {google.privacy.dlp.v2.InfoType} message InfoType + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + InfoType.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.version = ""; + object.sensitivityScore = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.sensitivityScore != null && message.hasOwnProperty("sensitivityScore")) + object.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.toObject(message.sensitivityScore, options); + return object; + }; + + /** + * Converts this InfoType to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.InfoType + * @instance + * @returns {Object.} JSON object + */ + InfoType.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for InfoType + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.InfoType + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + InfoType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.InfoType"; + }; + + return InfoType; + })(); + + v2.SensitivityScore = (function() { + + /** + * Properties of a SensitivityScore. + * @memberof google.privacy.dlp.v2 + * @interface ISensitivityScore + * @property {google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel|null} [score] SensitivityScore score + */ + + /** + * Constructs a new SensitivityScore. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a SensitivityScore. + * @implements ISensitivityScore + * @constructor + * @param {google.privacy.dlp.v2.ISensitivityScore=} [properties] Properties to set + */ + function SensitivityScore(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SensitivityScore score. + * @member {google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel} score + * @memberof google.privacy.dlp.v2.SensitivityScore + * @instance + */ + SensitivityScore.prototype.score = 0; + + /** + * Creates a new SensitivityScore instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.SensitivityScore + * @static + * @param {google.privacy.dlp.v2.ISensitivityScore=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.SensitivityScore} SensitivityScore instance + */ + SensitivityScore.create = function create(properties) { + return new SensitivityScore(properties); + }; + + /** + * Encodes the specified SensitivityScore message. Does not implicitly {@link google.privacy.dlp.v2.SensitivityScore.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.SensitivityScore + * @static + * @param {google.privacy.dlp.v2.ISensitivityScore} message SensitivityScore message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SensitivityScore.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.score != null && Object.hasOwnProperty.call(message, "score")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.score); + return writer; + }; + + /** + * Encodes the specified SensitivityScore message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.SensitivityScore.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.SensitivityScore + * @static + * @param {google.privacy.dlp.v2.ISensitivityScore} message SensitivityScore message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SensitivityScore.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SensitivityScore message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.SensitivityScore + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.SensitivityScore} SensitivityScore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SensitivityScore.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.SensitivityScore(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.score = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SensitivityScore message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.SensitivityScore + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.SensitivityScore} SensitivityScore + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SensitivityScore.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SensitivityScore message. + * @function verify + * @memberof google.privacy.dlp.v2.SensitivityScore + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SensitivityScore.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.score != null && message.hasOwnProperty("score")) + switch (message.score) { + default: + return "score: enum value expected"; + case 0: + case 10: + case 12: + case 20: + case 30: + break; + } + return null; + }; + + /** + * Creates a SensitivityScore message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.SensitivityScore + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.SensitivityScore} SensitivityScore + */ + SensitivityScore.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.SensitivityScore) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.SensitivityScore(); + switch (object.score) { + default: + if (typeof object.score === "number") { + message.score = object.score; + break; + } + break; + case "SENSITIVITY_SCORE_UNSPECIFIED": + case 0: + message.score = 0; + break; + case "SENSITIVITY_LOW": + case 10: + message.score = 10; + break; + case "SENSITIVITY_UNKNOWN": + case 12: + message.score = 12; + break; + case "SENSITIVITY_MODERATE": + case 20: + message.score = 20; + break; + case "SENSITIVITY_HIGH": + case 30: + message.score = 30; + break; + } + return message; + }; + + /** + * Creates a plain object from a SensitivityScore message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.SensitivityScore + * @static + * @param {google.privacy.dlp.v2.SensitivityScore} message SensitivityScore + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SensitivityScore.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.score = options.enums === String ? "SENSITIVITY_SCORE_UNSPECIFIED" : 0; + if (message.score != null && message.hasOwnProperty("score")) + object.score = options.enums === String ? $root.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel[message.score] === undefined ? message.score : $root.google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel[message.score] : message.score; + return object; + }; + + /** + * Converts this SensitivityScore to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.SensitivityScore + * @instance + * @returns {Object.} JSON object + */ + SensitivityScore.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SensitivityScore + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.SensitivityScore + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SensitivityScore.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.SensitivityScore"; + }; + + /** + * SensitivityScoreLevel enum. + * @name google.privacy.dlp.v2.SensitivityScore.SensitivityScoreLevel + * @enum {number} + * @property {number} SENSITIVITY_SCORE_UNSPECIFIED=0 SENSITIVITY_SCORE_UNSPECIFIED value + * @property {number} SENSITIVITY_LOW=10 SENSITIVITY_LOW value + * @property {number} SENSITIVITY_UNKNOWN=12 SENSITIVITY_UNKNOWN value + * @property {number} SENSITIVITY_MODERATE=20 SENSITIVITY_MODERATE value + * @property {number} SENSITIVITY_HIGH=30 SENSITIVITY_HIGH value + */ + SensitivityScore.SensitivityScoreLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SENSITIVITY_SCORE_UNSPECIFIED"] = 0; + values[valuesById[10] = "SENSITIVITY_LOW"] = 10; + values[valuesById[12] = "SENSITIVITY_UNKNOWN"] = 12; + values[valuesById[20] = "SENSITIVITY_MODERATE"] = 20; + values[valuesById[30] = "SENSITIVITY_HIGH"] = 30; + return values; + })(); + + return SensitivityScore; + })(); + + /** + * Likelihood enum. + * @name google.privacy.dlp.v2.Likelihood + * @enum {number} + * @property {number} LIKELIHOOD_UNSPECIFIED=0 LIKELIHOOD_UNSPECIFIED value + * @property {number} VERY_UNLIKELY=1 VERY_UNLIKELY value + * @property {number} UNLIKELY=2 UNLIKELY value + * @property {number} POSSIBLE=3 POSSIBLE value + * @property {number} LIKELY=4 LIKELY value + * @property {number} VERY_LIKELY=5 VERY_LIKELY value + */ + v2.Likelihood = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LIKELIHOOD_UNSPECIFIED"] = 0; + values[valuesById[1] = "VERY_UNLIKELY"] = 1; + values[valuesById[2] = "UNLIKELY"] = 2; + values[valuesById[3] = "POSSIBLE"] = 3; + values[valuesById[4] = "LIKELY"] = 4; + values[valuesById[5] = "VERY_LIKELY"] = 5; + return values; + })(); + + v2.StoredType = (function() { + + /** + * Properties of a StoredType. + * @memberof google.privacy.dlp.v2 + * @interface IStoredType + * @property {string|null} [name] StoredType name + * @property {google.protobuf.ITimestamp|null} [createTime] StoredType createTime + */ + + /** + * Constructs a new StoredType. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a StoredType. + * @implements IStoredType + * @constructor + * @param {google.privacy.dlp.v2.IStoredType=} [properties] Properties to set + */ + function StoredType(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * StoredType name. + * @member {string} name + * @memberof google.privacy.dlp.v2.StoredType + * @instance + */ + StoredType.prototype.name = ""; + + /** + * StoredType createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.privacy.dlp.v2.StoredType + * @instance + */ + StoredType.prototype.createTime = null; + + /** + * Creates a new StoredType instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.StoredType + * @static + * @param {google.privacy.dlp.v2.IStoredType=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.StoredType} StoredType instance + */ + StoredType.create = function create(properties) { + return new StoredType(properties); + }; + + /** + * Encodes the specified StoredType message. Does not implicitly {@link google.privacy.dlp.v2.StoredType.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.StoredType + * @static + * @param {google.privacy.dlp.v2.IStoredType} message StoredType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoredType.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StoredType message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StoredType.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.StoredType + * @static + * @param {google.privacy.dlp.v2.IStoredType} message StoredType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StoredType.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StoredType message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.StoredType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.StoredType} StoredType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoredType.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.StoredType(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a StoredType message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.StoredType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.StoredType} StoredType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StoredType.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StoredType message. + * @function verify + * @memberof google.privacy.dlp.v2.StoredType + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StoredType.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime, long + 1); + if (error) + return "createTime." + error; + } + return null; + }; + + /** + * Creates a StoredType message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.StoredType + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.StoredType} StoredType + */ + StoredType.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.StoredType) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.StoredType(); + if (object.name != null) + message.name = String(object.name); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.privacy.dlp.v2.StoredType.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a StoredType message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.StoredType + * @static + * @param {google.privacy.dlp.v2.StoredType} message StoredType + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StoredType.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.createTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + return object; + }; + + /** + * Converts this StoredType to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.StoredType + * @instance + * @returns {Object.} JSON object + */ + StoredType.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StoredType + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.StoredType + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StoredType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.StoredType"; + }; + + return StoredType; + })(); + + v2.CustomInfoType = (function() { + + /** + * Properties of a CustomInfoType. + * @memberof google.privacy.dlp.v2 + * @interface ICustomInfoType + * @property {google.privacy.dlp.v2.IInfoType|null} [infoType] CustomInfoType infoType + * @property {google.privacy.dlp.v2.Likelihood|null} [likelihood] CustomInfoType likelihood + * @property {google.privacy.dlp.v2.CustomInfoType.IDictionary|null} [dictionary] CustomInfoType dictionary + * @property {google.privacy.dlp.v2.CustomInfoType.IRegex|null} [regex] CustomInfoType regex + * @property {google.privacy.dlp.v2.CustomInfoType.ISurrogateType|null} [surrogateType] CustomInfoType surrogateType + * @property {google.privacy.dlp.v2.IStoredType|null} [storedType] CustomInfoType storedType + * @property {google.privacy.dlp.v2.CustomInfoType.IMetadataKeyValueExpression|null} [metadataKeyValueExpression] CustomInfoType metadataKeyValueExpression + * @property {Array.|null} [detectionRules] CustomInfoType detectionRules + * @property {google.privacy.dlp.v2.CustomInfoType.ExclusionType|null} [exclusionType] CustomInfoType exclusionType + * @property {google.privacy.dlp.v2.ISensitivityScore|null} [sensitivityScore] CustomInfoType sensitivityScore + */ + + /** + * Constructs a new CustomInfoType. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CustomInfoType. + * @implements ICustomInfoType + * @constructor + * @param {google.privacy.dlp.v2.ICustomInfoType=} [properties] Properties to set + */ + function CustomInfoType(properties) { + this.detectionRules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomInfoType infoType. + * @member {google.privacy.dlp.v2.IInfoType|null|undefined} infoType + * @memberof google.privacy.dlp.v2.CustomInfoType + * @instance + */ + CustomInfoType.prototype.infoType = null; + + /** + * CustomInfoType likelihood. + * @member {google.privacy.dlp.v2.Likelihood} likelihood + * @memberof google.privacy.dlp.v2.CustomInfoType + * @instance + */ + CustomInfoType.prototype.likelihood = 0; + + /** + * CustomInfoType dictionary. + * @member {google.privacy.dlp.v2.CustomInfoType.IDictionary|null|undefined} dictionary + * @memberof google.privacy.dlp.v2.CustomInfoType + * @instance + */ + CustomInfoType.prototype.dictionary = null; + + /** + * CustomInfoType regex. + * @member {google.privacy.dlp.v2.CustomInfoType.IRegex|null|undefined} regex + * @memberof google.privacy.dlp.v2.CustomInfoType + * @instance + */ + CustomInfoType.prototype.regex = null; + + /** + * CustomInfoType surrogateType. + * @member {google.privacy.dlp.v2.CustomInfoType.ISurrogateType|null|undefined} surrogateType + * @memberof google.privacy.dlp.v2.CustomInfoType + * @instance + */ + CustomInfoType.prototype.surrogateType = null; + + /** + * CustomInfoType storedType. + * @member {google.privacy.dlp.v2.IStoredType|null|undefined} storedType + * @memberof google.privacy.dlp.v2.CustomInfoType + * @instance + */ + CustomInfoType.prototype.storedType = null; + + /** + * CustomInfoType metadataKeyValueExpression. + * @member {google.privacy.dlp.v2.CustomInfoType.IMetadataKeyValueExpression|null|undefined} metadataKeyValueExpression + * @memberof google.privacy.dlp.v2.CustomInfoType + * @instance + */ + CustomInfoType.prototype.metadataKeyValueExpression = null; + + /** + * CustomInfoType detectionRules. + * @member {Array.} detectionRules + * @memberof google.privacy.dlp.v2.CustomInfoType + * @instance + */ + CustomInfoType.prototype.detectionRules = $util.emptyArray; + + /** + * CustomInfoType exclusionType. + * @member {google.privacy.dlp.v2.CustomInfoType.ExclusionType} exclusionType + * @memberof google.privacy.dlp.v2.CustomInfoType + * @instance + */ + CustomInfoType.prototype.exclusionType = 0; + + /** + * CustomInfoType sensitivityScore. + * @member {google.privacy.dlp.v2.ISensitivityScore|null|undefined} sensitivityScore + * @memberof google.privacy.dlp.v2.CustomInfoType + * @instance + */ + CustomInfoType.prototype.sensitivityScore = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CustomInfoType type. + * @member {"dictionary"|"regex"|"surrogateType"|"storedType"|"metadataKeyValueExpression"|undefined} type + * @memberof google.privacy.dlp.v2.CustomInfoType + * @instance + */ + Object.defineProperty(CustomInfoType.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["dictionary", "regex", "surrogateType", "storedType", "metadataKeyValueExpression"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new CustomInfoType instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CustomInfoType + * @static + * @param {google.privacy.dlp.v2.ICustomInfoType=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CustomInfoType} CustomInfoType instance + */ + CustomInfoType.create = function create(properties) { + return new CustomInfoType(properties); + }; + + /** + * Encodes the specified CustomInfoType message. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CustomInfoType + * @static + * @param {google.privacy.dlp.v2.ICustomInfoType} message CustomInfoType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomInfoType.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.infoType != null && Object.hasOwnProperty.call(message, "infoType")) + $root.google.privacy.dlp.v2.InfoType.encode(message.infoType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.dictionary != null && Object.hasOwnProperty.call(message, "dictionary")) + $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.encode(message.dictionary, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.regex != null && Object.hasOwnProperty.call(message, "regex")) + $root.google.privacy.dlp.v2.CustomInfoType.Regex.encode(message.regex, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.surrogateType != null && Object.hasOwnProperty.call(message, "surrogateType")) + $root.google.privacy.dlp.v2.CustomInfoType.SurrogateType.encode(message.surrogateType, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.storedType != null && Object.hasOwnProperty.call(message, "storedType")) + $root.google.privacy.dlp.v2.StoredType.encode(message.storedType, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.likelihood != null && Object.hasOwnProperty.call(message, "likelihood")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.likelihood); + if (message.detectionRules != null && message.detectionRules.length) + for (var i = 0; i < message.detectionRules.length; ++i) + $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.encode(message.detectionRules[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.exclusionType != null && Object.hasOwnProperty.call(message, "exclusionType")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.exclusionType); + if (message.sensitivityScore != null && Object.hasOwnProperty.call(message, "sensitivityScore")) + $root.google.privacy.dlp.v2.SensitivityScore.encode(message.sensitivityScore, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.metadataKeyValueExpression != null && Object.hasOwnProperty.call(message, "metadataKeyValueExpression")) + $root.google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression.encode(message.metadataKeyValueExpression, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CustomInfoType message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CustomInfoType + * @static + * @param {google.privacy.dlp.v2.ICustomInfoType} message CustomInfoType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomInfoType.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomInfoType message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CustomInfoType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CustomInfoType} CustomInfoType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomInfoType.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CustomInfoType(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.infoType = $root.google.privacy.dlp.v2.InfoType.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.likelihood = reader.int32(); + break; + } + case 2: { + message.dictionary = $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.regex = $root.google.privacy.dlp.v2.CustomInfoType.Regex.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.surrogateType = $root.google.privacy.dlp.v2.CustomInfoType.SurrogateType.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.storedType = $root.google.privacy.dlp.v2.StoredType.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 10: { + message.metadataKeyValueExpression = $root.google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 7: { + if (!(message.detectionRules && message.detectionRules.length)) + message.detectionRules = []; + message.detectionRules.push($root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 8: { + message.exclusionType = reader.int32(); + break; + } + case 9: { + message.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CustomInfoType message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CustomInfoType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CustomInfoType} CustomInfoType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomInfoType.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomInfoType message. + * @function verify + * @memberof google.privacy.dlp.v2.CustomInfoType + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomInfoType.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.infoType != null && message.hasOwnProperty("infoType")) { + var error = $root.google.privacy.dlp.v2.InfoType.verify(message.infoType, long + 1); + if (error) + return "infoType." + error; + } + if (message.likelihood != null && message.hasOwnProperty("likelihood")) + switch (message.likelihood) { + default: + return "likelihood: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.dictionary != null && message.hasOwnProperty("dictionary")) { + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.verify(message.dictionary, long + 1); + if (error) + return "dictionary." + error; + } + } + if (message.regex != null && message.hasOwnProperty("regex")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.CustomInfoType.Regex.verify(message.regex, long + 1); + if (error) + return "regex." + error; + } + } + if (message.surrogateType != null && message.hasOwnProperty("surrogateType")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.CustomInfoType.SurrogateType.verify(message.surrogateType, long + 1); + if (error) + return "surrogateType." + error; + } + } + if (message.storedType != null && message.hasOwnProperty("storedType")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.StoredType.verify(message.storedType, long + 1); + if (error) + return "storedType." + error; + } + } + if (message.metadataKeyValueExpression != null && message.hasOwnProperty("metadataKeyValueExpression")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression.verify(message.metadataKeyValueExpression, long + 1); + if (error) + return "metadataKeyValueExpression." + error; + } + } + if (message.detectionRules != null && message.hasOwnProperty("detectionRules")) { + if (!Array.isArray(message.detectionRules)) + return "detectionRules: array expected"; + for (var i = 0; i < message.detectionRules.length; ++i) { + var error = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.verify(message.detectionRules[i], long + 1); + if (error) + return "detectionRules." + error; + } + } + if (message.exclusionType != null && message.hasOwnProperty("exclusionType")) + switch (message.exclusionType) { + default: + return "exclusionType: enum value expected"; + case 0: + case 1: + break; + } + if (message.sensitivityScore != null && message.hasOwnProperty("sensitivityScore")) { + var error = $root.google.privacy.dlp.v2.SensitivityScore.verify(message.sensitivityScore, long + 1); + if (error) + return "sensitivityScore." + error; + } + return null; + }; + + /** + * Creates a CustomInfoType message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CustomInfoType + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CustomInfoType} CustomInfoType + */ + CustomInfoType.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CustomInfoType) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CustomInfoType(); + if (object.infoType != null) { + if (typeof object.infoType !== "object") + throw TypeError(".google.privacy.dlp.v2.CustomInfoType.infoType: object expected"); + message.infoType = $root.google.privacy.dlp.v2.InfoType.fromObject(object.infoType, long + 1); + } + switch (object.likelihood) { + default: + if (typeof object.likelihood === "number") { + message.likelihood = object.likelihood; + break; + } + break; + case "LIKELIHOOD_UNSPECIFIED": + case 0: + message.likelihood = 0; + break; + case "VERY_UNLIKELY": + case 1: + message.likelihood = 1; + break; + case "UNLIKELY": + case 2: + message.likelihood = 2; + break; + case "POSSIBLE": + case 3: + message.likelihood = 3; + break; + case "LIKELY": + case 4: + message.likelihood = 4; + break; + case "VERY_LIKELY": + case 5: + message.likelihood = 5; + break; + } + if (object.dictionary != null) { + if (typeof object.dictionary !== "object") + throw TypeError(".google.privacy.dlp.v2.CustomInfoType.dictionary: object expected"); + message.dictionary = $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.fromObject(object.dictionary, long + 1); + } + if (object.regex != null) { + if (typeof object.regex !== "object") + throw TypeError(".google.privacy.dlp.v2.CustomInfoType.regex: object expected"); + message.regex = $root.google.privacy.dlp.v2.CustomInfoType.Regex.fromObject(object.regex, long + 1); + } + if (object.surrogateType != null) { + if (typeof object.surrogateType !== "object") + throw TypeError(".google.privacy.dlp.v2.CustomInfoType.surrogateType: object expected"); + message.surrogateType = $root.google.privacy.dlp.v2.CustomInfoType.SurrogateType.fromObject(object.surrogateType, long + 1); + } + if (object.storedType != null) { + if (typeof object.storedType !== "object") + throw TypeError(".google.privacy.dlp.v2.CustomInfoType.storedType: object expected"); + message.storedType = $root.google.privacy.dlp.v2.StoredType.fromObject(object.storedType, long + 1); + } + if (object.metadataKeyValueExpression != null) { + if (typeof object.metadataKeyValueExpression !== "object") + throw TypeError(".google.privacy.dlp.v2.CustomInfoType.metadataKeyValueExpression: object expected"); + message.metadataKeyValueExpression = $root.google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression.fromObject(object.metadataKeyValueExpression, long + 1); + } + if (object.detectionRules) { + if (!Array.isArray(object.detectionRules)) + throw TypeError(".google.privacy.dlp.v2.CustomInfoType.detectionRules: array expected"); + message.detectionRules = []; + for (var i = 0; i < object.detectionRules.length; ++i) { + if (typeof object.detectionRules[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.CustomInfoType.detectionRules: object expected"); + message.detectionRules[i] = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.fromObject(object.detectionRules[i], long + 1); + } + } + switch (object.exclusionType) { + default: + if (typeof object.exclusionType === "number") { + message.exclusionType = object.exclusionType; + break; + } + break; + case "EXCLUSION_TYPE_UNSPECIFIED": + case 0: + message.exclusionType = 0; + break; + case "EXCLUSION_TYPE_EXCLUDE": + case 1: + message.exclusionType = 1; + break; + } + if (object.sensitivityScore != null) { + if (typeof object.sensitivityScore !== "object") + throw TypeError(".google.privacy.dlp.v2.CustomInfoType.sensitivityScore: object expected"); + message.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.fromObject(object.sensitivityScore, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CustomInfoType message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CustomInfoType + * @static + * @param {google.privacy.dlp.v2.CustomInfoType} message CustomInfoType + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomInfoType.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.detectionRules = []; + if (options.defaults) { + object.infoType = null; + object.likelihood = options.enums === String ? "LIKELIHOOD_UNSPECIFIED" : 0; + object.exclusionType = options.enums === String ? "EXCLUSION_TYPE_UNSPECIFIED" : 0; + object.sensitivityScore = null; + } + if (message.infoType != null && message.hasOwnProperty("infoType")) + object.infoType = $root.google.privacy.dlp.v2.InfoType.toObject(message.infoType, options); + if (message.dictionary != null && message.hasOwnProperty("dictionary")) { + object.dictionary = $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.toObject(message.dictionary, options); + if (options.oneofs) + object.type = "dictionary"; + } + if (message.regex != null && message.hasOwnProperty("regex")) { + object.regex = $root.google.privacy.dlp.v2.CustomInfoType.Regex.toObject(message.regex, options); + if (options.oneofs) + object.type = "regex"; + } + if (message.surrogateType != null && message.hasOwnProperty("surrogateType")) { + object.surrogateType = $root.google.privacy.dlp.v2.CustomInfoType.SurrogateType.toObject(message.surrogateType, options); + if (options.oneofs) + object.type = "surrogateType"; + } + if (message.storedType != null && message.hasOwnProperty("storedType")) { + object.storedType = $root.google.privacy.dlp.v2.StoredType.toObject(message.storedType, options); + if (options.oneofs) + object.type = "storedType"; + } + if (message.likelihood != null && message.hasOwnProperty("likelihood")) + object.likelihood = options.enums === String ? $root.google.privacy.dlp.v2.Likelihood[message.likelihood] === undefined ? message.likelihood : $root.google.privacy.dlp.v2.Likelihood[message.likelihood] : message.likelihood; + if (message.detectionRules && message.detectionRules.length) { + object.detectionRules = []; + for (var j = 0; j < message.detectionRules.length; ++j) + object.detectionRules[j] = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.toObject(message.detectionRules[j], options); + } + if (message.exclusionType != null && message.hasOwnProperty("exclusionType")) + object.exclusionType = options.enums === String ? $root.google.privacy.dlp.v2.CustomInfoType.ExclusionType[message.exclusionType] === undefined ? message.exclusionType : $root.google.privacy.dlp.v2.CustomInfoType.ExclusionType[message.exclusionType] : message.exclusionType; + if (message.sensitivityScore != null && message.hasOwnProperty("sensitivityScore")) + object.sensitivityScore = $root.google.privacy.dlp.v2.SensitivityScore.toObject(message.sensitivityScore, options); + if (message.metadataKeyValueExpression != null && message.hasOwnProperty("metadataKeyValueExpression")) { + object.metadataKeyValueExpression = $root.google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression.toObject(message.metadataKeyValueExpression, options); + if (options.oneofs) + object.type = "metadataKeyValueExpression"; + } + return object; + }; + + /** + * Converts this CustomInfoType to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CustomInfoType + * @instance + * @returns {Object.} JSON object + */ + CustomInfoType.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomInfoType + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CustomInfoType + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomInfoType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CustomInfoType"; + }; + + CustomInfoType.Dictionary = (function() { + + /** + * Properties of a Dictionary. + * @memberof google.privacy.dlp.v2.CustomInfoType + * @interface IDictionary + * @property {google.privacy.dlp.v2.CustomInfoType.Dictionary.IWordList|null} [wordList] Dictionary wordList + * @property {google.privacy.dlp.v2.ICloudStoragePath|null} [cloudStoragePath] Dictionary cloudStoragePath + */ + + /** + * Constructs a new Dictionary. + * @memberof google.privacy.dlp.v2.CustomInfoType + * @classdesc Represents a Dictionary. + * @implements IDictionary + * @constructor + * @param {google.privacy.dlp.v2.CustomInfoType.IDictionary=} [properties] Properties to set + */ + function Dictionary(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Dictionary wordList. + * @member {google.privacy.dlp.v2.CustomInfoType.Dictionary.IWordList|null|undefined} wordList + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary + * @instance + */ + Dictionary.prototype.wordList = null; + + /** + * Dictionary cloudStoragePath. + * @member {google.privacy.dlp.v2.ICloudStoragePath|null|undefined} cloudStoragePath + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary + * @instance + */ + Dictionary.prototype.cloudStoragePath = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Dictionary source. + * @member {"wordList"|"cloudStoragePath"|undefined} source + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary + * @instance + */ + Object.defineProperty(Dictionary.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["wordList", "cloudStoragePath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Dictionary instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.IDictionary=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CustomInfoType.Dictionary} Dictionary instance + */ + Dictionary.create = function create(properties) { + return new Dictionary(properties); + }; + + /** + * Encodes the specified Dictionary message. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.Dictionary.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.IDictionary} message Dictionary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Dictionary.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.wordList != null && Object.hasOwnProperty.call(message, "wordList")) + $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.encode(message.wordList, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.cloudStoragePath != null && Object.hasOwnProperty.call(message, "cloudStoragePath")) + $root.google.privacy.dlp.v2.CloudStoragePath.encode(message.cloudStoragePath, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Dictionary message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.Dictionary.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.IDictionary} message Dictionary message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Dictionary.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Dictionary message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CustomInfoType.Dictionary} Dictionary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Dictionary.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CustomInfoType.Dictionary(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.wordList = $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.cloudStoragePath = $root.google.privacy.dlp.v2.CloudStoragePath.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Dictionary message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CustomInfoType.Dictionary} Dictionary + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Dictionary.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Dictionary message. + * @function verify + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Dictionary.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.wordList != null && message.hasOwnProperty("wordList")) { + properties.source = 1; + { + var error = $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.verify(message.wordList, long + 1); + if (error) + return "wordList." + error; + } + } + if (message.cloudStoragePath != null && message.hasOwnProperty("cloudStoragePath")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + { + var error = $root.google.privacy.dlp.v2.CloudStoragePath.verify(message.cloudStoragePath, long + 1); + if (error) + return "cloudStoragePath." + error; + } + } + return null; + }; + + /** + * Creates a Dictionary message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CustomInfoType.Dictionary} Dictionary + */ + Dictionary.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CustomInfoType.Dictionary) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CustomInfoType.Dictionary(); + if (object.wordList != null) { + if (typeof object.wordList !== "object") + throw TypeError(".google.privacy.dlp.v2.CustomInfoType.Dictionary.wordList: object expected"); + message.wordList = $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.fromObject(object.wordList, long + 1); + } + if (object.cloudStoragePath != null) { + if (typeof object.cloudStoragePath !== "object") + throw TypeError(".google.privacy.dlp.v2.CustomInfoType.Dictionary.cloudStoragePath: object expected"); + message.cloudStoragePath = $root.google.privacy.dlp.v2.CloudStoragePath.fromObject(object.cloudStoragePath, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a Dictionary message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.Dictionary} message Dictionary + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Dictionary.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.wordList != null && message.hasOwnProperty("wordList")) { + object.wordList = $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.toObject(message.wordList, options); + if (options.oneofs) + object.source = "wordList"; + } + if (message.cloudStoragePath != null && message.hasOwnProperty("cloudStoragePath")) { + object.cloudStoragePath = $root.google.privacy.dlp.v2.CloudStoragePath.toObject(message.cloudStoragePath, options); + if (options.oneofs) + object.source = "cloudStoragePath"; + } + return object; + }; + + /** + * Converts this Dictionary to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary + * @instance + * @returns {Object.} JSON object + */ + Dictionary.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Dictionary + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Dictionary.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CustomInfoType.Dictionary"; + }; + + Dictionary.WordList = (function() { + + /** + * Properties of a WordList. + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary + * @interface IWordList + * @property {Array.|null} [words] WordList words + */ + + /** + * Constructs a new WordList. + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary + * @classdesc Represents a WordList. + * @implements IWordList + * @constructor + * @param {google.privacy.dlp.v2.CustomInfoType.Dictionary.IWordList=} [properties] Properties to set + */ + function WordList(properties) { + this.words = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * WordList words. + * @member {Array.} words + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList + * @instance + */ + WordList.prototype.words = $util.emptyArray; + + /** + * Creates a new WordList instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.Dictionary.IWordList=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList} WordList instance + */ + WordList.create = function create(properties) { + return new WordList(properties); + }; + + /** + * Encodes the specified WordList message. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.Dictionary.IWordList} message WordList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WordList.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.words != null && message.words.length) + for (var i = 0; i < message.words.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.words[i]); + return writer; + }; + + /** + * Encodes the specified WordList message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.Dictionary.IWordList} message WordList message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WordList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WordList message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList} WordList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WordList.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.words && message.words.length)) + message.words = []; + message.words.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a WordList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList} WordList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WordList.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WordList message. + * @function verify + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WordList.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.words != null && message.hasOwnProperty("words")) { + if (!Array.isArray(message.words)) + return "words: array expected"; + for (var i = 0; i < message.words.length; ++i) + if (!$util.isString(message.words[i])) + return "words: string[] expected"; + } + return null; + }; + + /** + * Creates a WordList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList} WordList + */ + WordList.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList(); + if (object.words) { + if (!Array.isArray(object.words)) + throw TypeError(".google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList.words: array expected"); + message.words = []; + for (var i = 0; i < object.words.length; ++i) + message.words[i] = String(object.words[i]); + } + return message; + }; + + /** + * Creates a plain object from a WordList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList} message WordList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WordList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.words = []; + if (message.words && message.words.length) { + object.words = []; + for (var j = 0; j < message.words.length; ++j) + object.words[j] = message.words[j]; + } + return object; + }; + + /** + * Converts this WordList to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList + * @instance + * @returns {Object.} JSON object + */ + WordList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WordList + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WordList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CustomInfoType.Dictionary.WordList"; + }; + + return WordList; + })(); + + return Dictionary; + })(); + + CustomInfoType.Regex = (function() { + + /** + * Properties of a Regex. + * @memberof google.privacy.dlp.v2.CustomInfoType + * @interface IRegex + * @property {string|null} [pattern] Regex pattern + * @property {Array.|null} [groupIndexes] Regex groupIndexes + */ + + /** + * Constructs a new Regex. + * @memberof google.privacy.dlp.v2.CustomInfoType + * @classdesc Represents a Regex. + * @implements IRegex + * @constructor + * @param {google.privacy.dlp.v2.CustomInfoType.IRegex=} [properties] Properties to set + */ + function Regex(properties) { + this.groupIndexes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Regex pattern. + * @member {string} pattern + * @memberof google.privacy.dlp.v2.CustomInfoType.Regex + * @instance + */ + Regex.prototype.pattern = ""; + + /** + * Regex groupIndexes. + * @member {Array.} groupIndexes + * @memberof google.privacy.dlp.v2.CustomInfoType.Regex + * @instance + */ + Regex.prototype.groupIndexes = $util.emptyArray; + + /** + * Creates a new Regex instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CustomInfoType.Regex + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.IRegex=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CustomInfoType.Regex} Regex instance + */ + Regex.create = function create(properties) { + return new Regex(properties); + }; + + /** + * Encodes the specified Regex message. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.Regex.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CustomInfoType.Regex + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.IRegex} message Regex message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Regex.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.pattern != null && Object.hasOwnProperty.call(message, "pattern")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.pattern); + if (message.groupIndexes != null && message.groupIndexes.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.groupIndexes.length; ++i) + writer.int32(message.groupIndexes[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Regex message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.Regex.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CustomInfoType.Regex + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.IRegex} message Regex message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Regex.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Regex message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CustomInfoType.Regex + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CustomInfoType.Regex} Regex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Regex.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CustomInfoType.Regex(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.pattern = reader.string(); + break; + } + case 2: { + if (!(message.groupIndexes && message.groupIndexes.length)) + message.groupIndexes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.groupIndexes.push(reader.int32()); + } else + message.groupIndexes.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Regex message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CustomInfoType.Regex + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CustomInfoType.Regex} Regex + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Regex.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Regex message. + * @function verify + * @memberof google.privacy.dlp.v2.CustomInfoType.Regex + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Regex.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.pattern != null && message.hasOwnProperty("pattern")) + if (!$util.isString(message.pattern)) + return "pattern: string expected"; + if (message.groupIndexes != null && message.hasOwnProperty("groupIndexes")) { + if (!Array.isArray(message.groupIndexes)) + return "groupIndexes: array expected"; + for (var i = 0; i < message.groupIndexes.length; ++i) + if (!$util.isInteger(message.groupIndexes[i])) + return "groupIndexes: integer[] expected"; + } + return null; + }; + + /** + * Creates a Regex message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CustomInfoType.Regex + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CustomInfoType.Regex} Regex + */ + Regex.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CustomInfoType.Regex) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CustomInfoType.Regex(); + if (object.pattern != null) + message.pattern = String(object.pattern); + if (object.groupIndexes) { + if (!Array.isArray(object.groupIndexes)) + throw TypeError(".google.privacy.dlp.v2.CustomInfoType.Regex.groupIndexes: array expected"); + message.groupIndexes = []; + for (var i = 0; i < object.groupIndexes.length; ++i) + message.groupIndexes[i] = object.groupIndexes[i] | 0; + } + return message; + }; + + /** + * Creates a plain object from a Regex message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CustomInfoType.Regex + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.Regex} message Regex + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Regex.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.groupIndexes = []; + if (options.defaults) + object.pattern = ""; + if (message.pattern != null && message.hasOwnProperty("pattern")) + object.pattern = message.pattern; + if (message.groupIndexes && message.groupIndexes.length) { + object.groupIndexes = []; + for (var j = 0; j < message.groupIndexes.length; ++j) + object.groupIndexes[j] = message.groupIndexes[j]; + } + return object; + }; + + /** + * Converts this Regex to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CustomInfoType.Regex + * @instance + * @returns {Object.} JSON object + */ + Regex.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Regex + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CustomInfoType.Regex + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Regex.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CustomInfoType.Regex"; + }; + + return Regex; + })(); + + CustomInfoType.SurrogateType = (function() { + + /** + * Properties of a SurrogateType. + * @memberof google.privacy.dlp.v2.CustomInfoType + * @interface ISurrogateType + */ + + /** + * Constructs a new SurrogateType. + * @memberof google.privacy.dlp.v2.CustomInfoType + * @classdesc Represents a SurrogateType. + * @implements ISurrogateType + * @constructor + * @param {google.privacy.dlp.v2.CustomInfoType.ISurrogateType=} [properties] Properties to set + */ + function SurrogateType(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new SurrogateType instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CustomInfoType.SurrogateType + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.ISurrogateType=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CustomInfoType.SurrogateType} SurrogateType instance + */ + SurrogateType.create = function create(properties) { + return new SurrogateType(properties); + }; + + /** + * Encodes the specified SurrogateType message. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.SurrogateType.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CustomInfoType.SurrogateType + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.ISurrogateType} message SurrogateType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SurrogateType.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified SurrogateType message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.SurrogateType.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CustomInfoType.SurrogateType + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.ISurrogateType} message SurrogateType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SurrogateType.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SurrogateType message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CustomInfoType.SurrogateType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CustomInfoType.SurrogateType} SurrogateType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SurrogateType.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CustomInfoType.SurrogateType(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SurrogateType message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CustomInfoType.SurrogateType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CustomInfoType.SurrogateType} SurrogateType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SurrogateType.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SurrogateType message. + * @function verify + * @memberof google.privacy.dlp.v2.CustomInfoType.SurrogateType + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SurrogateType.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a SurrogateType message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CustomInfoType.SurrogateType + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CustomInfoType.SurrogateType} SurrogateType + */ + SurrogateType.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CustomInfoType.SurrogateType) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.privacy.dlp.v2.CustomInfoType.SurrogateType(); + }; + + /** + * Creates a plain object from a SurrogateType message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CustomInfoType.SurrogateType + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.SurrogateType} message SurrogateType + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SurrogateType.toObject = function toObject() { + return {}; + }; + + /** + * Converts this SurrogateType to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CustomInfoType.SurrogateType + * @instance + * @returns {Object.} JSON object + */ + SurrogateType.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SurrogateType + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CustomInfoType.SurrogateType + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SurrogateType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CustomInfoType.SurrogateType"; + }; + + return SurrogateType; + })(); + + CustomInfoType.MetadataKeyValueExpression = (function() { + + /** + * Properties of a MetadataKeyValueExpression. + * @memberof google.privacy.dlp.v2.CustomInfoType + * @interface IMetadataKeyValueExpression + * @property {string|null} [keyRegex] MetadataKeyValueExpression keyRegex + * @property {string|null} [valueRegex] MetadataKeyValueExpression valueRegex + */ + + /** + * Constructs a new MetadataKeyValueExpression. + * @memberof google.privacy.dlp.v2.CustomInfoType + * @classdesc Represents a MetadataKeyValueExpression. + * @implements IMetadataKeyValueExpression + * @constructor + * @param {google.privacy.dlp.v2.CustomInfoType.IMetadataKeyValueExpression=} [properties] Properties to set + */ + function MetadataKeyValueExpression(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * MetadataKeyValueExpression keyRegex. + * @member {string} keyRegex + * @memberof google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression + * @instance + */ + MetadataKeyValueExpression.prototype.keyRegex = ""; + + /** + * MetadataKeyValueExpression valueRegex. + * @member {string} valueRegex + * @memberof google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression + * @instance + */ + MetadataKeyValueExpression.prototype.valueRegex = ""; + + /** + * Creates a new MetadataKeyValueExpression instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.IMetadataKeyValueExpression=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression} MetadataKeyValueExpression instance + */ + MetadataKeyValueExpression.create = function create(properties) { + return new MetadataKeyValueExpression(properties); + }; + + /** + * Encodes the specified MetadataKeyValueExpression message. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.IMetadataKeyValueExpression} message MetadataKeyValueExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetadataKeyValueExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.keyRegex != null && Object.hasOwnProperty.call(message, "keyRegex")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.keyRegex); + if (message.valueRegex != null && Object.hasOwnProperty.call(message, "valueRegex")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.valueRegex); + return writer; + }; + + /** + * Encodes the specified MetadataKeyValueExpression message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.IMetadataKeyValueExpression} message MetadataKeyValueExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetadataKeyValueExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetadataKeyValueExpression message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression} MetadataKeyValueExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetadataKeyValueExpression.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.keyRegex = reader.string(); + break; + } + case 2: { + message.valueRegex = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a MetadataKeyValueExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression} MetadataKeyValueExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetadataKeyValueExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetadataKeyValueExpression message. + * @function verify + * @memberof google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetadataKeyValueExpression.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.keyRegex != null && message.hasOwnProperty("keyRegex")) + if (!$util.isString(message.keyRegex)) + return "keyRegex: string expected"; + if (message.valueRegex != null && message.hasOwnProperty("valueRegex")) + if (!$util.isString(message.valueRegex)) + return "valueRegex: string expected"; + return null; + }; + + /** + * Creates a MetadataKeyValueExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression} MetadataKeyValueExpression + */ + MetadataKeyValueExpression.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression(); + if (object.keyRegex != null) + message.keyRegex = String(object.keyRegex); + if (object.valueRegex != null) + message.valueRegex = String(object.valueRegex); + return message; + }; + + /** + * Creates a plain object from a MetadataKeyValueExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression} message MetadataKeyValueExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetadataKeyValueExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.keyRegex = ""; + object.valueRegex = ""; + } + if (message.keyRegex != null && message.hasOwnProperty("keyRegex")) + object.keyRegex = message.keyRegex; + if (message.valueRegex != null && message.hasOwnProperty("valueRegex")) + object.valueRegex = message.valueRegex; + return object; + }; + + /** + * Converts this MetadataKeyValueExpression to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression + * @instance + * @returns {Object.} JSON object + */ + MetadataKeyValueExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetadataKeyValueExpression + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetadataKeyValueExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CustomInfoType.MetadataKeyValueExpression"; + }; + + return MetadataKeyValueExpression; + })(); + + CustomInfoType.DetectionRule = (function() { + + /** + * Properties of a DetectionRule. + * @memberof google.privacy.dlp.v2.CustomInfoType + * @interface IDetectionRule + * @property {google.privacy.dlp.v2.CustomInfoType.DetectionRule.IHotwordRule|null} [hotwordRule] DetectionRule hotwordRule + */ + + /** + * Constructs a new DetectionRule. + * @memberof google.privacy.dlp.v2.CustomInfoType + * @classdesc Represents a DetectionRule. + * @implements IDetectionRule + * @constructor + * @param {google.privacy.dlp.v2.CustomInfoType.IDetectionRule=} [properties] Properties to set + */ + function DetectionRule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DetectionRule hotwordRule. + * @member {google.privacy.dlp.v2.CustomInfoType.DetectionRule.IHotwordRule|null|undefined} hotwordRule + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule + * @instance + */ + DetectionRule.prototype.hotwordRule = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * DetectionRule type. + * @member {"hotwordRule"|undefined} type + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule + * @instance + */ + Object.defineProperty(DetectionRule.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["hotwordRule"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new DetectionRule instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.IDetectionRule=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CustomInfoType.DetectionRule} DetectionRule instance + */ + DetectionRule.create = function create(properties) { + return new DetectionRule(properties); + }; + + /** + * Encodes the specified DetectionRule message. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.DetectionRule.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.IDetectionRule} message DetectionRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DetectionRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hotwordRule != null && Object.hasOwnProperty.call(message, "hotwordRule")) + $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.encode(message.hotwordRule, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DetectionRule message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.DetectionRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.IDetectionRule} message DetectionRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DetectionRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DetectionRule message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CustomInfoType.DetectionRule} DetectionRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DetectionRule.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.hotwordRule = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DetectionRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CustomInfoType.DetectionRule} DetectionRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DetectionRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DetectionRule message. + * @function verify + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DetectionRule.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.hotwordRule != null && message.hasOwnProperty("hotwordRule")) { + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.verify(message.hotwordRule, long + 1); + if (error) + return "hotwordRule." + error; + } + } + return null; + }; + + /** + * Creates a DetectionRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CustomInfoType.DetectionRule} DetectionRule + */ + DetectionRule.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule(); + if (object.hotwordRule != null) { + if (typeof object.hotwordRule !== "object") + throw TypeError(".google.privacy.dlp.v2.CustomInfoType.DetectionRule.hotwordRule: object expected"); + message.hotwordRule = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.fromObject(object.hotwordRule, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DetectionRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.DetectionRule} message DetectionRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DetectionRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.hotwordRule != null && message.hasOwnProperty("hotwordRule")) { + object.hotwordRule = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.toObject(message.hotwordRule, options); + if (options.oneofs) + object.type = "hotwordRule"; + } + return object; + }; + + /** + * Converts this DetectionRule to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule + * @instance + * @returns {Object.} JSON object + */ + DetectionRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DetectionRule + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DetectionRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CustomInfoType.DetectionRule"; + }; + + DetectionRule.Proximity = (function() { + + /** + * Properties of a Proximity. + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule + * @interface IProximity + * @property {number|null} [windowBefore] Proximity windowBefore + * @property {number|null} [windowAfter] Proximity windowAfter + */ + + /** + * Constructs a new Proximity. + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule + * @classdesc Represents a Proximity. + * @implements IProximity + * @constructor + * @param {google.privacy.dlp.v2.CustomInfoType.DetectionRule.IProximity=} [properties] Properties to set + */ + function Proximity(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Proximity windowBefore. + * @member {number} windowBefore + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity + * @instance + */ + Proximity.prototype.windowBefore = 0; + + /** + * Proximity windowAfter. + * @member {number} windowAfter + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity + * @instance + */ + Proximity.prototype.windowAfter = 0; + + /** + * Creates a new Proximity instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.DetectionRule.IProximity=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity} Proximity instance + */ + Proximity.create = function create(properties) { + return new Proximity(properties); + }; + + /** + * Encodes the specified Proximity message. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.DetectionRule.IProximity} message Proximity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proximity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.windowBefore != null && Object.hasOwnProperty.call(message, "windowBefore")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.windowBefore); + if (message.windowAfter != null && Object.hasOwnProperty.call(message, "windowAfter")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.windowAfter); + return writer; + }; + + /** + * Encodes the specified Proximity message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.DetectionRule.IProximity} message Proximity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Proximity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Proximity message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity} Proximity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proximity.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.windowBefore = reader.int32(); + break; + } + case 2: { + message.windowAfter = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Proximity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity} Proximity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Proximity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Proximity message. + * @function verify + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Proximity.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.windowBefore != null && message.hasOwnProperty("windowBefore")) + if (!$util.isInteger(message.windowBefore)) + return "windowBefore: integer expected"; + if (message.windowAfter != null && message.hasOwnProperty("windowAfter")) + if (!$util.isInteger(message.windowAfter)) + return "windowAfter: integer expected"; + return null; + }; + + /** + * Creates a Proximity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity} Proximity + */ + Proximity.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity(); + if (object.windowBefore != null) + message.windowBefore = object.windowBefore | 0; + if (object.windowAfter != null) + message.windowAfter = object.windowAfter | 0; + return message; + }; + + /** + * Creates a plain object from a Proximity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity} message Proximity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Proximity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.windowBefore = 0; + object.windowAfter = 0; + } + if (message.windowBefore != null && message.hasOwnProperty("windowBefore")) + object.windowBefore = message.windowBefore; + if (message.windowAfter != null && message.hasOwnProperty("windowAfter")) + object.windowAfter = message.windowAfter; + return object; + }; + + /** + * Converts this Proximity to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity + * @instance + * @returns {Object.} JSON object + */ + Proximity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Proximity + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Proximity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity"; + }; + + return Proximity; + })(); + + DetectionRule.LikelihoodAdjustment = (function() { + + /** + * Properties of a LikelihoodAdjustment. + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule + * @interface ILikelihoodAdjustment + * @property {google.privacy.dlp.v2.Likelihood|null} [fixedLikelihood] LikelihoodAdjustment fixedLikelihood + * @property {number|null} [relativeLikelihood] LikelihoodAdjustment relativeLikelihood + */ + + /** + * Constructs a new LikelihoodAdjustment. + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule + * @classdesc Represents a LikelihoodAdjustment. + * @implements ILikelihoodAdjustment + * @constructor + * @param {google.privacy.dlp.v2.CustomInfoType.DetectionRule.ILikelihoodAdjustment=} [properties] Properties to set + */ + function LikelihoodAdjustment(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * LikelihoodAdjustment fixedLikelihood. + * @member {google.privacy.dlp.v2.Likelihood|null|undefined} fixedLikelihood + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment + * @instance + */ + LikelihoodAdjustment.prototype.fixedLikelihood = null; + + /** + * LikelihoodAdjustment relativeLikelihood. + * @member {number|null|undefined} relativeLikelihood + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment + * @instance + */ + LikelihoodAdjustment.prototype.relativeLikelihood = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * LikelihoodAdjustment adjustment. + * @member {"fixedLikelihood"|"relativeLikelihood"|undefined} adjustment + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment + * @instance + */ + Object.defineProperty(LikelihoodAdjustment.prototype, "adjustment", { + get: $util.oneOfGetter($oneOfFields = ["fixedLikelihood", "relativeLikelihood"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new LikelihoodAdjustment instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.DetectionRule.ILikelihoodAdjustment=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment} LikelihoodAdjustment instance + */ + LikelihoodAdjustment.create = function create(properties) { + return new LikelihoodAdjustment(properties); + }; + + /** + * Encodes the specified LikelihoodAdjustment message. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.DetectionRule.ILikelihoodAdjustment} message LikelihoodAdjustment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LikelihoodAdjustment.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fixedLikelihood != null && Object.hasOwnProperty.call(message, "fixedLikelihood")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fixedLikelihood); + if (message.relativeLikelihood != null && Object.hasOwnProperty.call(message, "relativeLikelihood")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.relativeLikelihood); + return writer; + }; + + /** + * Encodes the specified LikelihoodAdjustment message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.DetectionRule.ILikelihoodAdjustment} message LikelihoodAdjustment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LikelihoodAdjustment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LikelihoodAdjustment message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment} LikelihoodAdjustment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LikelihoodAdjustment.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fixedLikelihood = reader.int32(); + break; + } + case 2: { + message.relativeLikelihood = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a LikelihoodAdjustment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment} LikelihoodAdjustment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LikelihoodAdjustment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LikelihoodAdjustment message. + * @function verify + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LikelihoodAdjustment.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.fixedLikelihood != null && message.hasOwnProperty("fixedLikelihood")) { + properties.adjustment = 1; + switch (message.fixedLikelihood) { + default: + return "fixedLikelihood: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + } + if (message.relativeLikelihood != null && message.hasOwnProperty("relativeLikelihood")) { + if (properties.adjustment === 1) + return "adjustment: multiple values"; + properties.adjustment = 1; + if (!$util.isInteger(message.relativeLikelihood)) + return "relativeLikelihood: integer expected"; + } + return null; + }; + + /** + * Creates a LikelihoodAdjustment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment} LikelihoodAdjustment + */ + LikelihoodAdjustment.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment(); + switch (object.fixedLikelihood) { + default: + if (typeof object.fixedLikelihood === "number") { + message.fixedLikelihood = object.fixedLikelihood; + break; + } + break; + case "LIKELIHOOD_UNSPECIFIED": + case 0: + message.fixedLikelihood = 0; + break; + case "VERY_UNLIKELY": + case 1: + message.fixedLikelihood = 1; + break; + case "UNLIKELY": + case 2: + message.fixedLikelihood = 2; + break; + case "POSSIBLE": + case 3: + message.fixedLikelihood = 3; + break; + case "LIKELY": + case 4: + message.fixedLikelihood = 4; + break; + case "VERY_LIKELY": + case 5: + message.fixedLikelihood = 5; + break; + } + if (object.relativeLikelihood != null) + message.relativeLikelihood = object.relativeLikelihood | 0; + return message; + }; + + /** + * Creates a plain object from a LikelihoodAdjustment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment} message LikelihoodAdjustment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LikelihoodAdjustment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.fixedLikelihood != null && message.hasOwnProperty("fixedLikelihood")) { + object.fixedLikelihood = options.enums === String ? $root.google.privacy.dlp.v2.Likelihood[message.fixedLikelihood] === undefined ? message.fixedLikelihood : $root.google.privacy.dlp.v2.Likelihood[message.fixedLikelihood] : message.fixedLikelihood; + if (options.oneofs) + object.adjustment = "fixedLikelihood"; + } + if (message.relativeLikelihood != null && message.hasOwnProperty("relativeLikelihood")) { + object.relativeLikelihood = message.relativeLikelihood; + if (options.oneofs) + object.adjustment = "relativeLikelihood"; + } + return object; + }; + + /** + * Converts this LikelihoodAdjustment to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment + * @instance + * @returns {Object.} JSON object + */ + LikelihoodAdjustment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LikelihoodAdjustment + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LikelihoodAdjustment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment"; + }; + + return LikelihoodAdjustment; + })(); + + DetectionRule.HotwordRule = (function() { + + /** + * Properties of a HotwordRule. + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule + * @interface IHotwordRule + * @property {google.privacy.dlp.v2.CustomInfoType.IRegex|null} [hotwordRegex] HotwordRule hotwordRegex + * @property {google.privacy.dlp.v2.CustomInfoType.DetectionRule.IProximity|null} [proximity] HotwordRule proximity + * @property {google.privacy.dlp.v2.CustomInfoType.DetectionRule.ILikelihoodAdjustment|null} [likelihoodAdjustment] HotwordRule likelihoodAdjustment + */ + + /** + * Constructs a new HotwordRule. + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule + * @classdesc Represents a HotwordRule. + * @implements IHotwordRule + * @constructor + * @param {google.privacy.dlp.v2.CustomInfoType.DetectionRule.IHotwordRule=} [properties] Properties to set + */ + function HotwordRule(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * HotwordRule hotwordRegex. + * @member {google.privacy.dlp.v2.CustomInfoType.IRegex|null|undefined} hotwordRegex + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule + * @instance + */ + HotwordRule.prototype.hotwordRegex = null; + + /** + * HotwordRule proximity. + * @member {google.privacy.dlp.v2.CustomInfoType.DetectionRule.IProximity|null|undefined} proximity + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule + * @instance + */ + HotwordRule.prototype.proximity = null; + + /** + * HotwordRule likelihoodAdjustment. + * @member {google.privacy.dlp.v2.CustomInfoType.DetectionRule.ILikelihoodAdjustment|null|undefined} likelihoodAdjustment + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule + * @instance + */ + HotwordRule.prototype.likelihoodAdjustment = null; + + /** + * Creates a new HotwordRule instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.DetectionRule.IHotwordRule=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule} HotwordRule instance + */ + HotwordRule.create = function create(properties) { + return new HotwordRule(properties); + }; + + /** + * Encodes the specified HotwordRule message. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.DetectionRule.IHotwordRule} message HotwordRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HotwordRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hotwordRegex != null && Object.hasOwnProperty.call(message, "hotwordRegex")) + $root.google.privacy.dlp.v2.CustomInfoType.Regex.encode(message.hotwordRegex, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.proximity != null && Object.hasOwnProperty.call(message, "proximity")) + $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.encode(message.proximity, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.likelihoodAdjustment != null && Object.hasOwnProperty.call(message, "likelihoodAdjustment")) + $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.encode(message.likelihoodAdjustment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified HotwordRule message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.DetectionRule.IHotwordRule} message HotwordRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HotwordRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HotwordRule message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule} HotwordRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HotwordRule.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.hotwordRegex = $root.google.privacy.dlp.v2.CustomInfoType.Regex.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.proximity = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.likelihoodAdjustment = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a HotwordRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule} HotwordRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HotwordRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HotwordRule message. + * @function verify + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HotwordRule.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.hotwordRegex != null && message.hasOwnProperty("hotwordRegex")) { + var error = $root.google.privacy.dlp.v2.CustomInfoType.Regex.verify(message.hotwordRegex, long + 1); + if (error) + return "hotwordRegex." + error; + } + if (message.proximity != null && message.hasOwnProperty("proximity")) { + var error = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.verify(message.proximity, long + 1); + if (error) + return "proximity." + error; + } + if (message.likelihoodAdjustment != null && message.hasOwnProperty("likelihoodAdjustment")) { + var error = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.verify(message.likelihoodAdjustment, long + 1); + if (error) + return "likelihoodAdjustment." + error; + } + return null; + }; + + /** + * Creates a HotwordRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule} HotwordRule + */ + HotwordRule.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule(); + if (object.hotwordRegex != null) { + if (typeof object.hotwordRegex !== "object") + throw TypeError(".google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.hotwordRegex: object expected"); + message.hotwordRegex = $root.google.privacy.dlp.v2.CustomInfoType.Regex.fromObject(object.hotwordRegex, long + 1); + } + if (object.proximity != null) { + if (typeof object.proximity !== "object") + throw TypeError(".google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.proximity: object expected"); + message.proximity = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.fromObject(object.proximity, long + 1); + } + if (object.likelihoodAdjustment != null) { + if (typeof object.likelihoodAdjustment !== "object") + throw TypeError(".google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule.likelihoodAdjustment: object expected"); + message.likelihoodAdjustment = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.fromObject(object.likelihoodAdjustment, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a HotwordRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule + * @static + * @param {google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule} message HotwordRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HotwordRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.hotwordRegex = null; + object.proximity = null; + object.likelihoodAdjustment = null; + } + if (message.hotwordRegex != null && message.hasOwnProperty("hotwordRegex")) + object.hotwordRegex = $root.google.privacy.dlp.v2.CustomInfoType.Regex.toObject(message.hotwordRegex, options); + if (message.proximity != null && message.hasOwnProperty("proximity")) + object.proximity = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.Proximity.toObject(message.proximity, options); + if (message.likelihoodAdjustment != null && message.hasOwnProperty("likelihoodAdjustment")) + object.likelihoodAdjustment = $root.google.privacy.dlp.v2.CustomInfoType.DetectionRule.LikelihoodAdjustment.toObject(message.likelihoodAdjustment, options); + return object; + }; + + /** + * Converts this HotwordRule to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule + * @instance + * @returns {Object.} JSON object + */ + HotwordRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HotwordRule + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HotwordRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CustomInfoType.DetectionRule.HotwordRule"; + }; + + return HotwordRule; + })(); + + return DetectionRule; + })(); + + /** + * ExclusionType enum. + * @name google.privacy.dlp.v2.CustomInfoType.ExclusionType + * @enum {number} + * @property {number} EXCLUSION_TYPE_UNSPECIFIED=0 EXCLUSION_TYPE_UNSPECIFIED value + * @property {number} EXCLUSION_TYPE_EXCLUDE=1 EXCLUSION_TYPE_EXCLUDE value + */ + CustomInfoType.ExclusionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EXCLUSION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EXCLUSION_TYPE_EXCLUDE"] = 1; + return values; + })(); + + return CustomInfoType; + })(); + + v2.FieldId = (function() { + + /** + * Properties of a FieldId. + * @memberof google.privacy.dlp.v2 + * @interface IFieldId + * @property {string|null} [name] FieldId name + */ + + /** + * Constructs a new FieldId. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a FieldId. + * @implements IFieldId + * @constructor + * @param {google.privacy.dlp.v2.IFieldId=} [properties] Properties to set + */ + function FieldId(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldId name. + * @member {string} name + * @memberof google.privacy.dlp.v2.FieldId + * @instance + */ + FieldId.prototype.name = ""; + + /** + * Creates a new FieldId instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.FieldId + * @static + * @param {google.privacy.dlp.v2.IFieldId=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.FieldId} FieldId instance + */ + FieldId.create = function create(properties) { + return new FieldId(properties); + }; + + /** + * Encodes the specified FieldId message. Does not implicitly {@link google.privacy.dlp.v2.FieldId.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.FieldId + * @static + * @param {google.privacy.dlp.v2.IFieldId} message FieldId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldId.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified FieldId message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.FieldId.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.FieldId + * @static + * @param {google.privacy.dlp.v2.IFieldId} message FieldId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldId.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldId message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.FieldId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.FieldId} FieldId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldId.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.FieldId(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FieldId message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.FieldId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.FieldId} FieldId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldId.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldId message. + * @function verify + * @memberof google.privacy.dlp.v2.FieldId + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldId.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a FieldId message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.FieldId + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.FieldId} FieldId + */ + FieldId.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.FieldId) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.FieldId(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a FieldId message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.FieldId + * @static + * @param {google.privacy.dlp.v2.FieldId} message FieldId + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldId.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this FieldId to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.FieldId + * @instance + * @returns {Object.} JSON object + */ + FieldId.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldId + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.FieldId + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldId.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.FieldId"; + }; + + return FieldId; + })(); + + v2.PartitionId = (function() { + + /** + * Properties of a PartitionId. + * @memberof google.privacy.dlp.v2 + * @interface IPartitionId + * @property {string|null} [projectId] PartitionId projectId + * @property {string|null} [namespaceId] PartitionId namespaceId + */ + + /** + * Constructs a new PartitionId. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a PartitionId. + * @implements IPartitionId + * @constructor + * @param {google.privacy.dlp.v2.IPartitionId=} [properties] Properties to set + */ + function PartitionId(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * PartitionId projectId. + * @member {string} projectId + * @memberof google.privacy.dlp.v2.PartitionId + * @instance + */ + PartitionId.prototype.projectId = ""; + + /** + * PartitionId namespaceId. + * @member {string} namespaceId + * @memberof google.privacy.dlp.v2.PartitionId + * @instance + */ + PartitionId.prototype.namespaceId = ""; + + /** + * Creates a new PartitionId instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.PartitionId + * @static + * @param {google.privacy.dlp.v2.IPartitionId=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.PartitionId} PartitionId instance + */ + PartitionId.create = function create(properties) { + return new PartitionId(properties); + }; + + /** + * Encodes the specified PartitionId message. Does not implicitly {@link google.privacy.dlp.v2.PartitionId.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.PartitionId + * @static + * @param {google.privacy.dlp.v2.IPartitionId} message PartitionId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartitionId.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectId); + if (message.namespaceId != null && Object.hasOwnProperty.call(message, "namespaceId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.namespaceId); + return writer; + }; + + /** + * Encodes the specified PartitionId message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.PartitionId.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.PartitionId + * @static + * @param {google.privacy.dlp.v2.IPartitionId} message PartitionId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartitionId.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PartitionId message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.PartitionId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.PartitionId} PartitionId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartitionId.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.PartitionId(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.projectId = reader.string(); + break; + } + case 4: { + message.namespaceId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PartitionId message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.PartitionId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.PartitionId} PartitionId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartitionId.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartitionId message. + * @function verify + * @memberof google.privacy.dlp.v2.PartitionId + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartitionId.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.namespaceId != null && message.hasOwnProperty("namespaceId")) + if (!$util.isString(message.namespaceId)) + return "namespaceId: string expected"; + return null; + }; + + /** + * Creates a PartitionId message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.PartitionId + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.PartitionId} PartitionId + */ + PartitionId.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.PartitionId) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.PartitionId(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.namespaceId != null) + message.namespaceId = String(object.namespaceId); + return message; + }; + + /** + * Creates a plain object from a PartitionId message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.PartitionId + * @static + * @param {google.privacy.dlp.v2.PartitionId} message PartitionId + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartitionId.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.namespaceId = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.namespaceId != null && message.hasOwnProperty("namespaceId")) + object.namespaceId = message.namespaceId; + return object; + }; + + /** + * Converts this PartitionId to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.PartitionId + * @instance + * @returns {Object.} JSON object + */ + PartitionId.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PartitionId + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.PartitionId + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartitionId.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.PartitionId"; + }; + + return PartitionId; + })(); + + v2.KindExpression = (function() { + + /** + * Properties of a KindExpression. + * @memberof google.privacy.dlp.v2 + * @interface IKindExpression + * @property {string|null} [name] KindExpression name + */ + + /** + * Constructs a new KindExpression. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a KindExpression. + * @implements IKindExpression + * @constructor + * @param {google.privacy.dlp.v2.IKindExpression=} [properties] Properties to set + */ + function KindExpression(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * KindExpression name. + * @member {string} name + * @memberof google.privacy.dlp.v2.KindExpression + * @instance + */ + KindExpression.prototype.name = ""; + + /** + * Creates a new KindExpression instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.KindExpression + * @static + * @param {google.privacy.dlp.v2.IKindExpression=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.KindExpression} KindExpression instance + */ + KindExpression.create = function create(properties) { + return new KindExpression(properties); + }; + + /** + * Encodes the specified KindExpression message. Does not implicitly {@link google.privacy.dlp.v2.KindExpression.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.KindExpression + * @static + * @param {google.privacy.dlp.v2.IKindExpression} message KindExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KindExpression.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified KindExpression message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.KindExpression.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.KindExpression + * @static + * @param {google.privacy.dlp.v2.IKindExpression} message KindExpression message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + KindExpression.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a KindExpression message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.KindExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.KindExpression} KindExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KindExpression.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.KindExpression(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a KindExpression message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.KindExpression + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.KindExpression} KindExpression + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + KindExpression.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a KindExpression message. + * @function verify + * @memberof google.privacy.dlp.v2.KindExpression + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + KindExpression.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a KindExpression message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.KindExpression + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.KindExpression} KindExpression + */ + KindExpression.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.KindExpression) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.KindExpression(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a KindExpression message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.KindExpression + * @static + * @param {google.privacy.dlp.v2.KindExpression} message KindExpression + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + KindExpression.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this KindExpression to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.KindExpression + * @instance + * @returns {Object.} JSON object + */ + KindExpression.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for KindExpression + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.KindExpression + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + KindExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.KindExpression"; + }; + + return KindExpression; + })(); + + v2.DatastoreOptions = (function() { + + /** + * Properties of a DatastoreOptions. + * @memberof google.privacy.dlp.v2 + * @interface IDatastoreOptions + * @property {google.privacy.dlp.v2.IPartitionId|null} [partitionId] DatastoreOptions partitionId + * @property {google.privacy.dlp.v2.IKindExpression|null} [kind] DatastoreOptions kind + */ + + /** + * Constructs a new DatastoreOptions. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DatastoreOptions. + * @implements IDatastoreOptions + * @constructor + * @param {google.privacy.dlp.v2.IDatastoreOptions=} [properties] Properties to set + */ + function DatastoreOptions(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DatastoreOptions partitionId. + * @member {google.privacy.dlp.v2.IPartitionId|null|undefined} partitionId + * @memberof google.privacy.dlp.v2.DatastoreOptions + * @instance + */ + DatastoreOptions.prototype.partitionId = null; + + /** + * DatastoreOptions kind. + * @member {google.privacy.dlp.v2.IKindExpression|null|undefined} kind + * @memberof google.privacy.dlp.v2.DatastoreOptions + * @instance + */ + DatastoreOptions.prototype.kind = null; + + /** + * Creates a new DatastoreOptions instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DatastoreOptions + * @static + * @param {google.privacy.dlp.v2.IDatastoreOptions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DatastoreOptions} DatastoreOptions instance + */ + DatastoreOptions.create = function create(properties) { + return new DatastoreOptions(properties); + }; + + /** + * Encodes the specified DatastoreOptions message. Does not implicitly {@link google.privacy.dlp.v2.DatastoreOptions.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DatastoreOptions + * @static + * @param {google.privacy.dlp.v2.IDatastoreOptions} message DatastoreOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatastoreOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partitionId != null && Object.hasOwnProperty.call(message, "partitionId")) + $root.google.privacy.dlp.v2.PartitionId.encode(message.partitionId, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + $root.google.privacy.dlp.v2.KindExpression.encode(message.kind, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DatastoreOptions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DatastoreOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DatastoreOptions + * @static + * @param {google.privacy.dlp.v2.IDatastoreOptions} message DatastoreOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatastoreOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatastoreOptions message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DatastoreOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DatastoreOptions} DatastoreOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatastoreOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DatastoreOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.partitionId = $root.google.privacy.dlp.v2.PartitionId.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.kind = $root.google.privacy.dlp.v2.KindExpression.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DatastoreOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DatastoreOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DatastoreOptions} DatastoreOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatastoreOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatastoreOptions message. + * @function verify + * @memberof google.privacy.dlp.v2.DatastoreOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatastoreOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.partitionId != null && message.hasOwnProperty("partitionId")) { + var error = $root.google.privacy.dlp.v2.PartitionId.verify(message.partitionId, long + 1); + if (error) + return "partitionId." + error; + } + if (message.kind != null && message.hasOwnProperty("kind")) { + var error = $root.google.privacy.dlp.v2.KindExpression.verify(message.kind, long + 1); + if (error) + return "kind." + error; + } + return null; + }; + + /** + * Creates a DatastoreOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DatastoreOptions + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DatastoreOptions} DatastoreOptions + */ + DatastoreOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DatastoreOptions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DatastoreOptions(); + if (object.partitionId != null) { + if (typeof object.partitionId !== "object") + throw TypeError(".google.privacy.dlp.v2.DatastoreOptions.partitionId: object expected"); + message.partitionId = $root.google.privacy.dlp.v2.PartitionId.fromObject(object.partitionId, long + 1); + } + if (object.kind != null) { + if (typeof object.kind !== "object") + throw TypeError(".google.privacy.dlp.v2.DatastoreOptions.kind: object expected"); + message.kind = $root.google.privacy.dlp.v2.KindExpression.fromObject(object.kind, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DatastoreOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DatastoreOptions + * @static + * @param {google.privacy.dlp.v2.DatastoreOptions} message DatastoreOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatastoreOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.partitionId = null; + object.kind = null; + } + if (message.partitionId != null && message.hasOwnProperty("partitionId")) + object.partitionId = $root.google.privacy.dlp.v2.PartitionId.toObject(message.partitionId, options); + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = $root.google.privacy.dlp.v2.KindExpression.toObject(message.kind, options); + return object; + }; + + /** + * Converts this DatastoreOptions to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DatastoreOptions + * @instance + * @returns {Object.} JSON object + */ + DatastoreOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatastoreOptions + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DatastoreOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatastoreOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DatastoreOptions"; + }; + + return DatastoreOptions; + })(); + + /** + * FileType enum. + * @name google.privacy.dlp.v2.FileType + * @enum {number} + * @property {number} FILE_TYPE_UNSPECIFIED=0 FILE_TYPE_UNSPECIFIED value + * @property {number} BINARY_FILE=1 BINARY_FILE value + * @property {number} TEXT_FILE=2 TEXT_FILE value + * @property {number} IMAGE=3 IMAGE value + * @property {number} WORD=5 WORD value + * @property {number} PDF=6 PDF value + * @property {number} AVRO=7 AVRO value + * @property {number} CSV=8 CSV value + * @property {number} TSV=9 TSV value + * @property {number} POWERPOINT=11 POWERPOINT value + * @property {number} EXCEL=12 EXCEL value + */ + v2.FileType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FILE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BINARY_FILE"] = 1; + values[valuesById[2] = "TEXT_FILE"] = 2; + values[valuesById[3] = "IMAGE"] = 3; + values[valuesById[5] = "WORD"] = 5; + values[valuesById[6] = "PDF"] = 6; + values[valuesById[7] = "AVRO"] = 7; + values[valuesById[8] = "CSV"] = 8; + values[valuesById[9] = "TSV"] = 9; + values[valuesById[11] = "POWERPOINT"] = 11; + values[valuesById[12] = "EXCEL"] = 12; + return values; + })(); + + v2.CloudStorageRegexFileSet = (function() { + + /** + * Properties of a CloudStorageRegexFileSet. + * @memberof google.privacy.dlp.v2 + * @interface ICloudStorageRegexFileSet + * @property {string|null} [bucketName] CloudStorageRegexFileSet bucketName + * @property {Array.|null} [includeRegex] CloudStorageRegexFileSet includeRegex + * @property {Array.|null} [excludeRegex] CloudStorageRegexFileSet excludeRegex + */ + + /** + * Constructs a new CloudStorageRegexFileSet. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CloudStorageRegexFileSet. + * @implements ICloudStorageRegexFileSet + * @constructor + * @param {google.privacy.dlp.v2.ICloudStorageRegexFileSet=} [properties] Properties to set + */ + function CloudStorageRegexFileSet(properties) { + this.includeRegex = []; + this.excludeRegex = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudStorageRegexFileSet bucketName. + * @member {string} bucketName + * @memberof google.privacy.dlp.v2.CloudStorageRegexFileSet + * @instance + */ + CloudStorageRegexFileSet.prototype.bucketName = ""; + + /** + * CloudStorageRegexFileSet includeRegex. + * @member {Array.} includeRegex + * @memberof google.privacy.dlp.v2.CloudStorageRegexFileSet + * @instance + */ + CloudStorageRegexFileSet.prototype.includeRegex = $util.emptyArray; + + /** + * CloudStorageRegexFileSet excludeRegex. + * @member {Array.} excludeRegex + * @memberof google.privacy.dlp.v2.CloudStorageRegexFileSet + * @instance + */ + CloudStorageRegexFileSet.prototype.excludeRegex = $util.emptyArray; + + /** + * Creates a new CloudStorageRegexFileSet instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CloudStorageRegexFileSet + * @static + * @param {google.privacy.dlp.v2.ICloudStorageRegexFileSet=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CloudStorageRegexFileSet} CloudStorageRegexFileSet instance + */ + CloudStorageRegexFileSet.create = function create(properties) { + return new CloudStorageRegexFileSet(properties); + }; + + /** + * Encodes the specified CloudStorageRegexFileSet message. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageRegexFileSet.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CloudStorageRegexFileSet + * @static + * @param {google.privacy.dlp.v2.ICloudStorageRegexFileSet} message CloudStorageRegexFileSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudStorageRegexFileSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bucketName != null && Object.hasOwnProperty.call(message, "bucketName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucketName); + if (message.includeRegex != null && message.includeRegex.length) + for (var i = 0; i < message.includeRegex.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.includeRegex[i]); + if (message.excludeRegex != null && message.excludeRegex.length) + for (var i = 0; i < message.excludeRegex.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.excludeRegex[i]); + return writer; + }; + + /** + * Encodes the specified CloudStorageRegexFileSet message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageRegexFileSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CloudStorageRegexFileSet + * @static + * @param {google.privacy.dlp.v2.ICloudStorageRegexFileSet} message CloudStorageRegexFileSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudStorageRegexFileSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudStorageRegexFileSet message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CloudStorageRegexFileSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CloudStorageRegexFileSet} CloudStorageRegexFileSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudStorageRegexFileSet.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CloudStorageRegexFileSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.bucketName = reader.string(); + break; + } + case 2: { + if (!(message.includeRegex && message.includeRegex.length)) + message.includeRegex = []; + message.includeRegex.push(reader.string()); + break; + } + case 3: { + if (!(message.excludeRegex && message.excludeRegex.length)) + message.excludeRegex = []; + message.excludeRegex.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CloudStorageRegexFileSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CloudStorageRegexFileSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CloudStorageRegexFileSet} CloudStorageRegexFileSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudStorageRegexFileSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudStorageRegexFileSet message. + * @function verify + * @memberof google.privacy.dlp.v2.CloudStorageRegexFileSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudStorageRegexFileSet.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.bucketName != null && message.hasOwnProperty("bucketName")) + if (!$util.isString(message.bucketName)) + return "bucketName: string expected"; + if (message.includeRegex != null && message.hasOwnProperty("includeRegex")) { + if (!Array.isArray(message.includeRegex)) + return "includeRegex: array expected"; + for (var i = 0; i < message.includeRegex.length; ++i) + if (!$util.isString(message.includeRegex[i])) + return "includeRegex: string[] expected"; + } + if (message.excludeRegex != null && message.hasOwnProperty("excludeRegex")) { + if (!Array.isArray(message.excludeRegex)) + return "excludeRegex: array expected"; + for (var i = 0; i < message.excludeRegex.length; ++i) + if (!$util.isString(message.excludeRegex[i])) + return "excludeRegex: string[] expected"; + } + return null; + }; + + /** + * Creates a CloudStorageRegexFileSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CloudStorageRegexFileSet + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CloudStorageRegexFileSet} CloudStorageRegexFileSet + */ + CloudStorageRegexFileSet.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CloudStorageRegexFileSet) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CloudStorageRegexFileSet(); + if (object.bucketName != null) + message.bucketName = String(object.bucketName); + if (object.includeRegex) { + if (!Array.isArray(object.includeRegex)) + throw TypeError(".google.privacy.dlp.v2.CloudStorageRegexFileSet.includeRegex: array expected"); + message.includeRegex = []; + for (var i = 0; i < object.includeRegex.length; ++i) + message.includeRegex[i] = String(object.includeRegex[i]); + } + if (object.excludeRegex) { + if (!Array.isArray(object.excludeRegex)) + throw TypeError(".google.privacy.dlp.v2.CloudStorageRegexFileSet.excludeRegex: array expected"); + message.excludeRegex = []; + for (var i = 0; i < object.excludeRegex.length; ++i) + message.excludeRegex[i] = String(object.excludeRegex[i]); + } + return message; + }; + + /** + * Creates a plain object from a CloudStorageRegexFileSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CloudStorageRegexFileSet + * @static + * @param {google.privacy.dlp.v2.CloudStorageRegexFileSet} message CloudStorageRegexFileSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudStorageRegexFileSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.includeRegex = []; + object.excludeRegex = []; + } + if (options.defaults) + object.bucketName = ""; + if (message.bucketName != null && message.hasOwnProperty("bucketName")) + object.bucketName = message.bucketName; + if (message.includeRegex && message.includeRegex.length) { + object.includeRegex = []; + for (var j = 0; j < message.includeRegex.length; ++j) + object.includeRegex[j] = message.includeRegex[j]; + } + if (message.excludeRegex && message.excludeRegex.length) { + object.excludeRegex = []; + for (var j = 0; j < message.excludeRegex.length; ++j) + object.excludeRegex[j] = message.excludeRegex[j]; + } + return object; + }; + + /** + * Converts this CloudStorageRegexFileSet to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CloudStorageRegexFileSet + * @instance + * @returns {Object.} JSON object + */ + CloudStorageRegexFileSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudStorageRegexFileSet + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CloudStorageRegexFileSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudStorageRegexFileSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CloudStorageRegexFileSet"; + }; + + return CloudStorageRegexFileSet; + })(); + + v2.CloudStorageOptions = (function() { + + /** + * Properties of a CloudStorageOptions. + * @memberof google.privacy.dlp.v2 + * @interface ICloudStorageOptions + * @property {google.privacy.dlp.v2.CloudStorageOptions.IFileSet|null} [fileSet] CloudStorageOptions fileSet + * @property {number|Long|null} [bytesLimitPerFile] CloudStorageOptions bytesLimitPerFile + * @property {number|null} [bytesLimitPerFilePercent] CloudStorageOptions bytesLimitPerFilePercent + * @property {Array.|null} [fileTypes] CloudStorageOptions fileTypes + * @property {google.privacy.dlp.v2.CloudStorageOptions.SampleMethod|null} [sampleMethod] CloudStorageOptions sampleMethod + * @property {number|null} [filesLimitPercent] CloudStorageOptions filesLimitPercent + */ + + /** + * Constructs a new CloudStorageOptions. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CloudStorageOptions. + * @implements ICloudStorageOptions + * @constructor + * @param {google.privacy.dlp.v2.ICloudStorageOptions=} [properties] Properties to set + */ + function CloudStorageOptions(properties) { + this.fileTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudStorageOptions fileSet. + * @member {google.privacy.dlp.v2.CloudStorageOptions.IFileSet|null|undefined} fileSet + * @memberof google.privacy.dlp.v2.CloudStorageOptions + * @instance + */ + CloudStorageOptions.prototype.fileSet = null; + + /** + * CloudStorageOptions bytesLimitPerFile. + * @member {number|Long} bytesLimitPerFile + * @memberof google.privacy.dlp.v2.CloudStorageOptions + * @instance + */ + CloudStorageOptions.prototype.bytesLimitPerFile = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * CloudStorageOptions bytesLimitPerFilePercent. + * @member {number} bytesLimitPerFilePercent + * @memberof google.privacy.dlp.v2.CloudStorageOptions + * @instance + */ + CloudStorageOptions.prototype.bytesLimitPerFilePercent = 0; + + /** + * CloudStorageOptions fileTypes. + * @member {Array.} fileTypes + * @memberof google.privacy.dlp.v2.CloudStorageOptions + * @instance + */ + CloudStorageOptions.prototype.fileTypes = $util.emptyArray; + + /** + * CloudStorageOptions sampleMethod. + * @member {google.privacy.dlp.v2.CloudStorageOptions.SampleMethod} sampleMethod + * @memberof google.privacy.dlp.v2.CloudStorageOptions + * @instance + */ + CloudStorageOptions.prototype.sampleMethod = 0; + + /** + * CloudStorageOptions filesLimitPercent. + * @member {number} filesLimitPercent + * @memberof google.privacy.dlp.v2.CloudStorageOptions + * @instance + */ + CloudStorageOptions.prototype.filesLimitPercent = 0; + + /** + * Creates a new CloudStorageOptions instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CloudStorageOptions + * @static + * @param {google.privacy.dlp.v2.ICloudStorageOptions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CloudStorageOptions} CloudStorageOptions instance + */ + CloudStorageOptions.create = function create(properties) { + return new CloudStorageOptions(properties); + }; + + /** + * Encodes the specified CloudStorageOptions message. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageOptions.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CloudStorageOptions + * @static + * @param {google.privacy.dlp.v2.ICloudStorageOptions} message CloudStorageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudStorageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fileSet != null && Object.hasOwnProperty.call(message, "fileSet")) + $root.google.privacy.dlp.v2.CloudStorageOptions.FileSet.encode(message.fileSet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.bytesLimitPerFile != null && Object.hasOwnProperty.call(message, "bytesLimitPerFile")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.bytesLimitPerFile); + if (message.fileTypes != null && message.fileTypes.length) { + writer.uint32(/* id 5, wireType 2 =*/42).fork(); + for (var i = 0; i < message.fileTypes.length; ++i) + writer.int32(message.fileTypes[i]); + writer.ldelim(); + } + if (message.sampleMethod != null && Object.hasOwnProperty.call(message, "sampleMethod")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.sampleMethod); + if (message.filesLimitPercent != null && Object.hasOwnProperty.call(message, "filesLimitPercent")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.filesLimitPercent); + if (message.bytesLimitPerFilePercent != null && Object.hasOwnProperty.call(message, "bytesLimitPerFilePercent")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.bytesLimitPerFilePercent); + return writer; + }; + + /** + * Encodes the specified CloudStorageOptions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CloudStorageOptions + * @static + * @param {google.privacy.dlp.v2.ICloudStorageOptions} message CloudStorageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudStorageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudStorageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CloudStorageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CloudStorageOptions} CloudStorageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudStorageOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CloudStorageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fileSet = $root.google.privacy.dlp.v2.CloudStorageOptions.FileSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.bytesLimitPerFile = reader.int64(); + break; + } + case 8: { + message.bytesLimitPerFilePercent = reader.int32(); + break; + } + case 5: { + if (!(message.fileTypes && message.fileTypes.length)) + message.fileTypes = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.fileTypes.push(reader.int32()); + } else + message.fileTypes.push(reader.int32()); + break; + } + case 6: { + message.sampleMethod = reader.int32(); + break; + } + case 7: { + message.filesLimitPercent = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CloudStorageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CloudStorageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CloudStorageOptions} CloudStorageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudStorageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudStorageOptions message. + * @function verify + * @memberof google.privacy.dlp.v2.CloudStorageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudStorageOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.fileSet != null && message.hasOwnProperty("fileSet")) { + var error = $root.google.privacy.dlp.v2.CloudStorageOptions.FileSet.verify(message.fileSet, long + 1); + if (error) + return "fileSet." + error; + } + if (message.bytesLimitPerFile != null && message.hasOwnProperty("bytesLimitPerFile")) + if (!$util.isInteger(message.bytesLimitPerFile) && !(message.bytesLimitPerFile && $util.isInteger(message.bytesLimitPerFile.low) && $util.isInteger(message.bytesLimitPerFile.high))) + return "bytesLimitPerFile: integer|Long expected"; + if (message.bytesLimitPerFilePercent != null && message.hasOwnProperty("bytesLimitPerFilePercent")) + if (!$util.isInteger(message.bytesLimitPerFilePercent)) + return "bytesLimitPerFilePercent: integer expected"; + if (message.fileTypes != null && message.hasOwnProperty("fileTypes")) { + if (!Array.isArray(message.fileTypes)) + return "fileTypes: array expected"; + for (var i = 0; i < message.fileTypes.length; ++i) + switch (message.fileTypes[i]) { + default: + return "fileTypes: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 5: + case 6: + case 7: + case 8: + case 9: + case 11: + case 12: + break; + } + } + if (message.sampleMethod != null && message.hasOwnProperty("sampleMethod")) + switch (message.sampleMethod) { + default: + return "sampleMethod: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.filesLimitPercent != null && message.hasOwnProperty("filesLimitPercent")) + if (!$util.isInteger(message.filesLimitPercent)) + return "filesLimitPercent: integer expected"; + return null; + }; + + /** + * Creates a CloudStorageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CloudStorageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CloudStorageOptions} CloudStorageOptions + */ + CloudStorageOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CloudStorageOptions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CloudStorageOptions(); + if (object.fileSet != null) { + if (typeof object.fileSet !== "object") + throw TypeError(".google.privacy.dlp.v2.CloudStorageOptions.fileSet: object expected"); + message.fileSet = $root.google.privacy.dlp.v2.CloudStorageOptions.FileSet.fromObject(object.fileSet, long + 1); + } + if (object.bytesLimitPerFile != null) + if ($util.Long) + (message.bytesLimitPerFile = $util.Long.fromValue(object.bytesLimitPerFile)).unsigned = false; + else if (typeof object.bytesLimitPerFile === "string") + message.bytesLimitPerFile = parseInt(object.bytesLimitPerFile, 10); + else if (typeof object.bytesLimitPerFile === "number") + message.bytesLimitPerFile = object.bytesLimitPerFile; + else if (typeof object.bytesLimitPerFile === "object") + message.bytesLimitPerFile = new $util.LongBits(object.bytesLimitPerFile.low >>> 0, object.bytesLimitPerFile.high >>> 0).toNumber(); + if (object.bytesLimitPerFilePercent != null) + message.bytesLimitPerFilePercent = object.bytesLimitPerFilePercent | 0; + if (object.fileTypes) { + if (!Array.isArray(object.fileTypes)) + throw TypeError(".google.privacy.dlp.v2.CloudStorageOptions.fileTypes: array expected"); + message.fileTypes = []; + for (var i = 0; i < object.fileTypes.length; ++i) + switch (object.fileTypes[i]) { + default: + if (typeof object.fileTypes[i] === "number") { + message.fileTypes[i] = object.fileTypes[i]; + break; + } + case "FILE_TYPE_UNSPECIFIED": + case 0: + message.fileTypes[i] = 0; + break; + case "BINARY_FILE": + case 1: + message.fileTypes[i] = 1; + break; + case "TEXT_FILE": + case 2: + message.fileTypes[i] = 2; + break; + case "IMAGE": + case 3: + message.fileTypes[i] = 3; + break; + case "WORD": + case 5: + message.fileTypes[i] = 5; + break; + case "PDF": + case 6: + message.fileTypes[i] = 6; + break; + case "AVRO": + case 7: + message.fileTypes[i] = 7; + break; + case "CSV": + case 8: + message.fileTypes[i] = 8; + break; + case "TSV": + case 9: + message.fileTypes[i] = 9; + break; + case "POWERPOINT": + case 11: + message.fileTypes[i] = 11; + break; + case "EXCEL": + case 12: + message.fileTypes[i] = 12; + break; + } + } + switch (object.sampleMethod) { + default: + if (typeof object.sampleMethod === "number") { + message.sampleMethod = object.sampleMethod; + break; + } + break; + case "SAMPLE_METHOD_UNSPECIFIED": + case 0: + message.sampleMethod = 0; + break; + case "TOP": + case 1: + message.sampleMethod = 1; + break; + case "RANDOM_START": + case 2: + message.sampleMethod = 2; + break; + } + if (object.filesLimitPercent != null) + message.filesLimitPercent = object.filesLimitPercent | 0; + return message; + }; + + /** + * Creates a plain object from a CloudStorageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CloudStorageOptions + * @static + * @param {google.privacy.dlp.v2.CloudStorageOptions} message CloudStorageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudStorageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fileTypes = []; + if (options.defaults) { + object.fileSet = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.bytesLimitPerFile = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.bytesLimitPerFile = options.longs === String ? "0" : 0; + object.sampleMethod = options.enums === String ? "SAMPLE_METHOD_UNSPECIFIED" : 0; + object.filesLimitPercent = 0; + object.bytesLimitPerFilePercent = 0; + } + if (message.fileSet != null && message.hasOwnProperty("fileSet")) + object.fileSet = $root.google.privacy.dlp.v2.CloudStorageOptions.FileSet.toObject(message.fileSet, options); + if (message.bytesLimitPerFile != null && message.hasOwnProperty("bytesLimitPerFile")) + if (typeof message.bytesLimitPerFile === "number") + object.bytesLimitPerFile = options.longs === String ? String(message.bytesLimitPerFile) : message.bytesLimitPerFile; + else + object.bytesLimitPerFile = options.longs === String ? $util.Long.prototype.toString.call(message.bytesLimitPerFile) : options.longs === Number ? new $util.LongBits(message.bytesLimitPerFile.low >>> 0, message.bytesLimitPerFile.high >>> 0).toNumber() : message.bytesLimitPerFile; + if (message.fileTypes && message.fileTypes.length) { + object.fileTypes = []; + for (var j = 0; j < message.fileTypes.length; ++j) + object.fileTypes[j] = options.enums === String ? $root.google.privacy.dlp.v2.FileType[message.fileTypes[j]] === undefined ? message.fileTypes[j] : $root.google.privacy.dlp.v2.FileType[message.fileTypes[j]] : message.fileTypes[j]; + } + if (message.sampleMethod != null && message.hasOwnProperty("sampleMethod")) + object.sampleMethod = options.enums === String ? $root.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod[message.sampleMethod] === undefined ? message.sampleMethod : $root.google.privacy.dlp.v2.CloudStorageOptions.SampleMethod[message.sampleMethod] : message.sampleMethod; + if (message.filesLimitPercent != null && message.hasOwnProperty("filesLimitPercent")) + object.filesLimitPercent = message.filesLimitPercent; + if (message.bytesLimitPerFilePercent != null && message.hasOwnProperty("bytesLimitPerFilePercent")) + object.bytesLimitPerFilePercent = message.bytesLimitPerFilePercent; + return object; + }; + + /** + * Converts this CloudStorageOptions to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CloudStorageOptions + * @instance + * @returns {Object.} JSON object + */ + CloudStorageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudStorageOptions + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CloudStorageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudStorageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CloudStorageOptions"; + }; + + CloudStorageOptions.FileSet = (function() { + + /** + * Properties of a FileSet. + * @memberof google.privacy.dlp.v2.CloudStorageOptions + * @interface IFileSet + * @property {string|null} [url] FileSet url + * @property {google.privacy.dlp.v2.ICloudStorageRegexFileSet|null} [regexFileSet] FileSet regexFileSet + */ + + /** + * Constructs a new FileSet. + * @memberof google.privacy.dlp.v2.CloudStorageOptions + * @classdesc Represents a FileSet. + * @implements IFileSet + * @constructor + * @param {google.privacy.dlp.v2.CloudStorageOptions.IFileSet=} [properties] Properties to set + */ + function FileSet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileSet url. + * @member {string} url + * @memberof google.privacy.dlp.v2.CloudStorageOptions.FileSet + * @instance + */ + FileSet.prototype.url = ""; + + /** + * FileSet regexFileSet. + * @member {google.privacy.dlp.v2.ICloudStorageRegexFileSet|null|undefined} regexFileSet + * @memberof google.privacy.dlp.v2.CloudStorageOptions.FileSet + * @instance + */ + FileSet.prototype.regexFileSet = null; + + /** + * Creates a new FileSet instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CloudStorageOptions.FileSet + * @static + * @param {google.privacy.dlp.v2.CloudStorageOptions.IFileSet=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CloudStorageOptions.FileSet} FileSet instance + */ + FileSet.create = function create(properties) { + return new FileSet(properties); + }; + + /** + * Encodes the specified FileSet message. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageOptions.FileSet.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CloudStorageOptions.FileSet + * @static + * @param {google.privacy.dlp.v2.CloudStorageOptions.IFileSet} message FileSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); + if (message.regexFileSet != null && Object.hasOwnProperty.call(message, "regexFileSet")) + $root.google.privacy.dlp.v2.CloudStorageRegexFileSet.encode(message.regexFileSet, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileSet message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageOptions.FileSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CloudStorageOptions.FileSet + * @static + * @param {google.privacy.dlp.v2.CloudStorageOptions.IFileSet} message FileSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileSet message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CloudStorageOptions.FileSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CloudStorageOptions.FileSet} FileSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileSet.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CloudStorageOptions.FileSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.url = reader.string(); + break; + } + case 2: { + message.regexFileSet = $root.google.privacy.dlp.v2.CloudStorageRegexFileSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FileSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CloudStorageOptions.FileSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CloudStorageOptions.FileSet} FileSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileSet message. + * @function verify + * @memberof google.privacy.dlp.v2.CloudStorageOptions.FileSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileSet.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + if (message.regexFileSet != null && message.hasOwnProperty("regexFileSet")) { + var error = $root.google.privacy.dlp.v2.CloudStorageRegexFileSet.verify(message.regexFileSet, long + 1); + if (error) + return "regexFileSet." + error; + } + return null; + }; + + /** + * Creates a FileSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CloudStorageOptions.FileSet + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CloudStorageOptions.FileSet} FileSet + */ + FileSet.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CloudStorageOptions.FileSet) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CloudStorageOptions.FileSet(); + if (object.url != null) + message.url = String(object.url); + if (object.regexFileSet != null) { + if (typeof object.regexFileSet !== "object") + throw TypeError(".google.privacy.dlp.v2.CloudStorageOptions.FileSet.regexFileSet: object expected"); + message.regexFileSet = $root.google.privacy.dlp.v2.CloudStorageRegexFileSet.fromObject(object.regexFileSet, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a FileSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CloudStorageOptions.FileSet + * @static + * @param {google.privacy.dlp.v2.CloudStorageOptions.FileSet} message FileSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.url = ""; + object.regexFileSet = null; + } + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + if (message.regexFileSet != null && message.hasOwnProperty("regexFileSet")) + object.regexFileSet = $root.google.privacy.dlp.v2.CloudStorageRegexFileSet.toObject(message.regexFileSet, options); + return object; + }; + + /** + * Converts this FileSet to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CloudStorageOptions.FileSet + * @instance + * @returns {Object.} JSON object + */ + FileSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileSet + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CloudStorageOptions.FileSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CloudStorageOptions.FileSet"; + }; + + return FileSet; + })(); + + /** + * SampleMethod enum. + * @name google.privacy.dlp.v2.CloudStorageOptions.SampleMethod + * @enum {number} + * @property {number} SAMPLE_METHOD_UNSPECIFIED=0 SAMPLE_METHOD_UNSPECIFIED value + * @property {number} TOP=1 TOP value + * @property {number} RANDOM_START=2 RANDOM_START value + */ + CloudStorageOptions.SampleMethod = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SAMPLE_METHOD_UNSPECIFIED"] = 0; + values[valuesById[1] = "TOP"] = 1; + values[valuesById[2] = "RANDOM_START"] = 2; + return values; + })(); + + return CloudStorageOptions; + })(); + + v2.CloudStorageFileSet = (function() { + + /** + * Properties of a CloudStorageFileSet. + * @memberof google.privacy.dlp.v2 + * @interface ICloudStorageFileSet + * @property {string|null} [url] CloudStorageFileSet url + */ + + /** + * Constructs a new CloudStorageFileSet. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CloudStorageFileSet. + * @implements ICloudStorageFileSet + * @constructor + * @param {google.privacy.dlp.v2.ICloudStorageFileSet=} [properties] Properties to set + */ + function CloudStorageFileSet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudStorageFileSet url. + * @member {string} url + * @memberof google.privacy.dlp.v2.CloudStorageFileSet + * @instance + */ + CloudStorageFileSet.prototype.url = ""; + + /** + * Creates a new CloudStorageFileSet instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CloudStorageFileSet + * @static + * @param {google.privacy.dlp.v2.ICloudStorageFileSet=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CloudStorageFileSet} CloudStorageFileSet instance + */ + CloudStorageFileSet.create = function create(properties) { + return new CloudStorageFileSet(properties); + }; + + /** + * Encodes the specified CloudStorageFileSet message. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageFileSet.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CloudStorageFileSet + * @static + * @param {google.privacy.dlp.v2.ICloudStorageFileSet} message CloudStorageFileSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudStorageFileSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.url); + return writer; + }; + + /** + * Encodes the specified CloudStorageFileSet message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudStorageFileSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CloudStorageFileSet + * @static + * @param {google.privacy.dlp.v2.ICloudStorageFileSet} message CloudStorageFileSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudStorageFileSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudStorageFileSet message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CloudStorageFileSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CloudStorageFileSet} CloudStorageFileSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudStorageFileSet.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CloudStorageFileSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.url = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CloudStorageFileSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CloudStorageFileSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CloudStorageFileSet} CloudStorageFileSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudStorageFileSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudStorageFileSet message. + * @function verify + * @memberof google.privacy.dlp.v2.CloudStorageFileSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudStorageFileSet.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + return null; + }; + + /** + * Creates a CloudStorageFileSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CloudStorageFileSet + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CloudStorageFileSet} CloudStorageFileSet + */ + CloudStorageFileSet.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CloudStorageFileSet) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CloudStorageFileSet(); + if (object.url != null) + message.url = String(object.url); + return message; + }; + + /** + * Creates a plain object from a CloudStorageFileSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CloudStorageFileSet + * @static + * @param {google.privacy.dlp.v2.CloudStorageFileSet} message CloudStorageFileSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudStorageFileSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.url = ""; + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + return object; + }; + + /** + * Converts this CloudStorageFileSet to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CloudStorageFileSet + * @instance + * @returns {Object.} JSON object + */ + CloudStorageFileSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudStorageFileSet + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CloudStorageFileSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudStorageFileSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CloudStorageFileSet"; + }; + + return CloudStorageFileSet; + })(); + + v2.CloudStoragePath = (function() { + + /** + * Properties of a CloudStoragePath. + * @memberof google.privacy.dlp.v2 + * @interface ICloudStoragePath + * @property {string|null} [path] CloudStoragePath path + */ + + /** + * Constructs a new CloudStoragePath. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a CloudStoragePath. + * @implements ICloudStoragePath + * @constructor + * @param {google.privacy.dlp.v2.ICloudStoragePath=} [properties] Properties to set + */ + function CloudStoragePath(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudStoragePath path. + * @member {string} path + * @memberof google.privacy.dlp.v2.CloudStoragePath + * @instance + */ + CloudStoragePath.prototype.path = ""; + + /** + * Creates a new CloudStoragePath instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.CloudStoragePath + * @static + * @param {google.privacy.dlp.v2.ICloudStoragePath=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.CloudStoragePath} CloudStoragePath instance + */ + CloudStoragePath.create = function create(properties) { + return new CloudStoragePath(properties); + }; + + /** + * Encodes the specified CloudStoragePath message. Does not implicitly {@link google.privacy.dlp.v2.CloudStoragePath.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.CloudStoragePath + * @static + * @param {google.privacy.dlp.v2.ICloudStoragePath} message CloudStoragePath message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudStoragePath.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.path); + return writer; + }; + + /** + * Encodes the specified CloudStoragePath message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.CloudStoragePath.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.CloudStoragePath + * @static + * @param {google.privacy.dlp.v2.ICloudStoragePath} message CloudStoragePath message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudStoragePath.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudStoragePath message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.CloudStoragePath + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.CloudStoragePath} CloudStoragePath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudStoragePath.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.CloudStoragePath(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CloudStoragePath message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.CloudStoragePath + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.CloudStoragePath} CloudStoragePath + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudStoragePath.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudStoragePath message. + * @function verify + * @memberof google.privacy.dlp.v2.CloudStoragePath + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudStoragePath.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CloudStoragePath message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.CloudStoragePath + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.CloudStoragePath} CloudStoragePath + */ + CloudStoragePath.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.CloudStoragePath) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.CloudStoragePath(); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CloudStoragePath message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.CloudStoragePath + * @static + * @param {google.privacy.dlp.v2.CloudStoragePath} message CloudStoragePath + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudStoragePath.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.path = ""; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CloudStoragePath to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.CloudStoragePath + * @instance + * @returns {Object.} JSON object + */ + CloudStoragePath.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudStoragePath + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.CloudStoragePath + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudStoragePath.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.CloudStoragePath"; + }; + + return CloudStoragePath; + })(); + + v2.BigQueryOptions = (function() { + + /** + * Properties of a BigQueryOptions. + * @memberof google.privacy.dlp.v2 + * @interface IBigQueryOptions + * @property {google.privacy.dlp.v2.IBigQueryTable|null} [tableReference] BigQueryOptions tableReference + * @property {Array.|null} [identifyingFields] BigQueryOptions identifyingFields + * @property {number|Long|null} [rowsLimit] BigQueryOptions rowsLimit + * @property {number|null} [rowsLimitPercent] BigQueryOptions rowsLimitPercent + * @property {google.privacy.dlp.v2.BigQueryOptions.SampleMethod|null} [sampleMethod] BigQueryOptions sampleMethod + * @property {Array.|null} [excludedFields] BigQueryOptions excludedFields + * @property {Array.|null} [includedFields] BigQueryOptions includedFields + */ + + /** + * Constructs a new BigQueryOptions. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a BigQueryOptions. + * @implements IBigQueryOptions + * @constructor + * @param {google.privacy.dlp.v2.IBigQueryOptions=} [properties] Properties to set + */ + function BigQueryOptions(properties) { + this.identifyingFields = []; + this.excludedFields = []; + this.includedFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryOptions tableReference. + * @member {google.privacy.dlp.v2.IBigQueryTable|null|undefined} tableReference + * @memberof google.privacy.dlp.v2.BigQueryOptions + * @instance + */ + BigQueryOptions.prototype.tableReference = null; + + /** + * BigQueryOptions identifyingFields. + * @member {Array.} identifyingFields + * @memberof google.privacy.dlp.v2.BigQueryOptions + * @instance + */ + BigQueryOptions.prototype.identifyingFields = $util.emptyArray; + + /** + * BigQueryOptions rowsLimit. + * @member {number|Long} rowsLimit + * @memberof google.privacy.dlp.v2.BigQueryOptions + * @instance + */ + BigQueryOptions.prototype.rowsLimit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * BigQueryOptions rowsLimitPercent. + * @member {number} rowsLimitPercent + * @memberof google.privacy.dlp.v2.BigQueryOptions + * @instance + */ + BigQueryOptions.prototype.rowsLimitPercent = 0; + + /** + * BigQueryOptions sampleMethod. + * @member {google.privacy.dlp.v2.BigQueryOptions.SampleMethod} sampleMethod + * @memberof google.privacy.dlp.v2.BigQueryOptions + * @instance + */ + BigQueryOptions.prototype.sampleMethod = 0; + + /** + * BigQueryOptions excludedFields. + * @member {Array.} excludedFields + * @memberof google.privacy.dlp.v2.BigQueryOptions + * @instance + */ + BigQueryOptions.prototype.excludedFields = $util.emptyArray; + + /** + * BigQueryOptions includedFields. + * @member {Array.} includedFields + * @memberof google.privacy.dlp.v2.BigQueryOptions + * @instance + */ + BigQueryOptions.prototype.includedFields = $util.emptyArray; + + /** + * Creates a new BigQueryOptions instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.BigQueryOptions + * @static + * @param {google.privacy.dlp.v2.IBigQueryOptions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.BigQueryOptions} BigQueryOptions instance + */ + BigQueryOptions.create = function create(properties) { + return new BigQueryOptions(properties); + }; + + /** + * Encodes the specified BigQueryOptions message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryOptions.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.BigQueryOptions + * @static + * @param {google.privacy.dlp.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tableReference != null && Object.hasOwnProperty.call(message, "tableReference")) + $root.google.privacy.dlp.v2.BigQueryTable.encode(message.tableReference, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.identifyingFields != null && message.identifyingFields.length) + for (var i = 0; i < message.identifyingFields.length; ++i) + $root.google.privacy.dlp.v2.FieldId.encode(message.identifyingFields[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rowsLimit != null && Object.hasOwnProperty.call(message, "rowsLimit")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.rowsLimit); + if (message.sampleMethod != null && Object.hasOwnProperty.call(message, "sampleMethod")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.sampleMethod); + if (message.excludedFields != null && message.excludedFields.length) + for (var i = 0; i < message.excludedFields.length; ++i) + $root.google.privacy.dlp.v2.FieldId.encode(message.excludedFields[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.rowsLimitPercent != null && Object.hasOwnProperty.call(message, "rowsLimitPercent")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.rowsLimitPercent); + if (message.includedFields != null && message.includedFields.length) + for (var i = 0; i < message.includedFields.length; ++i) + $root.google.privacy.dlp.v2.FieldId.encode(message.includedFields[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BigQueryOptions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryOptions + * @static + * @param {google.privacy.dlp.v2.IBigQueryOptions} message BigQueryOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryOptions message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.BigQueryOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.BigQueryOptions} BigQueryOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.BigQueryOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tableReference = $root.google.privacy.dlp.v2.BigQueryTable.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + if (!(message.identifyingFields && message.identifyingFields.length)) + message.identifyingFields = []; + message.identifyingFields.push($root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 3: { + message.rowsLimit = reader.int64(); + break; + } + case 6: { + message.rowsLimitPercent = reader.int32(); + break; + } + case 4: { + message.sampleMethod = reader.int32(); + break; + } + case 5: { + if (!(message.excludedFields && message.excludedFields.length)) + message.excludedFields = []; + message.excludedFields.push($root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 7: { + if (!(message.includedFields && message.includedFields.length)) + message.includedFields = []; + message.includedFields.push($root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.BigQueryOptions} BigQueryOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryOptions message. + * @function verify + * @memberof google.privacy.dlp.v2.BigQueryOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.tableReference != null && message.hasOwnProperty("tableReference")) { + var error = $root.google.privacy.dlp.v2.BigQueryTable.verify(message.tableReference, long + 1); + if (error) + return "tableReference." + error; + } + if (message.identifyingFields != null && message.hasOwnProperty("identifyingFields")) { + if (!Array.isArray(message.identifyingFields)) + return "identifyingFields: array expected"; + for (var i = 0; i < message.identifyingFields.length; ++i) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.identifyingFields[i], long + 1); + if (error) + return "identifyingFields." + error; + } + } + if (message.rowsLimit != null && message.hasOwnProperty("rowsLimit")) + if (!$util.isInteger(message.rowsLimit) && !(message.rowsLimit && $util.isInteger(message.rowsLimit.low) && $util.isInteger(message.rowsLimit.high))) + return "rowsLimit: integer|Long expected"; + if (message.rowsLimitPercent != null && message.hasOwnProperty("rowsLimitPercent")) + if (!$util.isInteger(message.rowsLimitPercent)) + return "rowsLimitPercent: integer expected"; + if (message.sampleMethod != null && message.hasOwnProperty("sampleMethod")) + switch (message.sampleMethod) { + default: + return "sampleMethod: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.excludedFields != null && message.hasOwnProperty("excludedFields")) { + if (!Array.isArray(message.excludedFields)) + return "excludedFields: array expected"; + for (var i = 0; i < message.excludedFields.length; ++i) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.excludedFields[i], long + 1); + if (error) + return "excludedFields." + error; + } + } + if (message.includedFields != null && message.hasOwnProperty("includedFields")) { + if (!Array.isArray(message.includedFields)) + return "includedFields: array expected"; + for (var i = 0; i < message.includedFields.length; ++i) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.includedFields[i], long + 1); + if (error) + return "includedFields." + error; + } + } + return null; + }; + + /** + * Creates a BigQueryOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.BigQueryOptions + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.BigQueryOptions} BigQueryOptions + */ + BigQueryOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.BigQueryOptions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.BigQueryOptions(); + if (object.tableReference != null) { + if (typeof object.tableReference !== "object") + throw TypeError(".google.privacy.dlp.v2.BigQueryOptions.tableReference: object expected"); + message.tableReference = $root.google.privacy.dlp.v2.BigQueryTable.fromObject(object.tableReference, long + 1); + } + if (object.identifyingFields) { + if (!Array.isArray(object.identifyingFields)) + throw TypeError(".google.privacy.dlp.v2.BigQueryOptions.identifyingFields: array expected"); + message.identifyingFields = []; + for (var i = 0; i < object.identifyingFields.length; ++i) { + if (typeof object.identifyingFields[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.BigQueryOptions.identifyingFields: object expected"); + message.identifyingFields[i] = $root.google.privacy.dlp.v2.FieldId.fromObject(object.identifyingFields[i], long + 1); + } + } + if (object.rowsLimit != null) + if ($util.Long) + (message.rowsLimit = $util.Long.fromValue(object.rowsLimit)).unsigned = false; + else if (typeof object.rowsLimit === "string") + message.rowsLimit = parseInt(object.rowsLimit, 10); + else if (typeof object.rowsLimit === "number") + message.rowsLimit = object.rowsLimit; + else if (typeof object.rowsLimit === "object") + message.rowsLimit = new $util.LongBits(object.rowsLimit.low >>> 0, object.rowsLimit.high >>> 0).toNumber(); + if (object.rowsLimitPercent != null) + message.rowsLimitPercent = object.rowsLimitPercent | 0; + switch (object.sampleMethod) { + default: + if (typeof object.sampleMethod === "number") { + message.sampleMethod = object.sampleMethod; + break; + } + break; + case "SAMPLE_METHOD_UNSPECIFIED": + case 0: + message.sampleMethod = 0; + break; + case "TOP": + case 1: + message.sampleMethod = 1; + break; + case "RANDOM_START": + case 2: + message.sampleMethod = 2; + break; + } + if (object.excludedFields) { + if (!Array.isArray(object.excludedFields)) + throw TypeError(".google.privacy.dlp.v2.BigQueryOptions.excludedFields: array expected"); + message.excludedFields = []; + for (var i = 0; i < object.excludedFields.length; ++i) { + if (typeof object.excludedFields[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.BigQueryOptions.excludedFields: object expected"); + message.excludedFields[i] = $root.google.privacy.dlp.v2.FieldId.fromObject(object.excludedFields[i], long + 1); + } + } + if (object.includedFields) { + if (!Array.isArray(object.includedFields)) + throw TypeError(".google.privacy.dlp.v2.BigQueryOptions.includedFields: array expected"); + message.includedFields = []; + for (var i = 0; i < object.includedFields.length; ++i) { + if (typeof object.includedFields[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.BigQueryOptions.includedFields: object expected"); + message.includedFields[i] = $root.google.privacy.dlp.v2.FieldId.fromObject(object.includedFields[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a BigQueryOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.BigQueryOptions + * @static + * @param {google.privacy.dlp.v2.BigQueryOptions} message BigQueryOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.identifyingFields = []; + object.excludedFields = []; + object.includedFields = []; + } + if (options.defaults) { + object.tableReference = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rowsLimit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.rowsLimit = options.longs === String ? "0" : 0; + object.sampleMethod = options.enums === String ? "SAMPLE_METHOD_UNSPECIFIED" : 0; + object.rowsLimitPercent = 0; + } + if (message.tableReference != null && message.hasOwnProperty("tableReference")) + object.tableReference = $root.google.privacy.dlp.v2.BigQueryTable.toObject(message.tableReference, options); + if (message.identifyingFields && message.identifyingFields.length) { + object.identifyingFields = []; + for (var j = 0; j < message.identifyingFields.length; ++j) + object.identifyingFields[j] = $root.google.privacy.dlp.v2.FieldId.toObject(message.identifyingFields[j], options); + } + if (message.rowsLimit != null && message.hasOwnProperty("rowsLimit")) + if (typeof message.rowsLimit === "number") + object.rowsLimit = options.longs === String ? String(message.rowsLimit) : message.rowsLimit; + else + object.rowsLimit = options.longs === String ? $util.Long.prototype.toString.call(message.rowsLimit) : options.longs === Number ? new $util.LongBits(message.rowsLimit.low >>> 0, message.rowsLimit.high >>> 0).toNumber() : message.rowsLimit; + if (message.sampleMethod != null && message.hasOwnProperty("sampleMethod")) + object.sampleMethod = options.enums === String ? $root.google.privacy.dlp.v2.BigQueryOptions.SampleMethod[message.sampleMethod] === undefined ? message.sampleMethod : $root.google.privacy.dlp.v2.BigQueryOptions.SampleMethod[message.sampleMethod] : message.sampleMethod; + if (message.excludedFields && message.excludedFields.length) { + object.excludedFields = []; + for (var j = 0; j < message.excludedFields.length; ++j) + object.excludedFields[j] = $root.google.privacy.dlp.v2.FieldId.toObject(message.excludedFields[j], options); + } + if (message.rowsLimitPercent != null && message.hasOwnProperty("rowsLimitPercent")) + object.rowsLimitPercent = message.rowsLimitPercent; + if (message.includedFields && message.includedFields.length) { + object.includedFields = []; + for (var j = 0; j < message.includedFields.length; ++j) + object.includedFields[j] = $root.google.privacy.dlp.v2.FieldId.toObject(message.includedFields[j], options); + } + return object; + }; + + /** + * Converts this BigQueryOptions to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.BigQueryOptions + * @instance + * @returns {Object.} JSON object + */ + BigQueryOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryOptions + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.BigQueryOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.BigQueryOptions"; + }; + + /** + * SampleMethod enum. + * @name google.privacy.dlp.v2.BigQueryOptions.SampleMethod + * @enum {number} + * @property {number} SAMPLE_METHOD_UNSPECIFIED=0 SAMPLE_METHOD_UNSPECIFIED value + * @property {number} TOP=1 TOP value + * @property {number} RANDOM_START=2 RANDOM_START value + */ + BigQueryOptions.SampleMethod = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SAMPLE_METHOD_UNSPECIFIED"] = 0; + values[valuesById[1] = "TOP"] = 1; + values[valuesById[2] = "RANDOM_START"] = 2; + return values; + })(); + + return BigQueryOptions; + })(); + + v2.StorageConfig = (function() { + + /** + * Properties of a StorageConfig. + * @memberof google.privacy.dlp.v2 + * @interface IStorageConfig + * @property {google.privacy.dlp.v2.IDatastoreOptions|null} [datastoreOptions] StorageConfig datastoreOptions + * @property {google.privacy.dlp.v2.ICloudStorageOptions|null} [cloudStorageOptions] StorageConfig cloudStorageOptions + * @property {google.privacy.dlp.v2.IBigQueryOptions|null} [bigQueryOptions] StorageConfig bigQueryOptions + * @property {google.privacy.dlp.v2.IHybridOptions|null} [hybridOptions] StorageConfig hybridOptions + * @property {google.privacy.dlp.v2.StorageConfig.ITimespanConfig|null} [timespanConfig] StorageConfig timespanConfig + */ + + /** + * Constructs a new StorageConfig. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a StorageConfig. + * @implements IStorageConfig + * @constructor + * @param {google.privacy.dlp.v2.IStorageConfig=} [properties] Properties to set + */ + function StorageConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * StorageConfig datastoreOptions. + * @member {google.privacy.dlp.v2.IDatastoreOptions|null|undefined} datastoreOptions + * @memberof google.privacy.dlp.v2.StorageConfig + * @instance + */ + StorageConfig.prototype.datastoreOptions = null; + + /** + * StorageConfig cloudStorageOptions. + * @member {google.privacy.dlp.v2.ICloudStorageOptions|null|undefined} cloudStorageOptions + * @memberof google.privacy.dlp.v2.StorageConfig + * @instance + */ + StorageConfig.prototype.cloudStorageOptions = null; + + /** + * StorageConfig bigQueryOptions. + * @member {google.privacy.dlp.v2.IBigQueryOptions|null|undefined} bigQueryOptions + * @memberof google.privacy.dlp.v2.StorageConfig + * @instance + */ + StorageConfig.prototype.bigQueryOptions = null; + + /** + * StorageConfig hybridOptions. + * @member {google.privacy.dlp.v2.IHybridOptions|null|undefined} hybridOptions + * @memberof google.privacy.dlp.v2.StorageConfig + * @instance + */ + StorageConfig.prototype.hybridOptions = null; + + /** + * StorageConfig timespanConfig. + * @member {google.privacy.dlp.v2.StorageConfig.ITimespanConfig|null|undefined} timespanConfig + * @memberof google.privacy.dlp.v2.StorageConfig + * @instance + */ + StorageConfig.prototype.timespanConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * StorageConfig type. + * @member {"datastoreOptions"|"cloudStorageOptions"|"bigQueryOptions"|"hybridOptions"|undefined} type + * @memberof google.privacy.dlp.v2.StorageConfig + * @instance + */ + Object.defineProperty(StorageConfig.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["datastoreOptions", "cloudStorageOptions", "bigQueryOptions", "hybridOptions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new StorageConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.StorageConfig + * @static + * @param {google.privacy.dlp.v2.IStorageConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.StorageConfig} StorageConfig instance + */ + StorageConfig.create = function create(properties) { + return new StorageConfig(properties); + }; + + /** + * Encodes the specified StorageConfig message. Does not implicitly {@link google.privacy.dlp.v2.StorageConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.StorageConfig + * @static + * @param {google.privacy.dlp.v2.IStorageConfig} message StorageConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.datastoreOptions != null && Object.hasOwnProperty.call(message, "datastoreOptions")) + $root.google.privacy.dlp.v2.DatastoreOptions.encode(message.datastoreOptions, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.cloudStorageOptions != null && Object.hasOwnProperty.call(message, "cloudStorageOptions")) + $root.google.privacy.dlp.v2.CloudStorageOptions.encode(message.cloudStorageOptions, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.bigQueryOptions != null && Object.hasOwnProperty.call(message, "bigQueryOptions")) + $root.google.privacy.dlp.v2.BigQueryOptions.encode(message.bigQueryOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.timespanConfig != null && Object.hasOwnProperty.call(message, "timespanConfig")) + $root.google.privacy.dlp.v2.StorageConfig.TimespanConfig.encode(message.timespanConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.hybridOptions != null && Object.hasOwnProperty.call(message, "hybridOptions")) + $root.google.privacy.dlp.v2.HybridOptions.encode(message.hybridOptions, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified StorageConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StorageConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.StorageConfig + * @static + * @param {google.privacy.dlp.v2.IStorageConfig} message StorageConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StorageConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.StorageConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.StorageConfig} StorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.StorageConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.datastoreOptions = $root.google.privacy.dlp.v2.DatastoreOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.cloudStorageOptions = $root.google.privacy.dlp.v2.CloudStorageOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.bigQueryOptions = $root.google.privacy.dlp.v2.BigQueryOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 9: { + message.hybridOptions = $root.google.privacy.dlp.v2.HybridOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 6: { + message.timespanConfig = $root.google.privacy.dlp.v2.StorageConfig.TimespanConfig.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a StorageConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.StorageConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.StorageConfig} StorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StorageConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.StorageConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StorageConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.datastoreOptions != null && message.hasOwnProperty("datastoreOptions")) { + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.DatastoreOptions.verify(message.datastoreOptions, long + 1); + if (error) + return "datastoreOptions." + error; + } + } + if (message.cloudStorageOptions != null && message.hasOwnProperty("cloudStorageOptions")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.CloudStorageOptions.verify(message.cloudStorageOptions, long + 1); + if (error) + return "cloudStorageOptions." + error; + } + } + if (message.bigQueryOptions != null && message.hasOwnProperty("bigQueryOptions")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.BigQueryOptions.verify(message.bigQueryOptions, long + 1); + if (error) + return "bigQueryOptions." + error; + } + } + if (message.hybridOptions != null && message.hasOwnProperty("hybridOptions")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.HybridOptions.verify(message.hybridOptions, long + 1); + if (error) + return "hybridOptions." + error; + } + } + if (message.timespanConfig != null && message.hasOwnProperty("timespanConfig")) { + var error = $root.google.privacy.dlp.v2.StorageConfig.TimespanConfig.verify(message.timespanConfig, long + 1); + if (error) + return "timespanConfig." + error; + } + return null; + }; + + /** + * Creates a StorageConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.StorageConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.StorageConfig} StorageConfig + */ + StorageConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.StorageConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.StorageConfig(); + if (object.datastoreOptions != null) { + if (typeof object.datastoreOptions !== "object") + throw TypeError(".google.privacy.dlp.v2.StorageConfig.datastoreOptions: object expected"); + message.datastoreOptions = $root.google.privacy.dlp.v2.DatastoreOptions.fromObject(object.datastoreOptions, long + 1); + } + if (object.cloudStorageOptions != null) { + if (typeof object.cloudStorageOptions !== "object") + throw TypeError(".google.privacy.dlp.v2.StorageConfig.cloudStorageOptions: object expected"); + message.cloudStorageOptions = $root.google.privacy.dlp.v2.CloudStorageOptions.fromObject(object.cloudStorageOptions, long + 1); + } + if (object.bigQueryOptions != null) { + if (typeof object.bigQueryOptions !== "object") + throw TypeError(".google.privacy.dlp.v2.StorageConfig.bigQueryOptions: object expected"); + message.bigQueryOptions = $root.google.privacy.dlp.v2.BigQueryOptions.fromObject(object.bigQueryOptions, long + 1); + } + if (object.hybridOptions != null) { + if (typeof object.hybridOptions !== "object") + throw TypeError(".google.privacy.dlp.v2.StorageConfig.hybridOptions: object expected"); + message.hybridOptions = $root.google.privacy.dlp.v2.HybridOptions.fromObject(object.hybridOptions, long + 1); + } + if (object.timespanConfig != null) { + if (typeof object.timespanConfig !== "object") + throw TypeError(".google.privacy.dlp.v2.StorageConfig.timespanConfig: object expected"); + message.timespanConfig = $root.google.privacy.dlp.v2.StorageConfig.TimespanConfig.fromObject(object.timespanConfig, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a StorageConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.StorageConfig + * @static + * @param {google.privacy.dlp.v2.StorageConfig} message StorageConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StorageConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.timespanConfig = null; + if (message.datastoreOptions != null && message.hasOwnProperty("datastoreOptions")) { + object.datastoreOptions = $root.google.privacy.dlp.v2.DatastoreOptions.toObject(message.datastoreOptions, options); + if (options.oneofs) + object.type = "datastoreOptions"; + } + if (message.cloudStorageOptions != null && message.hasOwnProperty("cloudStorageOptions")) { + object.cloudStorageOptions = $root.google.privacy.dlp.v2.CloudStorageOptions.toObject(message.cloudStorageOptions, options); + if (options.oneofs) + object.type = "cloudStorageOptions"; + } + if (message.bigQueryOptions != null && message.hasOwnProperty("bigQueryOptions")) { + object.bigQueryOptions = $root.google.privacy.dlp.v2.BigQueryOptions.toObject(message.bigQueryOptions, options); + if (options.oneofs) + object.type = "bigQueryOptions"; + } + if (message.timespanConfig != null && message.hasOwnProperty("timespanConfig")) + object.timespanConfig = $root.google.privacy.dlp.v2.StorageConfig.TimespanConfig.toObject(message.timespanConfig, options); + if (message.hybridOptions != null && message.hasOwnProperty("hybridOptions")) { + object.hybridOptions = $root.google.privacy.dlp.v2.HybridOptions.toObject(message.hybridOptions, options); + if (options.oneofs) + object.type = "hybridOptions"; + } + return object; + }; + + /** + * Converts this StorageConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.StorageConfig + * @instance + * @returns {Object.} JSON object + */ + StorageConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StorageConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.StorageConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StorageConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.StorageConfig"; + }; + + StorageConfig.TimespanConfig = (function() { + + /** + * Properties of a TimespanConfig. + * @memberof google.privacy.dlp.v2.StorageConfig + * @interface ITimespanConfig + * @property {google.protobuf.ITimestamp|null} [startTime] TimespanConfig startTime + * @property {google.protobuf.ITimestamp|null} [endTime] TimespanConfig endTime + * @property {google.privacy.dlp.v2.IFieldId|null} [timestampField] TimespanConfig timestampField + * @property {boolean|null} [enableAutoPopulationOfTimespanConfig] TimespanConfig enableAutoPopulationOfTimespanConfig + */ + + /** + * Constructs a new TimespanConfig. + * @memberof google.privacy.dlp.v2.StorageConfig + * @classdesc Represents a TimespanConfig. + * @implements ITimespanConfig + * @constructor + * @param {google.privacy.dlp.v2.StorageConfig.ITimespanConfig=} [properties] Properties to set + */ + function TimespanConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimespanConfig startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.privacy.dlp.v2.StorageConfig.TimespanConfig + * @instance + */ + TimespanConfig.prototype.startTime = null; + + /** + * TimespanConfig endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.privacy.dlp.v2.StorageConfig.TimespanConfig + * @instance + */ + TimespanConfig.prototype.endTime = null; + + /** + * TimespanConfig timestampField. + * @member {google.privacy.dlp.v2.IFieldId|null|undefined} timestampField + * @memberof google.privacy.dlp.v2.StorageConfig.TimespanConfig + * @instance + */ + TimespanConfig.prototype.timestampField = null; + + /** + * TimespanConfig enableAutoPopulationOfTimespanConfig. + * @member {boolean} enableAutoPopulationOfTimespanConfig + * @memberof google.privacy.dlp.v2.StorageConfig.TimespanConfig + * @instance + */ + TimespanConfig.prototype.enableAutoPopulationOfTimespanConfig = false; + + /** + * Creates a new TimespanConfig instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.StorageConfig.TimespanConfig + * @static + * @param {google.privacy.dlp.v2.StorageConfig.ITimespanConfig=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.StorageConfig.TimespanConfig} TimespanConfig instance + */ + TimespanConfig.create = function create(properties) { + return new TimespanConfig(properties); + }; + + /** + * Encodes the specified TimespanConfig message. Does not implicitly {@link google.privacy.dlp.v2.StorageConfig.TimespanConfig.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.StorageConfig.TimespanConfig + * @static + * @param {google.privacy.dlp.v2.StorageConfig.ITimespanConfig} message TimespanConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimespanConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.timestampField != null && Object.hasOwnProperty.call(message, "timestampField")) + $root.google.privacy.dlp.v2.FieldId.encode(message.timestampField, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enableAutoPopulationOfTimespanConfig != null && Object.hasOwnProperty.call(message, "enableAutoPopulationOfTimespanConfig")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.enableAutoPopulationOfTimespanConfig); + return writer; + }; + + /** + * Encodes the specified TimespanConfig message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.StorageConfig.TimespanConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.StorageConfig.TimespanConfig + * @static + * @param {google.privacy.dlp.v2.StorageConfig.ITimespanConfig} message TimespanConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimespanConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimespanConfig message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.StorageConfig.TimespanConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.StorageConfig.TimespanConfig} TimespanConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimespanConfig.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.StorageConfig.TimespanConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.timestampField = $root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.enableAutoPopulationOfTimespanConfig = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TimespanConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.StorageConfig.TimespanConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.StorageConfig.TimespanConfig} TimespanConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimespanConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimespanConfig message. + * @function verify + * @memberof google.privacy.dlp.v2.StorageConfig.TimespanConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimespanConfig.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime, long + 1); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime, long + 1); + if (error) + return "endTime." + error; + } + if (message.timestampField != null && message.hasOwnProperty("timestampField")) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.timestampField, long + 1); + if (error) + return "timestampField." + error; + } + if (message.enableAutoPopulationOfTimespanConfig != null && message.hasOwnProperty("enableAutoPopulationOfTimespanConfig")) + if (typeof message.enableAutoPopulationOfTimespanConfig !== "boolean") + return "enableAutoPopulationOfTimespanConfig: boolean expected"; + return null; + }; + + /** + * Creates a TimespanConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.StorageConfig.TimespanConfig + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.StorageConfig.TimespanConfig} TimespanConfig + */ + TimespanConfig.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.StorageConfig.TimespanConfig) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.StorageConfig.TimespanConfig(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.privacy.dlp.v2.StorageConfig.TimespanConfig.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime, long + 1); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.privacy.dlp.v2.StorageConfig.TimespanConfig.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime, long + 1); + } + if (object.timestampField != null) { + if (typeof object.timestampField !== "object") + throw TypeError(".google.privacy.dlp.v2.StorageConfig.TimespanConfig.timestampField: object expected"); + message.timestampField = $root.google.privacy.dlp.v2.FieldId.fromObject(object.timestampField, long + 1); + } + if (object.enableAutoPopulationOfTimespanConfig != null) + message.enableAutoPopulationOfTimespanConfig = Boolean(object.enableAutoPopulationOfTimespanConfig); + return message; + }; + + /** + * Creates a plain object from a TimespanConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.StorageConfig.TimespanConfig + * @static + * @param {google.privacy.dlp.v2.StorageConfig.TimespanConfig} message TimespanConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimespanConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + object.timestampField = null; + object.enableAutoPopulationOfTimespanConfig = false; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.timestampField != null && message.hasOwnProperty("timestampField")) + object.timestampField = $root.google.privacy.dlp.v2.FieldId.toObject(message.timestampField, options); + if (message.enableAutoPopulationOfTimespanConfig != null && message.hasOwnProperty("enableAutoPopulationOfTimespanConfig")) + object.enableAutoPopulationOfTimespanConfig = message.enableAutoPopulationOfTimespanConfig; + return object; + }; + + /** + * Converts this TimespanConfig to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.StorageConfig.TimespanConfig + * @instance + * @returns {Object.} JSON object + */ + TimespanConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimespanConfig + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.StorageConfig.TimespanConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimespanConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.StorageConfig.TimespanConfig"; + }; + + return TimespanConfig; + })(); + + return StorageConfig; + })(); + + v2.HybridOptions = (function() { + + /** + * Properties of a HybridOptions. + * @memberof google.privacy.dlp.v2 + * @interface IHybridOptions + * @property {string|null} [description] HybridOptions description + * @property {Array.|null} [requiredFindingLabelKeys] HybridOptions requiredFindingLabelKeys + * @property {Object.|null} [labels] HybridOptions labels + * @property {google.privacy.dlp.v2.ITableOptions|null} [tableOptions] HybridOptions tableOptions + */ + + /** + * Constructs a new HybridOptions. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a HybridOptions. + * @implements IHybridOptions + * @constructor + * @param {google.privacy.dlp.v2.IHybridOptions=} [properties] Properties to set + */ + function HybridOptions(properties) { + this.requiredFindingLabelKeys = []; + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * HybridOptions description. + * @member {string} description + * @memberof google.privacy.dlp.v2.HybridOptions + * @instance + */ + HybridOptions.prototype.description = ""; + + /** + * HybridOptions requiredFindingLabelKeys. + * @member {Array.} requiredFindingLabelKeys + * @memberof google.privacy.dlp.v2.HybridOptions + * @instance + */ + HybridOptions.prototype.requiredFindingLabelKeys = $util.emptyArray; + + /** + * HybridOptions labels. + * @member {Object.} labels + * @memberof google.privacy.dlp.v2.HybridOptions + * @instance + */ + HybridOptions.prototype.labels = $util.emptyObject; + + /** + * HybridOptions tableOptions. + * @member {google.privacy.dlp.v2.ITableOptions|null|undefined} tableOptions + * @memberof google.privacy.dlp.v2.HybridOptions + * @instance + */ + HybridOptions.prototype.tableOptions = null; + + /** + * Creates a new HybridOptions instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.HybridOptions + * @static + * @param {google.privacy.dlp.v2.IHybridOptions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.HybridOptions} HybridOptions instance + */ + HybridOptions.create = function create(properties) { + return new HybridOptions(properties); + }; + + /** + * Encodes the specified HybridOptions message. Does not implicitly {@link google.privacy.dlp.v2.HybridOptions.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.HybridOptions + * @static + * @param {google.privacy.dlp.v2.IHybridOptions} message HybridOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HybridOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); + if (message.requiredFindingLabelKeys != null && message.requiredFindingLabelKeys.length) + for (var i = 0; i < message.requiredFindingLabelKeys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requiredFindingLabelKeys[i]); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.tableOptions != null && Object.hasOwnProperty.call(message, "tableOptions")) + $root.google.privacy.dlp.v2.TableOptions.encode(message.tableOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified HybridOptions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.HybridOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.HybridOptions + * @static + * @param {google.privacy.dlp.v2.IHybridOptions} message HybridOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HybridOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HybridOptions message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.HybridOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.HybridOptions} HybridOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HybridOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.HybridOptions(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.description = reader.string(); + break; + } + case 2: { + if (!(message.requiredFindingLabelKeys && message.requiredFindingLabelKeys.length)) + message.requiredFindingLabelKeys = []; + message.requiredFindingLabelKeys.push(reader.string()); + break; + } + case 3: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.labels, key); + message.labels[key] = value; + break; + } + case 4: { + message.tableOptions = $root.google.privacy.dlp.v2.TableOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a HybridOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.HybridOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.HybridOptions} HybridOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HybridOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HybridOptions message. + * @function verify + * @memberof google.privacy.dlp.v2.HybridOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HybridOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.requiredFindingLabelKeys != null && message.hasOwnProperty("requiredFindingLabelKeys")) { + if (!Array.isArray(message.requiredFindingLabelKeys)) + return "requiredFindingLabelKeys: array expected"; + for (var i = 0; i < message.requiredFindingLabelKeys.length; ++i) + if (!$util.isString(message.requiredFindingLabelKeys[i])) + return "requiredFindingLabelKeys: string[] expected"; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.tableOptions != null && message.hasOwnProperty("tableOptions")) { + var error = $root.google.privacy.dlp.v2.TableOptions.verify(message.tableOptions, long + 1); + if (error) + return "tableOptions." + error; + } + return null; + }; + + /** + * Creates a HybridOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.HybridOptions + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.HybridOptions} HybridOptions + */ + HybridOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.HybridOptions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.HybridOptions(); + if (object.description != null) + message.description = String(object.description); + if (object.requiredFindingLabelKeys) { + if (!Array.isArray(object.requiredFindingLabelKeys)) + throw TypeError(".google.privacy.dlp.v2.HybridOptions.requiredFindingLabelKeys: array expected"); + message.requiredFindingLabelKeys = []; + for (var i = 0; i < object.requiredFindingLabelKeys.length; ++i) + message.requiredFindingLabelKeys[i] = String(object.requiredFindingLabelKeys[i]); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.privacy.dlp.v2.HybridOptions.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.labels, keys[i]); + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + } + if (object.tableOptions != null) { + if (typeof object.tableOptions !== "object") + throw TypeError(".google.privacy.dlp.v2.HybridOptions.tableOptions: object expected"); + message.tableOptions = $root.google.privacy.dlp.v2.TableOptions.fromObject(object.tableOptions, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a HybridOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.HybridOptions + * @static + * @param {google.privacy.dlp.v2.HybridOptions} message HybridOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HybridOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.requiredFindingLabelKeys = []; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.description = ""; + object.tableOptions = null; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.requiredFindingLabelKeys && message.requiredFindingLabelKeys.length) { + object.requiredFindingLabelKeys = []; + for (var j = 0; j < message.requiredFindingLabelKeys.length; ++j) + object.requiredFindingLabelKeys[j] = message.requiredFindingLabelKeys[j]; + } + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.labels, keys2[j]); + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + } + if (message.tableOptions != null && message.hasOwnProperty("tableOptions")) + object.tableOptions = $root.google.privacy.dlp.v2.TableOptions.toObject(message.tableOptions, options); + return object; + }; + + /** + * Converts this HybridOptions to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.HybridOptions + * @instance + * @returns {Object.} JSON object + */ + HybridOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HybridOptions + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.HybridOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HybridOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.HybridOptions"; + }; + + return HybridOptions; + })(); + + v2.BigQueryKey = (function() { + + /** + * Properties of a BigQueryKey. + * @memberof google.privacy.dlp.v2 + * @interface IBigQueryKey + * @property {google.privacy.dlp.v2.IBigQueryTable|null} [tableReference] BigQueryKey tableReference + * @property {number|Long|null} [rowNumber] BigQueryKey rowNumber + */ + + /** + * Constructs a new BigQueryKey. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a BigQueryKey. + * @implements IBigQueryKey + * @constructor + * @param {google.privacy.dlp.v2.IBigQueryKey=} [properties] Properties to set + */ + function BigQueryKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryKey tableReference. + * @member {google.privacy.dlp.v2.IBigQueryTable|null|undefined} tableReference + * @memberof google.privacy.dlp.v2.BigQueryKey + * @instance + */ + BigQueryKey.prototype.tableReference = null; + + /** + * BigQueryKey rowNumber. + * @member {number|Long} rowNumber + * @memberof google.privacy.dlp.v2.BigQueryKey + * @instance + */ + BigQueryKey.prototype.rowNumber = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Creates a new BigQueryKey instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.BigQueryKey + * @static + * @param {google.privacy.dlp.v2.IBigQueryKey=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.BigQueryKey} BigQueryKey instance + */ + BigQueryKey.create = function create(properties) { + return new BigQueryKey(properties); + }; + + /** + * Encodes the specified BigQueryKey message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryKey.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.BigQueryKey + * @static + * @param {google.privacy.dlp.v2.IBigQueryKey} message BigQueryKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.tableReference != null && Object.hasOwnProperty.call(message, "tableReference")) + $root.google.privacy.dlp.v2.BigQueryTable.encode(message.tableReference, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.rowNumber != null && Object.hasOwnProperty.call(message, "rowNumber")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.rowNumber); + return writer; + }; + + /** + * Encodes the specified BigQueryKey message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryKey.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryKey + * @static + * @param {google.privacy.dlp.v2.IBigQueryKey} message BigQueryKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryKey message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.BigQueryKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.BigQueryKey} BigQueryKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryKey.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.BigQueryKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.tableReference = $root.google.privacy.dlp.v2.BigQueryTable.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.rowNumber = reader.int64(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.BigQueryKey} BigQueryKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryKey message. + * @function verify + * @memberof google.privacy.dlp.v2.BigQueryKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryKey.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.tableReference != null && message.hasOwnProperty("tableReference")) { + var error = $root.google.privacy.dlp.v2.BigQueryTable.verify(message.tableReference, long + 1); + if (error) + return "tableReference." + error; + } + if (message.rowNumber != null && message.hasOwnProperty("rowNumber")) + if (!$util.isInteger(message.rowNumber) && !(message.rowNumber && $util.isInteger(message.rowNumber.low) && $util.isInteger(message.rowNumber.high))) + return "rowNumber: integer|Long expected"; + return null; + }; + + /** + * Creates a BigQueryKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.BigQueryKey + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.BigQueryKey} BigQueryKey + */ + BigQueryKey.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.BigQueryKey) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.BigQueryKey(); + if (object.tableReference != null) { + if (typeof object.tableReference !== "object") + throw TypeError(".google.privacy.dlp.v2.BigQueryKey.tableReference: object expected"); + message.tableReference = $root.google.privacy.dlp.v2.BigQueryTable.fromObject(object.tableReference, long + 1); + } + if (object.rowNumber != null) + if ($util.Long) + (message.rowNumber = $util.Long.fromValue(object.rowNumber)).unsigned = false; + else if (typeof object.rowNumber === "string") + message.rowNumber = parseInt(object.rowNumber, 10); + else if (typeof object.rowNumber === "number") + message.rowNumber = object.rowNumber; + else if (typeof object.rowNumber === "object") + message.rowNumber = new $util.LongBits(object.rowNumber.low >>> 0, object.rowNumber.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a BigQueryKey message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.BigQueryKey + * @static + * @param {google.privacy.dlp.v2.BigQueryKey} message BigQueryKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.tableReference = null; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.rowNumber = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.rowNumber = options.longs === String ? "0" : 0; + } + if (message.tableReference != null && message.hasOwnProperty("tableReference")) + object.tableReference = $root.google.privacy.dlp.v2.BigQueryTable.toObject(message.tableReference, options); + if (message.rowNumber != null && message.hasOwnProperty("rowNumber")) + if (typeof message.rowNumber === "number") + object.rowNumber = options.longs === String ? String(message.rowNumber) : message.rowNumber; + else + object.rowNumber = options.longs === String ? $util.Long.prototype.toString.call(message.rowNumber) : options.longs === Number ? new $util.LongBits(message.rowNumber.low >>> 0, message.rowNumber.high >>> 0).toNumber() : message.rowNumber; + return object; + }; + + /** + * Converts this BigQueryKey to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.BigQueryKey + * @instance + * @returns {Object.} JSON object + */ + BigQueryKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryKey + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.BigQueryKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.BigQueryKey"; + }; + + return BigQueryKey; + })(); + + v2.DatastoreKey = (function() { + + /** + * Properties of a DatastoreKey. + * @memberof google.privacy.dlp.v2 + * @interface IDatastoreKey + * @property {google.privacy.dlp.v2.IKey|null} [entityKey] DatastoreKey entityKey + */ + + /** + * Constructs a new DatastoreKey. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a DatastoreKey. + * @implements IDatastoreKey + * @constructor + * @param {google.privacy.dlp.v2.IDatastoreKey=} [properties] Properties to set + */ + function DatastoreKey(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DatastoreKey entityKey. + * @member {google.privacy.dlp.v2.IKey|null|undefined} entityKey + * @memberof google.privacy.dlp.v2.DatastoreKey + * @instance + */ + DatastoreKey.prototype.entityKey = null; + + /** + * Creates a new DatastoreKey instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.DatastoreKey + * @static + * @param {google.privacy.dlp.v2.IDatastoreKey=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.DatastoreKey} DatastoreKey instance + */ + DatastoreKey.create = function create(properties) { + return new DatastoreKey(properties); + }; + + /** + * Encodes the specified DatastoreKey message. Does not implicitly {@link google.privacy.dlp.v2.DatastoreKey.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.DatastoreKey + * @static + * @param {google.privacy.dlp.v2.IDatastoreKey} message DatastoreKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatastoreKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.entityKey != null && Object.hasOwnProperty.call(message, "entityKey")) + $root.google.privacy.dlp.v2.Key.encode(message.entityKey, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DatastoreKey message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.DatastoreKey.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.DatastoreKey + * @static + * @param {google.privacy.dlp.v2.IDatastoreKey} message DatastoreKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatastoreKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatastoreKey message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.DatastoreKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.DatastoreKey} DatastoreKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatastoreKey.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.DatastoreKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.entityKey = $root.google.privacy.dlp.v2.Key.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DatastoreKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.DatastoreKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.DatastoreKey} DatastoreKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatastoreKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatastoreKey message. + * @function verify + * @memberof google.privacy.dlp.v2.DatastoreKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatastoreKey.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.entityKey != null && message.hasOwnProperty("entityKey")) { + var error = $root.google.privacy.dlp.v2.Key.verify(message.entityKey, long + 1); + if (error) + return "entityKey." + error; + } + return null; + }; + + /** + * Creates a DatastoreKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.DatastoreKey + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.DatastoreKey} DatastoreKey + */ + DatastoreKey.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.DatastoreKey) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.DatastoreKey(); + if (object.entityKey != null) { + if (typeof object.entityKey !== "object") + throw TypeError(".google.privacy.dlp.v2.DatastoreKey.entityKey: object expected"); + message.entityKey = $root.google.privacy.dlp.v2.Key.fromObject(object.entityKey, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a DatastoreKey message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.DatastoreKey + * @static + * @param {google.privacy.dlp.v2.DatastoreKey} message DatastoreKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatastoreKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.entityKey = null; + if (message.entityKey != null && message.hasOwnProperty("entityKey")) + object.entityKey = $root.google.privacy.dlp.v2.Key.toObject(message.entityKey, options); + return object; + }; + + /** + * Converts this DatastoreKey to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.DatastoreKey + * @instance + * @returns {Object.} JSON object + */ + DatastoreKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatastoreKey + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.DatastoreKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatastoreKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.DatastoreKey"; + }; + + return DatastoreKey; + })(); + + v2.Key = (function() { + + /** + * Properties of a Key. + * @memberof google.privacy.dlp.v2 + * @interface IKey + * @property {google.privacy.dlp.v2.IPartitionId|null} [partitionId] Key partitionId + * @property {Array.|null} [path] Key path + */ + + /** + * Constructs a new Key. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a Key. + * @implements IKey + * @constructor + * @param {google.privacy.dlp.v2.IKey=} [properties] Properties to set + */ + function Key(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Key partitionId. + * @member {google.privacy.dlp.v2.IPartitionId|null|undefined} partitionId + * @memberof google.privacy.dlp.v2.Key + * @instance + */ + Key.prototype.partitionId = null; + + /** + * Key path. + * @member {Array.} path + * @memberof google.privacy.dlp.v2.Key + * @instance + */ + Key.prototype.path = $util.emptyArray; + + /** + * Creates a new Key instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Key + * @static + * @param {google.privacy.dlp.v2.IKey=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Key} Key instance + */ + Key.create = function create(properties) { + return new Key(properties); + }; + + /** + * Encodes the specified Key message. Does not implicitly {@link google.privacy.dlp.v2.Key.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Key + * @static + * @param {google.privacy.dlp.v2.IKey} message Key message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Key.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.partitionId != null && Object.hasOwnProperty.call(message, "partitionId")) + $root.google.privacy.dlp.v2.PartitionId.encode(message.partitionId, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.path != null && message.path.length) + for (var i = 0; i < message.path.length; ++i) + $root.google.privacy.dlp.v2.Key.PathElement.encode(message.path[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Key message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Key.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Key + * @static + * @param {google.privacy.dlp.v2.IKey} message Key message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Key.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Key message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Key + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Key} Key + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Key.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Key(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.partitionId = $root.google.privacy.dlp.v2.PartitionId.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + if (!(message.path && message.path.length)) + message.path = []; + message.path.push($root.google.privacy.dlp.v2.Key.PathElement.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Key message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Key + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Key} Key + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Key.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Key message. + * @function verify + * @memberof google.privacy.dlp.v2.Key + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Key.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.partitionId != null && message.hasOwnProperty("partitionId")) { + var error = $root.google.privacy.dlp.v2.PartitionId.verify(message.partitionId, long + 1); + if (error) + return "partitionId." + error; + } + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) { + var error = $root.google.privacy.dlp.v2.Key.PathElement.verify(message.path[i], long + 1); + if (error) + return "path." + error; + } + } + return null; + }; + + /** + * Creates a Key message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Key + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Key} Key + */ + Key.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Key) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.Key(); + if (object.partitionId != null) { + if (typeof object.partitionId !== "object") + throw TypeError(".google.privacy.dlp.v2.Key.partitionId: object expected"); + message.partitionId = $root.google.privacy.dlp.v2.PartitionId.fromObject(object.partitionId, long + 1); + } + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.privacy.dlp.v2.Key.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) { + if (typeof object.path[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.Key.path: object expected"); + message.path[i] = $root.google.privacy.dlp.v2.Key.PathElement.fromObject(object.path[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a Key message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Key + * @static + * @param {google.privacy.dlp.v2.Key} message Key + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Key.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) + object.partitionId = null; + if (message.partitionId != null && message.hasOwnProperty("partitionId")) + object.partitionId = $root.google.privacy.dlp.v2.PartitionId.toObject(message.partitionId, options); + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = $root.google.privacy.dlp.v2.Key.PathElement.toObject(message.path[j], options); + } + return object; + }; + + /** + * Converts this Key to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Key + * @instance + * @returns {Object.} JSON object + */ + Key.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Key + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Key + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Key.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Key"; + }; + + Key.PathElement = (function() { + + /** + * Properties of a PathElement. + * @memberof google.privacy.dlp.v2.Key + * @interface IPathElement + * @property {string|null} [kind] PathElement kind + * @property {number|Long|null} [id] PathElement id + * @property {string|null} [name] PathElement name + */ + + /** + * Constructs a new PathElement. + * @memberof google.privacy.dlp.v2.Key + * @classdesc Represents a PathElement. + * @implements IPathElement + * @constructor + * @param {google.privacy.dlp.v2.Key.IPathElement=} [properties] Properties to set + */ + function PathElement(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * PathElement kind. + * @member {string} kind + * @memberof google.privacy.dlp.v2.Key.PathElement + * @instance + */ + PathElement.prototype.kind = ""; + + /** + * PathElement id. + * @member {number|Long|null|undefined} id + * @memberof google.privacy.dlp.v2.Key.PathElement + * @instance + */ + PathElement.prototype.id = null; + + /** + * PathElement name. + * @member {string|null|undefined} name + * @memberof google.privacy.dlp.v2.Key.PathElement + * @instance + */ + PathElement.prototype.name = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * PathElement idType. + * @member {"id"|"name"|undefined} idType + * @memberof google.privacy.dlp.v2.Key.PathElement + * @instance + */ + Object.defineProperty(PathElement.prototype, "idType", { + get: $util.oneOfGetter($oneOfFields = ["id", "name"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new PathElement instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.Key.PathElement + * @static + * @param {google.privacy.dlp.v2.Key.IPathElement=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.Key.PathElement} PathElement instance + */ + PathElement.create = function create(properties) { + return new PathElement(properties); + }; + + /** + * Encodes the specified PathElement message. Does not implicitly {@link google.privacy.dlp.v2.Key.PathElement.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.Key.PathElement + * @static + * @param {google.privacy.dlp.v2.Key.IPathElement} message PathElement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PathElement.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.id); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.name); + return writer; + }; + + /** + * Encodes the specified PathElement message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.Key.PathElement.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.Key.PathElement + * @static + * @param {google.privacy.dlp.v2.Key.IPathElement} message PathElement message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PathElement.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PathElement message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.Key.PathElement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.Key.PathElement} PathElement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PathElement.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.Key.PathElement(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.id = reader.int64(); + break; + } + case 3: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PathElement message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.Key.PathElement + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.Key.PathElement} PathElement + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PathElement.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PathElement message. + * @function verify + * @memberof google.privacy.dlp.v2.Key.PathElement + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PathElement.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.id != null && message.hasOwnProperty("id")) { + properties.idType = 1; + if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high))) + return "id: integer|Long expected"; + } + if (message.name != null && message.hasOwnProperty("name")) { + if (properties.idType === 1) + return "idType: multiple values"; + properties.idType = 1; + if (!$util.isString(message.name)) + return "name: string expected"; + } + return null; + }; + + /** + * Creates a PathElement message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.Key.PathElement + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.Key.PathElement} PathElement + */ + PathElement.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.Key.PathElement) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.Key.PathElement(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.id != null) + if ($util.Long) + (message.id = $util.Long.fromValue(object.id)).unsigned = false; + else if (typeof object.id === "string") + message.id = parseInt(object.id, 10); + else if (typeof object.id === "number") + message.id = object.id; + else if (typeof object.id === "object") + message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a PathElement message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.Key.PathElement + * @static + * @param {google.privacy.dlp.v2.Key.PathElement} message PathElement + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PathElement.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.kind = ""; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.id != null && message.hasOwnProperty("id")) { + if (typeof message.id === "number") + object.id = options.longs === String ? String(message.id) : message.id; + else + object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber() : message.id; + if (options.oneofs) + object.idType = "id"; + } + if (message.name != null && message.hasOwnProperty("name")) { + object.name = message.name; + if (options.oneofs) + object.idType = "name"; + } + return object; + }; + + /** + * Converts this PathElement to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.Key.PathElement + * @instance + * @returns {Object.} JSON object + */ + PathElement.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PathElement + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.Key.PathElement + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PathElement.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.Key.PathElement"; + }; + + return PathElement; + })(); + + return Key; + })(); + + v2.RecordKey = (function() { + + /** + * Properties of a RecordKey. + * @memberof google.privacy.dlp.v2 + * @interface IRecordKey + * @property {google.privacy.dlp.v2.IDatastoreKey|null} [datastoreKey] RecordKey datastoreKey + * @property {google.privacy.dlp.v2.IBigQueryKey|null} [bigQueryKey] RecordKey bigQueryKey + * @property {Array.|null} [idValues] RecordKey idValues + */ + + /** + * Constructs a new RecordKey. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a RecordKey. + * @implements IRecordKey + * @constructor + * @param {google.privacy.dlp.v2.IRecordKey=} [properties] Properties to set + */ + function RecordKey(properties) { + this.idValues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RecordKey datastoreKey. + * @member {google.privacy.dlp.v2.IDatastoreKey|null|undefined} datastoreKey + * @memberof google.privacy.dlp.v2.RecordKey + * @instance + */ + RecordKey.prototype.datastoreKey = null; + + /** + * RecordKey bigQueryKey. + * @member {google.privacy.dlp.v2.IBigQueryKey|null|undefined} bigQueryKey + * @memberof google.privacy.dlp.v2.RecordKey + * @instance + */ + RecordKey.prototype.bigQueryKey = null; + + /** + * RecordKey idValues. + * @member {Array.} idValues + * @memberof google.privacy.dlp.v2.RecordKey + * @instance + */ + RecordKey.prototype.idValues = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RecordKey type. + * @member {"datastoreKey"|"bigQueryKey"|undefined} type + * @memberof google.privacy.dlp.v2.RecordKey + * @instance + */ + Object.defineProperty(RecordKey.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["datastoreKey", "bigQueryKey"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RecordKey instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.RecordKey + * @static + * @param {google.privacy.dlp.v2.IRecordKey=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.RecordKey} RecordKey instance + */ + RecordKey.create = function create(properties) { + return new RecordKey(properties); + }; + + /** + * Encodes the specified RecordKey message. Does not implicitly {@link google.privacy.dlp.v2.RecordKey.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.RecordKey + * @static + * @param {google.privacy.dlp.v2.IRecordKey} message RecordKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordKey.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.datastoreKey != null && Object.hasOwnProperty.call(message, "datastoreKey")) + $root.google.privacy.dlp.v2.DatastoreKey.encode(message.datastoreKey, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.bigQueryKey != null && Object.hasOwnProperty.call(message, "bigQueryKey")) + $root.google.privacy.dlp.v2.BigQueryKey.encode(message.bigQueryKey, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.idValues != null && message.idValues.length) + for (var i = 0; i < message.idValues.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.idValues[i]); + return writer; + }; + + /** + * Encodes the specified RecordKey message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.RecordKey.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.RecordKey + * @static + * @param {google.privacy.dlp.v2.IRecordKey} message RecordKey message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecordKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecordKey message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.RecordKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.RecordKey} RecordKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordKey.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.RecordKey(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.datastoreKey = $root.google.privacy.dlp.v2.DatastoreKey.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.bigQueryKey = $root.google.privacy.dlp.v2.BigQueryKey.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + if (!(message.idValues && message.idValues.length)) + message.idValues = []; + message.idValues.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RecordKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.RecordKey + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.RecordKey} RecordKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecordKey.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecordKey message. + * @function verify + * @memberof google.privacy.dlp.v2.RecordKey + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecordKey.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.datastoreKey != null && message.hasOwnProperty("datastoreKey")) { + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.DatastoreKey.verify(message.datastoreKey, long + 1); + if (error) + return "datastoreKey." + error; + } + } + if (message.bigQueryKey != null && message.hasOwnProperty("bigQueryKey")) { + if (properties.type === 1) + return "type: multiple values"; + properties.type = 1; + { + var error = $root.google.privacy.dlp.v2.BigQueryKey.verify(message.bigQueryKey, long + 1); + if (error) + return "bigQueryKey." + error; + } + } + if (message.idValues != null && message.hasOwnProperty("idValues")) { + if (!Array.isArray(message.idValues)) + return "idValues: array expected"; + for (var i = 0; i < message.idValues.length; ++i) + if (!$util.isString(message.idValues[i])) + return "idValues: string[] expected"; + } + return null; + }; + + /** + * Creates a RecordKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.RecordKey + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.RecordKey} RecordKey + */ + RecordKey.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.RecordKey) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.RecordKey(); + if (object.datastoreKey != null) { + if (typeof object.datastoreKey !== "object") + throw TypeError(".google.privacy.dlp.v2.RecordKey.datastoreKey: object expected"); + message.datastoreKey = $root.google.privacy.dlp.v2.DatastoreKey.fromObject(object.datastoreKey, long + 1); + } + if (object.bigQueryKey != null) { + if (typeof object.bigQueryKey !== "object") + throw TypeError(".google.privacy.dlp.v2.RecordKey.bigQueryKey: object expected"); + message.bigQueryKey = $root.google.privacy.dlp.v2.BigQueryKey.fromObject(object.bigQueryKey, long + 1); + } + if (object.idValues) { + if (!Array.isArray(object.idValues)) + throw TypeError(".google.privacy.dlp.v2.RecordKey.idValues: array expected"); + message.idValues = []; + for (var i = 0; i < object.idValues.length; ++i) + message.idValues[i] = String(object.idValues[i]); + } + return message; + }; + + /** + * Creates a plain object from a RecordKey message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.RecordKey + * @static + * @param {google.privacy.dlp.v2.RecordKey} message RecordKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecordKey.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.idValues = []; + if (message.datastoreKey != null && message.hasOwnProperty("datastoreKey")) { + object.datastoreKey = $root.google.privacy.dlp.v2.DatastoreKey.toObject(message.datastoreKey, options); + if (options.oneofs) + object.type = "datastoreKey"; + } + if (message.bigQueryKey != null && message.hasOwnProperty("bigQueryKey")) { + object.bigQueryKey = $root.google.privacy.dlp.v2.BigQueryKey.toObject(message.bigQueryKey, options); + if (options.oneofs) + object.type = "bigQueryKey"; + } + if (message.idValues && message.idValues.length) { + object.idValues = []; + for (var j = 0; j < message.idValues.length; ++j) + object.idValues[j] = message.idValues[j]; + } + return object; + }; + + /** + * Converts this RecordKey to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.RecordKey + * @instance + * @returns {Object.} JSON object + */ + RecordKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RecordKey + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.RecordKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecordKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.RecordKey"; + }; + + return RecordKey; + })(); + + v2.BigQueryTable = (function() { + + /** + * Properties of a BigQueryTable. + * @memberof google.privacy.dlp.v2 + * @interface IBigQueryTable + * @property {string|null} [projectId] BigQueryTable projectId + * @property {string|null} [datasetId] BigQueryTable datasetId + * @property {string|null} [tableId] BigQueryTable tableId + */ + + /** + * Constructs a new BigQueryTable. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a BigQueryTable. + * @implements IBigQueryTable + * @constructor + * @param {google.privacy.dlp.v2.IBigQueryTable=} [properties] Properties to set + */ + function BigQueryTable(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryTable projectId. + * @member {string} projectId + * @memberof google.privacy.dlp.v2.BigQueryTable + * @instance + */ + BigQueryTable.prototype.projectId = ""; + + /** + * BigQueryTable datasetId. + * @member {string} datasetId + * @memberof google.privacy.dlp.v2.BigQueryTable + * @instance + */ + BigQueryTable.prototype.datasetId = ""; + + /** + * BigQueryTable tableId. + * @member {string} tableId + * @memberof google.privacy.dlp.v2.BigQueryTable + * @instance + */ + BigQueryTable.prototype.tableId = ""; + + /** + * Creates a new BigQueryTable instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.BigQueryTable + * @static + * @param {google.privacy.dlp.v2.IBigQueryTable=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.BigQueryTable} BigQueryTable instance + */ + BigQueryTable.create = function create(properties) { + return new BigQueryTable(properties); + }; + + /** + * Encodes the specified BigQueryTable message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryTable.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.BigQueryTable + * @static + * @param {google.privacy.dlp.v2.IBigQueryTable} message BigQueryTable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryTable.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.datasetId != null && Object.hasOwnProperty.call(message, "datasetId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.datasetId); + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.tableId); + return writer; + }; + + /** + * Encodes the specified BigQueryTable message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryTable.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryTable + * @static + * @param {google.privacy.dlp.v2.IBigQueryTable} message BigQueryTable message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryTable.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryTable message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.BigQueryTable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.BigQueryTable} BigQueryTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryTable.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.BigQueryTable(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.projectId = reader.string(); + break; + } + case 2: { + message.datasetId = reader.string(); + break; + } + case 3: { + message.tableId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryTable message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryTable + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.BigQueryTable} BigQueryTable + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryTable.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryTable message. + * @function verify + * @memberof google.privacy.dlp.v2.BigQueryTable + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryTable.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + if (!$util.isString(message.datasetId)) + return "datasetId: string expected"; + if (message.tableId != null && message.hasOwnProperty("tableId")) + if (!$util.isString(message.tableId)) + return "tableId: string expected"; + return null; + }; + + /** + * Creates a BigQueryTable message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.BigQueryTable + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.BigQueryTable} BigQueryTable + */ + BigQueryTable.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.BigQueryTable) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.BigQueryTable(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.datasetId != null) + message.datasetId = String(object.datasetId); + if (object.tableId != null) + message.tableId = String(object.tableId); + return message; + }; + + /** + * Creates a plain object from a BigQueryTable message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.BigQueryTable + * @static + * @param {google.privacy.dlp.v2.BigQueryTable} message BigQueryTable + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryTable.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.projectId = ""; + object.datasetId = ""; + object.tableId = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + object.datasetId = message.datasetId; + if (message.tableId != null && message.hasOwnProperty("tableId")) + object.tableId = message.tableId; + return object; + }; + + /** + * Converts this BigQueryTable to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.BigQueryTable + * @instance + * @returns {Object.} JSON object + */ + BigQueryTable.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryTable + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.BigQueryTable + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryTable.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.BigQueryTable"; + }; + + return BigQueryTable; + })(); + + v2.TableReference = (function() { + + /** + * Properties of a TableReference. + * @memberof google.privacy.dlp.v2 + * @interface ITableReference + * @property {string|null} [datasetId] TableReference datasetId + * @property {string|null} [tableId] TableReference tableId + * @property {string|null} [projectId] TableReference projectId + */ + + /** + * Constructs a new TableReference. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a TableReference. + * @implements ITableReference + * @constructor + * @param {google.privacy.dlp.v2.ITableReference=} [properties] Properties to set + */ + function TableReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TableReference datasetId. + * @member {string} datasetId + * @memberof google.privacy.dlp.v2.TableReference + * @instance + */ + TableReference.prototype.datasetId = ""; + + /** + * TableReference tableId. + * @member {string} tableId + * @memberof google.privacy.dlp.v2.TableReference + * @instance + */ + TableReference.prototype.tableId = ""; + + /** + * TableReference projectId. + * @member {string} projectId + * @memberof google.privacy.dlp.v2.TableReference + * @instance + */ + TableReference.prototype.projectId = ""; + + /** + * Creates a new TableReference instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.TableReference + * @static + * @param {google.privacy.dlp.v2.ITableReference=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.TableReference} TableReference instance + */ + TableReference.create = function create(properties) { + return new TableReference(properties); + }; + + /** + * Encodes the specified TableReference message. Does not implicitly {@link google.privacy.dlp.v2.TableReference.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.TableReference + * @static + * @param {google.privacy.dlp.v2.ITableReference} message TableReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.datasetId != null && Object.hasOwnProperty.call(message, "datasetId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.datasetId); + if (message.tableId != null && Object.hasOwnProperty.call(message, "tableId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.tableId); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.projectId); + return writer; + }; + + /** + * Encodes the specified TableReference message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TableReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.TableReference + * @static + * @param {google.privacy.dlp.v2.ITableReference} message TableReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TableReference message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.TableReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.TableReference} TableReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableReference.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TableReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.datasetId = reader.string(); + break; + } + case 2: { + message.tableId = reader.string(); + break; + } + case 3: { + message.projectId = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TableReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.TableReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.TableReference} TableReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TableReference message. + * @function verify + * @memberof google.privacy.dlp.v2.TableReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TableReference.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + if (!$util.isString(message.datasetId)) + return "datasetId: string expected"; + if (message.tableId != null && message.hasOwnProperty("tableId")) + if (!$util.isString(message.tableId)) + return "tableId: string expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + return null; + }; + + /** + * Creates a TableReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.TableReference + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.TableReference} TableReference + */ + TableReference.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.TableReference) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.TableReference(); + if (object.datasetId != null) + message.datasetId = String(object.datasetId); + if (object.tableId != null) + message.tableId = String(object.tableId); + if (object.projectId != null) + message.projectId = String(object.projectId); + return message; + }; + + /** + * Creates a plain object from a TableReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.TableReference + * @static + * @param {google.privacy.dlp.v2.TableReference} message TableReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TableReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.datasetId = ""; + object.tableId = ""; + object.projectId = ""; + } + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + object.datasetId = message.datasetId; + if (message.tableId != null && message.hasOwnProperty("tableId")) + object.tableId = message.tableId; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + return object; + }; + + /** + * Converts this TableReference to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.TableReference + * @instance + * @returns {Object.} JSON object + */ + TableReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TableReference + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.TableReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TableReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.TableReference"; + }; + + return TableReference; + })(); + + v2.BigQueryField = (function() { + + /** + * Properties of a BigQueryField. + * @memberof google.privacy.dlp.v2 + * @interface IBigQueryField + * @property {google.privacy.dlp.v2.IBigQueryTable|null} [table] BigQueryField table + * @property {google.privacy.dlp.v2.IFieldId|null} [field] BigQueryField field + */ + + /** + * Constructs a new BigQueryField. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a BigQueryField. + * @implements IBigQueryField + * @constructor + * @param {google.privacy.dlp.v2.IBigQueryField=} [properties] Properties to set + */ + function BigQueryField(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * BigQueryField table. + * @member {google.privacy.dlp.v2.IBigQueryTable|null|undefined} table + * @memberof google.privacy.dlp.v2.BigQueryField + * @instance + */ + BigQueryField.prototype.table = null; + + /** + * BigQueryField field. + * @member {google.privacy.dlp.v2.IFieldId|null|undefined} field + * @memberof google.privacy.dlp.v2.BigQueryField + * @instance + */ + BigQueryField.prototype.field = null; + + /** + * Creates a new BigQueryField instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.BigQueryField + * @static + * @param {google.privacy.dlp.v2.IBigQueryField=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.BigQueryField} BigQueryField instance + */ + BigQueryField.create = function create(properties) { + return new BigQueryField(properties); + }; + + /** + * Encodes the specified BigQueryField message. Does not implicitly {@link google.privacy.dlp.v2.BigQueryField.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.BigQueryField + * @static + * @param {google.privacy.dlp.v2.IBigQueryField} message BigQueryField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryField.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + $root.google.privacy.dlp.v2.BigQueryTable.encode(message.table, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + $root.google.privacy.dlp.v2.FieldId.encode(message.field, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BigQueryField message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.BigQueryField.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryField + * @static + * @param {google.privacy.dlp.v2.IBigQueryField} message BigQueryField message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryField.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryField message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.BigQueryField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.BigQueryField} BigQueryField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryField.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.BigQueryField(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.table = $root.google.privacy.dlp.v2.BigQueryTable.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.field = $root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryField message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.BigQueryField + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.BigQueryField} BigQueryField + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryField.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryField message. + * @function verify + * @memberof google.privacy.dlp.v2.BigQueryField + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryField.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.table != null && message.hasOwnProperty("table")) { + var error = $root.google.privacy.dlp.v2.BigQueryTable.verify(message.table, long + 1); + if (error) + return "table." + error; + } + if (message.field != null && message.hasOwnProperty("field")) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.field, long + 1); + if (error) + return "field." + error; + } + return null; + }; + + /** + * Creates a BigQueryField message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.BigQueryField + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.BigQueryField} BigQueryField + */ + BigQueryField.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.BigQueryField) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.BigQueryField(); + if (object.table != null) { + if (typeof object.table !== "object") + throw TypeError(".google.privacy.dlp.v2.BigQueryField.table: object expected"); + message.table = $root.google.privacy.dlp.v2.BigQueryTable.fromObject(object.table, long + 1); + } + if (object.field != null) { + if (typeof object.field !== "object") + throw TypeError(".google.privacy.dlp.v2.BigQueryField.field: object expected"); + message.field = $root.google.privacy.dlp.v2.FieldId.fromObject(object.field, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a BigQueryField message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.BigQueryField + * @static + * @param {google.privacy.dlp.v2.BigQueryField} message BigQueryField + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryField.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.table = null; + object.field = null; + } + if (message.table != null && message.hasOwnProperty("table")) + object.table = $root.google.privacy.dlp.v2.BigQueryTable.toObject(message.table, options); + if (message.field != null && message.hasOwnProperty("field")) + object.field = $root.google.privacy.dlp.v2.FieldId.toObject(message.field, options); + return object; + }; + + /** + * Converts this BigQueryField to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.BigQueryField + * @instance + * @returns {Object.} JSON object + */ + BigQueryField.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryField + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.BigQueryField + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryField.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.BigQueryField"; + }; + + return BigQueryField; + })(); + + v2.EntityId = (function() { + + /** + * Properties of an EntityId. + * @memberof google.privacy.dlp.v2 + * @interface IEntityId + * @property {google.privacy.dlp.v2.IFieldId|null} [field] EntityId field + */ + + /** + * Constructs a new EntityId. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents an EntityId. + * @implements IEntityId + * @constructor + * @param {google.privacy.dlp.v2.IEntityId=} [properties] Properties to set + */ + function EntityId(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * EntityId field. + * @member {google.privacy.dlp.v2.IFieldId|null|undefined} field + * @memberof google.privacy.dlp.v2.EntityId + * @instance + */ + EntityId.prototype.field = null; + + /** + * Creates a new EntityId instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.EntityId + * @static + * @param {google.privacy.dlp.v2.IEntityId=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.EntityId} EntityId instance + */ + EntityId.create = function create(properties) { + return new EntityId(properties); + }; + + /** + * Encodes the specified EntityId message. Does not implicitly {@link google.privacy.dlp.v2.EntityId.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.EntityId + * @static + * @param {google.privacy.dlp.v2.IEntityId} message EntityId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityId.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + $root.google.privacy.dlp.v2.FieldId.encode(message.field, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EntityId message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.EntityId.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.EntityId + * @static + * @param {google.privacy.dlp.v2.IEntityId} message EntityId message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EntityId.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EntityId message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.EntityId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.EntityId} EntityId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityId.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.EntityId(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.field = $root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an EntityId message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.EntityId + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.EntityId} EntityId + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EntityId.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EntityId message. + * @function verify + * @memberof google.privacy.dlp.v2.EntityId + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EntityId.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.field != null && message.hasOwnProperty("field")) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.field, long + 1); + if (error) + return "field." + error; + } + return null; + }; + + /** + * Creates an EntityId message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.EntityId + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.EntityId} EntityId + */ + EntityId.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.EntityId) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.EntityId(); + if (object.field != null) { + if (typeof object.field !== "object") + throw TypeError(".google.privacy.dlp.v2.EntityId.field: object expected"); + message.field = $root.google.privacy.dlp.v2.FieldId.fromObject(object.field, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an EntityId message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.EntityId + * @static + * @param {google.privacy.dlp.v2.EntityId} message EntityId + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EntityId.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.field = null; + if (message.field != null && message.hasOwnProperty("field")) + object.field = $root.google.privacy.dlp.v2.FieldId.toObject(message.field, options); + return object; + }; + + /** + * Converts this EntityId to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.EntityId + * @instance + * @returns {Object.} JSON object + */ + EntityId.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EntityId + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.EntityId + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EntityId.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.EntityId"; + }; + + return EntityId; + })(); + + v2.TableOptions = (function() { + + /** + * Properties of a TableOptions. + * @memberof google.privacy.dlp.v2 + * @interface ITableOptions + * @property {Array.|null} [identifyingFields] TableOptions identifyingFields + */ + + /** + * Constructs a new TableOptions. + * @memberof google.privacy.dlp.v2 + * @classdesc Represents a TableOptions. + * @implements ITableOptions + * @constructor + * @param {google.privacy.dlp.v2.ITableOptions=} [properties] Properties to set + */ + function TableOptions(properties) { + this.identifyingFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TableOptions identifyingFields. + * @member {Array.} identifyingFields + * @memberof google.privacy.dlp.v2.TableOptions + * @instance + */ + TableOptions.prototype.identifyingFields = $util.emptyArray; + + /** + * Creates a new TableOptions instance using the specified properties. + * @function create + * @memberof google.privacy.dlp.v2.TableOptions + * @static + * @param {google.privacy.dlp.v2.ITableOptions=} [properties] Properties to set + * @returns {google.privacy.dlp.v2.TableOptions} TableOptions instance + */ + TableOptions.create = function create(properties) { + return new TableOptions(properties); + }; + + /** + * Encodes the specified TableOptions message. Does not implicitly {@link google.privacy.dlp.v2.TableOptions.verify|verify} messages. + * @function encode + * @memberof google.privacy.dlp.v2.TableOptions + * @static + * @param {google.privacy.dlp.v2.ITableOptions} message TableOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.identifyingFields != null && message.identifyingFields.length) + for (var i = 0; i < message.identifyingFields.length; ++i) + $root.google.privacy.dlp.v2.FieldId.encode(message.identifyingFields[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TableOptions message, length delimited. Does not implicitly {@link google.privacy.dlp.v2.TableOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.privacy.dlp.v2.TableOptions + * @static + * @param {google.privacy.dlp.v2.ITableOptions} message TableOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TableOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TableOptions message from the specified reader or buffer. + * @function decode + * @memberof google.privacy.dlp.v2.TableOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.privacy.dlp.v2.TableOptions} TableOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.privacy.dlp.v2.TableOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.identifyingFields && message.identifyingFields.length)) + message.identifyingFields = []; + message.identifyingFields.push($root.google.privacy.dlp.v2.FieldId.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TableOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.privacy.dlp.v2.TableOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.privacy.dlp.v2.TableOptions} TableOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TableOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TableOptions message. + * @function verify + * @memberof google.privacy.dlp.v2.TableOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TableOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.identifyingFields != null && message.hasOwnProperty("identifyingFields")) { + if (!Array.isArray(message.identifyingFields)) + return "identifyingFields: array expected"; + for (var i = 0; i < message.identifyingFields.length; ++i) { + var error = $root.google.privacy.dlp.v2.FieldId.verify(message.identifyingFields[i], long + 1); + if (error) + return "identifyingFields." + error; + } + } + return null; + }; + + /** + * Creates a TableOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.privacy.dlp.v2.TableOptions + * @static + * @param {Object.} object Plain object + * @returns {google.privacy.dlp.v2.TableOptions} TableOptions + */ + TableOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.privacy.dlp.v2.TableOptions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.privacy.dlp.v2.TableOptions(); + if (object.identifyingFields) { + if (!Array.isArray(object.identifyingFields)) + throw TypeError(".google.privacy.dlp.v2.TableOptions.identifyingFields: array expected"); + message.identifyingFields = []; + for (var i = 0; i < object.identifyingFields.length; ++i) { + if (typeof object.identifyingFields[i] !== "object") + throw TypeError(".google.privacy.dlp.v2.TableOptions.identifyingFields: object expected"); + message.identifyingFields[i] = $root.google.privacy.dlp.v2.FieldId.fromObject(object.identifyingFields[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a TableOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.privacy.dlp.v2.TableOptions + * @static + * @param {google.privacy.dlp.v2.TableOptions} message TableOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TableOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.identifyingFields = []; + if (message.identifyingFields && message.identifyingFields.length) { + object.identifyingFields = []; + for (var j = 0; j < message.identifyingFields.length; ++j) + object.identifyingFields[j] = $root.google.privacy.dlp.v2.FieldId.toObject(message.identifyingFields[j], options); + } + return object; + }; + + /** + * Converts this TableOptions to JSON. + * @function toJSON + * @memberof google.privacy.dlp.v2.TableOptions + * @instance + * @returns {Object.} JSON object + */ + TableOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TableOptions + * @function getTypeUrl + * @memberof google.privacy.dlp.v2.TableOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TableOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.privacy.dlp.v2.TableOptions"; + }; + + return TableOptions; + })(); + + return v2; + })(); + + return dlp; + })(); + + return privacy; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i], long + 1); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.Http) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i], long + 1); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom, long + 1); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i], long + 1); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.HttpRule) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom, long + 1); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + api.CommonLanguageSettings = (function() { + + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + * @property {google.api.ISelectiveGapicGeneration|null} [selectiveGapicGeneration] CommonLanguageSettings selectiveGapicGeneration + */ + + /** + * Constructs a new CommonLanguageSettings. + * @memberof google.api + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings + * @constructor + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + */ + function CommonLanguageSettings(properties) { + this.destinations = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.referenceDocsUri = ""; + + /** + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.destinations = $util.emptyArray; + + /** + * CommonLanguageSettings selectiveGapicGeneration. + * @member {google.api.ISelectiveGapicGeneration|null|undefined} selectiveGapicGeneration + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.selectiveGapicGeneration = null; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @function create + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + */ + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); + }; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); + writer.ldelim(); + } + if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) + $root.google.api.SelectiveGapicGeneration.encode(message.selectiveGapicGeneration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.referenceDocsUri = reader.string(); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + case 3: { + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonLanguageSettings message. + * @function verify + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonLanguageSettings.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; + } + } + if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) { + var error = $root.google.api.SelectiveGapicGeneration.verify(message.selectiveGapicGeneration, long + 1); + if (error) + return "selectiveGapicGeneration." + error; + } + return null; + }; + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + */ + CommonLanguageSettings.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.CommonLanguageSettings) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.CommonLanguageSettings(); + if (object.referenceDocsUri != null) + message.referenceDocsUri = String(object.referenceDocsUri); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } + } + if (object.selectiveGapicGeneration != null) { + if (typeof object.selectiveGapicGeneration !== "object") + throw TypeError(".google.api.CommonLanguageSettings.selectiveGapicGeneration: object expected"); + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.fromObject(object.selectiveGapicGeneration, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonLanguageSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) { + object.referenceDocsUri = ""; + object.selectiveGapicGeneration = null; + } + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + } + if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) + object.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.toObject(message.selectiveGapicGeneration, options); + return object; + }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; + + return CommonLanguageSettings; + })(); + + api.ClientLibrarySettings = (function() { + + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; + + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings, long + 1); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings, long + 1); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings, long + 1); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings, long + 1); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings, long + 1); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings, long + 1); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings, long + 1); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings, long + 1); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings, long + 1); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings, long + 1); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings, long + 1); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings, long + 1); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings, long + 1); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings, long + 1); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings, long + 1); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri + */ + + /** + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing + * @constructor + * @param {google.api.IPublishing=} [properties] Properties to set + */ + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.methodSettings = $util.emptyArray; + + /** + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; + + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; + + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; + + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; + + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; + + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; + + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; + + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + + /** + * Publishing restReferenceDocumentationUri. + * @member {string} restReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.restReferenceDocumentationUri = ""; + + /** + * Creates a new Publishing instance using the specified properties. + * @function create + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance + */ + Publishing.create = function create(properties) { + return new Publishing(properties); + }; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encode + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); + return writer; + }; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } + case 111: { + message.restReferenceDocumentationUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i], long + 1); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i], long + 1); + if (error) + return "librarySettings." + error; + } + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (!$util.isString(message.restReferenceDocumentationUri)) + return "restReferenceDocumentationUri: string expected"; + return null; + }; + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Publishing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Publishing} Publishing + */ + Publishing.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.Publishing) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i], long + 1); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i], long + 1); + } + } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + if (object.restReferenceDocumentationUri != null) + message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); + return message; + }; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Publishing + * @static + * @param {google.api.Publishing} message Publishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; + object.restReferenceDocumentationUri = ""; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; + return object; + }; + + /** + * Converts this Publishing to JSON. + * @function toJSON + * @memberof google.api.Publishing + * @instance + * @returns {Object.} JSON object + */ + Publishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publishing + * @function getTypeUrl + * @memberof google.api.Publishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Publishing"; + }; + + return Publishing; + })(); + + api.JavaSettings = (function() { + + /** + * Properties of a JavaSettings. + * @memberof google.api + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + */ + + /** + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings + * @constructor + * @param {google.api.IJavaSettings=} [properties] Properties to set + */ + function JavaSettings(properties) { + this.serviceClassNames = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.serviceClassNames, key); + message.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.JavaSettings) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.serviceClassNames, keys[i]); + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.serviceClassNames, keys2[j]); + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.CppSettings) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.PhpSettings) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + * @property {google.api.PythonSettings.IExperimentalFeatures|null} [experimentalFeatures] PythonSettings experimentalFeatures + */ + + /** + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings + * @constructor + * @param {google.api.IPythonSettings=} [properties] Properties to set + */ + function PythonSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; + + /** + * PythonSettings experimentalFeatures. + * @member {google.api.PythonSettings.IExperimentalFeatures|null|undefined} experimentalFeatures + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.experimentalFeatures = null; + + /** + * Creates a new PythonSettings instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance + */ + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) + $root.google.api.PythonSettings.ExperimentalFeatures.encode(message.experimentalFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSettings message. + * @function verify + * @memberof google.api.PythonSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSettings.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); + if (error) + return "common." + error; + } + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) { + var error = $root.google.api.PythonSettings.ExperimentalFeatures.verify(message.experimentalFeatures, long + 1); + if (error) + return "experimentalFeatures." + error; + } + return null; + }; + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings} PythonSettings + */ + PythonSettings.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.PythonSettings) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.PythonSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PythonSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); + } + if (object.experimentalFeatures != null) { + if (typeof object.experimentalFeatures !== "object") + throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected"); + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings + * @static + * @param {google.api.PythonSettings} message PythonSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.common = null; + object.experimentalFeatures = null; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) + object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, options); + return object; + }; + + /** + * Converts this PythonSettings to JSON. + * @function toJSON + * @memberof google.api.PythonSettings + * @instance + * @returns {Object.} JSON object + */ + PythonSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSettings + * @function getTypeUrl + * @memberof google.api.PythonSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings"; + }; + + PythonSettings.ExperimentalFeatures = (function() { + + /** + * Properties of an ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @interface IExperimentalFeatures + * @property {boolean|null} [restAsyncIoEnabled] ExperimentalFeatures restAsyncIoEnabled + * @property {boolean|null} [protobufPythonicTypesEnabled] ExperimentalFeatures protobufPythonicTypesEnabled + * @property {boolean|null} [unversionedPackageDisabled] ExperimentalFeatures unversionedPackageDisabled + */ + + /** + * Constructs a new ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @classdesc Represents an ExperimentalFeatures. + * @implements IExperimentalFeatures + * @constructor + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + */ + function ExperimentalFeatures(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExperimentalFeatures restAsyncIoEnabled. + * @member {boolean} restAsyncIoEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.restAsyncIoEnabled = false; + + /** + * ExperimentalFeatures protobufPythonicTypesEnabled. + * @member {boolean} protobufPythonicTypesEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.protobufPythonicTypesEnabled = false; + + /** + * ExperimentalFeatures unversionedPackageDisabled. + * @member {boolean} unversionedPackageDisabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.unversionedPackageDisabled = false; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures instance + */ + ExperimentalFeatures.create = function create(properties) { + return new ExperimentalFeatures(properties); + }; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.restAsyncIoEnabled); + if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.protobufPythonicTypesEnabled); + if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unversionedPackageDisabled); + return writer; + }; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.restAsyncIoEnabled = reader.bool(); + break; + } + case 2: { + message.protobufPythonicTypesEnabled = reader.bool(); + break; + } + case 3: { + message.unversionedPackageDisabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExperimentalFeatures message. + * @function verify + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExperimentalFeatures.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + if (typeof message.restAsyncIoEnabled !== "boolean") + return "restAsyncIoEnabled: boolean expected"; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + if (typeof message.protobufPythonicTypesEnabled !== "boolean") + return "protobufPythonicTypesEnabled: boolean expected"; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + if (typeof message.unversionedPackageDisabled !== "boolean") + return "unversionedPackageDisabled: boolean expected"; + return null; + }; + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + */ + ExperimentalFeatures.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.PythonSettings.ExperimentalFeatures) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + if (object.restAsyncIoEnabled != null) + message.restAsyncIoEnabled = Boolean(object.restAsyncIoEnabled); + if (object.protobufPythonicTypesEnabled != null) + message.protobufPythonicTypesEnabled = Boolean(object.protobufPythonicTypesEnabled); + if (object.unversionedPackageDisabled != null) + message.unversionedPackageDisabled = Boolean(object.unversionedPackageDisabled); + return message; + }; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.ExperimentalFeatures} message ExperimentalFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExperimentalFeatures.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.restAsyncIoEnabled = false; + object.protobufPythonicTypesEnabled = false; + object.unversionedPackageDisabled = false; + } + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + object.restAsyncIoEnabled = message.restAsyncIoEnabled; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + object.protobufPythonicTypesEnabled = message.protobufPythonicTypesEnabled; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + object.unversionedPackageDisabled = message.unversionedPackageDisabled; + return object; + }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @function toJSON + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + * @returns {Object.} JSON object + */ + ExperimentalFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExperimentalFeatures + * @function getTypeUrl + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExperimentalFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings.ExperimentalFeatures"; + }; + + return ExperimentalFeatures; + })(); + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.NodeSettings) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures + */ + + /** + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings + * @constructor + * @param {google.api.IDotnetSettings=} [properties] Properties to set + */ + function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; + + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; + + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; + + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @function create + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance + */ + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); + }; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encode + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) + for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); + if (message.ignoredResources != null && message.ignoredResources.length) + for (var i = 0; i < message.ignoredResources.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); + if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); + if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); + return writer; + }; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.renamedServices, key); + message.renamedServices[key] = value; + break; + } + case 3: { + if (message.renamedResources === $util.emptyObject) + message.renamedResources = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.renamedResources, key); + message.renamedResources[key] = value; + break; + } + case 4: { + if (!(message.ignoredResources && message.ignoredResources.length)) + message.ignoredResources = []; + message.ignoredResources.push(reader.string()); + break; + } + case 5: { + if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) + message.forcedNamespaceAliases = []; + message.forcedNamespaceAliases.push(reader.string()); + break; + } + case 6: { + if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) + message.handwrittenSignatures = []; + message.handwrittenSignatures.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); + if (error) + return "common." + error; + } + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { + if (!$util.isObject(message.renamedResources)) + return "renamedResources: object expected"; + var key = Object.keys(message.renamedResources); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedResources[key[i]])) + return "renamedResources: string{k:string} expected"; + } + if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { + if (!Array.isArray(message.ignoredResources)) + return "ignoredResources: array expected"; + for (var i = 0; i < message.ignoredResources.length; ++i) + if (!$util.isString(message.ignoredResources[i])) + return "ignoredResources: string[] expected"; + } + if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { + if (!Array.isArray(message.forcedNamespaceAliases)) + return "forcedNamespaceAliases: array expected"; + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + if (!$util.isString(message.forcedNamespaceAliases[i])) + return "forcedNamespaceAliases: string[] expected"; + } + if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { + if (!Array.isArray(message.handwrittenSignatures)) + return "handwrittenSignatures: array expected"; + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + if (!$util.isString(message.handwrittenSignatures[i])) + return "handwrittenSignatures: string[] expected"; + } + return null; + }; + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.DotnetSettings} DotnetSettings + */ + DotnetSettings.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.renamedServices, keys[i]); + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.renamedResources, keys[i]); + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } + return message; + }; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.DotnetSettings} message DotnetSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DotnetSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.renamedServices, keys2[j]); + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.renamedResources, keys2[j]); + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } + return object; + }; + + /** + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings + * @instance + * @returns {Object.} JSON object + */ + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DotnetSettings + * @function getTypeUrl + * @memberof google.api.DotnetSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; + + return DotnetSettings; + })(); + + api.RubySettings = (function() { + + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ + + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.RubySettings) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + * @property {Object.|null} [renamedServices] GoSettings renamedServices + */ + + /** + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set + */ + function GoSettings(properties) { + this.renamedServices = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; + + /** + * GoSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.renamedServices = $util.emptyObject; + + /** + * Creates a new GoSettings instance using the specified properties. + * @function create + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance + */ + GoSettings.create = function create(properties) { + return new GoSettings(properties); + }; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encode + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7, long); + break; + } + } + if (key === "__proto__") + $util.makeProp(message.renamedServices, key); + message.renamedServices[key] = value; + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoSettings message. + * @function verify + * @memberof google.api.GoSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoSettings.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common, long + 1); + if (error) + return "common." + error; + } + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.GoSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.GoSettings} GoSettings + */ + GoSettings.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.GoSettings) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common, long + 1); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.GoSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) { + if (keys[i] === "__proto__") + $util.makeProp(message.renamedServices, keys[i]); + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + } + return message; + }; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.GoSettings + * @static + * @param {google.api.GoSettings} message GoSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.renamedServices = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) { + if (keys2[j] === "__proto__") + $util.makeProp(object.renamedServices, keys2[j]); + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + } + return object; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields + */ + + /** + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings + * @constructor + * @param {google.api.IMethodSettings=} [properties] Properties to set + */ + function MethodSettings(properties) { + this.autoPopulatedFields = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.selector = ""; + + /** + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.longRunning = null; + + /** + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance + */ + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); + }; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); + return writer; + }; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning, long + 1); + if (error) + return "longRunning." + error; + } + if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { + if (!Array.isArray(message.autoPopulatedFields)) + return "autoPopulatedFields: array expected"; + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + if (!$util.isString(message.autoPopulatedFields[i])) + return "autoPopulatedFields: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings} MethodSettings + */ + MethodSettings.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.MethodSettings) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning, long + 1); + } + if (object.autoPopulatedFields) { + if (!Array.isArray(object.autoPopulatedFields)) + throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); + message.autoPopulatedFields = []; + for (var i = 0; i < object.autoPopulatedFields.length; ++i) + message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings + * @static + * @param {google.api.MethodSettings} message MethodSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + if (message.autoPopulatedFields && message.autoPopulatedFields.length) { + object.autoPopulatedFields = []; + for (var j = 0; j < message.autoPopulatedFields.length; ++j) + object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; + } + return object; + }; + + /** + * Converts this MethodSettings to JSON. + * @function toJSON + * @memberof google.api.MethodSettings + * @instance + * @returns {Object.} JSON object + */ + MethodSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodSettings + * @function getTypeUrl + * @memberof google.api.MethodSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings"; + }; + + MethodSettings.LongRunning = (function() { + + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ + + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay, long + 1); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay, long + 1); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout, long + 1); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay, long + 1); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay, long + 1); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + * @property {number} SHOPPING=5 SHOPPING value + * @property {number} GEO=6 GEO value + * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value + */ + api.ClientLibraryOrganization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD"] = 1; + values[valuesById[2] = "ADS"] = 2; + values[valuesById[3] = "PHOTOS"] = 3; + values[valuesById[4] = "STREET_VIEW"] = 4; + values[valuesById[5] = "SHOPPING"] = 5; + values[valuesById[6] = "GEO"] = 6; + values[valuesById[7] = "GENERATIVE_AI"] = 7; + return values; + })(); + + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + api.ClientLibraryDestination = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; + values[valuesById[10] = "GITHUB"] = 10; + values[valuesById[20] = "PACKAGE_MANAGER"] = 20; + return values; + })(); + + api.SelectiveGapicGeneration = (function() { + + /** + * Properties of a SelectiveGapicGeneration. + * @memberof google.api + * @interface ISelectiveGapicGeneration + * @property {Array.|null} [methods] SelectiveGapicGeneration methods + * @property {boolean|null} [generateOmittedAsInternal] SelectiveGapicGeneration generateOmittedAsInternal + */ + + /** + * Constructs a new SelectiveGapicGeneration. + * @memberof google.api + * @classdesc Represents a SelectiveGapicGeneration. + * @implements ISelectiveGapicGeneration + * @constructor + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + */ + function SelectiveGapicGeneration(properties) { + this.methods = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SelectiveGapicGeneration methods. + * @member {Array.} methods + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.methods = $util.emptyArray; + + /** + * SelectiveGapicGeneration generateOmittedAsInternal. + * @member {boolean} generateOmittedAsInternal + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.generateOmittedAsInternal = false; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @function create + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration instance + */ + SelectiveGapicGeneration.create = function create(properties) { + return new SelectiveGapicGeneration(properties); + }; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methods != null && message.methods.length) + for (var i = 0; i < message.methods.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.methods[i]); + if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.generateOmittedAsInternal); + return writer; + }; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @function decode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.SelectiveGapicGeneration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.methods && message.methods.length)) + message.methods = []; + message.methods.push(reader.string()); + break; + } + case 2: { + message.generateOmittedAsInternal = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectiveGapicGeneration message. + * @function verify + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectiveGapicGeneration.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.methods != null && message.hasOwnProperty("methods")) { + if (!Array.isArray(message.methods)) + return "methods: array expected"; + for (var i = 0; i < message.methods.length; ++i) + if (!$util.isString(message.methods[i])) + return "methods: string[] expected"; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + if (typeof message.generateOmittedAsInternal !== "boolean") + return "generateOmittedAsInternal: boolean expected"; + return null; + }; + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} object Plain object + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + */ + SelectiveGapicGeneration.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.SelectiveGapicGeneration) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.SelectiveGapicGeneration(); + if (object.methods) { + if (!Array.isArray(object.methods)) + throw TypeError(".google.api.SelectiveGapicGeneration.methods: array expected"); + message.methods = []; + for (var i = 0; i < object.methods.length; ++i) + message.methods[i] = String(object.methods[i]); + } + if (object.generateOmittedAsInternal != null) + message.generateOmittedAsInternal = Boolean(object.generateOmittedAsInternal); + return message; + }; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.SelectiveGapicGeneration} message SelectiveGapicGeneration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectiveGapicGeneration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.methods = []; + if (options.defaults) + object.generateOmittedAsInternal = false; + if (message.methods && message.methods.length) { + object.methods = []; + for (var j = 0; j < message.methods.length; ++j) + object.methods[j] = message.methods[j]; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + object.generateOmittedAsInternal = message.generateOmittedAsInternal; + return object; + }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @function toJSON + * @memberof google.api.SelectiveGapicGeneration + * @instance + * @returns {Object.} JSON object + */ + SelectiveGapicGeneration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @function getTypeUrl + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectiveGapicGeneration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.SelectiveGapicGeneration"; + }; + + return SelectiveGapicGeneration; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + * @property {number} IDENTIFIER=8 IDENTIFIER value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.api.ResourceReference) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i], long + 1); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_LEGACY=900 EDITION_LEGACY value + * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value + * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value + * @property {number} EDITION_2023=1000 EDITION_2023 value + * @property {number} EDITION_2024=1001 EDITION_2024 value + * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value + * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value + * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value + * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value + * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value + * @property {number} EDITION_MAX=2147483647 EDITION_MAX value + */ + protobuf.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[900] = "EDITION_LEGACY"] = 900; + values[valuesById[998] = "EDITION_PROTO2"] = 998; + values[valuesById[999] = "EDITION_PROTO3"] = 999; + values[valuesById[1000] = "EDITION_2023"] = 1000; + values[valuesById[1001] = "EDITION_2024"] = 1001; + values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; + values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; + values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; + values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; + values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; + values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; + return values; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [optionDependency] FileDescriptorProto optionDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.optionDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto optionDependency. + * @member {Array.} optionDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.optionDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = 0; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + if (message.optionDependency != null && message.optionDependency.length) + for (var i = 0; i < message.optionDependency.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.optionDependency[i]); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 15: { + if (!(message.optionDependency && message.optionDependency.length)) + message.optionDependency = []; + message.optionDependency.push(reader.string()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 14: { + message.edition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.optionDependency != null && message.hasOwnProperty("optionDependency")) { + if (!Array.isArray(message.optionDependency)) + return "optionDependency: array expected"; + for (var i = 0; i < message.optionDependency.length; ++i) + if (!$util.isString(message.optionDependency[i])) + return "optionDependency: string[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i], long + 1); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i], long + 1); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i], long + 1); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i], long + 1); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options, long + 1); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo, long + 1); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.optionDependency) { + if (!Array.isArray(object.optionDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.optionDependency: array expected"); + message.optionDependency = []; + for (var i = 0; i < object.optionDependency.length; ++i) + message.optionDependency[i] = String(object.optionDependency[i]); + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i], long + 1); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i], long + 1); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i], long + 1); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], long + 1); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options, long + 1); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo, long + 1); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + object.optionDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + if (message.optionDependency && message.optionDependency.length) { + object.optionDependency = []; + for (var j = 0; j < message.optionDependency.length; ++j) + object.optionDependency[j] = message.optionDependency[j]; + } + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] DescriptorProto visibility + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * DescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.visibility = 0; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.visibility); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + case 11: { + message.visibility = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i], long + 1); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i], long + 1); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i], long + 1); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i], long + 1); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i], long + 1); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i], long + 1); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options, long + 1); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i], long + 1); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i], long + 1); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i], long + 1); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i], long + 1); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i], long + 1); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i], long + 1); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i], long + 1); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options, long + 1); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i], long + 1); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options, long + 1); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + this.declaration = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); + if (error) + return "uninterpretedOption." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i], long + 1); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i], long + 1); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 3: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options, long + 1); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options, long + 1); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options, long + 1); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] EnumDescriptorProto visibility + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * EnumDescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.visibility = 0; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.visibility); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + case 6: { + message.visibility = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i], long + 1); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options, long + 1); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i], long + 1); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i], long + 1); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options, long + 1); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i], long + 1); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options, long + 1); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options, long + 1); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i], long + 1); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options, long + 1); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i], long + 1); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options, long + 1); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options, long + 1); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i], long + 1); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"], long + 1); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"], long + 1); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] FieldOptions featureSupport + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * FieldOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.featureSupport = null; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); + if (message.editionDefaults != null && message.editionDefaults.length) + for (var i = 0; i < message.editionDefaults.length; ++i) + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 22: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i], long + 1); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); + if (error) + return "features." + error; + } + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport, long + 1); + if (error) + return "featureSupport." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"], long + 1); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i], long + 1); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); + } + if (object.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.FieldOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport, long + 1); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"], long + 1); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targets = []; + object.editionDefaults = []; + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.features = null; + object.featureSupport = null; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; + } + if (message.editionDefaults && message.editionDefaults.length) { + object.editionDefaults = []; + for (var j = 0; j < message.editionDefaults.length; ++j) + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + + FieldOptions.EditionDefault = (function() { + + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ + + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + */ + EditionDefault.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.FieldOptions.EditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this EditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + * @returns {Object.} JSON object + */ + EditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + }; + + return EditionDefault; + })(); + + FieldOptions.FeatureSupport = (function() { + + /** + * Properties of a FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @interface IFeatureSupport + * @property {google.protobuf.Edition|null} [editionIntroduced] FeatureSupport editionIntroduced + * @property {google.protobuf.Edition|null} [editionDeprecated] FeatureSupport editionDeprecated + * @property {string|null} [deprecationWarning] FeatureSupport deprecationWarning + * @property {google.protobuf.Edition|null} [editionRemoved] FeatureSupport editionRemoved + */ + + /** + * Constructs a new FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents a FeatureSupport. + * @implements IFeatureSupport + * @constructor + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + */ + function FeatureSupport(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSupport editionIntroduced. + * @member {google.protobuf.Edition} editionIntroduced + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionIntroduced = 0; + + /** + * FeatureSupport editionDeprecated. + * @member {google.protobuf.Edition} editionDeprecated + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionDeprecated = 0; + + /** + * FeatureSupport deprecationWarning. + * @member {string} deprecationWarning + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.deprecationWarning = ""; + + /** + * FeatureSupport editionRemoved. + * @member {google.protobuf.Edition} editionRemoved + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionRemoved = 0; + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport instance + */ + FeatureSupport.create = function create(properties) { + return new FeatureSupport(properties); + }; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.editionIntroduced); + if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.editionDeprecated); + if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deprecationWarning); + if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.editionRemoved); + return writer; + }; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.editionIntroduced = reader.int32(); + break; + } + case 2: { + message.editionDeprecated = reader.int32(); + break; + } + case 3: { + message.deprecationWarning = reader.string(); + break; + } + case 4: { + message.editionRemoved = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSupport message. + * @function verify + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSupport.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + switch (message.editionIntroduced) { + default: + return "editionIntroduced: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + switch (message.editionDeprecated) { + default: + return "editionDeprecated: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + if (!$util.isString(message.deprecationWarning)) + return "deprecationWarning: string expected"; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + switch (message.editionRemoved) { + default: + return "editionRemoved: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + */ + FeatureSupport.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.FieldOptions.FeatureSupport) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + switch (object.editionIntroduced) { + default: + if (typeof object.editionIntroduced === "number") { + message.editionIntroduced = object.editionIntroduced; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionIntroduced = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionIntroduced = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionIntroduced = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionIntroduced = 999; + break; + case "EDITION_2023": + case 1000: + message.editionIntroduced = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionIntroduced = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionIntroduced = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionIntroduced = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionIntroduced = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionIntroduced = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionIntroduced = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionIntroduced = 2147483647; + break; + } + switch (object.editionDeprecated) { + default: + if (typeof object.editionDeprecated === "number") { + message.editionDeprecated = object.editionDeprecated; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionDeprecated = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionDeprecated = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionDeprecated = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionDeprecated = 999; + break; + case "EDITION_2023": + case 1000: + message.editionDeprecated = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionDeprecated = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionDeprecated = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionDeprecated = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionDeprecated = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionDeprecated = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionDeprecated = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionDeprecated = 2147483647; + break; + } + if (object.deprecationWarning != null) + message.deprecationWarning = String(object.deprecationWarning); + switch (object.editionRemoved) { + default: + if (typeof object.editionRemoved === "number") { + message.editionRemoved = object.editionRemoved; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionRemoved = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionRemoved = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionRemoved = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionRemoved = 999; + break; + case "EDITION_2023": + case 1000: + message.editionRemoved = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionRemoved = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionRemoved = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionRemoved = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionRemoved = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionRemoved = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionRemoved = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionRemoved = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.FeatureSupport} message FeatureSupport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSupport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.editionIntroduced = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.editionDeprecated = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.deprecationWarning = ""; + object.editionRemoved = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + object.editionIntroduced = options.enums === String ? $root.google.protobuf.Edition[message.editionIntroduced] === undefined ? message.editionIntroduced : $root.google.protobuf.Edition[message.editionIntroduced] : message.editionIntroduced; + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + object.editionDeprecated = options.enums === String ? $root.google.protobuf.Edition[message.editionDeprecated] === undefined ? message.editionDeprecated : $root.google.protobuf.Edition[message.editionDeprecated] : message.editionDeprecated; + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + object.deprecationWarning = message.deprecationWarning; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + object.editionRemoved = options.enums === String ? $root.google.protobuf.Edition[message.editionRemoved] === undefined ? message.editionRemoved : $root.google.protobuf.Edition[message.editionRemoved] : message.editionRemoved; + return object; + }; + + /** + * Converts this FeatureSupport to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + * @returns {Object.} JSON object + */ + FeatureSupport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSupport + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSupport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.FeatureSupport"; + }; + + return FeatureSupport; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * OneofOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.features = null; + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.OneofOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.features = null; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * EnumOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.features = null; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] EnumValueOptions featureSupport + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.features = null; + + /** + * EnumValueOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.debugRedact = false; + + /** + * EnumValueOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.featureSupport = null; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); + if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 3: { + message.debugRedact = reader.bool(); + break; + } + case 4: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); + if (error) + return "features." + error; + } + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport, long + 1); + if (error) + return "featureSupport." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); + } + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + if (object.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport, long + 1); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object.debugRedact = false; + object.featureSupport = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.features = null; + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * ServiceOptions .google.api.apiVersion. + * @member {string} .google.api.apiVersion + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.apiVersion"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + case 525000001: { + message[".google.api.apiVersion"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); + if (error) + return "features." + error; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (!$util.isString(message[".google.api.apiVersion"])) + return ".google.api.apiVersion: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.ServiceOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); + } + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + if (object[".google.api.apiVersion"] != null) + message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + object[".google.api.apiVersion"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.features = null; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 35: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features, long + 1); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i], long + 1); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"], long + 1); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features, long + 1); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i], long + 1); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"], long + 1); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object.features = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i], long + 1); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i], long + 1); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.FeatureSet = (function() { + + /** + * Properties of a FeatureSet. + * @memberof google.protobuf + * @interface IFeatureSet + * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence + * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType + * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding + * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation + * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding + * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat + * @property {google.protobuf.FeatureSet.EnforceNamingStyle|null} [enforceNamingStyle] FeatureSet enforceNamingStyle + * @property {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null} [defaultSymbolVisibility] FeatureSet defaultSymbolVisibility + */ + + /** + * Constructs a new FeatureSet. + * @memberof google.protobuf + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet + * @constructor + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + */ + function FeatureSet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.fieldPresence = 0; + + /** + * FeatureSet enumType. + * @member {google.protobuf.FeatureSet.EnumType} enumType + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enumType = 0; + + /** + * FeatureSet repeatedFieldEncoding. + * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.repeatedFieldEncoding = 0; + + /** + * FeatureSet utf8Validation. + * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.utf8Validation = 0; + + /** + * FeatureSet messageEncoding. + * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.messageEncoding = 0; + + /** + * FeatureSet jsonFormat. + * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.jsonFormat = 0; + + /** + * FeatureSet enforceNamingStyle. + * @member {google.protobuf.FeatureSet.EnforceNamingStyle} enforceNamingStyle + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enforceNamingStyle = 0; + + /** + * FeatureSet defaultSymbolVisibility. + * @member {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility} defaultSymbolVisibility + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.defaultSymbolVisibility = 0; + + /** + * Creates a new FeatureSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance + */ + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); + }; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); + if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.enforceNamingStyle); + if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.defaultSymbolVisibility); + return writer; + }; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldPresence = reader.int32(); + break; + } + case 2: { + message.enumType = reader.int32(); + break; + } + case 3: { + message.repeatedFieldEncoding = reader.int32(); + break; + } + case 4: { + message.utf8Validation = reader.int32(); + break; + } + case 5: { + message.messageEncoding = reader.int32(); + break; + } + case 6: { + message.jsonFormat = reader.int32(); + break; + } + case 7: { + message.enforceNamingStyle = reader.int32(); + break; + } + case 8: { + message.defaultSymbolVisibility = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSet message. + * @function verify + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSet.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + switch (message.fieldPresence) { + default: + return "fieldPresence: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enumType != null && message.hasOwnProperty("enumType")) + switch (message.enumType) { + default: + return "enumType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + switch (message.repeatedFieldEncoding) { + default: + return "repeatedFieldEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + switch (message.utf8Validation) { + default: + return "utf8Validation: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + switch (message.messageEncoding) { + default: + return "messageEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + switch (message.jsonFormat) { + default: + return "jsonFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + switch (message.enforceNamingStyle) { + default: + return "enforceNamingStyle: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + switch (message.defaultSymbolVisibility) { + default: + return "defaultSymbolVisibility: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet} FeatureSet + */ + FeatureSet.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.FeatureSet) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.FeatureSet(); + switch (object.fieldPresence) { + default: + if (typeof object.fieldPresence === "number") { + message.fieldPresence = object.fieldPresence; + break; + } + break; + case "FIELD_PRESENCE_UNKNOWN": + case 0: + message.fieldPresence = 0; + break; + case "EXPLICIT": + case 1: + message.fieldPresence = 1; + break; + case "IMPLICIT": + case 2: + message.fieldPresence = 2; + break; + case "LEGACY_REQUIRED": + case 3: + message.fieldPresence = 3; + break; + } + switch (object.enumType) { + default: + if (typeof object.enumType === "number") { + message.enumType = object.enumType; + break; + } + break; + case "ENUM_TYPE_UNKNOWN": + case 0: + message.enumType = 0; + break; + case "OPEN": + case 1: + message.enumType = 1; + break; + case "CLOSED": + case 2: + message.enumType = 2; + break; + } + switch (object.repeatedFieldEncoding) { + default: + if (typeof object.repeatedFieldEncoding === "number") { + message.repeatedFieldEncoding = object.repeatedFieldEncoding; + break; + } + break; + case "REPEATED_FIELD_ENCODING_UNKNOWN": + case 0: + message.repeatedFieldEncoding = 0; + break; + case "PACKED": + case 1: + message.repeatedFieldEncoding = 1; + break; + case "EXPANDED": + case 2: + message.repeatedFieldEncoding = 2; + break; + } + switch (object.utf8Validation) { + default: + if (typeof object.utf8Validation === "number") { + message.utf8Validation = object.utf8Validation; + break; + } + break; + case "UTF8_VALIDATION_UNKNOWN": + case 0: + message.utf8Validation = 0; + break; + case "VERIFY": + case 2: + message.utf8Validation = 2; + break; + case "NONE": + case 3: + message.utf8Validation = 3; + break; + } + switch (object.messageEncoding) { + default: + if (typeof object.messageEncoding === "number") { + message.messageEncoding = object.messageEncoding; + break; + } + break; + case "MESSAGE_ENCODING_UNKNOWN": + case 0: + message.messageEncoding = 0; + break; + case "LENGTH_PREFIXED": + case 1: + message.messageEncoding = 1; + break; + case "DELIMITED": + case 2: + message.messageEncoding = 2; + break; + } + switch (object.jsonFormat) { + default: + if (typeof object.jsonFormat === "number") { + message.jsonFormat = object.jsonFormat; + break; + } + break; + case "JSON_FORMAT_UNKNOWN": + case 0: + message.jsonFormat = 0; + break; + case "ALLOW": + case 1: + message.jsonFormat = 1; + break; + case "LEGACY_BEST_EFFORT": + case 2: + message.jsonFormat = 2; + break; + } + switch (object.enforceNamingStyle) { + default: + if (typeof object.enforceNamingStyle === "number") { + message.enforceNamingStyle = object.enforceNamingStyle; + break; + } + break; + case "ENFORCE_NAMING_STYLE_UNKNOWN": + case 0: + message.enforceNamingStyle = 0; + break; + case "STYLE2024": + case 1: + message.enforceNamingStyle = 1; + break; + case "STYLE_LEGACY": + case 2: + message.enforceNamingStyle = 2; + break; + } + switch (object.defaultSymbolVisibility) { + default: + if (typeof object.defaultSymbolVisibility === "number") { + message.defaultSymbolVisibility = object.defaultSymbolVisibility; + break; + } + break; + case "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": + case 0: + message.defaultSymbolVisibility = 0; + break; + case "EXPORT_ALL": + case 1: + message.defaultSymbolVisibility = 1; + break; + case "EXPORT_TOP_LEVEL": + case 2: + message.defaultSymbolVisibility = 2; + break; + case "LOCAL_ALL": + case 3: + message.defaultSymbolVisibility = 3; + break; + case "STRICT": + case 4: + message.defaultSymbolVisibility = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.FeatureSet} message FeatureSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; + object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; + object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; + object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; + object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; + object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; + object.enforceNamingStyle = options.enums === String ? "ENFORCE_NAMING_STYLE_UNKNOWN" : 0; + object.defaultSymbolVisibility = options.enums === String ? "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN" : 0; + } + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; + if (message.enumType != null && message.hasOwnProperty("enumType")) + object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + object.enforceNamingStyle = options.enums === String ? $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] === undefined ? message.enforceNamingStyle : $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] : message.enforceNamingStyle; + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + object.defaultSymbolVisibility = options.enums === String ? $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] === undefined ? message.defaultSymbolVisibility : $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] : message.defaultSymbolVisibility; + return object; + }; + + /** + * Converts this FeatureSet to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet + * @instance + * @returns {Object.} JSON object + */ + FeatureSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSet + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet"; + }; + + /** + * FieldPresence enum. + * @name google.protobuf.FeatureSet.FieldPresence + * @enum {number} + * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value + * @property {number} EXPLICIT=1 EXPLICIT value + * @property {number} IMPLICIT=2 IMPLICIT value + * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value + */ + FeatureSet.FieldPresence = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; + values[valuesById[1] = "EXPLICIT"] = 1; + values[valuesById[2] = "IMPLICIT"] = 2; + values[valuesById[3] = "LEGACY_REQUIRED"] = 3; + return values; + })(); + + /** + * EnumType enum. + * @name google.protobuf.FeatureSet.EnumType + * @enum {number} + * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value + * @property {number} OPEN=1 OPEN value + * @property {number} CLOSED=2 CLOSED value + */ + FeatureSet.EnumType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "OPEN"] = 1; + values[valuesById[2] = "CLOSED"] = 2; + return values; + })(); + + /** + * RepeatedFieldEncoding enum. + * @name google.protobuf.FeatureSet.RepeatedFieldEncoding + * @enum {number} + * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value + * @property {number} PACKED=1 PACKED value + * @property {number} EXPANDED=2 EXPANDED value + */ + FeatureSet.RepeatedFieldEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "PACKED"] = 1; + values[valuesById[2] = "EXPANDED"] = 2; + return values; + })(); + + /** + * Utf8Validation enum. + * @name google.protobuf.FeatureSet.Utf8Validation + * @enum {number} + * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value + * @property {number} VERIFY=2 VERIFY value + * @property {number} NONE=3 NONE value + */ + FeatureSet.Utf8Validation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; + values[valuesById[2] = "VERIFY"] = 2; + values[valuesById[3] = "NONE"] = 3; + return values; + })(); + + /** + * MessageEncoding enum. + * @name google.protobuf.FeatureSet.MessageEncoding + * @enum {number} + * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value + * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value + * @property {number} DELIMITED=2 DELIMITED value + */ + FeatureSet.MessageEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "LENGTH_PREFIXED"] = 1; + values[valuesById[2] = "DELIMITED"] = 2; + return values; + })(); + + /** + * JsonFormat enum. + * @name google.protobuf.FeatureSet.JsonFormat + * @enum {number} + * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value + * @property {number} ALLOW=1 ALLOW value + * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value + */ + FeatureSet.JsonFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; + values[valuesById[1] = "ALLOW"] = 1; + values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; + return values; + })(); + + /** + * EnforceNamingStyle enum. + * @name google.protobuf.FeatureSet.EnforceNamingStyle + * @enum {number} + * @property {number} ENFORCE_NAMING_STYLE_UNKNOWN=0 ENFORCE_NAMING_STYLE_UNKNOWN value + * @property {number} STYLE2024=1 STYLE2024 value + * @property {number} STYLE_LEGACY=2 STYLE_LEGACY value + */ + FeatureSet.EnforceNamingStyle = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENFORCE_NAMING_STYLE_UNKNOWN"] = 0; + values[valuesById[1] = "STYLE2024"] = 1; + values[valuesById[2] = "STYLE_LEGACY"] = 2; + return values; + })(); + + FeatureSet.VisibilityFeature = (function() { + + /** + * Properties of a VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @interface IVisibilityFeature + */ + + /** + * Constructs a new VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @classdesc Represents a VisibilityFeature. + * @implements IVisibilityFeature + * @constructor + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + */ + function VisibilityFeature(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new VisibilityFeature instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature instance + */ + VisibilityFeature.create = function create(properties) { + return new VisibilityFeature(properties); + }; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet.VisibilityFeature(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VisibilityFeature message. + * @function verify + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VisibilityFeature.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + */ + VisibilityFeature.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.FeatureSet.VisibilityFeature) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.protobuf.FeatureSet.VisibilityFeature(); + }; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.VisibilityFeature} message VisibilityFeature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VisibilityFeature.toObject = function toObject() { + return {}; + }; + + /** + * Converts this VisibilityFeature to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @instance + * @returns {Object.} JSON object + */ + VisibilityFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VisibilityFeature + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VisibilityFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet.VisibilityFeature"; + }; + + /** + * DefaultSymbolVisibility enum. + * @name google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility + * @enum {number} + * @property {number} DEFAULT_SYMBOL_VISIBILITY_UNKNOWN=0 DEFAULT_SYMBOL_VISIBILITY_UNKNOWN value + * @property {number} EXPORT_ALL=1 EXPORT_ALL value + * @property {number} EXPORT_TOP_LEVEL=2 EXPORT_TOP_LEVEL value + * @property {number} LOCAL_ALL=3 LOCAL_ALL value + * @property {number} STRICT=4 STRICT value + */ + VisibilityFeature.DefaultSymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"] = 0; + values[valuesById[1] = "EXPORT_ALL"] = 1; + values[valuesById[2] = "EXPORT_TOP_LEVEL"] = 2; + values[valuesById[3] = "LOCAL_ALL"] = 3; + values[valuesById[4] = "STRICT"] = 4; + return values; + })(); + + return VisibilityFeature; + })(); + + return FeatureSet; + })(); + + protobuf.FeatureSetDefaults = (function() { + + /** + * Properties of a FeatureSetDefaults. + * @memberof google.protobuf + * @interface IFeatureSetDefaults + * @property {Array.|null} [defaults] FeatureSetDefaults defaults + * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition + * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition + */ + + /** + * Constructs a new FeatureSetDefaults. + * @memberof google.protobuf + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults + * @constructor + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + */ + function FeatureSetDefaults(properties) { + this.defaults = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.defaults = $util.emptyArray; + + /** + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.minimumEdition = 0; + + /** + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.maximumEdition = 0; + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + */ + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); + }; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaults != null && message.defaults.length) + for (var i = 0; i < message.defaults.length; ++i) + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); + return writer; + }; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetDefaults message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetDefaults.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (!Array.isArray(message.defaults)) + return "defaults: array expected"; + for (var i = 0; i < message.defaults.length; ++i) { + var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i], long + 1); + if (error) + return "defaults." + error; + } + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + switch (message.maximumEdition) { + default: + return "maximumEdition: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + */ + FeatureSetDefaults.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.FeatureSetDefaults(); + if (object.defaults) { + if (!Array.isArray(object.defaults)) + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); + message.defaults = []; + for (var i = 0; i < object.defaults.length; ++i) { + if (typeof object.defaults[i] !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); + message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i], long + 1); + } + } + switch (object.minimumEdition) { + default: + if (typeof object.minimumEdition === "number") { + message.minimumEdition = object.minimumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.minimumEdition = 0; + break; + case "EDITION_LEGACY": + case 900: + message.minimumEdition = 900; + break; + case "EDITION_PROTO2": + case 998: + message.minimumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.minimumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.minimumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.minimumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.minimumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.minimumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.minimumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.minimumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.minimumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.minimumEdition = 2147483647; + break; + } + switch (object.maximumEdition) { + default: + if (typeof object.maximumEdition === "number") { + message.maximumEdition = object.maximumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.maximumEdition = 0; + break; + case "EDITION_LEGACY": + case 900: + message.maximumEdition = 900; + break; + case "EDITION_PROTO2": + case 998: + message.maximumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.maximumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.maximumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.maximumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.maximumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.maximumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.maximumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.maximumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.maximumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.maximumEdition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.defaults = []; + if (options.defaults) { + object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.defaults && message.defaults.length) { + object.defaults = []; + for (var j = 0; j < message.defaults.length; ++j) + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; + return object; + }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults + * @instance + * @returns {Object.} JSON object + */ + FeatureSetDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetDefaults + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; + }; + + FeatureSetDefaults.FeatureSetEditionDefault = (function() { + + /** + * Properties of a FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @interface IFeatureSetEditionDefault + * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition + * @property {google.protobuf.IFeatureSet|null} [overridableFeatures] FeatureSetEditionDefault overridableFeatures + * @property {google.protobuf.IFeatureSet|null} [fixedFeatures] FeatureSetEditionDefault fixedFeatures + */ + + /** + * Constructs a new FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @classdesc Represents a FeatureSetEditionDefault. + * @implements IFeatureSetEditionDefault + * @constructor + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + */ + function FeatureSetEditionDefault(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; + + /** + * FeatureSetEditionDefault overridableFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} overridableFeatures + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.overridableFeatures = null; + + /** + * FeatureSetEditionDefault fixedFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} fixedFeatures + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.fixedFeatures = null; + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance + */ + FeatureSetEditionDefault.create = function create(properties) { + return new FeatureSetEditionDefault(properties); + }; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) + $root.google.protobuf.FeatureSet.encode(message.overridableFeatures, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) + $root.google.protobuf.FeatureSet.encode(message.fixedFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 4: { + message.overridableFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + case 5: { + message.fixedFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32(), undefined, long + 1); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetEditionDefault message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetEditionDefault.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.overridableFeatures, long + 1); + if (error) + return "overridableFeatures." + error; + } + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.fixedFeatures, long + 1); + if (error) + return "fixedFeatures." + error; + } + return null; + }; + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + */ + FeatureSetEditionDefault.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.overridableFeatures != null) { + if (typeof object.overridableFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridableFeatures: object expected"); + message.overridableFeatures = $root.google.protobuf.FeatureSet.fromObject(object.overridableFeatures, long + 1); + } + if (object.fixedFeatures != null) { + if (typeof object.fixedFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixedFeatures: object expected"); + message.fixedFeatures = $root.google.protobuf.FeatureSet.fromObject(object.fixedFeatures, long + 1); + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetEditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.overridableFeatures = null; + object.fixedFeatures = null; + } + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) + object.overridableFeatures = $root.google.protobuf.FeatureSet.toObject(message.overridableFeatures, options); + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) + object.fixedFeatures = $root.google.protobuf.FeatureSet.toObject(message.fixedFeatures, options); + return object; + }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + * @returns {Object.} JSON object + */ + FeatureSetEditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; + }; + + return FeatureSetEditionDefault; + })(); + + return FeatureSetDefaults; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i], long + 1); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i], long + 1); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + /** + * SymbolVisibility enum. + * @name google.protobuf.SymbolVisibility + * @enum {number} + * @property {number} VISIBILITY_UNSET=0 VISIBILITY_UNSET value + * @property {number} VISIBILITY_LOCAL=1 VISIBILITY_LOCAL value + * @property {number} VISIBILITY_EXPORT=2 VISIBILITY_EXPORT value + */ + protobuf.SymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VISIBILITY_UNSET"] = 0; + values[valuesById[1] = "VISIBILITY_LOCAL"] = 1; + values[valuesById[2] = "VISIBILITY_EXPORT"] = 2; + return values; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.Duration) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.Empty) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + + return FieldMask; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.protobuf.Any) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + + return Any; + })(); + + return protobuf; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.Status = (function() { + + /** + * Properties of a Status. + * @memberof google.rpc + * @interface IStatus + * @property {number|null} [code] Status code + * @property {string|null} [message] Status message + * @property {Array.|null} [details] Status details + */ + + /** + * Constructs a new Status. + * @memberof google.rpc + * @classdesc Represents a Status. + * @implements IStatus + * @constructor + * @param {google.rpc.IStatus=} [properties] Properties to set + */ + function Status(properties) { + this.details = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Status code. + * @member {number} code + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.code = 0; + + /** + * Status message. + * @member {string} message + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.message = ""; + + /** + * Status details. + * @member {Array.} details + * @memberof google.rpc.Status + * @instance + */ + Status.prototype.details = $util.emptyArray; + + /** + * Creates a new Status instance using the specified properties. + * @function create + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus=} [properties] Properties to set + * @returns {google.rpc.Status} Status instance + */ + Status.create = function create(properties) { + return new Status(properties); + }; + + /** + * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encode + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + if (message.details != null && message.details.length) + for (var i = 0; i < message.details.length; ++i) + $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Status + * @static + * @param {google.rpc.IStatus} message Status message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Status.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Status message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.code = reader.int32(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + case 3: { + if (!(message.details && message.details.length)) + message.details = []; + message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32(), undefined, long + 1)); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Status message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Status + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Status} Status + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Status.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Status message. + * @function verify + * @memberof google.rpc.Status + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Status.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.code != null && message.hasOwnProperty("code")) + if (!$util.isInteger(message.code)) + return "code: integer expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + if (!Array.isArray(message.details)) + return "details: array expected"; + for (var i = 0; i < message.details.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.details[i], long + 1); + if (error) + return "details." + error; + } + } + return null; + }; + + /** + * Creates a Status message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Status + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Status} Status + */ + Status.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.rpc.Status) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.rpc.Status(); + if (object.code != null) + message.code = object.code | 0; + if (object.message != null) + message.message = String(object.message); + if (object.details) { + if (!Array.isArray(object.details)) + throw TypeError(".google.rpc.Status.details: array expected"); + message.details = []; + for (var i = 0; i < object.details.length; ++i) { + if (typeof object.details[i] !== "object") + throw TypeError(".google.rpc.Status.details: object expected"); + message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i], long + 1); + } + } + return message; + }; + + /** + * Creates a plain object from a Status message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Status + * @static + * @param {google.rpc.Status} message Status + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Status.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.details = []; + if (options.defaults) { + object.code = 0; + object.message = ""; + } + if (message.code != null && message.hasOwnProperty("code")) + object.code = message.code; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + if (message.details && message.details.length) { + object.details = []; + for (var j = 0; j < message.details.length; ++j) + object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options); + } + return object; + }; + + /** + * Converts this Status to JSON. + * @function toJSON + * @memberof google.rpc.Status + * @instance + * @returns {Object.} JSON object + */ + Status.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Status + * @function getTypeUrl + * @memberof google.rpc.Status + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Status"; + }; + + return Status; + })(); + + return rpc; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.Date = (function() { + + /** + * Properties of a Date. + * @memberof google.type + * @interface IDate + * @property {number|null} [year] Date year + * @property {number|null} [month] Date month + * @property {number|null} [day] Date day + */ + + /** + * Constructs a new Date. + * @memberof google.type + * @classdesc Represents a Date. + * @implements IDate + * @constructor + * @param {google.type.IDate=} [properties] Properties to set + */ + function Date(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * Date year. + * @member {number} year + * @memberof google.type.Date + * @instance + */ + Date.prototype.year = 0; + + /** + * Date month. + * @member {number} month + * @memberof google.type.Date + * @instance + */ + Date.prototype.month = 0; + + /** + * Date day. + * @member {number} day + * @memberof google.type.Date + * @instance + */ + Date.prototype.day = 0; + + /** + * Creates a new Date instance using the specified properties. + * @function create + * @memberof google.type.Date + * @static + * @param {google.type.IDate=} [properties] Properties to set + * @returns {google.type.Date} Date instance + */ + Date.create = function create(properties) { + return new Date(properties); + }; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @function encode + * @memberof google.type.Date + * @static + * @param {google.type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.year != null && Object.hasOwnProperty.call(message, "year")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); + if (message.month != null && Object.hasOwnProperty.call(message, "month")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); + return writer; + }; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Date + * @static + * @param {google.type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Date message from the specified reader or buffer. + * @function decode + * @memberof google.type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Date(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.year = reader.int32(); + break; + } + case 2: { + message.month = reader.int32(); + break; + } + case 3: { + message.day = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Date message. + * @function verify + * @memberof google.type.Date + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Date.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.year != null && message.hasOwnProperty("year")) + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (message.month != null && message.hasOwnProperty("month")) + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (message.day != null && message.hasOwnProperty("day")) + if (!$util.isInteger(message.day)) + return "day: integer expected"; + return null; + }; + + /** + * Creates a Date message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Date + * @static + * @param {Object.} object Plain object + * @returns {google.type.Date} Date + */ + Date.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.type.Date) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.type.Date(); + if (object.year != null) + message.year = object.year | 0; + if (object.month != null) + message.month = object.month | 0; + if (object.day != null) + message.day = object.day | 0; + return message; + }; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Date + * @static + * @param {google.type.Date} message Date + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Date.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.year = 0; + object.month = 0; + object.day = 0; + } + if (message.year != null && message.hasOwnProperty("year")) + object.year = message.year; + if (message.month != null && message.hasOwnProperty("month")) + object.month = message.month; + if (message.day != null && message.hasOwnProperty("day")) + object.day = message.day; + return object; + }; + + /** + * Converts this Date to JSON. + * @function toJSON + * @memberof google.type.Date + * @instance + * @returns {Object.} JSON object + */ + Date.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Date + * @function getTypeUrl + * @memberof google.type.Date + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Date.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Date"; + }; + + return Date; + })(); + + /** + * DayOfWeek enum. + * @name google.type.DayOfWeek + * @enum {number} + * @property {number} DAY_OF_WEEK_UNSPECIFIED=0 DAY_OF_WEEK_UNSPECIFIED value + * @property {number} MONDAY=1 MONDAY value + * @property {number} TUESDAY=2 TUESDAY value + * @property {number} WEDNESDAY=3 WEDNESDAY value + * @property {number} THURSDAY=4 THURSDAY value + * @property {number} FRIDAY=5 FRIDAY value + * @property {number} SATURDAY=6 SATURDAY value + * @property {number} SUNDAY=7 SUNDAY value + */ + type.DayOfWeek = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DAY_OF_WEEK_UNSPECIFIED"] = 0; + values[valuesById[1] = "MONDAY"] = 1; + values[valuesById[2] = "TUESDAY"] = 2; + values[valuesById[3] = "WEDNESDAY"] = 3; + values[valuesById[4] = "THURSDAY"] = 4; + values[valuesById[5] = "FRIDAY"] = 5; + values[valuesById[6] = "SATURDAY"] = 6; + values[valuesById[7] = "SUNDAY"] = 7; + return values; + })(); + + type.TimeOfDay = (function() { + + /** + * Properties of a TimeOfDay. + * @memberof google.type + * @interface ITimeOfDay + * @property {number|null} [hours] TimeOfDay hours + * @property {number|null} [minutes] TimeOfDay minutes + * @property {number|null} [seconds] TimeOfDay seconds + * @property {number|null} [nanos] TimeOfDay nanos + */ + + /** + * Constructs a new TimeOfDay. + * @memberof google.type + * @classdesc Represents a TimeOfDay. + * @implements ITimeOfDay + * @constructor + * @param {google.type.ITimeOfDay=} [properties] Properties to set + */ + function TimeOfDay(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null && keys[i] !== "__proto__") + this[keys[i]] = properties[keys[i]]; + } + + /** + * TimeOfDay hours. + * @member {number} hours + * @memberof google.type.TimeOfDay + * @instance + */ + TimeOfDay.prototype.hours = 0; + + /** + * TimeOfDay minutes. + * @member {number} minutes + * @memberof google.type.TimeOfDay + * @instance + */ + TimeOfDay.prototype.minutes = 0; + + /** + * TimeOfDay seconds. + * @member {number} seconds + * @memberof google.type.TimeOfDay + * @instance + */ + TimeOfDay.prototype.seconds = 0; + + /** + * TimeOfDay nanos. + * @member {number} nanos + * @memberof google.type.TimeOfDay + * @instance + */ + TimeOfDay.prototype.nanos = 0; + + /** + * Creates a new TimeOfDay instance using the specified properties. + * @function create + * @memberof google.type.TimeOfDay + * @static + * @param {google.type.ITimeOfDay=} [properties] Properties to set + * @returns {google.type.TimeOfDay} TimeOfDay instance + */ + TimeOfDay.create = function create(properties) { + return new TimeOfDay(properties); + }; + + /** + * Encodes the specified TimeOfDay message. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. + * @function encode + * @memberof google.type.TimeOfDay + * @static + * @param {google.type.ITimeOfDay} message TimeOfDay message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeOfDay.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.hours != null && Object.hasOwnProperty.call(message, "hours")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.hours); + if (message.minutes != null && Object.hasOwnProperty.call(message, "minutes")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.minutes); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified TimeOfDay message, length delimited. Does not implicitly {@link google.type.TimeOfDay.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.TimeOfDay + * @static + * @param {google.type.ITimeOfDay} message TimeOfDay message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeOfDay.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeOfDay message from the specified reader or buffer. + * @function decode + * @memberof google.type.TimeOfDay + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.TimeOfDay} TimeOfDay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeOfDay.decode = function decode(reader, length, error, long) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + if (long === undefined) + long = 0; + if (long > $Reader.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.TimeOfDay(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.hours = reader.int32(); + break; + } + case 2: { + message.minutes = reader.int32(); + break; + } + case 3: { + message.seconds = reader.int32(); + break; + } + case 4: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7, long); + break; + } + } + return message; + }; + + /** + * Decodes a TimeOfDay message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.TimeOfDay + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.TimeOfDay} TimeOfDay + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TimeOfDay.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeOfDay message. + * @function verify + * @memberof google.type.TimeOfDay + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TimeOfDay.verify = function verify(message, long) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + return "maximum nesting depth exceeded"; + if (message.hours != null && message.hasOwnProperty("hours")) + if (!$util.isInteger(message.hours)) + return "hours: integer expected"; + if (message.minutes != null && message.hasOwnProperty("minutes")) + if (!$util.isInteger(message.minutes)) + return "minutes: integer expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds)) + return "seconds: integer expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a TimeOfDay message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.TimeOfDay + * @static + * @param {Object.} object Plain object + * @returns {google.type.TimeOfDay} TimeOfDay + */ + TimeOfDay.fromObject = function fromObject(object, long) { + if (object instanceof $root.google.type.TimeOfDay) + return object; + if (long === undefined) + long = 0; + if (long > $util.recursionLimit) + throw Error("maximum nesting depth exceeded"); + var message = new $root.google.type.TimeOfDay(); + if (object.hours != null) + message.hours = object.hours | 0; + if (object.minutes != null) + message.minutes = object.minutes | 0; + if (object.seconds != null) + message.seconds = object.seconds | 0; + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a TimeOfDay message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.TimeOfDay + * @static + * @param {google.type.TimeOfDay} message TimeOfDay + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeOfDay.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.hours = 0; + object.minutes = 0; + object.seconds = 0; + object.nanos = 0; + } + if (message.hours != null && message.hasOwnProperty("hours")) + object.hours = message.hours; + if (message.minutes != null && message.hasOwnProperty("minutes")) + object.minutes = message.minutes; + if (message.seconds != null && message.hasOwnProperty("seconds")) + object.seconds = message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this TimeOfDay to JSON. + * @function toJSON + * @memberof google.type.TimeOfDay + * @instance + * @returns {Object.} JSON object + */ + TimeOfDay.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimeOfDay + * @function getTypeUrl + * @memberof google.type.TimeOfDay + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeOfDay.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.TimeOfDay"; + }; + + return TimeOfDay; + })(); + + return type; + })(); + + return google; + })(); + + return $root; +}); diff --git a/owl-bot-staging/dlp/v2/protos/protos.json b/owl-bot-staging/dlp/v2/protos/protos.json new file mode 100644 index 000000000..696a5dc41 --- /dev/null +++ b/owl-bot-staging/dlp/v2/protos/protos.json @@ -0,0 +1,11742 @@ +{ + "nested": { + "google": { + "nested": { + "privacy": { + "nested": { + "dlp": { + "nested": { + "v2": { + "options": { + "csharp_namespace": "Google.Cloud.Dlp.V2", + "go_package": "cloud.google.com/go/dlp/apiv2/dlppb;dlppb", + "java_multiple_files": true, + "java_outer_classname": "DlpStorage", + "java_package": "com.google.privacy.dlp.v2", + "php_namespace": "Google\\Cloud\\Dlp\\V2", + "ruby_package": "Google::Cloud::Dlp::V2", + "(google.api.resource_definition).type": "dlp.googleapis.com/OrganizationLocation", + "(google.api.resource_definition).pattern": "organizations/{organization}/locations/{location}" + }, + "nested": { + "DlpService": { + "options": { + "(google.api.default_host)": "dlp.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "InspectContent": { + "requestType": "InspectContentRequest", + "responseType": "InspectContentResponse", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*}/content:inspect", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{parent=projects/*/locations/*}/content:inspect", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*}/content:inspect", + "body": "*", + "additional_bindings": { + "post": "/v2/{parent=projects/*/locations/*}/content:inspect", + "body": "*" + } + } + } + ] + }, + "RedactImage": { + "requestType": "RedactImageRequest", + "responseType": "RedactImageResponse", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*}/image:redact", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{parent=projects/*/locations/*}/image:redact", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*}/image:redact", + "body": "*", + "additional_bindings": { + "post": "/v2/{parent=projects/*/locations/*}/image:redact", + "body": "*" + } + } + } + ] + }, + "DeidentifyContent": { + "requestType": "DeidentifyContentRequest", + "responseType": "DeidentifyContentResponse", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*}/content:deidentify", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{parent=projects/*/locations/*}/content:deidentify", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*}/content:deidentify", + "body": "*", + "additional_bindings": { + "post": "/v2/{parent=projects/*/locations/*}/content:deidentify", + "body": "*" + } + } + } + ] + }, + "ReidentifyContent": { + "requestType": "ReidentifyContentRequest", + "responseType": "ReidentifyContentResponse", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*}/content:reidentify", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{parent=projects/*/locations/*}/content:reidentify", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*}/content:reidentify", + "body": "*", + "additional_bindings": { + "post": "/v2/{parent=projects/*/locations/*}/content:reidentify", + "body": "*" + } + } + } + ] + }, + "ListInfoTypes": { + "requestType": "ListInfoTypesRequest", + "responseType": "ListInfoTypesResponse", + "options": { + "(google.api.http).get": "/v2/infoTypes", + "(google.api.http).additional_bindings.get": "/v2/{parent=organizations/*/locations/*}/infoTypes", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/infoTypes", + "additional_bindings": [ + { + "get": "/v2/{parent=locations/*}/infoTypes" + }, + { + "get": "/v2/{parent=projects/*/locations/*}/infoTypes" + }, + { + "get": "/v2/{parent=organizations/*/locations/*}/infoTypes" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateInspectTemplate": { + "requestType": "CreateInspectTemplateRequest", + "responseType": "InspectTemplate", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*/locations/*}/inspectTemplates", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{parent=organizations/*}/inspectTemplates", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "parent,inspect_template" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/locations/*}/inspectTemplates", + "body": "*", + "additional_bindings": [ + { + "post": "/v2/{parent=organizations/*/locations/*}/inspectTemplates", + "body": "*" + }, + { + "post": "/v2/{parent=projects/*}/inspectTemplates", + "body": "*" + }, + { + "post": "/v2/{parent=organizations/*}/inspectTemplates", + "body": "*" + } + ] + } + }, + { + "(google.api.method_signature)": "parent,inspect_template" + } + ] + }, + "UpdateInspectTemplate": { + "requestType": "UpdateInspectTemplateRequest", + "responseType": "InspectTemplate", + "options": { + "(google.api.http).patch": "/v2/{name=projects/*/locations/*/inspectTemplates/*}", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.patch": "/v2/{name=organizations/*/inspectTemplates/*}", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name,inspect_template,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{name=projects/*/locations/*/inspectTemplates/*}", + "body": "*", + "additional_bindings": [ + { + "patch": "/v2/{name=organizations/*/locations/*/inspectTemplates/*}", + "body": "*" + }, + { + "patch": "/v2/{name=projects/*/inspectTemplates/*}", + "body": "*" + }, + { + "patch": "/v2/{name=organizations/*/inspectTemplates/*}", + "body": "*" + } + ] + } + }, + { + "(google.api.method_signature)": "name,inspect_template,update_mask" + } + ] + }, + "GetInspectTemplate": { + "requestType": "GetInspectTemplateRequest", + "responseType": "InspectTemplate", + "options": { + "(google.api.http).get": "/v2/{name=projects/*/locations/*/inspectTemplates/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=organizations/*/inspectTemplates/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/locations/*/inspectTemplates/*}", + "additional_bindings": [ + { + "get": "/v2/{name=organizations/*/locations/*/inspectTemplates/*}" + }, + { + "get": "/v2/{name=projects/*/inspectTemplates/*}" + }, + { + "get": "/v2/{name=organizations/*/inspectTemplates/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListInspectTemplates": { + "requestType": "ListInspectTemplatesRequest", + "responseType": "ListInspectTemplatesResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*/locations/*}/inspectTemplates", + "(google.api.http).additional_bindings.get": "/v2/{parent=organizations/*}/inspectTemplates", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*/locations/*}/inspectTemplates", + "additional_bindings": [ + { + "get": "/v2/{parent=organizations/*/locations/*}/inspectTemplates" + }, + { + "get": "/v2/{parent=projects/*}/inspectTemplates" + }, + { + "get": "/v2/{parent=organizations/*}/inspectTemplates" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteInspectTemplate": { + "requestType": "DeleteInspectTemplateRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=projects/*/locations/*/inspectTemplates/*}", + "(google.api.http).additional_bindings.delete": "/v2/{name=organizations/*/inspectTemplates/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/locations/*/inspectTemplates/*}", + "additional_bindings": [ + { + "delete": "/v2/{name=organizations/*/locations/*/inspectTemplates/*}" + }, + { + "delete": "/v2/{name=projects/*/inspectTemplates/*}" + }, + { + "delete": "/v2/{name=organizations/*/inspectTemplates/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateDeidentifyTemplate": { + "requestType": "CreateDeidentifyTemplateRequest", + "responseType": "DeidentifyTemplate", + "options": { + "(google.api.http).post": "/v2/{parent=organizations/*}/deidentifyTemplates", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{parent=projects/*/locations/*}/deidentifyTemplates", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "parent,deidentify_template" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=organizations/*}/deidentifyTemplates", + "body": "*", + "additional_bindings": [ + { + "post": "/v2/{parent=organizations/*/locations/*}/deidentifyTemplates", + "body": "*" + }, + { + "post": "/v2/{parent=projects/*}/deidentifyTemplates", + "body": "*" + }, + { + "post": "/v2/{parent=projects/*/locations/*}/deidentifyTemplates", + "body": "*" + } + ] + } + }, + { + "(google.api.method_signature)": "parent,deidentify_template" + } + ] + }, + "UpdateDeidentifyTemplate": { + "requestType": "UpdateDeidentifyTemplateRequest", + "responseType": "DeidentifyTemplate", + "options": { + "(google.api.http).patch": "/v2/{name=organizations/*/deidentifyTemplates/*}", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.patch": "/v2/{name=projects/*/locations/*/deidentifyTemplates/*}", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name,deidentify_template,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{name=organizations/*/deidentifyTemplates/*}", + "body": "*", + "additional_bindings": [ + { + "patch": "/v2/{name=organizations/*/locations/*/deidentifyTemplates/*}", + "body": "*" + }, + { + "patch": "/v2/{name=projects/*/deidentifyTemplates/*}", + "body": "*" + }, + { + "patch": "/v2/{name=projects/*/locations/*/deidentifyTemplates/*}", + "body": "*" + } + ] + } + }, + { + "(google.api.method_signature)": "name,deidentify_template,update_mask" + } + ] + }, + "GetDeidentifyTemplate": { + "requestType": "GetDeidentifyTemplateRequest", + "responseType": "DeidentifyTemplate", + "options": { + "(google.api.http).get": "/v2/{name=organizations/*/deidentifyTemplates/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=projects/*/locations/*/deidentifyTemplates/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=organizations/*/deidentifyTemplates/*}", + "additional_bindings": [ + { + "get": "/v2/{name=organizations/*/locations/*/deidentifyTemplates/*}" + }, + { + "get": "/v2/{name=projects/*/deidentifyTemplates/*}" + }, + { + "get": "/v2/{name=projects/*/locations/*/deidentifyTemplates/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListDeidentifyTemplates": { + "requestType": "ListDeidentifyTemplatesRequest", + "responseType": "ListDeidentifyTemplatesResponse", + "options": { + "(google.api.http).get": "/v2/{parent=organizations/*}/deidentifyTemplates", + "(google.api.http).additional_bindings.get": "/v2/{parent=projects/*/locations/*}/deidentifyTemplates", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=organizations/*}/deidentifyTemplates", + "additional_bindings": [ + { + "get": "/v2/{parent=organizations/*/locations/*}/deidentifyTemplates" + }, + { + "get": "/v2/{parent=projects/*}/deidentifyTemplates" + }, + { + "get": "/v2/{parent=projects/*/locations/*}/deidentifyTemplates" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteDeidentifyTemplate": { + "requestType": "DeleteDeidentifyTemplateRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=organizations/*/deidentifyTemplates/*}", + "(google.api.http).additional_bindings.delete": "/v2/{name=projects/*/locations/*/deidentifyTemplates/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=organizations/*/deidentifyTemplates/*}", + "additional_bindings": [ + { + "delete": "/v2/{name=organizations/*/locations/*/deidentifyTemplates/*}" + }, + { + "delete": "/v2/{name=projects/*/deidentifyTemplates/*}" + }, + { + "delete": "/v2/{name=projects/*/locations/*/deidentifyTemplates/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateJobTrigger": { + "requestType": "CreateJobTriggerRequest", + "responseType": "JobTrigger", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*}/jobTriggers", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{parent=organizations/*/locations/*}/jobTriggers", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "parent,job_trigger" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*}/jobTriggers", + "body": "*", + "additional_bindings": [ + { + "post": "/v2/{parent=projects/*/locations/*}/jobTriggers", + "body": "*" + }, + { + "post": "/v2/{parent=organizations/*/locations/*}/jobTriggers", + "body": "*" + } + ] + } + }, + { + "(google.api.method_signature)": "parent,job_trigger" + } + ] + }, + "UpdateJobTrigger": { + "requestType": "UpdateJobTriggerRequest", + "responseType": "JobTrigger", + "options": { + "(google.api.http).patch": "/v2/{name=projects/*/jobTriggers/*}", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.patch": "/v2/{name=organizations/*/locations/*/jobTriggers/*}", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name,job_trigger,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{name=projects/*/jobTriggers/*}", + "body": "*", + "additional_bindings": [ + { + "patch": "/v2/{name=projects/*/locations/*/jobTriggers/*}", + "body": "*" + }, + { + "patch": "/v2/{name=organizations/*/locations/*/jobTriggers/*}", + "body": "*" + } + ] + } + }, + { + "(google.api.method_signature)": "name,job_trigger,update_mask" + } + ] + }, + "HybridInspectJobTrigger": { + "requestType": "HybridInspectJobTriggerRequest", + "responseType": "HybridInspectResponse", + "options": { + "(google.api.http).post": "/v2/{name=projects/*/locations/*/jobTriggers/*}:hybridInspect", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{name=projects/*/locations/*/jobTriggers/*}:hybridInspect", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetJobTrigger": { + "requestType": "GetJobTriggerRequest", + "responseType": "JobTrigger", + "options": { + "(google.api.http).get": "/v2/{name=projects/*/jobTriggers/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=organizations/*/locations/*/jobTriggers/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/jobTriggers/*}", + "additional_bindings": [ + { + "get": "/v2/{name=projects/*/locations/*/jobTriggers/*}" + }, + { + "get": "/v2/{name=organizations/*/locations/*/jobTriggers/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListJobTriggers": { + "requestType": "ListJobTriggersRequest", + "responseType": "ListJobTriggersResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*}/jobTriggers", + "(google.api.http).additional_bindings.get": "/v2/{parent=organizations/*/locations/*}/jobTriggers", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*}/jobTriggers", + "additional_bindings": [ + { + "get": "/v2/{parent=projects/*/locations/*}/jobTriggers" + }, + { + "get": "/v2/{parent=organizations/*/locations/*}/jobTriggers" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteJobTrigger": { + "requestType": "DeleteJobTriggerRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=projects/*/jobTriggers/*}", + "(google.api.http).additional_bindings.delete": "/v2/{name=organizations/*/locations/*/jobTriggers/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/jobTriggers/*}", + "additional_bindings": [ + { + "delete": "/v2/{name=projects/*/locations/*/jobTriggers/*}" + }, + { + "delete": "/v2/{name=organizations/*/locations/*/jobTriggers/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ActivateJobTrigger": { + "requestType": "ActivateJobTriggerRequest", + "responseType": "DlpJob", + "options": { + "(google.api.http).post": "/v2/{name=projects/*/jobTriggers/*}:activate", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{name=projects/*/locations/*/jobTriggers/*}:activate", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{name=projects/*/jobTriggers/*}:activate", + "body": "*", + "additional_bindings": { + "post": "/v2/{name=projects/*/locations/*/jobTriggers/*}:activate", + "body": "*" + } + } + } + ] + }, + "CreateDiscoveryConfig": { + "requestType": "CreateDiscoveryConfigRequest", + "responseType": "DiscoveryConfig", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*/locations/*}/discoveryConfigs", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{parent=organizations/*/locations/*}/discoveryConfigs", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "parent,discovery_config" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/locations/*}/discoveryConfigs", + "body": "*", + "additional_bindings": { + "post": "/v2/{parent=organizations/*/locations/*}/discoveryConfigs", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "parent,discovery_config" + } + ] + }, + "UpdateDiscoveryConfig": { + "requestType": "UpdateDiscoveryConfigRequest", + "responseType": "DiscoveryConfig", + "options": { + "(google.api.http).patch": "/v2/{name=projects/*/locations/*/discoveryConfigs/*}", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.patch": "/v2/{name=organizations/*/locations/*/discoveryConfigs/*}", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name,discovery_config,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{name=projects/*/locations/*/discoveryConfigs/*}", + "body": "*", + "additional_bindings": { + "patch": "/v2/{name=organizations/*/locations/*/discoveryConfigs/*}", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "name,discovery_config,update_mask" + } + ] + }, + "GetDiscoveryConfig": { + "requestType": "GetDiscoveryConfigRequest", + "responseType": "DiscoveryConfig", + "options": { + "(google.api.http).get": "/v2/{name=projects/*/locations/*/discoveryConfigs/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=organizations/*/locations/*/discoveryConfigs/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/locations/*/discoveryConfigs/*}", + "additional_bindings": { + "get": "/v2/{name=organizations/*/locations/*/discoveryConfigs/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListDiscoveryConfigs": { + "requestType": "ListDiscoveryConfigsRequest", + "responseType": "ListDiscoveryConfigsResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*/locations/*}/discoveryConfigs", + "(google.api.http).additional_bindings.get": "/v2/{parent=organizations/*/locations/*}/discoveryConfigs", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*/locations/*}/discoveryConfigs", + "additional_bindings": { + "get": "/v2/{parent=organizations/*/locations/*}/discoveryConfigs" + } + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteDiscoveryConfig": { + "requestType": "DeleteDiscoveryConfigRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=projects/*/locations/*/discoveryConfigs/*}", + "(google.api.http).additional_bindings.delete": "/v2/{name=organizations/*/locations/*/discoveryConfigs/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/locations/*/discoveryConfigs/*}", + "additional_bindings": { + "delete": "/v2/{name=organizations/*/locations/*/discoveryConfigs/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateDlpJob": { + "requestType": "CreateDlpJobRequest", + "responseType": "DlpJob", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*}/dlpJobs", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{parent=projects/*/locations/*}/dlpJobs", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "parent,risk_job" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*}/dlpJobs", + "body": "*", + "additional_bindings": { + "post": "/v2/{parent=projects/*/locations/*}/dlpJobs", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "parent,inspect_job" + }, + { + "(google.api.method_signature)": "parent,risk_job" + } + ] + }, + "ListDlpJobs": { + "requestType": "ListDlpJobsRequest", + "responseType": "ListDlpJobsResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*}/dlpJobs", + "(google.api.http).additional_bindings.get": "/v2/{parent=organizations/*/locations/*}/dlpJobs", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*}/dlpJobs", + "additional_bindings": [ + { + "get": "/v2/{parent=projects/*/locations/*}/dlpJobs" + }, + { + "get": "/v2/{parent=organizations/*/locations/*}/dlpJobs" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetDlpJob": { + "requestType": "GetDlpJobRequest", + "responseType": "DlpJob", + "options": { + "(google.api.http).get": "/v2/{name=projects/*/dlpJobs/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=projects/*/locations/*/dlpJobs/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/dlpJobs/*}", + "additional_bindings": { + "get": "/v2/{name=projects/*/locations/*/dlpJobs/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteDlpJob": { + "requestType": "DeleteDlpJobRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=projects/*/dlpJobs/*}", + "(google.api.http).additional_bindings.delete": "/v2/{name=projects/*/locations/*/dlpJobs/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/dlpJobs/*}", + "additional_bindings": { + "delete": "/v2/{name=projects/*/locations/*/dlpJobs/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CancelDlpJob": { + "requestType": "CancelDlpJobRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v2/{name=projects/*/dlpJobs/*}:cancel", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{name=projects/*/locations/*/dlpJobs/*}:cancel", + "(google.api.http).additional_bindings.body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{name=projects/*/dlpJobs/*}:cancel", + "body": "*", + "additional_bindings": { + "post": "/v2/{name=projects/*/locations/*/dlpJobs/*}:cancel", + "body": "*" + } + } + } + ] + }, + "CreateStoredInfoType": { + "requestType": "CreateStoredInfoTypeRequest", + "responseType": "StoredInfoType", + "options": { + "(google.api.http).post": "/v2/{parent=organizations/*}/storedInfoTypes", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{parent=projects/*/locations/*}/storedInfoTypes", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "parent,config" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=organizations/*}/storedInfoTypes", + "body": "*", + "additional_bindings": [ + { + "post": "/v2/{parent=organizations/*/locations/*}/storedInfoTypes", + "body": "*" + }, + { + "post": "/v2/{parent=projects/*}/storedInfoTypes", + "body": "*" + }, + { + "post": "/v2/{parent=projects/*/locations/*}/storedInfoTypes", + "body": "*" + } + ] + } + }, + { + "(google.api.method_signature)": "parent,config" + } + ] + }, + "UpdateStoredInfoType": { + "requestType": "UpdateStoredInfoTypeRequest", + "responseType": "StoredInfoType", + "options": { + "(google.api.http).patch": "/v2/{name=organizations/*/storedInfoTypes/*}", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.patch": "/v2/{name=projects/*/locations/*/storedInfoTypes/*}", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name,config,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{name=organizations/*/storedInfoTypes/*}", + "body": "*", + "additional_bindings": [ + { + "patch": "/v2/{name=organizations/*/locations/*/storedInfoTypes/*}", + "body": "*" + }, + { + "patch": "/v2/{name=projects/*/storedInfoTypes/*}", + "body": "*" + }, + { + "patch": "/v2/{name=projects/*/locations/*/storedInfoTypes/*}", + "body": "*" + } + ] + } + }, + { + "(google.api.method_signature)": "name,config,update_mask" + } + ] + }, + "GetStoredInfoType": { + "requestType": "GetStoredInfoTypeRequest", + "responseType": "StoredInfoType", + "options": { + "(google.api.http).get": "/v2/{name=organizations/*/storedInfoTypes/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=projects/*/locations/*/storedInfoTypes/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=organizations/*/storedInfoTypes/*}", + "additional_bindings": [ + { + "get": "/v2/{name=organizations/*/locations/*/storedInfoTypes/*}" + }, + { + "get": "/v2/{name=projects/*/storedInfoTypes/*}" + }, + { + "get": "/v2/{name=projects/*/locations/*/storedInfoTypes/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListStoredInfoTypes": { + "requestType": "ListStoredInfoTypesRequest", + "responseType": "ListStoredInfoTypesResponse", + "options": { + "(google.api.http).get": "/v2/{parent=organizations/*}/storedInfoTypes", + "(google.api.http).additional_bindings.get": "/v2/{parent=projects/*/locations/*}/storedInfoTypes", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=organizations/*}/storedInfoTypes", + "additional_bindings": [ + { + "get": "/v2/{parent=organizations/*/locations/*}/storedInfoTypes" + }, + { + "get": "/v2/{parent=projects/*}/storedInfoTypes" + }, + { + "get": "/v2/{parent=projects/*/locations/*}/storedInfoTypes" + } + ] + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteStoredInfoType": { + "requestType": "DeleteStoredInfoTypeRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=organizations/*/storedInfoTypes/*}", + "(google.api.http).additional_bindings.delete": "/v2/{name=projects/*/locations/*/storedInfoTypes/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=organizations/*/storedInfoTypes/*}", + "additional_bindings": [ + { + "delete": "/v2/{name=organizations/*/locations/*/storedInfoTypes/*}" + }, + { + "delete": "/v2/{name=projects/*/storedInfoTypes/*}" + }, + { + "delete": "/v2/{name=projects/*/locations/*/storedInfoTypes/*}" + } + ] + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListProjectDataProfiles": { + "requestType": "ListProjectDataProfilesRequest", + "responseType": "ListProjectDataProfilesResponse", + "options": { + "(google.api.http).get": "/v2/{parent=organizations/*/locations/*}/projectDataProfiles", + "(google.api.http).additional_bindings.get": "/v2/{parent=projects/*/locations/*}/projectDataProfiles", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=organizations/*/locations/*}/projectDataProfiles", + "additional_bindings": { + "get": "/v2/{parent=projects/*/locations/*}/projectDataProfiles" + } + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ListTableDataProfiles": { + "requestType": "ListTableDataProfilesRequest", + "responseType": "ListTableDataProfilesResponse", + "options": { + "(google.api.http).get": "/v2/{parent=organizations/*/locations/*}/tableDataProfiles", + "(google.api.http).additional_bindings.get": "/v2/{parent=projects/*/locations/*}/tableDataProfiles", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=organizations/*/locations/*}/tableDataProfiles", + "additional_bindings": { + "get": "/v2/{parent=projects/*/locations/*}/tableDataProfiles" + } + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ListColumnDataProfiles": { + "requestType": "ListColumnDataProfilesRequest", + "responseType": "ListColumnDataProfilesResponse", + "options": { + "(google.api.http).get": "/v2/{parent=organizations/*/locations/*}/columnDataProfiles", + "(google.api.http).additional_bindings.get": "/v2/{parent=projects/*/locations/*}/columnDataProfiles", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=organizations/*/locations/*}/columnDataProfiles", + "additional_bindings": { + "get": "/v2/{parent=projects/*/locations/*}/columnDataProfiles" + } + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetProjectDataProfile": { + "requestType": "GetProjectDataProfileRequest", + "responseType": "ProjectDataProfile", + "options": { + "(google.api.http).get": "/v2/{name=organizations/*/locations/*/projectDataProfiles/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=projects/*/locations/*/projectDataProfiles/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=organizations/*/locations/*/projectDataProfiles/*}", + "additional_bindings": { + "get": "/v2/{name=projects/*/locations/*/projectDataProfiles/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListFileStoreDataProfiles": { + "requestType": "ListFileStoreDataProfilesRequest", + "responseType": "ListFileStoreDataProfilesResponse", + "options": { + "(google.api.http).get": "/v2/{parent=organizations/*/locations/*}/fileStoreDataProfiles", + "(google.api.http).additional_bindings.get": "/v2/{parent=projects/*/locations/*}/fileStoreDataProfiles", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=organizations/*/locations/*}/fileStoreDataProfiles", + "additional_bindings": { + "get": "/v2/{parent=projects/*/locations/*}/fileStoreDataProfiles" + } + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetFileStoreDataProfile": { + "requestType": "GetFileStoreDataProfileRequest", + "responseType": "FileStoreDataProfile", + "options": { + "(google.api.http).get": "/v2/{name=organizations/*/locations/*/fileStoreDataProfiles/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=projects/*/locations/*/fileStoreDataProfiles/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=organizations/*/locations/*/fileStoreDataProfiles/*}", + "additional_bindings": { + "get": "/v2/{name=projects/*/locations/*/fileStoreDataProfiles/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteFileStoreDataProfile": { + "requestType": "DeleteFileStoreDataProfileRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=organizations/*/locations/*/fileStoreDataProfiles/*}", + "(google.api.http).additional_bindings.delete": "/v2/{name=projects/*/locations/*/fileStoreDataProfiles/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=organizations/*/locations/*/fileStoreDataProfiles/*}", + "additional_bindings": { + "delete": "/v2/{name=projects/*/locations/*/fileStoreDataProfiles/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetTableDataProfile": { + "requestType": "GetTableDataProfileRequest", + "responseType": "TableDataProfile", + "options": { + "(google.api.http).get": "/v2/{name=organizations/*/locations/*/tableDataProfiles/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=projects/*/locations/*/tableDataProfiles/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=organizations/*/locations/*/tableDataProfiles/*}", + "additional_bindings": { + "get": "/v2/{name=projects/*/locations/*/tableDataProfiles/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetColumnDataProfile": { + "requestType": "GetColumnDataProfileRequest", + "responseType": "ColumnDataProfile", + "options": { + "(google.api.http).get": "/v2/{name=organizations/*/locations/*/columnDataProfiles/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=projects/*/locations/*/columnDataProfiles/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=organizations/*/locations/*/columnDataProfiles/*}", + "additional_bindings": { + "get": "/v2/{name=projects/*/locations/*/columnDataProfiles/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "DeleteTableDataProfile": { + "requestType": "DeleteTableDataProfileRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=organizations/*/locations/*/tableDataProfiles/*}", + "(google.api.http).additional_bindings.delete": "/v2/{name=projects/*/locations/*/tableDataProfiles/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=organizations/*/locations/*/tableDataProfiles/*}", + "additional_bindings": { + "delete": "/v2/{name=projects/*/locations/*/tableDataProfiles/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "HybridInspectDlpJob": { + "requestType": "HybridInspectDlpJobRequest", + "responseType": "HybridInspectResponse", + "options": { + "(google.api.http).post": "/v2/{name=projects/*/locations/*/dlpJobs/*}:hybridInspect", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{name=projects/*/locations/*/dlpJobs/*}:hybridInspect", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "FinishDlpJob": { + "requestType": "FinishDlpJobRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v2/{name=projects/*/locations/*/dlpJobs/*}:finish", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{name=projects/*/locations/*/dlpJobs/*}:finish", + "body": "*" + } + } + ] + }, + "CreateConnection": { + "requestType": "CreateConnectionRequest", + "responseType": "Connection", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*/locations/*}/connections", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.post": "/v2/{parent=organizations/*/locations/*}/connections", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "parent, connection" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/locations/*}/connections", + "body": "*", + "additional_bindings": { + "post": "/v2/{parent=organizations/*/locations/*}/connections", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "parent, connection" + } + ] + }, + "GetConnection": { + "requestType": "GetConnectionRequest", + "responseType": "Connection", + "options": { + "(google.api.http).get": "/v2/{name=projects/*/locations/*/connections/*}", + "(google.api.http).additional_bindings.get": "/v2/{name=organizations/*/locations/*/connections/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/locations/*/connections/*}", + "additional_bindings": { + "get": "/v2/{name=organizations/*/locations/*/connections/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListConnections": { + "requestType": "ListConnectionsRequest", + "responseType": "ListConnectionsResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*/locations/*}/connections", + "(google.api.http).additional_bindings.get": "/v2/{parent=organizations/*/locations/*}/connections", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*/locations/*}/connections", + "additional_bindings": { + "get": "/v2/{parent=organizations/*/locations/*}/connections" + } + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "SearchConnections": { + "requestType": "SearchConnectionsRequest", + "responseType": "SearchConnectionsResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*/locations/*}/connections:search", + "(google.api.http).additional_bindings.get": "/v2/{parent=organizations/*/locations/*}/connections:search", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*/locations/*}/connections:search", + "additional_bindings": { + "get": "/v2/{parent=organizations/*/locations/*}/connections:search" + } + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteConnection": { + "requestType": "DeleteConnectionRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=projects/*/locations/*/connections/*}", + "(google.api.http).additional_bindings.delete": "/v2/{name=organizations/*/locations/*/connections/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/locations/*/connections/*}", + "additional_bindings": { + "delete": "/v2/{name=organizations/*/locations/*/connections/*}" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateConnection": { + "requestType": "UpdateConnectionRequest", + "responseType": "Connection", + "options": { + "(google.api.http).patch": "/v2/{name=projects/*/locations/*/connections/*}", + "(google.api.http).body": "*", + "(google.api.http).additional_bindings.patch": "/v2/{name=organizations/*/locations/*/connections/*}", + "(google.api.http).additional_bindings.body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{name=projects/*/locations/*/connections/*}", + "body": "*", + "additional_bindings": { + "patch": "/v2/{name=organizations/*/locations/*/connections/*}", + "body": "*" + } + } + }, + { + "(google.api.method_signature)": "name" + } + ] + } + } + }, + "ExcludeInfoTypes": { + "fields": { + "infoTypes": { + "rule": "repeated", + "type": "InfoType", + "id": 1 + } + } + }, + "ExcludeByHotword": { + "fields": { + "hotwordRegex": { + "type": "CustomInfoType.Regex", + "id": 1 + }, + "proximity": { + "type": "CustomInfoType.DetectionRule.Proximity", + "id": 2 + } + } + }, + "ExcludeByImageFindings": { + "fields": { + "infoTypes": { + "rule": "repeated", + "type": "InfoType", + "id": 1 + }, + "imageContainmentType": { + "type": "ImageContainmentType", + "id": 2 + } + } + }, + "ExclusionRule": { + "oneofs": { + "type": { + "oneof": [ + "dictionary", + "regex", + "excludeInfoTypes", + "excludeByHotword", + "excludeByImageFindings" + ] + } + }, + "fields": { + "dictionary": { + "type": "CustomInfoType.Dictionary", + "id": 1 + }, + "regex": { + "type": "CustomInfoType.Regex", + "id": 2 + }, + "excludeInfoTypes": { + "type": "ExcludeInfoTypes", + "id": 3 + }, + "excludeByHotword": { + "type": "ExcludeByHotword", + "id": 5 + }, + "excludeByImageFindings": { + "type": "ExcludeByImageFindings", + "id": 6 + }, + "matchingType": { + "type": "MatchingType", + "id": 4 + } + } + }, + "AdjustByMatchingInfoTypes": { + "fields": { + "infoTypes": { + "rule": "repeated", + "type": "InfoType", + "id": 1 + }, + "minLikelihood": { + "type": "Likelihood", + "id": 2 + }, + "matchingType": { + "type": "MatchingType", + "id": 3 + } + } + }, + "AdjustByImageFindings": { + "fields": { + "infoTypes": { + "rule": "repeated", + "type": "InfoType", + "id": 1 + }, + "minLikelihood": { + "type": "Likelihood", + "id": 2 + }, + "imageContainmentType": { + "type": "ImageContainmentType", + "id": 3 + } + } + }, + "AdjustmentRule": { + "oneofs": { + "conditions": { + "oneof": [ + "adjustByMatchingInfoTypes", + "adjustByImageFindings" + ] + } + }, + "fields": { + "adjustByMatchingInfoTypes": { + "type": "AdjustByMatchingInfoTypes", + "id": 1 + }, + "adjustByImageFindings": { + "type": "AdjustByImageFindings", + "id": 3 + }, + "likelihoodAdjustment": { + "type": "CustomInfoType.DetectionRule.LikelihoodAdjustment", + "id": 2 + } + } + }, + "InspectionRule": { + "oneofs": { + "type": { + "oneof": [ + "hotwordRule", + "exclusionRule", + "adjustmentRule" + ] + } + }, + "fields": { + "hotwordRule": { + "type": "CustomInfoType.DetectionRule.HotwordRule", + "id": 1 + }, + "exclusionRule": { + "type": "ExclusionRule", + "id": 2 + }, + "adjustmentRule": { + "type": "AdjustmentRule", + "id": 3 + } + } + }, + "InspectionRuleSet": { + "fields": { + "infoTypes": { + "rule": "repeated", + "type": "InfoType", + "id": 1 + }, + "rules": { + "rule": "repeated", + "type": "InspectionRule", + "id": 2 + } + } + }, + "InspectConfig": { + "fields": { + "infoTypes": { + "rule": "repeated", + "type": "InfoType", + "id": 1 + }, + "minLikelihood": { + "type": "Likelihood", + "id": 2 + }, + "minLikelihoodPerInfoType": { + "rule": "repeated", + "type": "InfoTypeLikelihood", + "id": 11 + }, + "limits": { + "type": "FindingLimits", + "id": 3 + }, + "includeQuote": { + "type": "bool", + "id": 4 + }, + "excludeInfoTypes": { + "type": "bool", + "id": 5 + }, + "customInfoTypes": { + "rule": "repeated", + "type": "CustomInfoType", + "id": 6 + }, + "contentOptions": { + "rule": "repeated", + "type": "ContentOption", + "id": 8 + }, + "ruleSet": { + "rule": "repeated", + "type": "InspectionRuleSet", + "id": 10 + } + }, + "nested": { + "InfoTypeLikelihood": { + "fields": { + "infoType": { + "type": "InfoType", + "id": 1 + }, + "minLikelihood": { + "type": "Likelihood", + "id": 2 + } + } + }, + "FindingLimits": { + "fields": { + "maxFindingsPerItem": { + "type": "int32", + "id": 1 + }, + "maxFindingsPerRequest": { + "type": "int32", + "id": 2 + }, + "maxFindingsPerInfoType": { + "rule": "repeated", + "type": "InfoTypeLimit", + "id": 3 + } + }, + "nested": { + "InfoTypeLimit": { + "fields": { + "infoType": { + "type": "InfoType", + "id": 1 + }, + "maxFindings": { + "type": "int32", + "id": 2 + } + } + } + } + } + } + }, + "ByteContentItem": { + "fields": { + "type": { + "type": "BytesType", + "id": 1 + }, + "data": { + "type": "bytes", + "id": 2 + } + }, + "nested": { + "BytesType": { + "values": { + "BYTES_TYPE_UNSPECIFIED": 0, + "IMAGE": 6, + "IMAGE_JPEG": 1, + "IMAGE_BMP": 2, + "IMAGE_PNG": 3, + "IMAGE_SVG": 4, + "TEXT_UTF8": 5, + "WORD_DOCUMENT": 7, + "PDF": 8, + "POWERPOINT_DOCUMENT": 9, + "EXCEL_DOCUMENT": 10, + "AVRO": 11, + "CSV": 12, + "TSV": 13, + "AUDIO": 15, + "VIDEO": 16, + "EXECUTABLE": 17, + "AI_MODEL": 18 + } + } + } + }, + "ContentItem": { + "oneofs": { + "dataItem": { + "oneof": [ + "value", + "table", + "byteItem", + "conversation", + "batchContentItem" + ] + } + }, + "fields": { + "value": { + "type": "string", + "id": 3 + }, + "table": { + "type": "Table", + "id": 4 + }, + "byteItem": { + "type": "ByteContentItem", + "id": 5 + }, + "conversation": { + "type": "Conversation", + "id": 7 + }, + "batchContentItem": { + "type": "BatchContentItem", + "id": 8 + }, + "contentMetadata": { + "type": "ContentMetadata", + "id": 6 + } + } + }, + "ContentMetadata": { + "fields": { + "properties": { + "rule": "repeated", + "type": "KeyValueMetadataProperty", + "id": 2 + } + } + }, + "Conversation": { + "fields": { + "messages": { + "rule": "repeated", + "type": "ConversationMessage", + "id": 1 + } + } + }, + "ConversationMessage": { + "fields": { + "content": { + "type": "string", + "id": 1 + }, + "messageType": { + "type": "MessageType", + "id": 2 + }, + "participantId": { + "type": "string", + "id": 3 + } + }, + "nested": { + "MessageType": { + "values": { + "MESSAGE_TYPE_UNSPECIFIED": 0, + "CONTENT": 1, + "CONTEXT": 2 + } + } + } + }, + "BatchContentItem": { + "oneofs": { + "batch": { + "oneof": [ + "stringValueBatch" + ] + } + }, + "fields": { + "stringValueBatch": { + "type": "StringValueBatch", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "StringValueBatch": { + "fields": { + "values": { + "rule": "repeated", + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Table": { + "fields": { + "headers": { + "rule": "repeated", + "type": "FieldId", + "id": 1 + }, + "rows": { + "rule": "repeated", + "type": "Row", + "id": 2 + } + }, + "nested": { + "Row": { + "fields": { + "values": { + "rule": "repeated", + "type": "Value", + "id": 1 + } + } + } + } + }, + "KeyValueMetadataProperty": { + "fields": { + "key": { + "type": "string", + "id": 1 + }, + "value": { + "type": "string", + "id": 2 + } + } + }, + "InspectResult": { + "fields": { + "findings": { + "rule": "repeated", + "type": "Finding", + "id": 1 + }, + "findingsTruncated": { + "type": "bool", + "id": 2 + } + } + }, + "Finding": { + "options": { + "(google.api.resource).type": "dlp.googleapis.com/Finding", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/findings/{finding}" + }, + "fields": { + "name": { + "type": "string", + "id": 14 + }, + "quote": { + "type": "string", + "id": 1 + }, + "infoType": { + "type": "InfoType", + "id": 2 + }, + "likelihood": { + "type": "Likelihood", + "id": 3 + }, + "location": { + "type": "Location", + "id": 4 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + }, + "quoteInfo": { + "type": "QuoteInfo", + "id": 7 + }, + "resourceName": { + "type": "string", + "id": 8, + "options": { + "(google.api.resource_reference).type": "dlp.googleapis.com/DlpJob" + } + }, + "triggerName": { + "type": "string", + "id": 9, + "options": { + "(google.api.resource_reference).type": "dlp.googleapis.com/JobTrigger" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 10 + }, + "jobCreateTime": { + "type": "google.protobuf.Timestamp", + "id": 11 + }, + "jobName": { + "type": "string", + "id": 13, + "options": { + "(google.api.resource_reference).type": "dlp.googleapis.com/DlpJob" + } + }, + "findingId": { + "type": "string", + "id": 15 + } + } + }, + "Location": { + "fields": { + "byteRange": { + "type": "Range", + "id": 1 + }, + "codepointRange": { + "type": "Range", + "id": 2 + }, + "contentLocations": { + "rule": "repeated", + "type": "ContentLocation", + "id": 7 + }, + "container": { + "type": "Container", + "id": 8 + } + } + }, + "ContentLocation": { + "oneofs": { + "location": { + "oneof": [ + "recordLocation", + "imageLocation", + "documentLocation", + "metadataLocation", + "conversationLocation", + "batchContentLocation" + ] + } + }, + "fields": { + "containerName": { + "type": "string", + "id": 1 + }, + "recordLocation": { + "type": "RecordLocation", + "id": 2 + }, + "imageLocation": { + "type": "ImageLocation", + "id": 3 + }, + "documentLocation": { + "type": "DocumentLocation", + "id": 5 + }, + "metadataLocation": { + "type": "MetadataLocation", + "id": 8 + }, + "conversationLocation": { + "type": "ConversationLocation", + "id": 10 + }, + "batchContentLocation": { + "type": "BatchContentLocation", + "id": 11 + }, + "containerTimestamp": { + "type": "google.protobuf.Timestamp", + "id": 6 + }, + "containerVersion": { + "type": "string", + "id": 7 + } + } + }, + "ConversationLocation": { + "oneofs": { + "location": { + "oneof": [ + "messageIndex", + "allMessages" + ] + } + }, + "fields": { + "messageIndex": { + "type": "int32", + "id": 1 + }, + "allMessages": { + "type": "AllMessages", + "id": 2 + } + }, + "nested": { + "AllMessages": { + "fields": {} + } + } + }, + "BatchContentLocation": { + "fields": { + "itemIndex": { + "type": "int32", + "id": 1 + } + } + }, + "MetadataLocation": { + "oneofs": { + "label": { + "oneof": [ + "storageLabel", + "keyValueMetadataLabel" + ] + } + }, + "fields": { + "type": { + "type": "MetadataType", + "id": 1 + }, + "storageLabel": { + "type": "StorageMetadataLabel", + "id": 3 + }, + "keyValueMetadataLabel": { + "type": "KeyValueMetadataLabel", + "id": 4 + } + } + }, + "StorageMetadataLabel": { + "fields": { + "key": { + "type": "string", + "id": 1 + } + } + }, + "KeyValueMetadataLabel": { + "fields": { + "key": { + "type": "string", + "id": 1 + } + } + }, + "DocumentLocation": { + "fields": { + "fileOffset": { + "type": "int64", + "id": 1 + } + } + }, + "RecordLocation": { + "fields": { + "recordKey": { + "type": "RecordKey", + "id": 1 + }, + "fieldId": { + "type": "FieldId", + "id": 2 + }, + "tableLocation": { + "type": "TableLocation", + "id": 3 + } + } + }, + "TableLocation": { + "fields": { + "rowIndex": { + "type": "int64", + "id": 1 + } + } + }, + "Container": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "projectId": { + "type": "string", + "id": 2 + }, + "fullPath": { + "type": "string", + "id": 3 + }, + "rootPath": { + "type": "string", + "id": 4 + }, + "relativePath": { + "type": "string", + "id": 5 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + }, + "version": { + "type": "string", + "id": 7 + } + } + }, + "Range": { + "fields": { + "start": { + "type": "int64", + "id": 1 + }, + "end": { + "type": "int64", + "id": 2 + } + } + }, + "ImageLocation": { + "fields": { + "boundingBoxes": { + "rule": "repeated", + "type": "BoundingBox", + "id": 1 + } + } + }, + "BoundingBox": { + "fields": { + "top": { + "type": "int32", + "id": 1 + }, + "left": { + "type": "int32", + "id": 2 + }, + "width": { + "type": "int32", + "id": 3 + }, + "height": { + "type": "int32", + "id": 4 + } + } + }, + "RedactImageRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).child_type": "dlp.googleapis.com/DlpContent" + } + }, + "locationId": { + "type": "string", + "id": 8 + }, + "inspectConfig": { + "type": "InspectConfig", + "id": 2 + }, + "imageRedactionConfigs": { + "rule": "repeated", + "type": "ImageRedactionConfig", + "id": 5 + }, + "includeFindings": { + "type": "bool", + "id": 6 + }, + "byteItem": { + "type": "ByteContentItem", + "id": 7 + }, + "inspectTemplate": { + "type": "string", + "id": 9 + }, + "deidentifyTemplate": { + "type": "string", + "id": 10 + } + }, + "nested": { + "ImageRedactionConfig": { + "oneofs": { + "target": { + "oneof": [ + "infoType", + "redactAllText" + ] + } + }, + "fields": { + "infoType": { + "type": "InfoType", + "id": 1 + }, + "redactAllText": { + "type": "bool", + "id": 2 + }, + "redactionColor": { + "type": "Color", + "id": 3 + } + } + } + } + }, + "Color": { + "fields": { + "red": { + "type": "float", + "id": 1 + }, + "green": { + "type": "float", + "id": 2 + }, + "blue": { + "type": "float", + "id": 3 + } + } + }, + "RedactImageResponse": { + "fields": { + "redactedImage": { + "type": "bytes", + "id": 1 + }, + "extractedText": { + "type": "string", + "id": 2 + }, + "inspectResult": { + "type": "InspectResult", + "id": 3 + } + } + }, + "DeidentifyContentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).child_type": "dlp.googleapis.com/DlpContent" + } + }, + "deidentifyConfig": { + "type": "DeidentifyConfig", + "id": 2 + }, + "inspectConfig": { + "type": "InspectConfig", + "id": 3 + }, + "item": { + "type": "ContentItem", + "id": 4 + }, + "inspectTemplateName": { + "type": "string", + "id": 5 + }, + "deidentifyTemplateName": { + "type": "string", + "id": 6 + }, + "locationId": { + "type": "string", + "id": 7 + } + } + }, + "DeidentifyContentResponse": { + "fields": { + "item": { + "type": "ContentItem", + "id": 1 + }, + "overview": { + "type": "TransformationOverview", + "id": 2 + } + } + }, + "ReidentifyContentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dlp.googleapis.com/DlpContent" + } + }, + "reidentifyConfig": { + "type": "DeidentifyConfig", + "id": 2 + }, + "inspectConfig": { + "type": "InspectConfig", + "id": 3 + }, + "item": { + "type": "ContentItem", + "id": 4 + }, + "inspectTemplateName": { + "type": "string", + "id": 5 + }, + "reidentifyTemplateName": { + "type": "string", + "id": 6 + }, + "locationId": { + "type": "string", + "id": 7 + } + } + }, + "ReidentifyContentResponse": { + "fields": { + "item": { + "type": "ContentItem", + "id": 1 + }, + "overview": { + "type": "TransformationOverview", + "id": 2 + } + } + }, + "InspectContentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.resource_reference).child_type": "dlp.googleapis.com/DlpContent" + } + }, + "inspectConfig": { + "type": "InspectConfig", + "id": 2 + }, + "item": { + "type": "ContentItem", + "id": 3 + }, + "inspectTemplateName": { + "type": "string", + "id": 4 + }, + "locationId": { + "type": "string", + "id": 5 + } + } + }, + "InspectContentResponse": { + "fields": { + "result": { + "type": "InspectResult", + "id": 1 + } + } + }, + "OutputStorageConfig": { + "oneofs": { + "type": { + "oneof": [ + "table", + "storagePath" + ] + } + }, + "fields": { + "table": { + "type": "BigQueryTable", + "id": 1 + }, + "storagePath": { + "type": "CloudStoragePath", + "id": 5 + }, + "outputSchema": { + "type": "OutputSchema", + "id": 3 + } + }, + "nested": { + "OutputSchema": { + "values": { + "OUTPUT_SCHEMA_UNSPECIFIED": 0, + "BASIC_COLUMNS": 1, + "GCS_COLUMNS": 2, + "DATASTORE_COLUMNS": 3, + "BIG_QUERY_COLUMNS": 4, + "ALL_COLUMNS": 5 + } + } + } + }, + "InfoTypeStats": { + "fields": { + "infoType": { + "type": "InfoType", + "id": 1 + }, + "count": { + "type": "int64", + "id": 2 + } + } + }, + "InspectDataSourceDetails": { + "fields": { + "requestedOptions": { + "type": "RequestedOptions", + "id": 2 + }, + "result": { + "type": "Result", + "id": 3 + } + }, + "nested": { + "RequestedOptions": { + "fields": { + "snapshotInspectTemplate": { + "type": "InspectTemplate", + "id": 1 + }, + "jobConfig": { + "type": "InspectJobConfig", + "id": 3 + } + } + }, + "Result": { + "fields": { + "processedBytes": { + "type": "int64", + "id": 1 + }, + "totalEstimatedBytes": { + "type": "int64", + "id": 2 + }, + "infoTypeStats": { + "rule": "repeated", + "type": "InfoTypeStats", + "id": 3 + }, + "numRowsProcessed": { + "type": "int64", + "id": 5 + }, + "hybridStats": { + "type": "HybridInspectStatistics", + "id": 7 + } + } + } + } + }, + "DataProfileBigQueryRowSchema": { + "oneofs": { + "dataProfile": { + "oneof": [ + "tableProfile", + "columnProfile", + "fileStoreProfile" + ] + } + }, + "fields": { + "tableProfile": { + "type": "TableDataProfile", + "id": 1 + }, + "columnProfile": { + "type": "ColumnDataProfile", + "id": 2 + }, + "fileStoreProfile": { + "type": "FileStoreDataProfile", + "id": 3 + } + } + }, + "HybridInspectStatistics": { + "fields": { + "processedCount": { + "type": "int64", + "id": 1 + }, + "abortedCount": { + "type": "int64", + "id": 2 + }, + "pendingCount": { + "type": "int64", + "id": 3 + } + } + }, + "ActionDetails": { + "oneofs": { + "details": { + "oneof": [ + "deidentifyDetails" + ] + } + }, + "fields": { + "deidentifyDetails": { + "type": "DeidentifyDataSourceDetails", + "id": 1 + } + } + }, + "DeidentifyDataSourceStats": { + "fields": { + "transformedBytes": { + "type": "int64", + "id": 1 + }, + "transformationCount": { + "type": "int64", + "id": 2 + }, + "transformationErrorCount": { + "type": "int64", + "id": 3 + } + } + }, + "DeidentifyDataSourceDetails": { + "fields": { + "requestedOptions": { + "type": "RequestedDeidentifyOptions", + "id": 1 + }, + "deidentifyStats": { + "type": "DeidentifyDataSourceStats", + "id": 2 + } + }, + "nested": { + "RequestedDeidentifyOptions": { + "fields": { + "snapshotDeidentifyTemplate": { + "type": "DeidentifyTemplate", + "id": 1 + }, + "snapshotStructuredDeidentifyTemplate": { + "type": "DeidentifyTemplate", + "id": 2 + }, + "snapshotImageRedactTemplate": { + "type": "DeidentifyTemplate", + "id": 3 + } + } + } + } + }, + "LocationSupport": { + "fields": { + "regionalizationScope": { + "type": "RegionalizationScope", + "id": 1 + }, + "locations": { + "rule": "repeated", + "type": "string", + "id": 2 + } + }, + "nested": { + "RegionalizationScope": { + "values": { + "REGIONALIZATION_SCOPE_UNSPECIFIED": 0, + "REGIONAL": 1, + "ANY_LOCATION": 2 + } + } + } + }, + "InfoTypeDescription": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "supportedBy": { + "rule": "repeated", + "type": "InfoTypeSupportedBy", + "id": 3 + }, + "description": { + "type": "string", + "id": 4 + }, + "locationSupport": { + "type": "LocationSupport", + "id": 6 + }, + "example": { + "type": "string", + "id": 8 + }, + "versions": { + "rule": "repeated", + "type": "VersionDescription", + "id": 9 + }, + "categories": { + "rule": "repeated", + "type": "InfoTypeCategory", + "id": 10 + }, + "sensitivityScore": { + "type": "SensitivityScore", + "id": 11 + }, + "specificInfoTypes": { + "rule": "repeated", + "type": "string", + "id": 12 + }, + "launchStatus": { + "type": "InfoTypeLaunchStatus", + "id": 13 + } + }, + "nested": { + "InfoTypeLaunchStatus": { + "values": { + "INFO_TYPE_LAUNCH_STATUS_UNSPECIFIED": 0, + "GENERAL_AVAILABILITY": 1, + "PUBLIC_PREVIEW": 2, + "PRIVATE_PREVIEW": 3 + } + } + } + }, + "InfoTypeCategory": { + "oneofs": { + "category": { + "oneof": [ + "locationCategory", + "industryCategory", + "typeCategory" + ] + } + }, + "fields": { + "locationCategory": { + "type": "LocationCategory", + "id": 1 + }, + "industryCategory": { + "type": "IndustryCategory", + "id": 2 + }, + "typeCategory": { + "type": "TypeCategory", + "id": 3 + } + }, + "nested": { + "LocationCategory": { + "values": { + "LOCATION_UNSPECIFIED": 0, + "GLOBAL": 1, + "ARGENTINA": 2, + "ARMENIA": 51, + "AUSTRALIA": 3, + "AUSTRIA": 53, + "AZERBAIJAN": 48, + "BELARUS": 50, + "BELGIUM": 4, + "BRAZIL": 5, + "CANADA": 6, + "CHILE": 7, + "CHINA": 8, + "COLOMBIA": 9, + "CROATIA": 42, + "CZECHIA": 52, + "DENMARK": 10, + "FRANCE": 11, + "FINLAND": 12, + "GERMANY": 13, + "HONG_KONG": 14, + "INDIA": 15, + "INDONESIA": 16, + "IRELAND": 17, + "ISRAEL": 18, + "ITALY": 19, + "JAPAN": 20, + "KAZAKHSTAN": 47, + "KOREA": 21, + "MEXICO": 22, + "THE_NETHERLANDS": 23, + "NEW_ZEALAND": 41, + "NORWAY": 24, + "PARAGUAY": 25, + "PERU": 26, + "POLAND": 27, + "PORTUGAL": 28, + "RUSSIA": 44, + "SINGAPORE": 29, + "SOUTH_AFRICA": 30, + "SPAIN": 31, + "SWEDEN": 32, + "SWITZERLAND": 43, + "TAIWAN": 33, + "THAILAND": 34, + "TURKEY": 35, + "UKRAINE": 45, + "UNITED_KINGDOM": 36, + "UNITED_STATES": 37, + "URUGUAY": 38, + "UZBEKISTAN": 46, + "VENEZUELA": 39, + "INTERNAL": 40 + } + }, + "IndustryCategory": { + "values": { + "INDUSTRY_UNSPECIFIED": 0, + "FINANCE": 1, + "HEALTH": 2, + "TELECOMMUNICATIONS": 3 + } + }, + "TypeCategory": { + "values": { + "TYPE_UNSPECIFIED": 0, + "PII": 1, + "SPII": 2, + "DEMOGRAPHIC": 3, + "CREDENTIAL": 4, + "GOVERNMENT_ID": 5, + "DOCUMENT": 6, + "CONTEXTUAL_INFORMATION": 7, + "CUSTOM": 8 + } + } + } + }, + "VersionDescription": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + } + } + }, + "ListInfoTypesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 4 + }, + "languageCode": { + "type": "string", + "id": 1 + }, + "filter": { + "type": "string", + "id": 2 + }, + "locationId": { + "type": "string", + "id": 3 + } + } + }, + "ListInfoTypesResponse": { + "fields": { + "infoTypes": { + "rule": "repeated", + "type": "InfoTypeDescription", + "id": 1 + } + } + }, + "RiskAnalysisJobConfig": { + "fields": { + "privacyMetric": { + "type": "PrivacyMetric", + "id": 1 + }, + "sourceTable": { + "type": "BigQueryTable", + "id": 2 + }, + "actions": { + "rule": "repeated", + "type": "Action", + "id": 3 + } + } + }, + "QuasiId": { + "oneofs": { + "tag": { + "oneof": [ + "infoType", + "customTag", + "inferred" + ] + } + }, + "fields": { + "field": { + "type": "FieldId", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "infoType": { + "type": "InfoType", + "id": 2 + }, + "customTag": { + "type": "string", + "id": 3 + }, + "inferred": { + "type": "google.protobuf.Empty", + "id": 4 + } + } + }, + "StatisticalTable": { + "fields": { + "table": { + "type": "BigQueryTable", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "quasiIds": { + "rule": "repeated", + "type": "QuasiIdentifierField", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "relativeFrequency": { + "type": "FieldId", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "QuasiIdentifierField": { + "fields": { + "field": { + "type": "FieldId", + "id": 1 + }, + "customTag": { + "type": "string", + "id": 2 + } + } + } + } + }, + "PrivacyMetric": { + "oneofs": { + "type": { + "oneof": [ + "numericalStatsConfig", + "categoricalStatsConfig", + "kAnonymityConfig", + "lDiversityConfig", + "kMapEstimationConfig", + "deltaPresenceEstimationConfig" + ] + } + }, + "fields": { + "numericalStatsConfig": { + "type": "NumericalStatsConfig", + "id": 1 + }, + "categoricalStatsConfig": { + "type": "CategoricalStatsConfig", + "id": 2 + }, + "kAnonymityConfig": { + "type": "KAnonymityConfig", + "id": 3 + }, + "lDiversityConfig": { + "type": "LDiversityConfig", + "id": 4 + }, + "kMapEstimationConfig": { + "type": "KMapEstimationConfig", + "id": 5 + }, + "deltaPresenceEstimationConfig": { + "type": "DeltaPresenceEstimationConfig", + "id": 6 + } + }, + "nested": { + "NumericalStatsConfig": { + "fields": { + "field": { + "type": "FieldId", + "id": 1 + } + } + }, + "CategoricalStatsConfig": { + "fields": { + "field": { + "type": "FieldId", + "id": 1 + } + } + }, + "KAnonymityConfig": { + "fields": { + "quasiIds": { + "rule": "repeated", + "type": "FieldId", + "id": 1 + }, + "entityId": { + "type": "EntityId", + "id": 2 + } + } + }, + "LDiversityConfig": { + "fields": { + "quasiIds": { + "rule": "repeated", + "type": "FieldId", + "id": 1 + }, + "sensitiveAttribute": { + "type": "FieldId", + "id": 2 + } + } + }, + "KMapEstimationConfig": { + "fields": { + "quasiIds": { + "rule": "repeated", + "type": "TaggedField", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "regionCode": { + "type": "string", + "id": 2 + }, + "auxiliaryTables": { + "rule": "repeated", + "type": "AuxiliaryTable", + "id": 3 + } + }, + "nested": { + "TaggedField": { + "oneofs": { + "tag": { + "oneof": [ + "infoType", + "customTag", + "inferred" + ] + } + }, + "fields": { + "field": { + "type": "FieldId", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "infoType": { + "type": "InfoType", + "id": 2 + }, + "customTag": { + "type": "string", + "id": 3 + }, + "inferred": { + "type": "google.protobuf.Empty", + "id": 4 + } + } + }, + "AuxiliaryTable": { + "fields": { + "table": { + "type": "BigQueryTable", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "quasiIds": { + "rule": "repeated", + "type": "QuasiIdField", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "relativeFrequency": { + "type": "FieldId", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "QuasiIdField": { + "fields": { + "field": { + "type": "FieldId", + "id": 1 + }, + "customTag": { + "type": "string", + "id": 2 + } + } + } + } + } + } + }, + "DeltaPresenceEstimationConfig": { + "fields": { + "quasiIds": { + "rule": "repeated", + "type": "QuasiId", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "regionCode": { + "type": "string", + "id": 2 + }, + "auxiliaryTables": { + "rule": "repeated", + "type": "StatisticalTable", + "id": 3 + } + } + } + } + }, + "AnalyzeDataSourceRiskDetails": { + "oneofs": { + "result": { + "oneof": [ + "numericalStatsResult", + "categoricalStatsResult", + "kAnonymityResult", + "lDiversityResult", + "kMapEstimationResult", + "deltaPresenceEstimationResult" + ] + } + }, + "fields": { + "requestedPrivacyMetric": { + "type": "PrivacyMetric", + "id": 1 + }, + "requestedSourceTable": { + "type": "BigQueryTable", + "id": 2 + }, + "numericalStatsResult": { + "type": "NumericalStatsResult", + "id": 3 + }, + "categoricalStatsResult": { + "type": "CategoricalStatsResult", + "id": 4 + }, + "kAnonymityResult": { + "type": "KAnonymityResult", + "id": 5 + }, + "lDiversityResult": { + "type": "LDiversityResult", + "id": 6 + }, + "kMapEstimationResult": { + "type": "KMapEstimationResult", + "id": 7 + }, + "deltaPresenceEstimationResult": { + "type": "DeltaPresenceEstimationResult", + "id": 9 + }, + "requestedOptions": { + "type": "RequestedRiskAnalysisOptions", + "id": 10 + } + }, + "nested": { + "NumericalStatsResult": { + "fields": { + "minValue": { + "type": "Value", + "id": 1 + }, + "maxValue": { + "type": "Value", + "id": 2 + }, + "quantileValues": { + "rule": "repeated", + "type": "Value", + "id": 4 + } + } + }, + "CategoricalStatsResult": { + "fields": { + "valueFrequencyHistogramBuckets": { + "rule": "repeated", + "type": "CategoricalStatsHistogramBucket", + "id": 5 + } + }, + "nested": { + "CategoricalStatsHistogramBucket": { + "fields": { + "valueFrequencyLowerBound": { + "type": "int64", + "id": 1 + }, + "valueFrequencyUpperBound": { + "type": "int64", + "id": 2 + }, + "bucketSize": { + "type": "int64", + "id": 3 + }, + "bucketValues": { + "rule": "repeated", + "type": "ValueFrequency", + "id": 4 + }, + "bucketValueCount": { + "type": "int64", + "id": 5 + } + } + } + } + }, + "KAnonymityResult": { + "fields": { + "equivalenceClassHistogramBuckets": { + "rule": "repeated", + "type": "KAnonymityHistogramBucket", + "id": 5 + } + }, + "nested": { + "KAnonymityEquivalenceClass": { + "fields": { + "quasiIdsValues": { + "rule": "repeated", + "type": "Value", + "id": 1 + }, + "equivalenceClassSize": { + "type": "int64", + "id": 2 + } + } + }, + "KAnonymityHistogramBucket": { + "fields": { + "equivalenceClassSizeLowerBound": { + "type": "int64", + "id": 1 + }, + "equivalenceClassSizeUpperBound": { + "type": "int64", + "id": 2 + }, + "bucketSize": { + "type": "int64", + "id": 3 + }, + "bucketValues": { + "rule": "repeated", + "type": "KAnonymityEquivalenceClass", + "id": 4 + }, + "bucketValueCount": { + "type": "int64", + "id": 5 + } + } + } + } + }, + "LDiversityResult": { + "fields": { + "sensitiveValueFrequencyHistogramBuckets": { + "rule": "repeated", + "type": "LDiversityHistogramBucket", + "id": 5 + } + }, + "nested": { + "LDiversityEquivalenceClass": { + "fields": { + "quasiIdsValues": { + "rule": "repeated", + "type": "Value", + "id": 1 + }, + "equivalenceClassSize": { + "type": "int64", + "id": 2 + }, + "numDistinctSensitiveValues": { + "type": "int64", + "id": 3 + }, + "topSensitiveValues": { + "rule": "repeated", + "type": "ValueFrequency", + "id": 4 + } + } + }, + "LDiversityHistogramBucket": { + "fields": { + "sensitiveValueFrequencyLowerBound": { + "type": "int64", + "id": 1 + }, + "sensitiveValueFrequencyUpperBound": { + "type": "int64", + "id": 2 + }, + "bucketSize": { + "type": "int64", + "id": 3 + }, + "bucketValues": { + "rule": "repeated", + "type": "LDiversityEquivalenceClass", + "id": 4 + }, + "bucketValueCount": { + "type": "int64", + "id": 5 + } + } + } + } + }, + "KMapEstimationResult": { + "fields": { + "kMapEstimationHistogram": { + "rule": "repeated", + "type": "KMapEstimationHistogramBucket", + "id": 1 + } + }, + "nested": { + "KMapEstimationQuasiIdValues": { + "fields": { + "quasiIdsValues": { + "rule": "repeated", + "type": "Value", + "id": 1 + }, + "estimatedAnonymity": { + "type": "int64", + "id": 2 + } + } + }, + "KMapEstimationHistogramBucket": { + "fields": { + "minAnonymity": { + "type": "int64", + "id": 1 + }, + "maxAnonymity": { + "type": "int64", + "id": 2 + }, + "bucketSize": { + "type": "int64", + "id": 5 + }, + "bucketValues": { + "rule": "repeated", + "type": "KMapEstimationQuasiIdValues", + "id": 6 + }, + "bucketValueCount": { + "type": "int64", + "id": 7 + } + } + } + } + }, + "DeltaPresenceEstimationResult": { + "fields": { + "deltaPresenceEstimationHistogram": { + "rule": "repeated", + "type": "DeltaPresenceEstimationHistogramBucket", + "id": 1 + } + }, + "nested": { + "DeltaPresenceEstimationQuasiIdValues": { + "fields": { + "quasiIdsValues": { + "rule": "repeated", + "type": "Value", + "id": 1 + }, + "estimatedProbability": { + "type": "double", + "id": 2 + } + } + }, + "DeltaPresenceEstimationHistogramBucket": { + "fields": { + "minProbability": { + "type": "double", + "id": 1 + }, + "maxProbability": { + "type": "double", + "id": 2 + }, + "bucketSize": { + "type": "int64", + "id": 5 + }, + "bucketValues": { + "rule": "repeated", + "type": "DeltaPresenceEstimationQuasiIdValues", + "id": 6 + }, + "bucketValueCount": { + "type": "int64", + "id": 7 + } + } + } + } + }, + "RequestedRiskAnalysisOptions": { + "fields": { + "jobConfig": { + "type": "RiskAnalysisJobConfig", + "id": 1 + } + } + } + } + }, + "ValueFrequency": { + "fields": { + "value": { + "type": "Value", + "id": 1 + }, + "count": { + "type": "int64", + "id": 2 + } + } + }, + "Value": { + "oneofs": { + "type": { + "oneof": [ + "integerValue", + "floatValue", + "stringValue", + "booleanValue", + "timestampValue", + "timeValue", + "dateValue", + "dayOfWeekValue" + ] + } + }, + "fields": { + "integerValue": { + "type": "int64", + "id": 1 + }, + "floatValue": { + "type": "double", + "id": 2 + }, + "stringValue": { + "type": "string", + "id": 3 + }, + "booleanValue": { + "type": "bool", + "id": 4 + }, + "timestampValue": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "timeValue": { + "type": "google.type.TimeOfDay", + "id": 6 + }, + "dateValue": { + "type": "google.type.Date", + "id": 7 + }, + "dayOfWeekValue": { + "type": "google.type.DayOfWeek", + "id": 8 + } + } + }, + "QuoteInfo": { + "oneofs": { + "parsedQuote": { + "oneof": [ + "dateTime" + ] + } + }, + "fields": { + "dateTime": { + "type": "DateTime", + "id": 2 + } + } + }, + "DateTime": { + "fields": { + "date": { + "type": "google.type.Date", + "id": 1 + }, + "dayOfWeek": { + "type": "google.type.DayOfWeek", + "id": 2 + }, + "time": { + "type": "google.type.TimeOfDay", + "id": 3 + }, + "timeZone": { + "type": "TimeZone", + "id": 4 + } + }, + "nested": { + "TimeZone": { + "fields": { + "offsetMinutes": { + "type": "int32", + "id": 1 + } + } + } + } + }, + "DeidentifyConfig": { + "oneofs": { + "transformation": { + "oneof": [ + "infoTypeTransformations", + "recordTransformations", + "imageTransformations" + ] + } + }, + "fields": { + "infoTypeTransformations": { + "type": "InfoTypeTransformations", + "id": 1 + }, + "recordTransformations": { + "type": "RecordTransformations", + "id": 2 + }, + "imageTransformations": { + "type": "ImageTransformations", + "id": 4 + }, + "transformationErrorHandling": { + "type": "TransformationErrorHandling", + "id": 3 + } + } + }, + "ImageTransformations": { + "fields": { + "transforms": { + "rule": "repeated", + "type": "ImageTransformation", + "id": 2 + } + }, + "nested": { + "ImageTransformation": { + "oneofs": { + "target": { + "oneof": [ + "selectedInfoTypes", + "allInfoTypes", + "allText" + ] + } + }, + "fields": { + "selectedInfoTypes": { + "type": "SelectedInfoTypes", + "id": 4 + }, + "allInfoTypes": { + "type": "AllInfoTypes", + "id": 5 + }, + "allText": { + "type": "AllText", + "id": 6 + }, + "redactionColor": { + "type": "Color", + "id": 3 + } + }, + "nested": { + "SelectedInfoTypes": { + "fields": { + "infoTypes": { + "rule": "repeated", + "type": "InfoType", + "id": 5, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "AllInfoTypes": { + "fields": {} + }, + "AllText": { + "fields": {} + } + } + } + } + }, + "TransformationErrorHandling": { + "oneofs": { + "mode": { + "oneof": [ + "throwError", + "leaveUntransformed" + ] + } + }, + "fields": { + "throwError": { + "type": "ThrowError", + "id": 1 + }, + "leaveUntransformed": { + "type": "LeaveUntransformed", + "id": 2 + } + }, + "nested": { + "ThrowError": { + "fields": {} + }, + "LeaveUntransformed": { + "fields": {} + } + } + }, + "PrimitiveTransformation": { + "oneofs": { + "transformation": { + "oneof": [ + "replaceConfig", + "redactConfig", + "characterMaskConfig", + "cryptoReplaceFfxFpeConfig", + "fixedSizeBucketingConfig", + "bucketingConfig", + "replaceWithInfoTypeConfig", + "timePartConfig", + "cryptoHashConfig", + "dateShiftConfig", + "cryptoDeterministicConfig", + "replaceDictionaryConfig" + ] + } + }, + "fields": { + "replaceConfig": { + "type": "ReplaceValueConfig", + "id": 1 + }, + "redactConfig": { + "type": "RedactConfig", + "id": 2 + }, + "characterMaskConfig": { + "type": "CharacterMaskConfig", + "id": 3 + }, + "cryptoReplaceFfxFpeConfig": { + "type": "CryptoReplaceFfxFpeConfig", + "id": 4 + }, + "fixedSizeBucketingConfig": { + "type": "FixedSizeBucketingConfig", + "id": 5 + }, + "bucketingConfig": { + "type": "BucketingConfig", + "id": 6 + }, + "replaceWithInfoTypeConfig": { + "type": "ReplaceWithInfoTypeConfig", + "id": 7 + }, + "timePartConfig": { + "type": "TimePartConfig", + "id": 8 + }, + "cryptoHashConfig": { + "type": "CryptoHashConfig", + "id": 9 + }, + "dateShiftConfig": { + "type": "DateShiftConfig", + "id": 11 + }, + "cryptoDeterministicConfig": { + "type": "CryptoDeterministicConfig", + "id": 12 + }, + "replaceDictionaryConfig": { + "type": "ReplaceDictionaryConfig", + "id": 13 + } + } + }, + "TimePartConfig": { + "fields": { + "partToExtract": { + "type": "TimePart", + "id": 1 + } + }, + "nested": { + "TimePart": { + "values": { + "TIME_PART_UNSPECIFIED": 0, + "YEAR": 1, + "MONTH": 2, + "DAY_OF_MONTH": 3, + "DAY_OF_WEEK": 4, + "WEEK_OF_YEAR": 5, + "HOUR_OF_DAY": 6 + } + } + } + }, + "CryptoHashConfig": { + "fields": { + "cryptoKey": { + "type": "CryptoKey", + "id": 1 + } + } + }, + "CryptoDeterministicConfig": { + "fields": { + "cryptoKey": { + "type": "CryptoKey", + "id": 1 + }, + "surrogateInfoType": { + "type": "InfoType", + "id": 2 + }, + "context": { + "type": "FieldId", + "id": 3 + } + } + }, + "ReplaceValueConfig": { + "fields": { + "newValue": { + "type": "Value", + "id": 1 + } + } + }, + "ReplaceDictionaryConfig": { + "oneofs": { + "type": { + "oneof": [ + "wordList" + ] + } + }, + "fields": { + "wordList": { + "type": "CustomInfoType.Dictionary.WordList", + "id": 1 + } + } + }, + "ReplaceWithInfoTypeConfig": { + "fields": {} + }, + "RedactConfig": { + "fields": {} + }, + "CharsToIgnore": { + "oneofs": { + "characters": { + "oneof": [ + "charactersToSkip", + "commonCharactersToIgnore" + ] + } + }, + "fields": { + "charactersToSkip": { + "type": "string", + "id": 1 + }, + "commonCharactersToIgnore": { + "type": "CommonCharsToIgnore", + "id": 2 + } + }, + "nested": { + "CommonCharsToIgnore": { + "values": { + "COMMON_CHARS_TO_IGNORE_UNSPECIFIED": 0, + "NUMERIC": 1, + "ALPHA_UPPER_CASE": 2, + "ALPHA_LOWER_CASE": 3, + "PUNCTUATION": 4, + "WHITESPACE": 5 + } + } + } + }, + "CharacterMaskConfig": { + "fields": { + "maskingCharacter": { + "type": "string", + "id": 1 + }, + "numberToMask": { + "type": "int32", + "id": 2 + }, + "reverseOrder": { + "type": "bool", + "id": 3 + }, + "charactersToIgnore": { + "rule": "repeated", + "type": "CharsToIgnore", + "id": 4 + } + } + }, + "FixedSizeBucketingConfig": { + "fields": { + "lowerBound": { + "type": "Value", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "upperBound": { + "type": "Value", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "bucketSize": { + "type": "double", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "BucketingConfig": { + "fields": { + "buckets": { + "rule": "repeated", + "type": "Bucket", + "id": 1 + } + }, + "nested": { + "Bucket": { + "fields": { + "min": { + "type": "Value", + "id": 1 + }, + "max": { + "type": "Value", + "id": 2 + }, + "replacementValue": { + "type": "Value", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "CryptoReplaceFfxFpeConfig": { + "oneofs": { + "alphabet": { + "oneof": [ + "commonAlphabet", + "customAlphabet", + "radix" + ] + } + }, + "fields": { + "cryptoKey": { + "type": "CryptoKey", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "context": { + "type": "FieldId", + "id": 2 + }, + "commonAlphabet": { + "type": "FfxCommonNativeAlphabet", + "id": 4 + }, + "customAlphabet": { + "type": "string", + "id": 5 + }, + "radix": { + "type": "int32", + "id": 6 + }, + "surrogateInfoType": { + "type": "InfoType", + "id": 8 + } + }, + "nested": { + "FfxCommonNativeAlphabet": { + "values": { + "FFX_COMMON_NATIVE_ALPHABET_UNSPECIFIED": 0, + "NUMERIC": 1, + "HEXADECIMAL": 2, + "UPPER_CASE_ALPHA_NUMERIC": 3, + "ALPHA_NUMERIC": 4 + } + } + } + }, + "CryptoKey": { + "oneofs": { + "source": { + "oneof": [ + "transient", + "unwrapped", + "kmsWrapped" + ] + } + }, + "fields": { + "transient": { + "type": "TransientCryptoKey", + "id": 1 + }, + "unwrapped": { + "type": "UnwrappedCryptoKey", + "id": 2 + }, + "kmsWrapped": { + "type": "KmsWrappedCryptoKey", + "id": 3 + } + } + }, + "TransientCryptoKey": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UnwrappedCryptoKey": { + "fields": { + "key": { + "type": "bytes", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "KmsWrappedCryptoKey": { + "fields": { + "wrappedKey": { + "type": "bytes", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "cryptoKeyName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DateShiftConfig": { + "oneofs": { + "method": { + "oneof": [ + "cryptoKey" + ] + } + }, + "fields": { + "upperBoundDays": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "lowerBoundDays": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "context": { + "type": "FieldId", + "id": 3 + }, + "cryptoKey": { + "type": "CryptoKey", + "id": 4 + } + } + }, + "InfoTypeTransformations": { + "fields": { + "transformations": { + "rule": "repeated", + "type": "InfoTypeTransformation", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "InfoTypeTransformation": { + "fields": { + "infoTypes": { + "rule": "repeated", + "type": "InfoType", + "id": 1 + }, + "primitiveTransformation": { + "type": "PrimitiveTransformation", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "FieldTransformation": { + "oneofs": { + "transformation": { + "oneof": [ + "primitiveTransformation", + "infoTypeTransformations" + ] + } + }, + "fields": { + "fields": { + "rule": "repeated", + "type": "FieldId", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "condition": { + "type": "RecordCondition", + "id": 3 + }, + "primitiveTransformation": { + "type": "PrimitiveTransformation", + "id": 4 + }, + "infoTypeTransformations": { + "type": "InfoTypeTransformations", + "id": 5 + } + } + }, + "RecordTransformations": { + "fields": { + "fieldTransformations": { + "rule": "repeated", + "type": "FieldTransformation", + "id": 1 + }, + "recordSuppressions": { + "rule": "repeated", + "type": "RecordSuppression", + "id": 2 + } + } + }, + "RecordSuppression": { + "fields": { + "condition": { + "type": "RecordCondition", + "id": 1 + } + } + }, + "RecordCondition": { + "fields": { + "expressions": { + "type": "Expressions", + "id": 3 + } + }, + "nested": { + "Condition": { + "fields": { + "field": { + "type": "FieldId", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "operator": { + "type": "RelationalOperator", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "value": { + "type": "Value", + "id": 4 + } + } + }, + "Conditions": { + "fields": { + "conditions": { + "rule": "repeated", + "type": "Condition", + "id": 1 + } + } + }, + "Expressions": { + "oneofs": { + "type": { + "oneof": [ + "conditions" + ] + } + }, + "fields": { + "logicalOperator": { + "type": "LogicalOperator", + "id": 1 + }, + "conditions": { + "type": "Conditions", + "id": 3 + } + }, + "nested": { + "LogicalOperator": { + "values": { + "LOGICAL_OPERATOR_UNSPECIFIED": 0, + "AND": 1 + } + } + } + } + } + }, + "TransformationOverview": { + "fields": { + "transformedBytes": { + "type": "int64", + "id": 2 + }, + "transformationSummaries": { + "rule": "repeated", + "type": "TransformationSummary", + "id": 3 + } + } + }, + "TransformationSummary": { + "fields": { + "infoType": { + "type": "InfoType", + "id": 1 + }, + "field": { + "type": "FieldId", + "id": 2 + }, + "transformation": { + "type": "PrimitiveTransformation", + "id": 3 + }, + "fieldTransformations": { + "rule": "repeated", + "type": "FieldTransformation", + "id": 5 + }, + "recordSuppress": { + "type": "RecordSuppression", + "id": 6 + }, + "results": { + "rule": "repeated", + "type": "SummaryResult", + "id": 4 + }, + "transformedBytes": { + "type": "int64", + "id": 7 + } + }, + "nested": { + "TransformationResultCode": { + "values": { + "TRANSFORMATION_RESULT_CODE_UNSPECIFIED": 0, + "SUCCESS": 1, + "ERROR": 2 + } + }, + "SummaryResult": { + "fields": { + "count": { + "type": "int64", + "id": 1 + }, + "code": { + "type": "TransformationResultCode", + "id": 2 + }, + "details": { + "type": "string", + "id": 3 + } + } + } + } + }, + "TransformationDescription": { + "fields": { + "type": { + "type": "TransformationType", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "condition": { + "type": "string", + "id": 3 + }, + "infoType": { + "type": "InfoType", + "id": 4 + } + } + }, + "TransformationDetails": { + "fields": { + "resourceName": { + "type": "string", + "id": 1 + }, + "containerName": { + "type": "string", + "id": 2 + }, + "transformation": { + "rule": "repeated", + "type": "TransformationDescription", + "id": 3 + }, + "statusDetails": { + "type": "TransformationResultStatus", + "id": 4 + }, + "transformedBytes": { + "type": "int64", + "id": 5 + }, + "transformationLocation": { + "type": "TransformationLocation", + "id": 6 + } + } + }, + "TransformationLocation": { + "oneofs": { + "locationType": { + "oneof": [ + "findingId", + "recordTransformation" + ] + } + }, + "fields": { + "findingId": { + "type": "string", + "id": 1 + }, + "recordTransformation": { + "type": "RecordTransformation", + "id": 2 + }, + "containerType": { + "type": "TransformationContainerType", + "id": 3 + } + } + }, + "RecordTransformation": { + "fields": { + "fieldId": { + "type": "FieldId", + "id": 1 + }, + "containerTimestamp": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "containerVersion": { + "type": "string", + "id": 3 + } + } + }, + "TransformationResultStatus": { + "fields": { + "resultStatusType": { + "type": "TransformationResultStatusType", + "id": 1 + }, + "details": { + "type": "google.rpc.Status", + "id": 2 + } + } + }, + "TransformationResultStatusType": { + "values": { + "STATE_TYPE_UNSPECIFIED": 0, + "INVALID_TRANSFORM": 1, + "BIGQUERY_MAX_ROW_SIZE_EXCEEDED": 2, + "METADATA_UNRETRIEVABLE": 3, + "SUCCESS": 4 + } + }, + "TransformationContainerType": { + "values": { + "TRANSFORM_UNKNOWN_CONTAINER": 0, + "TRANSFORM_BODY": 1, + "TRANSFORM_METADATA": 2, + "TRANSFORM_TABLE": 3 + } + }, + "TransformationType": { + "values": { + "TRANSFORMATION_TYPE_UNSPECIFIED": 0, + "RECORD_SUPPRESSION": 1, + "REPLACE_VALUE": 2, + "REPLACE_DICTIONARY": 15, + "REDACT": 3, + "CHARACTER_MASK": 4, + "CRYPTO_REPLACE_FFX_FPE": 5, + "FIXED_SIZE_BUCKETING": 6, + "BUCKETING": 7, + "REPLACE_WITH_INFO_TYPE": 8, + "TIME_PART": 9, + "CRYPTO_HASH": 10, + "DATE_SHIFT": 12, + "CRYPTO_DETERMINISTIC_CONFIG": 13, + "REDACT_IMAGE": 14 + } + }, + "TransformationDetailsStorageConfig": { + "oneofs": { + "type": { + "oneof": [ + "table" + ] + } + }, + "fields": { + "table": { + "type": "BigQueryTable", + "id": 1 + } + } + }, + "Schedule": { + "oneofs": { + "option": { + "oneof": [ + "recurrencePeriodDuration" + ] + } + }, + "fields": { + "recurrencePeriodDuration": { + "type": "google.protobuf.Duration", + "id": 1 + } + } + }, + "Manual": { + "fields": {} + }, + "InspectTemplate": { + "options": { + "(google.api.resource).type": "dlp.googleapis.com/InspectTemplate", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/inspectTemplates/{inspect_template}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "displayName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "inspectConfig": { + "type": "InspectConfig", + "id": 6 + } + } + }, + "DeidentifyTemplate": { + "options": { + "(google.api.resource).type": "dlp.googleapis.com/DeidentifyTemplate", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "displayName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deidentifyConfig": { + "type": "DeidentifyConfig", + "id": 6 + } + } + }, + "Error": { + "fields": { + "details": { + "type": "google.rpc.Status", + "id": 1 + }, + "timestamps": { + "rule": "repeated", + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "extraInfo": { + "type": "ErrorExtraInfo", + "id": 4 + } + }, + "nested": { + "ErrorExtraInfo": { + "values": { + "ERROR_INFO_UNSPECIFIED": 0, + "IMAGE_SCAN_UNAVAILABLE_IN_REGION": 1, + "FILE_STORE_CLUSTER_UNSUPPORTED": 2 + } + } + } + }, + "JobTrigger": { + "options": { + "(google.api.resource).type": "dlp.googleapis.com/JobTrigger", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/jobTriggers/{job_trigger}" + }, + "oneofs": { + "job": { + "oneof": [ + "inspectJob" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + }, + "inspectJob": { + "type": "InspectJobConfig", + "id": 4 + }, + "triggers": { + "rule": "repeated", + "type": "Trigger", + "id": 5 + }, + "errors": { + "rule": "repeated", + "type": "Error", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastRunTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "status": { + "type": "Status", + "id": 10, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "Trigger": { + "oneofs": { + "trigger": { + "oneof": [ + "schedule", + "manual" + ] + } + }, + "fields": { + "schedule": { + "type": "Schedule", + "id": 1 + }, + "manual": { + "type": "Manual", + "id": 2 + } + } + }, + "Status": { + "values": { + "STATUS_UNSPECIFIED": 0, + "HEALTHY": 1, + "PAUSED": 2, + "CANCELLED": 3 + } + } + } + }, + "Action": { + "oneofs": { + "action": { + "oneof": [ + "saveFindings", + "pubSub", + "publishSummaryToCscc", + "publishFindingsToCloudDataCatalog", + "publishFindingsToDataplexCatalog", + "deidentify", + "jobNotificationEmails", + "publishToStackdriver" + ] + } + }, + "fields": { + "saveFindings": { + "type": "SaveFindings", + "id": 1 + }, + "pubSub": { + "type": "PublishToPubSub", + "id": 2 + }, + "publishSummaryToCscc": { + "type": "PublishSummaryToCscc", + "id": 3 + }, + "publishFindingsToCloudDataCatalog": { + "type": "PublishFindingsToCloudDataCatalog", + "id": 5, + "options": { + "deprecated": true + } + }, + "publishFindingsToDataplexCatalog": { + "type": "PublishFindingsToDataplexCatalog", + "id": 10 + }, + "deidentify": { + "type": "Deidentify", + "id": 7 + }, + "jobNotificationEmails": { + "type": "JobNotificationEmails", + "id": 8 + }, + "publishToStackdriver": { + "type": "PublishToStackdriver", + "id": 9 + } + }, + "nested": { + "SaveFindings": { + "fields": { + "outputConfig": { + "type": "OutputStorageConfig", + "id": 1 + } + } + }, + "PublishToPubSub": { + "fields": { + "topic": { + "type": "string", + "id": 1 + } + } + }, + "PublishSummaryToCscc": { + "fields": {} + }, + "PublishFindingsToCloudDataCatalog": { + "fields": {} + }, + "PublishFindingsToDataplexCatalog": { + "fields": {} + }, + "Deidentify": { + "oneofs": { + "output": { + "oneof": [ + "cloudStorageOutput" + ] + } + }, + "fields": { + "transformationConfig": { + "type": "TransformationConfig", + "id": 7 + }, + "transformationDetailsStorageConfig": { + "type": "TransformationDetailsStorageConfig", + "id": 3 + }, + "cloudStorageOutput": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "fileTypesToTransform": { + "rule": "repeated", + "type": "FileType", + "id": 8 + } + } + }, + "JobNotificationEmails": { + "fields": {} + }, + "PublishToStackdriver": { + "fields": {} + } + } + }, + "TransformationConfig": { + "fields": { + "deidentifyTemplate": { + "type": "string", + "id": 1 + }, + "structuredDeidentifyTemplate": { + "type": "string", + "id": 2 + }, + "imageRedactTemplate": { + "type": "string", + "id": 4 + } + } + }, + "CreateInspectTemplateRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dlp.googleapis.com/InspectTemplate" + } + }, + "inspectTemplate": { + "type": "InspectTemplate", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "templateId": { + "type": "string", + "id": 3 + }, + "locationId": { + "type": "string", + "id": 4 + } + } + }, + "UpdateInspectTemplateRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/InspectTemplate" + } + }, + "inspectTemplate": { + "type": "InspectTemplate", + "id": 2 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3 + } + } + }, + "GetInspectTemplateRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/InspectTemplate" + } + } + } + }, + "ListInspectTemplatesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dlp.googleapis.com/InspectTemplate" + } + }, + "pageToken": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "orderBy": { + "type": "string", + "id": 4 + }, + "locationId": { + "type": "string", + "id": 5 + } + } + }, + "ListInspectTemplatesResponse": { + "fields": { + "inspectTemplates": { + "rule": "repeated", + "type": "InspectTemplate", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeleteInspectTemplateRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/InspectTemplate" + } + } + } + }, + "CreateJobTriggerRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dlp.googleapis.com/JobTrigger" + } + }, + "jobTrigger": { + "type": "JobTrigger", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "triggerId": { + "type": "string", + "id": 3 + }, + "locationId": { + "type": "string", + "id": 4 + } + } + }, + "ActivateJobTriggerRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/JobTrigger" + } + } + } + }, + "UpdateJobTriggerRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/JobTrigger" + } + }, + "jobTrigger": { + "type": "JobTrigger", + "id": 2 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3 + } + } + }, + "GetJobTriggerRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/JobTrigger" + } + } + } + }, + "CreateDiscoveryConfigRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dlp.googleapis.com/DiscoveryConfig" + } + }, + "discoveryConfig": { + "type": "DiscoveryConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "configId": { + "type": "string", + "id": 3 + } + } + }, + "UpdateDiscoveryConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/DiscoveryConfig" + } + }, + "discoveryConfig": { + "type": "DiscoveryConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3 + } + } + }, + "GetDiscoveryConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/DiscoveryConfig" + } + } + } + }, + "ListDiscoveryConfigsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dlp.googleapis.com/DiscoveryConfig" + } + }, + "pageToken": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "orderBy": { + "type": "string", + "id": 4 + } + } + }, + "ListDiscoveryConfigsResponse": { + "fields": { + "discoveryConfigs": { + "rule": "repeated", + "type": "DiscoveryConfig", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeleteDiscoveryConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/DiscoveryConfig" + } + } + } + }, + "CreateDlpJobRequest": { + "oneofs": { + "job": { + "oneof": [ + "inspectJob", + "riskJob" + ] + } + }, + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dlp.googleapis.com/DlpJob" + } + }, + "inspectJob": { + "type": "InspectJobConfig", + "id": 2 + }, + "riskJob": { + "type": "RiskAnalysisJobConfig", + "id": 3 + }, + "jobId": { + "type": "string", + "id": 4 + }, + "locationId": { + "type": "string", + "id": 5 + } + } + }, + "ListJobTriggersRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dlp.googleapis.com/JobTrigger" + } + }, + "pageToken": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "orderBy": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 5 + }, + "type": { + "type": "DlpJobType", + "id": 6 + }, + "locationId": { + "type": "string", + "id": 7 + } + } + }, + "ListJobTriggersResponse": { + "fields": { + "jobTriggers": { + "rule": "repeated", + "type": "JobTrigger", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeleteJobTriggerRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/JobTrigger" + } + } + } + }, + "InspectJobConfig": { + "fields": { + "storageConfig": { + "type": "StorageConfig", + "id": 1 + }, + "inspectConfig": { + "type": "InspectConfig", + "id": 2 + }, + "inspectTemplateName": { + "type": "string", + "id": 3 + }, + "actions": { + "rule": "repeated", + "type": "Action", + "id": 4 + } + } + }, + "ProfileGeneration": { + "values": { + "PROFILE_GENERATION_UNSPECIFIED": 0, + "PROFILE_GENERATION_NEW": 1, + "PROFILE_GENERATION_UPDATE": 2 + } + }, + "DataProfileAction": { + "oneofs": { + "action": { + "oneof": [ + "exportData", + "pubSubNotification", + "publishToChronicle", + "publishToScc", + "tagResources", + "publishToDataplexCatalog" + ] + } + }, + "fields": { + "exportData": { + "type": "Export", + "id": 1 + }, + "pubSubNotification": { + "type": "PubSubNotification", + "id": 2 + }, + "publishToChronicle": { + "type": "PublishToChronicle", + "id": 3 + }, + "publishToScc": { + "type": "PublishToSecurityCommandCenter", + "id": 4 + }, + "tagResources": { + "type": "TagResources", + "id": 8 + }, + "publishToDataplexCatalog": { + "type": "PublishToDataplexCatalog", + "id": 9 + } + }, + "nested": { + "Export": { + "fields": { + "profileTable": { + "type": "BigQueryTable", + "id": 1 + }, + "sampleFindingsTable": { + "type": "BigQueryTable", + "id": 2 + } + } + }, + "PubSubNotification": { + "fields": { + "topic": { + "type": "string", + "id": 1 + }, + "event": { + "type": "EventType", + "id": 2 + }, + "pubsubCondition": { + "type": "DataProfilePubSubCondition", + "id": 3 + }, + "detailOfMessage": { + "type": "DetailLevel", + "id": 4 + } + }, + "nested": { + "DetailLevel": { + "values": { + "DETAIL_LEVEL_UNSPECIFIED": 0, + "TABLE_PROFILE": 1, + "RESOURCE_NAME": 2, + "FILE_STORE_PROFILE": 3 + } + } + } + }, + "EventType": { + "values": { + "EVENT_TYPE_UNSPECIFIED": 0, + "NEW_PROFILE": 1, + "CHANGED_PROFILE": 2, + "SCORE_INCREASED": 3, + "ERROR_CHANGED": 4 + } + }, + "PublishToChronicle": { + "fields": {} + }, + "PublishToSecurityCommandCenter": { + "fields": {} + }, + "PublishToDataplexCatalog": { + "fields": { + "lowerDataRiskToLow": { + "type": "bool", + "id": 1 + } + } + }, + "TagResources": { + "fields": { + "tagConditions": { + "rule": "repeated", + "type": "TagCondition", + "id": 1 + }, + "profileGenerationsToTag": { + "rule": "repeated", + "type": "ProfileGeneration", + "id": 2 + }, + "lowerDataRiskToLow": { + "type": "bool", + "id": 3 + } + }, + "nested": { + "TagCondition": { + "oneofs": { + "type": { + "oneof": [ + "sensitivityScore" + ] + } + }, + "fields": { + "tag": { + "type": "TagValue", + "id": 1 + }, + "sensitivityScore": { + "type": "SensitivityScore", + "id": 2 + } + } + }, + "TagValue": { + "oneofs": { + "format": { + "oneof": [ + "namespacedValue" + ] + } + }, + "fields": { + "namespacedValue": { + "type": "string", + "id": 1 + } + } + } + } + } + } + }, + "DataProfileFinding": { + "fields": { + "quote": { + "type": "string", + "id": 1 + }, + "infotype": { + "type": "InfoType", + "id": 2 + }, + "quoteInfo": { + "type": "QuoteInfo", + "id": 3 + }, + "dataProfileResourceName": { + "type": "string", + "id": 4 + }, + "findingId": { + "type": "string", + "id": 5 + }, + "timestamp": { + "type": "google.protobuf.Timestamp", + "id": 6 + }, + "location": { + "type": "DataProfileFindingLocation", + "id": 7 + }, + "resourceVisibility": { + "type": "ResourceVisibility", + "id": 8 + }, + "fullResourceName": { + "type": "string", + "id": 9 + }, + "dataSourceType": { + "type": "DataSourceType", + "id": 10 + } + } + }, + "DataProfileFindingLocation": { + "oneofs": { + "locationExtraDetails": { + "oneof": [ + "dataProfileFindingRecordLocation" + ] + } + }, + "fields": { + "containerName": { + "type": "string", + "id": 1 + }, + "dataProfileFindingRecordLocation": { + "type": "DataProfileFindingRecordLocation", + "id": 2 + } + } + }, + "DataProfileFindingRecordLocation": { + "fields": { + "field": { + "type": "FieldId", + "id": 1 + } + } + }, + "DataProfileJobConfig": { + "fields": { + "location": { + "type": "DataProfileLocation", + "id": 1 + }, + "projectId": { + "type": "string", + "id": 5 + }, + "otherCloudStartingLocation": { + "type": "OtherCloudDiscoveryStartingLocation", + "id": 8 + }, + "inspectTemplates": { + "rule": "repeated", + "type": "string", + "id": 7 + }, + "dataProfileActions": { + "rule": "repeated", + "type": "DataProfileAction", + "id": 6 + } + } + }, + "BigQueryRegex": { + "fields": { + "projectIdRegex": { + "type": "string", + "id": 1 + }, + "datasetIdRegex": { + "type": "string", + "id": 2 + }, + "tableIdRegex": { + "type": "string", + "id": 3 + } + } + }, + "BigQueryRegexes": { + "fields": { + "patterns": { + "rule": "repeated", + "type": "BigQueryRegex", + "id": 1 + } + } + }, + "BigQueryTableTypes": { + "fields": { + "types": { + "rule": "repeated", + "type": "BigQueryTableType", + "id": 1 + } + } + }, + "BigQueryTableTypeCollection": { + "values": { + "BIG_QUERY_COLLECTION_UNSPECIFIED": 0, + "BIG_QUERY_COLLECTION_ALL_TYPES": 1, + "BIG_QUERY_COLLECTION_ONLY_SUPPORTED_TYPES": 2 + } + }, + "BigQueryTableType": { + "values": { + "BIG_QUERY_TABLE_TYPE_UNSPECIFIED": 0, + "BIG_QUERY_TABLE_TYPE_TABLE": 1, + "BIG_QUERY_TABLE_TYPE_EXTERNAL_BIG_LAKE": 2, + "BIG_QUERY_TABLE_TYPE_SNAPSHOT": 3 + } + }, + "DataProfileUpdateFrequency": { + "values": { + "UPDATE_FREQUENCY_UNSPECIFIED": 0, + "UPDATE_FREQUENCY_NEVER": 1, + "UPDATE_FREQUENCY_DAILY": 2, + "UPDATE_FREQUENCY_MONTHLY": 4 + } + }, + "Disabled": { + "fields": {} + }, + "DataProfileLocation": { + "oneofs": { + "location": { + "oneof": [ + "organizationId", + "folderId" + ] + } + }, + "fields": { + "organizationId": { + "type": "int64", + "id": 1 + }, + "folderId": { + "type": "int64", + "id": 2 + } + } + }, + "DiscoveryConfig": { + "options": { + "(google.api.resource).type": "dlp.googleapis.com/DiscoveryConfig", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/discoveryConfigs/{discovery_config}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 11 + }, + "orgConfig": { + "type": "OrgConfig", + "id": 2 + }, + "otherCloudStartingLocation": { + "type": "OtherCloudDiscoveryStartingLocation", + "id": 12 + }, + "inspectTemplates": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "actions": { + "rule": "repeated", + "type": "DataProfileAction", + "id": 4 + }, + "targets": { + "rule": "repeated", + "type": "DiscoveryTarget", + "id": 5 + }, + "errors": { + "rule": "repeated", + "type": "Error", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastRunTime": { + "type": "google.protobuf.Timestamp", + "id": 9, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "status": { + "type": "Status", + "id": 10, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "processingLocation": { + "type": "ProcessingLocation", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "OrgConfig": { + "fields": { + "location": { + "type": "DiscoveryStartingLocation", + "id": 1 + }, + "projectId": { + "type": "string", + "id": 2 + } + } + }, + "Status": { + "values": { + "STATUS_UNSPECIFIED": 0, + "RUNNING": 1, + "PAUSED": 2 + } + } + } + }, + "DiscoveryTarget": { + "oneofs": { + "target": { + "oneof": [ + "bigQueryTarget", + "cloudSqlTarget", + "secretsTarget", + "cloudStorageTarget", + "otherCloudTarget", + "vertexDatasetTarget" + ] + } + }, + "fields": { + "bigQueryTarget": { + "type": "BigQueryDiscoveryTarget", + "id": 1 + }, + "cloudSqlTarget": { + "type": "CloudSqlDiscoveryTarget", + "id": 2 + }, + "secretsTarget": { + "type": "SecretsDiscoveryTarget", + "id": 3 + }, + "cloudStorageTarget": { + "type": "CloudStorageDiscoveryTarget", + "id": 4 + }, + "otherCloudTarget": { + "type": "OtherCloudDiscoveryTarget", + "id": 5 + }, + "vertexDatasetTarget": { + "type": "VertexDatasetDiscoveryTarget", + "id": 7 + } + } + }, + "BigQueryDiscoveryTarget": { + "oneofs": { + "frequency": { + "oneof": [ + "cadence", + "disabled" + ] + } + }, + "fields": { + "filter": { + "type": "DiscoveryBigQueryFilter", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "conditions": { + "type": "DiscoveryBigQueryConditions", + "id": 2 + }, + "cadence": { + "type": "DiscoveryGenerationCadence", + "id": 3 + }, + "disabled": { + "type": "Disabled", + "id": 4 + } + } + }, + "DiscoveryBigQueryFilter": { + "oneofs": { + "filter": { + "oneof": [ + "tables", + "otherTables", + "tableReference" + ] + } + }, + "fields": { + "tables": { + "type": "BigQueryTableCollection", + "id": 1 + }, + "otherTables": { + "type": "AllOtherBigQueryTables", + "id": 2 + }, + "tableReference": { + "type": "TableReference", + "id": 3 + } + }, + "nested": { + "AllOtherBigQueryTables": { + "fields": {} + } + } + }, + "BigQueryTableCollection": { + "oneofs": { + "pattern": { + "oneof": [ + "includeRegexes" + ] + } + }, + "fields": { + "includeRegexes": { + "type": "BigQueryRegexes", + "id": 1 + } + } + }, + "DiscoveryBigQueryConditions": { + "oneofs": { + "includedTypes": { + "oneof": [ + "types", + "typeCollection" + ] + } + }, + "fields": { + "createdAfter": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "types": { + "type": "BigQueryTableTypes", + "id": 2 + }, + "typeCollection": { + "type": "BigQueryTableTypeCollection", + "id": 3 + }, + "orConditions": { + "type": "OrConditions", + "id": 4 + } + }, + "nested": { + "OrConditions": { + "fields": { + "minRowCount": { + "type": "int32", + "id": 1 + }, + "minAge": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + } + } + }, + "DiscoveryGenerationCadence": { + "fields": { + "schemaModifiedCadence": { + "type": "DiscoverySchemaModifiedCadence", + "id": 1 + }, + "tableModifiedCadence": { + "type": "DiscoveryTableModifiedCadence", + "id": 2 + }, + "inspectTemplateModifiedCadence": { + "type": "DiscoveryInspectTemplateModifiedCadence", + "id": 3 + }, + "refreshFrequency": { + "type": "DataProfileUpdateFrequency", + "id": 4 + } + } + }, + "DiscoveryTableModifiedCadence": { + "fields": { + "types": { + "rule": "repeated", + "type": "BigQueryTableModification", + "id": 1 + }, + "frequency": { + "type": "DataProfileUpdateFrequency", + "id": 2 + } + } + }, + "BigQueryTableModification": { + "values": { + "TABLE_MODIFICATION_UNSPECIFIED": 0, + "TABLE_MODIFIED_TIMESTAMP": 1 + } + }, + "DiscoverySchemaModifiedCadence": { + "fields": { + "types": { + "rule": "repeated", + "type": "BigQuerySchemaModification", + "id": 1 + }, + "frequency": { + "type": "DataProfileUpdateFrequency", + "id": 2 + } + } + }, + "BigQuerySchemaModification": { + "values": { + "SCHEMA_MODIFICATION_UNSPECIFIED": 0, + "SCHEMA_NEW_COLUMNS": 1, + "SCHEMA_REMOVED_COLUMNS": 2 + } + }, + "DiscoveryInspectTemplateModifiedCadence": { + "fields": { + "frequency": { + "type": "DataProfileUpdateFrequency", + "id": 1 + } + } + }, + "CloudSqlDiscoveryTarget": { + "oneofs": { + "cadence": { + "oneof": [ + "generationCadence", + "disabled" + ] + } + }, + "fields": { + "filter": { + "type": "DiscoveryCloudSqlFilter", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "conditions": { + "type": "DiscoveryCloudSqlConditions", + "id": 2 + }, + "generationCadence": { + "type": "DiscoveryCloudSqlGenerationCadence", + "id": 3 + }, + "disabled": { + "type": "Disabled", + "id": 4 + } + } + }, + "DiscoveryCloudSqlFilter": { + "oneofs": { + "filter": { + "oneof": [ + "collection", + "others", + "databaseResourceReference" + ] + } + }, + "fields": { + "collection": { + "type": "DatabaseResourceCollection", + "id": 1 + }, + "others": { + "type": "AllOtherDatabaseResources", + "id": 2 + }, + "databaseResourceReference": { + "type": "DatabaseResourceReference", + "id": 3 + } + } + }, + "DatabaseResourceCollection": { + "oneofs": { + "pattern": { + "oneof": [ + "includeRegexes" + ] + } + }, + "fields": { + "includeRegexes": { + "type": "DatabaseResourceRegexes", + "id": 1 + } + } + }, + "DatabaseResourceRegexes": { + "fields": { + "patterns": { + "rule": "repeated", + "type": "DatabaseResourceRegex", + "id": 1 + } + } + }, + "DatabaseResourceRegex": { + "fields": { + "projectIdRegex": { + "type": "string", + "id": 1 + }, + "instanceRegex": { + "type": "string", + "id": 2 + }, + "databaseRegex": { + "type": "string", + "id": 3 + }, + "databaseResourceNameRegex": { + "type": "string", + "id": 4 + } + } + }, + "AllOtherDatabaseResources": { + "fields": {} + }, + "DatabaseResourceReference": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "instance": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "database": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "databaseResource": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DiscoveryCloudSqlConditions": { + "fields": { + "databaseEngines": { + "rule": "repeated", + "type": "DatabaseEngine", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "types": { + "rule": "repeated", + "type": "DatabaseResourceType", + "id": 3 + } + }, + "nested": { + "DatabaseEngine": { + "values": { + "DATABASE_ENGINE_UNSPECIFIED": 0, + "ALL_SUPPORTED_DATABASE_ENGINES": 1, + "MYSQL": 2, + "POSTGRES": 3 + } + }, + "DatabaseResourceType": { + "values": { + "DATABASE_RESOURCE_TYPE_UNSPECIFIED": 0, + "DATABASE_RESOURCE_TYPE_ALL_SUPPORTED_TYPES": 1, + "DATABASE_RESOURCE_TYPE_TABLE": 2 + } + } + } + }, + "DiscoveryCloudSqlGenerationCadence": { + "fields": { + "schemaModifiedCadence": { + "type": "SchemaModifiedCadence", + "id": 1 + }, + "refreshFrequency": { + "type": "DataProfileUpdateFrequency", + "id": 2 + }, + "inspectTemplateModifiedCadence": { + "type": "DiscoveryInspectTemplateModifiedCadence", + "id": 3 + } + }, + "nested": { + "SchemaModifiedCadence": { + "fields": { + "types": { + "rule": "repeated", + "type": "CloudSqlSchemaModification", + "id": 1 + }, + "frequency": { + "type": "DataProfileUpdateFrequency", + "id": 2 + } + }, + "nested": { + "CloudSqlSchemaModification": { + "values": { + "SQL_SCHEMA_MODIFICATION_UNSPECIFIED": 0, + "NEW_COLUMNS": 1, + "REMOVED_COLUMNS": 2 + } + } + } + } + } + }, + "SecretsDiscoveryTarget": { + "fields": {} + }, + "CloudStorageDiscoveryTarget": { + "oneofs": { + "cadence": { + "oneof": [ + "generationCadence", + "disabled" + ] + } + }, + "fields": { + "filter": { + "type": "DiscoveryCloudStorageFilter", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "conditions": { + "type": "DiscoveryFileStoreConditions", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "generationCadence": { + "type": "DiscoveryCloudStorageGenerationCadence", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "disabled": { + "type": "Disabled", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DiscoveryCloudStorageFilter": { + "oneofs": { + "filter": { + "oneof": [ + "collection", + "cloudStorageResourceReference", + "others" + ] + } + }, + "fields": { + "collection": { + "type": "FileStoreCollection", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cloudStorageResourceReference": { + "type": "CloudStorageResourceReference", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "others": { + "type": "AllOtherResources", + "id": 100, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FileStoreCollection": { + "oneofs": { + "pattern": { + "oneof": [ + "includeRegexes" + ] + } + }, + "fields": { + "includeRegexes": { + "type": "FileStoreRegexes", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "includeTags": { + "type": "TagFilters", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "FileStoreRegexes": { + "fields": { + "patterns": { + "rule": "repeated", + "type": "FileStoreRegex", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "FileStoreRegex": { + "oneofs": { + "resourceRegex": { + "oneof": [ + "cloudStorageRegex" + ] + } + }, + "fields": { + "cloudStorageRegex": { + "type": "CloudStorageRegex", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CloudStorageRegex": { + "fields": { + "projectIdRegex": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "bucketNameRegex": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CloudStorageResourceReference": { + "fields": { + "bucketName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "projectId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DiscoveryCloudStorageGenerationCadence": { + "fields": { + "refreshFrequency": { + "type": "DataProfileUpdateFrequency", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "inspectTemplateModifiedCadence": { + "type": "DiscoveryInspectTemplateModifiedCadence", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DiscoveryCloudStorageConditions": { + "fields": { + "includedObjectAttributes": { + "rule": "repeated", + "type": "CloudStorageObjectAttribute", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "includedBucketAttributes": { + "rule": "repeated", + "type": "CloudStorageBucketAttribute", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "CloudStorageObjectAttribute": { + "values": { + "CLOUD_STORAGE_OBJECT_ATTRIBUTE_UNSPECIFIED": 0, + "ALL_SUPPORTED_OBJECTS": 1, + "STANDARD": 2, + "NEARLINE": 3, + "COLDLINE": 4, + "ARCHIVE": 5, + "REGIONAL": 6, + "MULTI_REGIONAL": 7, + "DURABLE_REDUCED_AVAILABILITY": 8 + } + }, + "CloudStorageBucketAttribute": { + "values": { + "CLOUD_STORAGE_BUCKET_ATTRIBUTE_UNSPECIFIED": 0, + "ALL_SUPPORTED_BUCKETS": 1, + "AUTOCLASS_DISABLED": 2, + "AUTOCLASS_ENABLED": 3 + } + } + } + }, + "DiscoveryFileStoreConditions": { + "oneofs": { + "conditions": { + "oneof": [ + "cloudStorageConditions" + ] + } + }, + "fields": { + "createdAfter": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "minAge": { + "type": "google.protobuf.Duration", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cloudStorageConditions": { + "type": "DiscoveryCloudStorageConditions", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "OtherCloudDiscoveryTarget": { + "oneofs": { + "cadence": { + "oneof": [ + "generationCadence", + "disabled" + ] + } + }, + "fields": { + "dataSourceType": { + "type": "DataSourceType", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "filter": { + "type": "DiscoveryOtherCloudFilter", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "conditions": { + "type": "DiscoveryOtherCloudConditions", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "generationCadence": { + "type": "DiscoveryOtherCloudGenerationCadence", + "id": 4 + }, + "disabled": { + "type": "Disabled", + "id": 5 + } + } + }, + "DiscoveryOtherCloudFilter": { + "oneofs": { + "filter": { + "oneof": [ + "collection", + "singleResource", + "others" + ] + } + }, + "fields": { + "collection": { + "type": "OtherCloudResourceCollection", + "id": 1 + }, + "singleResource": { + "type": "OtherCloudSingleResourceReference", + "id": 2 + }, + "others": { + "type": "AllOtherResources", + "id": 100, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "OtherCloudResourceCollection": { + "oneofs": { + "pattern": { + "oneof": [ + "includeRegexes" + ] + } + }, + "fields": { + "includeRegexes": { + "type": "OtherCloudResourceRegexes", + "id": 1 + } + } + }, + "OtherCloudResourceRegexes": { + "fields": { + "patterns": { + "rule": "repeated", + "type": "OtherCloudResourceRegex", + "id": 1 + } + } + }, + "OtherCloudResourceRegex": { + "oneofs": { + "resourceRegex": { + "oneof": [ + "amazonS3BucketRegex" + ] + } + }, + "fields": { + "amazonS3BucketRegex": { + "type": "AmazonS3BucketRegex", + "id": 1 + } + } + }, + "AwsAccountRegex": { + "fields": { + "accountIdRegex": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "AmazonS3BucketRegex": { + "fields": { + "awsAccountRegex": { + "type": "AwsAccountRegex", + "id": 1 + }, + "bucketNameRegex": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "OtherCloudSingleResourceReference": { + "oneofs": { + "resource": { + "oneof": [ + "amazonS3Bucket" + ] + } + }, + "fields": { + "amazonS3Bucket": { + "type": "AmazonS3Bucket", + "id": 1 + } + } + }, + "AwsAccount": { + "fields": { + "accountId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "AmazonS3Bucket": { + "fields": { + "awsAccount": { + "type": "AwsAccount", + "id": 1 + }, + "bucketName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DiscoveryOtherCloudConditions": { + "oneofs": { + "conditions": { + "oneof": [ + "amazonS3BucketConditions" + ] + } + }, + "fields": { + "minAge": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "amazonS3BucketConditions": { + "type": "AmazonS3BucketConditions", + "id": 2 + } + } + }, + "AmazonS3BucketConditions": { + "fields": { + "bucketTypes": { + "rule": "repeated", + "type": "BucketType", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "objectStorageClasses": { + "rule": "repeated", + "type": "ObjectStorageClass", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "BucketType": { + "values": { + "TYPE_UNSPECIFIED": 0, + "TYPE_ALL_SUPPORTED": 1, + "TYPE_GENERAL_PURPOSE": 2 + } + }, + "ObjectStorageClass": { + "values": { + "UNSPECIFIED": 0, + "ALL_SUPPORTED_CLASSES": 1, + "STANDARD": 2, + "STANDARD_INFREQUENT_ACCESS": 4, + "GLACIER_INSTANT_RETRIEVAL": 6, + "INTELLIGENT_TIERING": 7 + } + } + } + }, + "DiscoveryOtherCloudGenerationCadence": { + "fields": { + "refreshFrequency": { + "type": "DataProfileUpdateFrequency", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "inspectTemplateModifiedCadence": { + "type": "DiscoveryInspectTemplateModifiedCadence", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DiscoveryStartingLocation": { + "oneofs": { + "location": { + "oneof": [ + "organizationId", + "folderId" + ] + } + }, + "fields": { + "organizationId": { + "type": "int64", + "id": 1 + }, + "folderId": { + "type": "int64", + "id": 2 + } + } + }, + "OtherCloudDiscoveryStartingLocation": { + "oneofs": { + "location": { + "oneof": [ + "awsLocation" + ] + } + }, + "fields": { + "awsLocation": { + "type": "AwsDiscoveryStartingLocation", + "id": 1 + } + }, + "nested": { + "AwsDiscoveryStartingLocation": { + "oneofs": { + "scope": { + "oneof": [ + "accountId", + "allAssetInventoryAssets" + ] + } + }, + "fields": { + "accountId": { + "type": "string", + "id": 2 + }, + "allAssetInventoryAssets": { + "type": "bool", + "id": 3 + } + } + } + } + }, + "AllOtherResources": { + "fields": {} + }, + "VertexDatasetDiscoveryTarget": { + "oneofs": { + "cadence": { + "oneof": [ + "generationCadence", + "disabled" + ] + } + }, + "fields": { + "filter": { + "type": "DiscoveryVertexDatasetFilter", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "conditions": { + "type": "DiscoveryVertexDatasetConditions", + "id": 2 + }, + "generationCadence": { + "type": "DiscoveryVertexDatasetGenerationCadence", + "id": 3 + }, + "disabled": { + "type": "Disabled", + "id": 4 + } + } + }, + "DiscoveryVertexDatasetFilter": { + "oneofs": { + "filter": { + "oneof": [ + "collection", + "vertexDatasetResourceReference", + "others" + ] + } + }, + "fields": { + "collection": { + "type": "VertexDatasetCollection", + "id": 1 + }, + "vertexDatasetResourceReference": { + "type": "VertexDatasetResourceReference", + "id": 2 + }, + "others": { + "type": "AllOtherResources", + "id": 100 + } + } + }, + "VertexDatasetCollection": { + "oneofs": { + "pattern": { + "oneof": [ + "vertexDatasetRegexes" + ] + } + }, + "fields": { + "vertexDatasetRegexes": { + "type": "VertexDatasetRegexes", + "id": 1 + } + } + }, + "VertexDatasetRegexes": { + "fields": { + "patterns": { + "rule": "repeated", + "type": "VertexDatasetRegex", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "VertexDatasetRegex": { + "fields": { + "projectIdRegex": { + "type": "string", + "id": 1 + } + } + }, + "VertexDatasetResourceReference": { + "fields": { + "datasetResourceName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DiscoveryVertexDatasetConditions": { + "fields": { + "createdAfter": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "minAge": { + "type": "google.protobuf.Duration", + "id": 2 + } + } + }, + "DiscoveryVertexDatasetGenerationCadence": { + "fields": { + "refreshFrequency": { + "type": "DataProfileUpdateFrequency", + "id": 1 + }, + "inspectTemplateModifiedCadence": { + "type": "DiscoveryInspectTemplateModifiedCadence", + "id": 2 + } + } + }, + "DlpJob": { + "options": { + "(google.api.resource).type": "dlp.googleapis.com/DlpJob", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/dlpJobs/{dlp_job}" + }, + "oneofs": { + "details": { + "oneof": [ + "riskDetails", + "inspectDetails" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "type": { + "type": "DlpJobType", + "id": 2 + }, + "state": { + "type": "JobState", + "id": 3 + }, + "riskDetails": { + "type": "AnalyzeDataSourceRiskDetails", + "id": 4 + }, + "inspectDetails": { + "type": "InspectDataSourceDetails", + "id": 5 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 7 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 8 + }, + "lastModified": { + "type": "google.protobuf.Timestamp", + "id": 15 + }, + "jobTriggerName": { + "type": "string", + "id": 10 + }, + "errors": { + "rule": "repeated", + "type": "Error", + "id": 11 + }, + "actionDetails": { + "rule": "repeated", + "type": "ActionDetails", + "id": 12 + } + }, + "nested": { + "JobState": { + "values": { + "JOB_STATE_UNSPECIFIED": 0, + "PENDING": 1, + "RUNNING": 2, + "DONE": 3, + "CANCELED": 4, + "FAILED": 5, + "ACTIVE": 6 + } + } + } + }, + "GetDlpJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/DlpJob" + } + } + } + }, + "ListDlpJobsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dlp.googleapis.com/DlpJob" + } + }, + "filter": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "type": { + "type": "DlpJobType", + "id": 5 + }, + "orderBy": { + "type": "string", + "id": 6 + }, + "locationId": { + "type": "string", + "id": 7 + } + } + }, + "ListDlpJobsResponse": { + "fields": { + "jobs": { + "rule": "repeated", + "type": "DlpJob", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CancelDlpJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/DlpJob" + } + } + } + }, + "FinishDlpJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/DlpJob" + } + } + } + }, + "DeleteDlpJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/DlpJob" + } + } + } + }, + "CreateDeidentifyTemplateRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dlp.googleapis.com/DeidentifyTemplate" + } + }, + "deidentifyTemplate": { + "type": "DeidentifyTemplate", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "templateId": { + "type": "string", + "id": 3 + }, + "locationId": { + "type": "string", + "id": 4 + } + } + }, + "UpdateDeidentifyTemplateRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/DeidentifyTemplate" + } + }, + "deidentifyTemplate": { + "type": "DeidentifyTemplate", + "id": 2 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3 + } + } + }, + "GetDeidentifyTemplateRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/DeidentifyTemplate" + } + } + } + }, + "ListDeidentifyTemplatesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dlp.googleapis.com/DeidentifyTemplate" + } + }, + "pageToken": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "orderBy": { + "type": "string", + "id": 4 + }, + "locationId": { + "type": "string", + "id": 5 + } + } + }, + "ListDeidentifyTemplatesResponse": { + "fields": { + "deidentifyTemplates": { + "rule": "repeated", + "type": "DeidentifyTemplate", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeleteDeidentifyTemplateRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/DeidentifyTemplate" + } + } + } + }, + "LargeCustomDictionaryConfig": { + "oneofs": { + "source": { + "oneof": [ + "cloudStorageFileSet", + "bigQueryField" + ] + } + }, + "fields": { + "outputPath": { + "type": "CloudStoragePath", + "id": 1 + }, + "cloudStorageFileSet": { + "type": "CloudStorageFileSet", + "id": 2 + }, + "bigQueryField": { + "type": "BigQueryField", + "id": 3 + } + } + }, + "LargeCustomDictionaryStats": { + "fields": { + "approxNumPhrases": { + "type": "int64", + "id": 1 + } + } + }, + "StoredInfoTypeConfig": { + "oneofs": { + "type": { + "oneof": [ + "largeCustomDictionary", + "dictionary", + "regex" + ] + } + }, + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "largeCustomDictionary": { + "type": "LargeCustomDictionaryConfig", + "id": 3 + }, + "dictionary": { + "type": "CustomInfoType.Dictionary", + "id": 4 + }, + "regex": { + "type": "CustomInfoType.Regex", + "id": 5 + } + } + }, + "StoredInfoTypeStats": { + "oneofs": { + "type": { + "oneof": [ + "largeCustomDictionary" + ] + } + }, + "fields": { + "largeCustomDictionary": { + "type": "LargeCustomDictionaryStats", + "id": 1 + } + } + }, + "StoredInfoTypeVersion": { + "fields": { + "config": { + "type": "StoredInfoTypeConfig", + "id": 1 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "state": { + "type": "StoredInfoTypeState", + "id": 3 + }, + "errors": { + "rule": "repeated", + "type": "Error", + "id": 4 + }, + "stats": { + "type": "StoredInfoTypeStats", + "id": 5 + } + } + }, + "StoredInfoType": { + "options": { + "(google.api.resource).type": "dlp.googleapis.com/StoredInfoType", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/storedInfoTypes/{stored_info_type}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "currentVersion": { + "type": "StoredInfoTypeVersion", + "id": 2 + }, + "pendingVersions": { + "rule": "repeated", + "type": "StoredInfoTypeVersion", + "id": 3 + } + } + }, + "CreateStoredInfoTypeRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dlp.googleapis.com/StoredInfoType" + } + }, + "config": { + "type": "StoredInfoTypeConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "storedInfoTypeId": { + "type": "string", + "id": 3 + }, + "locationId": { + "type": "string", + "id": 4 + } + } + }, + "UpdateStoredInfoTypeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/StoredInfoType" + } + }, + "config": { + "type": "StoredInfoTypeConfig", + "id": 2 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3 + } + } + }, + "GetStoredInfoTypeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/StoredInfoType" + } + } + } + }, + "ListStoredInfoTypesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dlp.googleapis.com/StoredInfoType" + } + }, + "pageToken": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "orderBy": { + "type": "string", + "id": 4 + }, + "locationId": { + "type": "string", + "id": 5 + } + } + }, + "ListStoredInfoTypesResponse": { + "fields": { + "storedInfoTypes": { + "rule": "repeated", + "type": "StoredInfoType", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeleteStoredInfoTypeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/StoredInfoType" + } + } + } + }, + "HybridInspectJobTriggerRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/JobTrigger" + } + }, + "hybridItem": { + "type": "HybridContentItem", + "id": 3 + } + } + }, + "HybridInspectDlpJobRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/DlpJob" + } + }, + "hybridItem": { + "type": "HybridContentItem", + "id": 3 + } + } + }, + "HybridContentItem": { + "fields": { + "item": { + "type": "ContentItem", + "id": 1 + }, + "findingDetails": { + "type": "HybridFindingDetails", + "id": 2 + } + } + }, + "HybridFindingDetails": { + "fields": { + "containerDetails": { + "type": "Container", + "id": 1 + }, + "fileOffset": { + "type": "int64", + "id": 2 + }, + "rowOffset": { + "type": "int64", + "id": 3 + }, + "tableOptions": { + "type": "TableOptions", + "id": 4 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 5 + } + } + }, + "HybridInspectResponse": { + "fields": {} + }, + "RelationalOperator": { + "values": { + "RELATIONAL_OPERATOR_UNSPECIFIED": 0, + "EQUAL_TO": 1, + "NOT_EQUAL_TO": 2, + "GREATER_THAN": 3, + "LESS_THAN": 4, + "GREATER_THAN_OR_EQUALS": 5, + "LESS_THAN_OR_EQUALS": 6, + "EXISTS": 7 + } + }, + "MatchingType": { + "values": { + "MATCHING_TYPE_UNSPECIFIED": 0, + "MATCHING_TYPE_FULL_MATCH": 1, + "MATCHING_TYPE_PARTIAL_MATCH": 2, + "MATCHING_TYPE_INVERSE_MATCH": 3, + "MATCHING_TYPE_RULE_SPECIFIC": 4 + } + }, + "ImageContainmentType": { + "oneofs": { + "type": { + "oneof": [ + "encloses", + "fullyInside", + "overlaps" + ] + } + }, + "fields": { + "encloses": { + "type": "Encloses", + "id": 1 + }, + "fullyInside": { + "type": "FullyInside", + "id": 2 + }, + "overlaps": { + "type": "Overlap", + "id": 3 + } + } + }, + "Overlap": { + "fields": {} + }, + "Encloses": { + "fields": {} + }, + "FullyInside": { + "fields": {} + }, + "ContentOption": { + "values": { + "CONTENT_UNSPECIFIED": 0, + "CONTENT_TEXT": 1, + "CONTENT_IMAGE": 2 + } + }, + "MetadataType": { + "values": { + "METADATATYPE_UNSPECIFIED": 0, + "STORAGE_METADATA": 2, + "CONTENT_METADATA": 3, + "CLIENT_PROVIDED_METADATA": 4 + } + }, + "InfoTypeSupportedBy": { + "values": { + "ENUM_TYPE_UNSPECIFIED": 0, + "INSPECT": 1, + "RISK_ANALYSIS": 2 + } + }, + "DlpJobType": { + "values": { + "DLP_JOB_TYPE_UNSPECIFIED": 0, + "INSPECT_JOB": 1, + "RISK_ANALYSIS_JOB": 2 + } + }, + "StoredInfoTypeState": { + "values": { + "STORED_INFO_TYPE_STATE_UNSPECIFIED": 0, + "PENDING": 1, + "READY": 2, + "FAILED": 3, + "INVALID": 4 + } + }, + "ListProjectDataProfilesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dlp.googleapis.com/ProjectDataProfile" + } + }, + "pageToken": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "orderBy": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 5 + } + } + }, + "ListProjectDataProfilesResponse": { + "fields": { + "projectDataProfiles": { + "rule": "repeated", + "type": "ProjectDataProfile", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListTableDataProfilesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dlp.googleapis.com/TableDataProfile" + } + }, + "pageToken": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "orderBy": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 5 + } + } + }, + "ListTableDataProfilesResponse": { + "fields": { + "tableDataProfiles": { + "rule": "repeated", + "type": "TableDataProfile", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListColumnDataProfilesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dlp.googleapis.com/ColumnDataProfile" + } + }, + "pageToken": { + "type": "string", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "orderBy": { + "type": "string", + "id": 4 + }, + "filter": { + "type": "string", + "id": 5 + } + } + }, + "ListColumnDataProfilesResponse": { + "fields": { + "columnDataProfiles": { + "rule": "repeated", + "type": "ColumnDataProfile", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DataRiskLevel": { + "fields": { + "score": { + "type": "DataRiskLevelScore", + "id": 1 + } + }, + "nested": { + "DataRiskLevelScore": { + "values": { + "RISK_SCORE_UNSPECIFIED": 0, + "RISK_LOW": 10, + "RISK_UNKNOWN": 12, + "RISK_MODERATE": 20, + "RISK_HIGH": 30 + } + } + } + }, + "ProjectDataProfile": { + "options": { + "(google.api.resource).type": "dlp.googleapis.com/ProjectDataProfile", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/projectDataProfiles/{project_data_profile}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "projectId": { + "type": "string", + "id": 2 + }, + "profileLastGenerated": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "sensitivityScore": { + "type": "SensitivityScore", + "id": 4 + }, + "dataRiskLevel": { + "type": "DataRiskLevel", + "id": 5 + }, + "profileStatus": { + "type": "ProfileStatus", + "id": 7 + }, + "tableDataProfileCount": { + "type": "int64", + "id": 9 + }, + "fileStoreDataProfileCount": { + "type": "int64", + "id": 10 + } + } + }, + "ResourceVisibility": { + "values": { + "RESOURCE_VISIBILITY_UNSPECIFIED": 0, + "RESOURCE_VISIBILITY_PUBLIC": 10, + "RESOURCE_VISIBILITY_INCONCLUSIVE": 15, + "RESOURCE_VISIBILITY_RESTRICTED": 20 + } + }, + "DataProfileConfigSnapshot": { + "fields": { + "inspectConfig": { + "type": "InspectConfig", + "id": 2 + }, + "dataProfileJob": { + "type": "DataProfileJobConfig", + "id": 3, + "options": { + "deprecated": true + } + }, + "discoveryConfig": { + "type": "DiscoveryConfig", + "id": 4 + }, + "inspectTemplateName": { + "type": "string", + "id": 5 + }, + "inspectTemplateModifiedTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + } + } + }, + "TableDataProfile": { + "options": { + "(google.api.resource).type": "dlp.googleapis.com/TableDataProfile", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/tableDataProfiles/{table_data_profile}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "dataSourceType": { + "type": "DataSourceType", + "id": 36 + }, + "projectDataProfile": { + "type": "string", + "id": 2 + }, + "datasetProjectId": { + "type": "string", + "id": 24 + }, + "datasetLocation": { + "type": "string", + "id": 29 + }, + "datasetId": { + "type": "string", + "id": 25 + }, + "tableId": { + "type": "string", + "id": 26 + }, + "fullResource": { + "type": "string", + "id": 3 + }, + "profileStatus": { + "type": "ProfileStatus", + "id": 21 + }, + "state": { + "type": "State", + "id": 22 + }, + "sensitivityScore": { + "type": "SensitivityScore", + "id": 5 + }, + "dataRiskLevel": { + "type": "DataRiskLevel", + "id": 6 + }, + "predictedInfoTypes": { + "rule": "repeated", + "type": "InfoTypeSummary", + "id": 27 + }, + "otherInfoTypes": { + "rule": "repeated", + "type": "OtherInfoTypeSummary", + "id": 28 + }, + "configSnapshot": { + "type": "DataProfileConfigSnapshot", + "id": 7 + }, + "lastModifiedTime": { + "type": "google.protobuf.Timestamp", + "id": 8 + }, + "expirationTime": { + "type": "google.protobuf.Timestamp", + "id": 9 + }, + "scannedColumnCount": { + "type": "int64", + "id": 10 + }, + "failedColumnCount": { + "type": "int64", + "id": 11 + }, + "tableSizeBytes": { + "type": "int64", + "id": 12 + }, + "rowCount": { + "type": "int64", + "id": 13 + }, + "encryptionStatus": { + "type": "EncryptionStatus", + "id": 14 + }, + "resourceVisibility": { + "type": "ResourceVisibility", + "id": 15 + }, + "profileLastGenerated": { + "type": "google.protobuf.Timestamp", + "id": 16 + }, + "resourceLabels": { + "keyType": "string", + "type": "string", + "id": 17 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 23 + }, + "sampleFindingsTable": { + "type": "BigQueryTable", + "id": 37 + }, + "tags": { + "rule": "repeated", + "type": "Tag", + "id": 39 + }, + "relatedResources": { + "rule": "repeated", + "type": "RelatedResource", + "id": 41 + }, + "domains": { + "rule": "repeated", + "type": "Domain", + "id": 47 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "RUNNING": 1, + "DONE": 2 + } + } + } + }, + "ProfileStatus": { + "fields": { + "status": { + "type": "google.rpc.Status", + "id": 1 + }, + "timestamp": { + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "EncryptionStatus": { + "values": { + "ENCRYPTION_STATUS_UNSPECIFIED": 0, + "ENCRYPTION_GOOGLE_MANAGED": 1, + "ENCRYPTION_CUSTOMER_MANAGED": 2 + } + }, + "InfoTypeSummary": { + "fields": { + "infoType": { + "type": "InfoType", + "id": 1 + }, + "estimatedPrevalence": { + "type": "int32", + "id": 2, + "options": { + "deprecated": true + } + } + } + }, + "OtherInfoTypeSummary": { + "fields": { + "infoType": { + "type": "InfoType", + "id": 1 + }, + "estimatedPrevalence": { + "type": "int32", + "id": 2 + }, + "excludedFromAnalysis": { + "type": "bool", + "id": 3 + } + } + }, + "NullPercentageLevel": { + "values": { + "NULL_PERCENTAGE_LEVEL_UNSPECIFIED": 0, + "NULL_PERCENTAGE_VERY_LOW": 1, + "NULL_PERCENTAGE_LOW": 2, + "NULL_PERCENTAGE_MEDIUM": 3, + "NULL_PERCENTAGE_HIGH": 4 + } + }, + "UniquenessScoreLevel": { + "values": { + "UNIQUENESS_SCORE_LEVEL_UNSPECIFIED": 0, + "UNIQUENESS_SCORE_LOW": 1, + "UNIQUENESS_SCORE_MEDIUM": 2, + "UNIQUENESS_SCORE_HIGH": 3 + } + }, + "ColumnDataProfile": { + "options": { + "(google.api.resource).type": "dlp.googleapis.com/ColumnDataProfile", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/columnDataProfiles/{column_data_profile}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "profileStatus": { + "type": "ProfileStatus", + "id": 17 + }, + "state": { + "type": "State", + "id": 18 + }, + "profileLastGenerated": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "tableDataProfile": { + "type": "string", + "id": 4 + }, + "tableFullResource": { + "type": "string", + "id": 5 + }, + "datasetProjectId": { + "type": "string", + "id": 19 + }, + "datasetLocation": { + "type": "string", + "id": 20 + }, + "datasetId": { + "type": "string", + "id": 21 + }, + "tableId": { + "type": "string", + "id": 22 + }, + "column": { + "type": "string", + "id": 6 + }, + "sensitivityScore": { + "type": "SensitivityScore", + "id": 7 + }, + "dataRiskLevel": { + "type": "DataRiskLevel", + "id": 8 + }, + "columnInfoType": { + "type": "InfoTypeSummary", + "id": 9 + }, + "otherMatches": { + "rule": "repeated", + "type": "OtherInfoTypeSummary", + "id": 10 + }, + "estimatedNullPercentage": { + "type": "NullPercentageLevel", + "id": 23 + }, + "estimatedUniquenessScore": { + "type": "UniquenessScoreLevel", + "id": 24 + }, + "freeTextScore": { + "type": "double", + "id": 13 + }, + "columnType": { + "type": "ColumnDataType", + "id": 14 + }, + "policyState": { + "type": "ColumnPolicyState", + "id": 15 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "RUNNING": 1, + "DONE": 2 + } + }, + "ColumnDataType": { + "values": { + "COLUMN_DATA_TYPE_UNSPECIFIED": 0, + "TYPE_INT64": 1, + "TYPE_BOOL": 2, + "TYPE_FLOAT64": 3, + "TYPE_STRING": 4, + "TYPE_BYTES": 5, + "TYPE_TIMESTAMP": 6, + "TYPE_DATE": 7, + "TYPE_TIME": 8, + "TYPE_DATETIME": 9, + "TYPE_GEOGRAPHY": 10, + "TYPE_NUMERIC": 11, + "TYPE_RECORD": 12, + "TYPE_BIGNUMERIC": 13, + "TYPE_JSON": 14, + "TYPE_INTERVAL": 15, + "TYPE_RANGE_DATE": 16, + "TYPE_RANGE_DATETIME": 17, + "TYPE_RANGE_TIMESTAMP": 18 + } + }, + "ColumnPolicyState": { + "values": { + "COLUMN_POLICY_STATE_UNSPECIFIED": 0, + "COLUMN_POLICY_TAGGED": 1 + } + } + } + }, + "FileStoreDataProfile": { + "options": { + "(google.api.resource).type": "dlp.googleapis.com/FileStoreDataProfile", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/fileStoreDataProfiles/{file_store_data_profile}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "dataSourceType": { + "type": "DataSourceType", + "id": 2 + }, + "projectDataProfile": { + "type": "string", + "id": 3 + }, + "projectId": { + "type": "string", + "id": 4 + }, + "fileStoreLocation": { + "type": "string", + "id": 5 + }, + "dataStorageLocations": { + "rule": "repeated", + "type": "string", + "id": 19 + }, + "locationType": { + "type": "string", + "id": 20 + }, + "fileStorePath": { + "type": "string", + "id": 6 + }, + "fullResource": { + "type": "string", + "id": 24 + }, + "configSnapshot": { + "type": "DataProfileConfigSnapshot", + "id": 7 + }, + "profileStatus": { + "type": "ProfileStatus", + "id": 8 + }, + "state": { + "type": "State", + "id": 9 + }, + "profileLastGenerated": { + "type": "google.protobuf.Timestamp", + "id": 10 + }, + "resourceVisibility": { + "type": "ResourceVisibility", + "id": 11 + }, + "sensitivityScore": { + "type": "SensitivityScore", + "id": 12 + }, + "dataRiskLevel": { + "type": "DataRiskLevel", + "id": 13 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 14 + }, + "lastModifiedTime": { + "type": "google.protobuf.Timestamp", + "id": 15 + }, + "fileClusterSummaries": { + "rule": "repeated", + "type": "FileClusterSummary", + "id": 16 + }, + "resourceAttributes": { + "keyType": "string", + "type": "Value", + "id": 17 + }, + "resourceLabels": { + "keyType": "string", + "type": "string", + "id": 18 + }, + "fileStoreInfoTypeSummaries": { + "rule": "repeated", + "type": "FileStoreInfoTypeSummary", + "id": 21 + }, + "sampleFindingsTable": { + "type": "BigQueryTable", + "id": 22 + }, + "fileStoreIsEmpty": { + "type": "bool", + "id": 23 + }, + "tags": { + "rule": "repeated", + "type": "Tag", + "id": 25 + }, + "relatedResources": { + "rule": "repeated", + "type": "RelatedResource", + "id": 26 + }, + "domains": { + "rule": "repeated", + "type": "Domain", + "id": 27 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "RUNNING": 1, + "DONE": 2 + } + } + } + }, + "Tag": { + "fields": { + "namespacedTagValue": { + "type": "string", + "id": 1 + }, + "key": { + "type": "string", + "id": 2 + }, + "value": { + "type": "string", + "id": 3 + } + } + }, + "TagFilters": { + "fields": { + "tagFilters": { + "rule": "repeated", + "type": "TagFilter", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "TagFilter": { + "oneofs": { + "format": { + "oneof": [ + "namespacedTagValue", + "namespacedTagKey" + ] + } + }, + "fields": { + "namespacedTagValue": { + "type": "string", + "id": 1 + }, + "namespacedTagKey": { + "type": "string", + "id": 2 + } + } + }, + "RelatedResource": { + "fields": { + "fullResource": { + "type": "string", + "id": 1 + } + } + }, + "FileStoreInfoTypeSummary": { + "fields": { + "infoType": { + "type": "InfoType", + "id": 1 + } + } + }, + "FileExtensionInfo": { + "fields": { + "fileExtension": { + "type": "string", + "id": 1 + } + } + }, + "FileClusterSummary": { + "fields": { + "fileClusterType": { + "type": "FileClusterType", + "id": 1 + }, + "fileStoreInfoTypeSummaries": { + "rule": "repeated", + "type": "FileStoreInfoTypeSummary", + "id": 2 + }, + "sensitivityScore": { + "type": "SensitivityScore", + "id": 3 + }, + "dataRiskLevel": { + "type": "DataRiskLevel", + "id": 4 + }, + "errors": { + "rule": "repeated", + "type": "Error", + "id": 6 + }, + "fileExtensionsScanned": { + "rule": "repeated", + "type": "FileExtensionInfo", + "id": 7 + }, + "fileExtensionsSeen": { + "rule": "repeated", + "type": "FileExtensionInfo", + "id": 8 + }, + "noFilesExist": { + "type": "bool", + "id": 9 + } + } + }, + "GetProjectDataProfileRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/ProjectDataProfile" + } + } + } + }, + "GetFileStoreDataProfileRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/ProjectDataProfile" + } + } + } + }, + "ListFileStoreDataProfilesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dlp.googleapis.com/FileStoreDataProfile" + } + }, + "pageToken": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListFileStoreDataProfilesResponse": { + "fields": { + "fileStoreDataProfiles": { + "rule": "repeated", + "type": "FileStoreDataProfile", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeleteFileStoreDataProfileRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/FileStoreDataProfile" + } + } + } + }, + "GetTableDataProfileRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/TableDataProfile" + } + } + } + }, + "GetColumnDataProfileRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/ColumnDataProfile" + } + } + } + }, + "DataProfilePubSubCondition": { + "fields": { + "expressions": { + "type": "PubSubExpressions", + "id": 1 + } + }, + "nested": { + "ProfileScoreBucket": { + "values": { + "PROFILE_SCORE_BUCKET_UNSPECIFIED": 0, + "HIGH": 1, + "MEDIUM_OR_HIGH": 2 + } + }, + "PubSubCondition": { + "oneofs": { + "value": { + "oneof": [ + "minimumRiskScore", + "minimumSensitivityScore" + ] + } + }, + "fields": { + "minimumRiskScore": { + "type": "ProfileScoreBucket", + "id": 1 + }, + "minimumSensitivityScore": { + "type": "ProfileScoreBucket", + "id": 2 + } + } + }, + "PubSubExpressions": { + "fields": { + "logicalOperator": { + "type": "PubSubLogicalOperator", + "id": 1 + }, + "conditions": { + "rule": "repeated", + "type": "PubSubCondition", + "id": 2 + } + }, + "nested": { + "PubSubLogicalOperator": { + "values": { + "LOGICAL_OPERATOR_UNSPECIFIED": 0, + "OR": 1, + "AND": 2 + } + } + } + } + } + }, + "DataProfilePubSubMessage": { + "fields": { + "profile": { + "type": "TableDataProfile", + "id": 1 + }, + "fileStoreProfile": { + "type": "FileStoreDataProfile", + "id": 3 + }, + "event": { + "type": "DataProfileAction.EventType", + "id": 2 + } + } + }, + "CreateConnectionRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dlp.googleapis.com/Connection" + } + }, + "connection": { + "type": "Connection", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetConnectionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/Connection" + } + } + } + }, + "ListConnectionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dlp.googleapis.com/Connection" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "SearchConnectionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "dlp.googleapis.com/Connection" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListConnectionsResponse": { + "fields": { + "connections": { + "rule": "repeated", + "type": "Connection", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "SearchConnectionsResponse": { + "fields": { + "connections": { + "rule": "repeated", + "type": "Connection", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "UpdateConnectionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/Connection" + } + }, + "connection": { + "type": "Connection", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteConnectionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/Connection" + } + } + } + }, + "Connection": { + "options": { + "(google.api.resource).type": "dlp.googleapis.com/Connection", + "(google.api.resource).pattern": "organizations/{organization}/locations/{location}/connections/{connection}" + }, + "oneofs": { + "properties": { + "oneof": [ + "cloudSql" + ] + } + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "ConnectionState", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "errors": { + "rule": "repeated", + "type": "Error", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "cloudSql": { + "type": "CloudSqlProperties", + "id": 4 + } + } + }, + "ConnectionState": { + "values": { + "CONNECTION_STATE_UNSPECIFIED": 0, + "MISSING_CREDENTIALS": 1, + "AVAILABLE": 2, + "ERROR": 3 + } + }, + "SecretManagerCredential": { + "fields": { + "username": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "passwordSecretVersionName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "CloudSqlIamCredential": { + "fields": {} + }, + "CloudSqlProperties": { + "oneofs": { + "credential": { + "oneof": [ + "usernamePassword", + "cloudSqlIam" + ] + } + }, + "fields": { + "connectionName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "usernamePassword": { + "type": "SecretManagerCredential", + "id": 2 + }, + "cloudSqlIam": { + "type": "CloudSqlIamCredential", + "id": 3 + }, + "maxConnections": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "databaseEngine": { + "type": "DatabaseEngine", + "id": 7, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "DatabaseEngine": { + "values": { + "DATABASE_ENGINE_UNKNOWN": 0, + "DATABASE_ENGINE_MYSQL": 1, + "DATABASE_ENGINE_POSTGRES": 2 + } + } + } + }, + "DeleteTableDataProfileRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "dlp.googleapis.com/TableDataProfile" + } + } + } + }, + "DataSourceType": { + "fields": { + "dataSource": { + "type": "string", + "id": 1 + } + } + }, + "FileClusterType": { + "oneofs": { + "fileClusterType": { + "oneof": [ + "cluster" + ] + } + }, + "fields": { + "cluster": { + "type": "Cluster", + "id": 1 + } + }, + "nested": { + "Cluster": { + "values": { + "CLUSTER_UNSPECIFIED": 0, + "CLUSTER_UNKNOWN": 1, + "CLUSTER_TEXT": 2, + "CLUSTER_STRUCTURED_DATA": 3, + "CLUSTER_SOURCE_CODE": 4, + "CLUSTER_RICH_DOCUMENT": 5, + "CLUSTER_IMAGE": 6, + "CLUSTER_ARCHIVE": 7, + "CLUSTER_MULTIMEDIA": 8, + "CLUSTER_EXECUTABLE": 9, + "CLUSTER_AI_MODEL": 10 + } + } + } + }, + "ProcessingLocation": { + "fields": { + "imageFallbackLocation": { + "type": "ImageFallbackLocation", + "id": 1 + }, + "documentFallbackLocation": { + "type": "DocumentFallbackLocation", + "id": 2 + } + }, + "nested": { + "MultiRegionProcessing": { + "fields": {} + }, + "GlobalProcessing": { + "fields": {} + }, + "ImageFallbackLocation": { + "fields": { + "multiRegionProcessing": { + "type": "MultiRegionProcessing", + "id": 100 + }, + "globalProcessing": { + "type": "GlobalProcessing", + "id": 200 + } + } + }, + "DocumentFallbackLocation": { + "fields": { + "multiRegionProcessing": { + "type": "MultiRegionProcessing", + "id": 100 + }, + "globalProcessing": { + "type": "GlobalProcessing", + "id": 200 + } + } + } + } + }, + "SaveToGcsFindingsOutput": { + "fields": { + "findings": { + "rule": "repeated", + "type": "Finding", + "id": 1 + } + } + }, + "Domain": { + "fields": { + "category": { + "type": "Category", + "id": 1 + }, + "signals": { + "rule": "repeated", + "type": "Signal", + "id": 2 + } + }, + "nested": { + "Category": { + "values": { + "CATEGORY_UNSPECIFIED": 0, + "AI": 1, + "CODE": 2 + } + }, + "Signal": { + "values": { + "SIGNAL_UNSPECIFIED": 0, + "MODEL": 1, + "TEXT_EMBEDDING": 2, + "EMBEDDING": 7, + "VERTEX_PLUGIN": 3, + "VECTOR_PLUGIN": 4, + "SOURCE_CODE": 5, + "SERVICE": 6 + } + } + } + }, + "InfoType": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "version": { + "type": "string", + "id": 2 + }, + "sensitivityScore": { + "type": "SensitivityScore", + "id": 3 + } + } + }, + "SensitivityScore": { + "fields": { + "score": { + "type": "SensitivityScoreLevel", + "id": 1 + } + }, + "nested": { + "SensitivityScoreLevel": { + "values": { + "SENSITIVITY_SCORE_UNSPECIFIED": 0, + "SENSITIVITY_LOW": 10, + "SENSITIVITY_UNKNOWN": 12, + "SENSITIVITY_MODERATE": 20, + "SENSITIVITY_HIGH": 30 + } + } + } + }, + "Likelihood": { + "values": { + "LIKELIHOOD_UNSPECIFIED": 0, + "VERY_UNLIKELY": 1, + "UNLIKELY": 2, + "POSSIBLE": 3, + "LIKELY": 4, + "VERY_LIKELY": 5 + } + }, + "StoredType": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + }, + "CustomInfoType": { + "oneofs": { + "type": { + "oneof": [ + "dictionary", + "regex", + "surrogateType", + "storedType", + "metadataKeyValueExpression" + ] + } + }, + "fields": { + "infoType": { + "type": "InfoType", + "id": 1 + }, + "likelihood": { + "type": "Likelihood", + "id": 6 + }, + "dictionary": { + "type": "Dictionary", + "id": 2 + }, + "regex": { + "type": "Regex", + "id": 3 + }, + "surrogateType": { + "type": "SurrogateType", + "id": 4 + }, + "storedType": { + "type": "StoredType", + "id": 5 + }, + "metadataKeyValueExpression": { + "type": "MetadataKeyValueExpression", + "id": 10 + }, + "detectionRules": { + "rule": "repeated", + "type": "DetectionRule", + "id": 7 + }, + "exclusionType": { + "type": "ExclusionType", + "id": 8 + }, + "sensitivityScore": { + "type": "SensitivityScore", + "id": 9 + } + }, + "nested": { + "Dictionary": { + "oneofs": { + "source": { + "oneof": [ + "wordList", + "cloudStoragePath" + ] + } + }, + "fields": { + "wordList": { + "type": "WordList", + "id": 1 + }, + "cloudStoragePath": { + "type": "CloudStoragePath", + "id": 3 + } + }, + "nested": { + "WordList": { + "fields": { + "words": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + } + } + }, + "Regex": { + "fields": { + "pattern": { + "type": "string", + "id": 1 + }, + "groupIndexes": { + "rule": "repeated", + "type": "int32", + "id": 2 + } + } + }, + "SurrogateType": { + "fields": {} + }, + "MetadataKeyValueExpression": { + "fields": { + "keyRegex": { + "type": "string", + "id": 1 + }, + "valueRegex": { + "type": "string", + "id": 2 + } + } + }, + "DetectionRule": { + "oneofs": { + "type": { + "oneof": [ + "hotwordRule" + ] + } + }, + "fields": { + "hotwordRule": { + "type": "HotwordRule", + "id": 1 + } + }, + "nested": { + "Proximity": { + "fields": { + "windowBefore": { + "type": "int32", + "id": 1 + }, + "windowAfter": { + "type": "int32", + "id": 2 + } + } + }, + "LikelihoodAdjustment": { + "oneofs": { + "adjustment": { + "oneof": [ + "fixedLikelihood", + "relativeLikelihood" + ] + } + }, + "fields": { + "fixedLikelihood": { + "type": "Likelihood", + "id": 1 + }, + "relativeLikelihood": { + "type": "int32", + "id": 2 + } + } + }, + "HotwordRule": { + "fields": { + "hotwordRegex": { + "type": "Regex", + "id": 1 + }, + "proximity": { + "type": "Proximity", + "id": 2 + }, + "likelihoodAdjustment": { + "type": "LikelihoodAdjustment", + "id": 3 + } + } + } + } + }, + "ExclusionType": { + "values": { + "EXCLUSION_TYPE_UNSPECIFIED": 0, + "EXCLUSION_TYPE_EXCLUDE": 1 + } + } + } + }, + "FieldId": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "PartitionId": { + "fields": { + "projectId": { + "type": "string", + "id": 2 + }, + "namespaceId": { + "type": "string", + "id": 4 + } + } + }, + "KindExpression": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "DatastoreOptions": { + "fields": { + "partitionId": { + "type": "PartitionId", + "id": 1 + }, + "kind": { + "type": "KindExpression", + "id": 2 + } + } + }, + "FileType": { + "values": { + "FILE_TYPE_UNSPECIFIED": 0, + "BINARY_FILE": 1, + "TEXT_FILE": 2, + "IMAGE": 3, + "WORD": 5, + "PDF": 6, + "AVRO": 7, + "CSV": 8, + "TSV": 9, + "POWERPOINT": 11, + "EXCEL": 12 + } + }, + "CloudStorageRegexFileSet": { + "fields": { + "bucketName": { + "type": "string", + "id": 1 + }, + "includeRegex": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "excludeRegex": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "CloudStorageOptions": { + "fields": { + "fileSet": { + "type": "FileSet", + "id": 1 + }, + "bytesLimitPerFile": { + "type": "int64", + "id": 4 + }, + "bytesLimitPerFilePercent": { + "type": "int32", + "id": 8 + }, + "fileTypes": { + "rule": "repeated", + "type": "FileType", + "id": 5 + }, + "sampleMethod": { + "type": "SampleMethod", + "id": 6 + }, + "filesLimitPercent": { + "type": "int32", + "id": 7 + } + }, + "nested": { + "FileSet": { + "fields": { + "url": { + "type": "string", + "id": 1 + }, + "regexFileSet": { + "type": "CloudStorageRegexFileSet", + "id": 2 + } + } + }, + "SampleMethod": { + "values": { + "SAMPLE_METHOD_UNSPECIFIED": 0, + "TOP": 1, + "RANDOM_START": 2 + } + } + } + }, + "CloudStorageFileSet": { + "fields": { + "url": { + "type": "string", + "id": 1 + } + } + }, + "CloudStoragePath": { + "fields": { + "path": { + "type": "string", + "id": 1 + } + } + }, + "BigQueryOptions": { + "fields": { + "tableReference": { + "type": "BigQueryTable", + "id": 1 + }, + "identifyingFields": { + "rule": "repeated", + "type": "FieldId", + "id": 2 + }, + "rowsLimit": { + "type": "int64", + "id": 3 + }, + "rowsLimitPercent": { + "type": "int32", + "id": 6 + }, + "sampleMethod": { + "type": "SampleMethod", + "id": 4 + }, + "excludedFields": { + "rule": "repeated", + "type": "FieldId", + "id": 5 + }, + "includedFields": { + "rule": "repeated", + "type": "FieldId", + "id": 7 + } + }, + "nested": { + "SampleMethod": { + "values": { + "SAMPLE_METHOD_UNSPECIFIED": 0, + "TOP": 1, + "RANDOM_START": 2 + } + } + } + }, + "StorageConfig": { + "oneofs": { + "type": { + "oneof": [ + "datastoreOptions", + "cloudStorageOptions", + "bigQueryOptions", + "hybridOptions" + ] + } + }, + "fields": { + "datastoreOptions": { + "type": "DatastoreOptions", + "id": 2 + }, + "cloudStorageOptions": { + "type": "CloudStorageOptions", + "id": 3 + }, + "bigQueryOptions": { + "type": "BigQueryOptions", + "id": 4 + }, + "hybridOptions": { + "type": "HybridOptions", + "id": 9 + }, + "timespanConfig": { + "type": "TimespanConfig", + "id": 6 + } + }, + "nested": { + "TimespanConfig": { + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "timestampField": { + "type": "FieldId", + "id": 3 + }, + "enableAutoPopulationOfTimespanConfig": { + "type": "bool", + "id": 4 + } + } + } + } + }, + "HybridOptions": { + "fields": { + "description": { + "type": "string", + "id": 1 + }, + "requiredFindingLabelKeys": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "tableOptions": { + "type": "TableOptions", + "id": 4 + } + } + }, + "BigQueryKey": { + "fields": { + "tableReference": { + "type": "BigQueryTable", + "id": 1 + }, + "rowNumber": { + "type": "int64", + "id": 2 + } + } + }, + "DatastoreKey": { + "fields": { + "entityKey": { + "type": "Key", + "id": 1 + } + } + }, + "Key": { + "fields": { + "partitionId": { + "type": "PartitionId", + "id": 1 + }, + "path": { + "rule": "repeated", + "type": "PathElement", + "id": 2 + } + }, + "nested": { + "PathElement": { + "oneofs": { + "idType": { + "oneof": [ + "id", + "name" + ] + } + }, + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "id": { + "type": "int64", + "id": 2 + }, + "name": { + "type": "string", + "id": 3 + } + } + } + } + }, + "RecordKey": { + "oneofs": { + "type": { + "oneof": [ + "datastoreKey", + "bigQueryKey" + ] + } + }, + "fields": { + "datastoreKey": { + "type": "DatastoreKey", + "id": 2 + }, + "bigQueryKey": { + "type": "BigQueryKey", + "id": 3 + }, + "idValues": { + "rule": "repeated", + "type": "string", + "id": 5 + } + } + }, + "BigQueryTable": { + "fields": { + "projectId": { + "type": "string", + "id": 1 + }, + "datasetId": { + "type": "string", + "id": 2 + }, + "tableId": { + "type": "string", + "id": 3 + } + } + }, + "TableReference": { + "fields": { + "datasetId": { + "type": "string", + "id": 1 + }, + "tableId": { + "type": "string", + "id": 2 + }, + "projectId": { + "type": "string", + "id": 3 + } + } + }, + "BigQueryField": { + "fields": { + "table": { + "type": "BigQueryTable", + "id": 1 + }, + "field": { + "type": "FieldId", + "id": 2 + } + } + }, + "EntityId": { + "fields": { + "field": { + "type": "FieldId", + "id": 1 + } + } + }, + "TableOptions": { + "fields": { + "identifyingFields": { + "rule": "repeated", + "type": "FieldId", + "id": 1 + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI" + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "apiVersion": { + "type": "string", + "id": 525000001, + "extend": "google.protobuf.ServiceOptions" + }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + }, + "selectiveGapicGeneration": { + "type": "SelectiveGapicGeneration", + "id": 3 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 + }, + "restReferenceDocumentationUri": { + "type": "string", + "id": 111 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "experimentalFeatures": { + "type": "ExperimentalFeatures", + "id": 2 + } + }, + "nested": { + "ExperimentalFeatures": { + "fields": { + "restAsyncIoEnabled": { + "type": "bool", + "id": 1 + }, + "protobufPythonicTypesEnabled": { + "type": "bool", + "id": 2 + }, + "unversionedPackageDisabled": { + "type": "bool", + "id": 3 + } + } + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "renamedResources": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "ignoredResources": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "forcedNamespaceAliases": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "handwrittenSignatures": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + }, + "autoPopulatedFields": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "LongRunning": { + "fields": { + "initialPollDelay": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "pollDelayMultiplier": { + "type": "float", + "id": 2 + }, + "maxPollDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "totalPollTimeout": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + } + } + }, + "ClientLibraryOrganization": { + "values": { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4, + "SHOPPING": 5, + "GEO": 6, + "GENERATIVE_AI": 7 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, + "SelectiveGapicGeneration": { + "fields": { + "methods": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "generateOmittedAsInternal": { + "type": "bool", + "id": 2 + } + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "edition": "proto2", + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ] + }, + "Edition": { + "edition": "proto2", + "values": { + "EDITION_UNKNOWN": 0, + "EDITION_LEGACY": 900, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_2024": 1001, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + "EDITION_MAX": 2147483647 + } + }, + "FileDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10 + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11 + }, + "optionDependency": { + "rule": "repeated", + "type": "string", + "id": 15 + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 11 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "edition": "proto2", + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "declaration": { + "rule": "repeated", + "type": "Declaration", + "id": 2, + "options": { + "retention": "RETENTION_SOURCE" + } + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "verification": { + "type": "VerificationState", + "id": 3, + "options": { + "default": "UNVERIFIED", + "retention": "RETENTION_SOURCE" + } + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "Declaration": { + "fields": { + "number": { + "type": "int32", + "id": 1 + }, + "fullName": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "reserved": { + "type": "bool", + "id": 5 + }, + "repeated": { + "type": "bool", + "id": 6 + } + }, + "reserved": [ + [ + 4, + 4 + ] + ] + }, + "VerificationState": { + "values": { + "DECLARATION": 0, + "UNVERIFIED": 1 + } + } + } + }, + "FieldDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REPEATED": 3, + "LABEL_REQUIRED": 2 + } + } + } + }, + "OneofDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 6 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + }, + "reserved": [ + [ + 4, + 4 + ], + "stream" + ] + }, + "MethodDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "edition": "proto2", + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 42, + 42 + ], + "php_generic_services", + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "edition": "proto2", + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 12 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "edition": "proto2", + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false, + "deprecated": true + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "targets": { + "rule": "repeated", + "type": "OptionTargetType", + "id": 19 + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 + }, + "featureSupport": { + "type": "FeatureSupport", + "id": 22 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 18, + 18 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + }, + "OptionRetention": { + "values": { + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2 + } + }, + "OptionTargetType": { + "values": { + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9 + } + }, + "EditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "value": { + "type": "string", + "id": 2 + } + } + }, + "FeatureSupport": { + "fields": { + "editionIntroduced": { + "type": "Edition", + "id": 1 + }, + "editionDeprecated": { + "type": "Edition", + "id": 2 + }, + "deprecationWarning": { + "type": "string", + "id": 3 + }, + "editionRemoved": { + "type": "Edition", + "id": 4 + } + } + } + } + }, + "OneofOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "edition": "proto2", + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "featureSupport": { + "type": "FieldOptions.FeatureSupport", + "id": 4 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 34 + }, + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "features": { + "type": "FeatureSet", + "id": 35 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "edition": "proto2", + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "FeatureSet": { + "edition": "proto2", + "fields": { + "fieldPresence": { + "type": "FieldPresence", + "id": 1, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_2023", + "edition_defaults.value": "EXPLICIT" + } + }, + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "OPEN" + } + }, + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "PACKED" + } + }, + "utf8Validation": { + "type": "Utf8Validation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" + } + }, + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_LEGACY", + "edition_defaults.value": "LENGTH_PREFIXED" + } + }, + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "ALLOW" + } + }, + "enforceNamingStyle": { + "type": "EnforceNamingStyle", + "id": 7, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_METHOD", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "STYLE2024" + } + }, + "defaultSymbolVisibility": { + "type": "VisibilityFeature.DefaultSymbolVisibility", + "id": 8, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "EXPORT_TOP_LEVEL" + } + } + }, + "extensions": [ + [ + 1000, + 9994 + ], + [ + 9995, + 9999 + ], + [ + 10000, + 10000 + ] + ], + "reserved": [ + [ + 999, + 999 + ] + ], + "nested": { + "FieldPresence": { + "values": { + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3 + } + }, + "EnumType": { + "values": { + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2 + } + }, + "RepeatedFieldEncoding": { + "values": { + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2 + } + }, + "Utf8Validation": { + "values": { + "UTF8_VALIDATION_UNKNOWN": 0, + "VERIFY": 2, + "NONE": 3 + }, + "reserved": [ + [ + 1, + 1 + ] + ] + }, + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } + }, + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } + }, + "EnforceNamingStyle": { + "values": { + "ENFORCE_NAMING_STYLE_UNKNOWN": 0, + "STYLE2024": 1, + "STYLE_LEGACY": 2 + } + }, + "VisibilityFeature": { + "fields": {}, + "reserved": [ + [ + 1, + 536870911 + ] + ], + "nested": { + "DefaultSymbolVisibility": { + "values": { + "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": 0, + "EXPORT_ALL": 1, + "EXPORT_TOP_LEVEL": 2, + "LOCAL_ALL": 3, + "STRICT": 4 + } + } + } + } + } + }, + "FeatureSetDefaults": { + "edition": "proto2", + "fields": { + "defaults": { + "rule": "repeated", + "type": "FeatureSetEditionDefault", + "id": 1 + }, + "minimumEdition": { + "type": "Edition", + "id": 4 + }, + "maximumEdition": { + "type": "Edition", + "id": 5 + } + }, + "nested": { + "FeatureSetEditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "overridableFeatures": { + "type": "FeatureSet", + "id": 4 + }, + "fixedFeatures": { + "type": "FeatureSet", + "id": 5 + } + }, + "reserved": [ + [ + 1, + 1 + ], + [ + 2, + 2 + ], + "features" + ] + } + } + }, + "SourceCodeInfo": { + "edition": "proto2", + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ], + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2, + "options": { + "packed": true + } + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "edition": "proto2", + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "SymbolVisibility": { + "edition": "proto2", + "values": { + "VISIBILITY_UNSET": 0, + "VISIBILITY_LOCAL": 1, + "VISIBILITY_EXPORT": 2 + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + } + } + }, + "rpc": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + }, + "type": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/type/timeofday;timeofday", + "java_multiple_files": true, + "java_outer_classname": "TimeOfDayProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "Date": { + "fields": { + "year": { + "type": "int32", + "id": 1 + }, + "month": { + "type": "int32", + "id": 2 + }, + "day": { + "type": "int32", + "id": 3 + } + } + }, + "DayOfWeek": { + "values": { + "DAY_OF_WEEK_UNSPECIFIED": 0, + "MONDAY": 1, + "TUESDAY": 2, + "WEDNESDAY": 3, + "THURSDAY": 4, + "FRIDAY": 5, + "SATURDAY": 6, + "SUNDAY": 7 + } + }, + "TimeOfDay": { + "fields": { + "hours": { + "type": "int32", + "id": 1 + }, + "minutes": { + "type": "int32", + "id": 2 + }, + "seconds": { + "type": "int32", + "id": 3 + }, + "nanos": { + "type": "int32", + "id": 4 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.activate_job_trigger.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.activate_job_trigger.js new file mode 100644 index 000000000..e1730b6cc --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.activate_job_trigger.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_ActivateJobTrigger_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the trigger to activate, for example + * `projects/dlp-test-project/jobTriggers/53234423`. + */ + // const name = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callActivateJobTrigger() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.activateJobTrigger(request); + console.log(response); + } + + callActivateJobTrigger(); + // [END dlp_v2_generated_DlpService_ActivateJobTrigger_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.cancel_dlp_job.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.cancel_dlp_job.js new file mode 100644 index 000000000..b997ff0e7 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.cancel_dlp_job.js @@ -0,0 +1,61 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_CancelDlpJob_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the DlpJob resource to be cancelled. + */ + // const name = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callCancelDlpJob() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.cancelDlpJob(request); + console.log(response); + } + + callCancelDlpJob(); + // [END dlp_v2_generated_DlpService_CancelDlpJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.create_connection.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.create_connection.js new file mode 100644 index 000000000..f5372e4bf --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.create_connection.js @@ -0,0 +1,72 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, connection) { + // [START dlp_v2_generated_DlpService_CreateConnection_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent resource name. + * The format of this value varies depending on the scope of the request + * (project or organization): + * + Projects scope: + * `projects/{project_id}/locations/{location_id}` + * + Organizations scope: + * `organizations/{org_id}/locations/{location_id}` + */ + // const parent = 'abc123' + /** + * Required. The connection resource. + */ + // const connection = {} + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callCreateConnection() { + // Construct request + const request = { + parent, + connection, + }; + + // Run request + const response = await dlpClient.createConnection(request); + console.log(response); + } + + callCreateConnection(); + // [END dlp_v2_generated_DlpService_CreateConnection_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.create_deidentify_template.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.create_deidentify_template.js new file mode 100644 index 000000000..b60ada7b9 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.create_deidentify_template.js @@ -0,0 +1,88 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, deidentifyTemplate) { + // [START dlp_v2_generated_DlpService_CreateDeidentifyTemplate_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent resource name. + * The format of this value varies depending on the scope of the request + * (project or organization) and whether you have specified a processing + * location (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + Organizations scope, location specified: + * `organizations/{org_id}/locations/{location_id}` + * + Organizations scope, no location specified (defaults to global): + * `organizations/{org_id}` + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * parent=projects/example-project/locations/europe-west3 + */ + // const parent = 'abc123' + /** + * Required. The DeidentifyTemplate to create. + */ + // const deidentifyTemplate = {} + /** + * The template id can contain uppercase and lowercase letters, + * numbers, and hyphens; that is, it must match the regular + * expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + * characters. Can be empty to allow the system to generate one. + */ + // const templateId = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callCreateDeidentifyTemplate() { + // Construct request + const request = { + parent, + deidentifyTemplate, + }; + + // Run request + const response = await dlpClient.createDeidentifyTemplate(request); + console.log(response); + } + + callCreateDeidentifyTemplate(); + // [END dlp_v2_generated_DlpService_CreateDeidentifyTemplate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.create_discovery_config.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.create_discovery_config.js new file mode 100644 index 000000000..f06cc05eb --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.create_discovery_config.js @@ -0,0 +1,83 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, discoveryConfig) { + // [START dlp_v2_generated_DlpService_CreateDiscoveryConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent resource name. + * The format of this value varies depending on the scope of the request + * (project or organization): + * + Projects scope: + * `projects/{project_id}/locations/{location_id}` + * + Organizations scope: + * `organizations/{org_id}/locations/{location_id}` + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * parent=projects/example-project/locations/europe-west3 + */ + // const parent = 'abc123' + /** + * Required. The DiscoveryConfig to create. + */ + // const discoveryConfig = {} + /** + * The config ID can contain uppercase and lowercase letters, + * numbers, and hyphens; that is, it must match the regular + * expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + * characters. Can be empty to allow the system to generate one. + */ + // const configId = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callCreateDiscoveryConfig() { + // Construct request + const request = { + parent, + discoveryConfig, + }; + + // Run request + const response = await dlpClient.createDiscoveryConfig(request); + console.log(response); + } + + callCreateDiscoveryConfig(); + // [END dlp_v2_generated_DlpService_CreateDiscoveryConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.create_dlp_job.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.create_dlp_job.js new file mode 100644 index 000000000..d436c1604 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.create_dlp_job.js @@ -0,0 +1,88 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dlp_v2_generated_DlpService_CreateDlpJob_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent resource name. + * The format of this value varies depending on whether you have specified a + * processing + * location (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * parent=projects/example-project/locations/europe-west3 + */ + // const parent = 'abc123' + /** + * An inspection job scans a storage repository for InfoTypes. + */ + // const inspectJob = {} + /** + * A risk analysis job calculates re-identification risk metrics for a + * BigQuery table. + */ + // const riskJob = {} + /** + * The job id can contain uppercase and lowercase letters, + * numbers, and hyphens; that is, it must match the regular + * expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + * characters. Can be empty to allow the system to generate one. + */ + // const jobId = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callCreateDlpJob() { + // Construct request + const request = { + parent, + }; + + // Run request + const response = await dlpClient.createDlpJob(request); + console.log(response); + } + + callCreateDlpJob(); + // [END dlp_v2_generated_DlpService_CreateDlpJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.create_inspect_template.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.create_inspect_template.js new file mode 100644 index 000000000..fb1cffac3 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.create_inspect_template.js @@ -0,0 +1,88 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, inspectTemplate) { + // [START dlp_v2_generated_DlpService_CreateInspectTemplate_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent resource name. + * The format of this value varies depending on the scope of the request + * (project or organization) and whether you have specified a processing + * location (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + Organizations scope, location specified: + * `organizations/{org_id}/locations/{location_id}` + * + Organizations scope, no location specified (defaults to global): + * `organizations/{org_id}` + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * parent=projects/example-project/locations/europe-west3 + */ + // const parent = 'abc123' + /** + * Required. The InspectTemplate to create. + */ + // const inspectTemplate = {} + /** + * The template id can contain uppercase and lowercase letters, + * numbers, and hyphens; that is, it must match the regular + * expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + * characters. Can be empty to allow the system to generate one. + */ + // const templateId = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callCreateInspectTemplate() { + // Construct request + const request = { + parent, + inspectTemplate, + }; + + // Run request + const response = await dlpClient.createInspectTemplate(request); + console.log(response); + } + + callCreateInspectTemplate(); + // [END dlp_v2_generated_DlpService_CreateInspectTemplate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.create_job_trigger.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.create_job_trigger.js new file mode 100644 index 000000000..181286166 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.create_job_trigger.js @@ -0,0 +1,84 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, jobTrigger) { + // [START dlp_v2_generated_DlpService_CreateJobTrigger_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent resource name. + * The format of this value varies depending on whether you have specified a + * processing + * location (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * parent=projects/example-project/locations/europe-west3 + */ + // const parent = 'abc123' + /** + * Required. The JobTrigger to create. + */ + // const jobTrigger = {} + /** + * The trigger id can contain uppercase and lowercase letters, + * numbers, and hyphens; that is, it must match the regular + * expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + * characters. Can be empty to allow the system to generate one. + */ + // const triggerId = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callCreateJobTrigger() { + // Construct request + const request = { + parent, + jobTrigger, + }; + + // Run request + const response = await dlpClient.createJobTrigger(request); + console.log(response); + } + + callCreateJobTrigger(); + // [END dlp_v2_generated_DlpService_CreateJobTrigger_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.create_stored_info_type.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.create_stored_info_type.js new file mode 100644 index 000000000..2e64d83a2 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.create_stored_info_type.js @@ -0,0 +1,88 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, config) { + // [START dlp_v2_generated_DlpService_CreateStoredInfoType_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent resource name. + * The format of this value varies depending on the scope of the request + * (project or organization) and whether you have specified a processing + * location (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + Organizations scope, location specified: + * `organizations/{org_id}/locations/{location_id}` + * + Organizations scope, no location specified (defaults to global): + * `organizations/{org_id}` + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * parent=projects/example-project/locations/europe-west3 + */ + // const parent = 'abc123' + /** + * Required. Configuration of the storedInfoType to create. + */ + // const config = {} + /** + * The storedInfoType ID can contain uppercase and lowercase letters, + * numbers, and hyphens; that is, it must match the regular + * expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + * characters. Can be empty to allow the system to generate one. + */ + // const storedInfoTypeId = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callCreateStoredInfoType() { + // Construct request + const request = { + parent, + config, + }; + + // Run request + const response = await dlpClient.createStoredInfoType(request); + console.log(response); + } + + callCreateStoredInfoType(); + // [END dlp_v2_generated_DlpService_CreateStoredInfoType_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.deidentify_content.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.deidentify_content.js new file mode 100644 index 000000000..3edb41636 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.deidentify_content.js @@ -0,0 +1,109 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START dlp_v2_generated_DlpService_DeidentifyContent_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Parent resource name. + * The format of this value varies depending on whether you have specified a + * processing + * location (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * parent=projects/example-project/locations/europe-west3 + */ + // const parent = 'abc123' + /** + * Configuration for the de-identification of the content item. + * Items specified here will override the template referenced by the + * deidentify_template_name argument. + */ + // const deidentifyConfig = {} + /** + * Configuration for the inspector. + * Items specified here will override the template referenced by the + * inspect_template_name argument. + */ + // const inspectConfig = {} + /** + * The item to de-identify. Will be treated as text. + * This value must be of type + * Table google.privacy.dlp.v2.Table if your + * deidentify_config google.privacy.dlp.v2.DeidentifyContentRequest.deidentify_config + * is a + * RecordTransformations google.privacy.dlp.v2.RecordTransformations + * object. + */ + // const item = {} + /** + * Template to use. Any configuration directly specified in + * inspect_config will override those set in the template. Singular fields + * that are set in this request will replace their corresponding fields in the + * template. Repeated fields are appended. Singular sub-messages and groups + * are recursively merged. + */ + // const inspectTemplateName = 'abc123' + /** + * Template to use. Any configuration directly specified in + * deidentify_config will override those set in the template. Singular fields + * that are set in this request will replace their corresponding fields in the + * template. Repeated fields are appended. Singular sub-messages and groups + * are recursively merged. + */ + // const deidentifyTemplateName = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callDeidentifyContent() { + // Construct request + const request = { + }; + + // Run request + const response = await dlpClient.deidentifyContent(request); + console.log(response); + } + + callDeidentifyContent(); + // [END dlp_v2_generated_DlpService_DeidentifyContent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_connection.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_connection.js new file mode 100644 index 000000000..7711a99c9 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_connection.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_DeleteConnection_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the Connection to be deleted, in the format: + * `projects/{project}/locations/{location}/connections/{connection}`. + */ + // const name = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callDeleteConnection() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.deleteConnection(request); + console.log(response); + } + + callDeleteConnection(); + // [END dlp_v2_generated_DlpService_DeleteConnection_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_deidentify_template.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_deidentify_template.js new file mode 100644 index 000000000..e9bf02910 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_deidentify_template.js @@ -0,0 +1,64 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_DeleteDeidentifyTemplate_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the organization and deidentify template to be + * deleted, for example + * `organizations/433245324/deidentifyTemplates/432452342` or + * projects/project-id/deidentifyTemplates/432452342. + */ + // const name = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callDeleteDeidentifyTemplate() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.deleteDeidentifyTemplate(request); + console.log(response); + } + + callDeleteDeidentifyTemplate(); + // [END dlp_v2_generated_DlpService_DeleteDeidentifyTemplate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_discovery_config.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_discovery_config.js new file mode 100644 index 000000000..1857e94d7 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_discovery_config.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_DeleteDiscoveryConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the project and the config, for example + * `projects/dlp-test-project/discoveryConfigs/53234423`. + */ + // const name = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callDeleteDiscoveryConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.deleteDiscoveryConfig(request); + console.log(response); + } + + callDeleteDiscoveryConfig(); + // [END dlp_v2_generated_DlpService_DeleteDiscoveryConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_dlp_job.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_dlp_job.js new file mode 100644 index 000000000..dcd8dda35 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_dlp_job.js @@ -0,0 +1,61 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_DeleteDlpJob_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the DlpJob resource to be deleted. + */ + // const name = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callDeleteDlpJob() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.deleteDlpJob(request); + console.log(response); + } + + callDeleteDlpJob(); + // [END dlp_v2_generated_DlpService_DeleteDlpJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_file_store_data_profile.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_file_store_data_profile.js new file mode 100644 index 000000000..025b79c4a --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_file_store_data_profile.js @@ -0,0 +1,61 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_DeleteFileStoreDataProfile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the file store data profile. + */ + // const name = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callDeleteFileStoreDataProfile() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.deleteFileStoreDataProfile(request); + console.log(response); + } + + callDeleteFileStoreDataProfile(); + // [END dlp_v2_generated_DlpService_DeleteFileStoreDataProfile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_inspect_template.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_inspect_template.js new file mode 100644 index 000000000..58c4a0edf --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_inspect_template.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_DeleteInspectTemplate_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the organization and inspectTemplate to be + * deleted, for example `organizations/433245324/inspectTemplates/432452342` + * or projects/project-id/inspectTemplates/432452342. + */ + // const name = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callDeleteInspectTemplate() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.deleteInspectTemplate(request); + console.log(response); + } + + callDeleteInspectTemplate(); + // [END dlp_v2_generated_DlpService_DeleteInspectTemplate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_job_trigger.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_job_trigger.js new file mode 100644 index 000000000..cfc4b62ab --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_job_trigger.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_DeleteJobTrigger_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the project and the triggeredJob, for example + * `projects/dlp-test-project/jobTriggers/53234423`. + */ + // const name = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callDeleteJobTrigger() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.deleteJobTrigger(request); + console.log(response); + } + + callDeleteJobTrigger(); + // [END dlp_v2_generated_DlpService_DeleteJobTrigger_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_stored_info_type.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_stored_info_type.js new file mode 100644 index 000000000..91a844ad5 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_stored_info_type.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_DeleteStoredInfoType_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the organization and storedInfoType to be + * deleted, for example `organizations/433245324/storedInfoTypes/432452342` or + * projects/project-id/storedInfoTypes/432452342. + */ + // const name = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callDeleteStoredInfoType() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.deleteStoredInfoType(request); + console.log(response); + } + + callDeleteStoredInfoType(); + // [END dlp_v2_generated_DlpService_DeleteStoredInfoType_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_table_data_profile.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_table_data_profile.js new file mode 100644 index 000000000..1e0404789 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.delete_table_data_profile.js @@ -0,0 +1,61 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_DeleteTableDataProfile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the table data profile. + */ + // const name = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callDeleteTableDataProfile() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.deleteTableDataProfile(request); + console.log(response); + } + + callDeleteTableDataProfile(); + // [END dlp_v2_generated_DlpService_DeleteTableDataProfile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.finish_dlp_job.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.finish_dlp_job.js new file mode 100644 index 000000000..11868f090 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.finish_dlp_job.js @@ -0,0 +1,61 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_FinishDlpJob_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the DlpJob resource to be finished. + */ + // const name = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callFinishDlpJob() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.finishDlpJob(request); + console.log(response); + } + + callFinishDlpJob(); + // [END dlp_v2_generated_DlpService_FinishDlpJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_column_data_profile.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_column_data_profile.js new file mode 100644 index 000000000..777289b73 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_column_data_profile.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_GetColumnDataProfile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name, for example + * `organizations/12345/locations/us/columnDataProfiles/53234423`. + */ + // const name = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callGetColumnDataProfile() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.getColumnDataProfile(request); + console.log(response); + } + + callGetColumnDataProfile(); + // [END dlp_v2_generated_DlpService_GetColumnDataProfile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_connection.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_connection.js new file mode 100644 index 000000000..1a658d97a --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_connection.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_GetConnection_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name in the format: + * `projects/{project}/locations/{location}/connections/{connection}`. + */ + // const name = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callGetConnection() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.getConnection(request); + console.log(response); + } + + callGetConnection(); + // [END dlp_v2_generated_DlpService_GetConnection_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_deidentify_template.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_deidentify_template.js new file mode 100644 index 000000000..ce6bc810e --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_deidentify_template.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_GetDeidentifyTemplate_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the organization and deidentify template to be + * read, for example `organizations/433245324/deidentifyTemplates/432452342` + * or projects/project-id/deidentifyTemplates/432452342. + */ + // const name = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callGetDeidentifyTemplate() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.getDeidentifyTemplate(request); + console.log(response); + } + + callGetDeidentifyTemplate(); + // [END dlp_v2_generated_DlpService_GetDeidentifyTemplate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_discovery_config.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_discovery_config.js new file mode 100644 index 000000000..38aa806f8 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_discovery_config.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_GetDiscoveryConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the project and the configuration, for example + * `projects/dlp-test-project/discoveryConfigs/53234423`. + */ + // const name = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callGetDiscoveryConfig() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.getDiscoveryConfig(request); + console.log(response); + } + + callGetDiscoveryConfig(); + // [END dlp_v2_generated_DlpService_GetDiscoveryConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_dlp_job.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_dlp_job.js new file mode 100644 index 000000000..7488ab918 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_dlp_job.js @@ -0,0 +1,61 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_GetDlpJob_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the DlpJob resource. + */ + // const name = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callGetDlpJob() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.getDlpJob(request); + console.log(response); + } + + callGetDlpJob(); + // [END dlp_v2_generated_DlpService_GetDlpJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_file_store_data_profile.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_file_store_data_profile.js new file mode 100644 index 000000000..2b97a8dc3 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_file_store_data_profile.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_GetFileStoreDataProfile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name, for example + * `organizations/12345/locations/us/fileStoreDataProfiles/53234423`. + */ + // const name = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callGetFileStoreDataProfile() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.getFileStoreDataProfile(request); + console.log(response); + } + + callGetFileStoreDataProfile(); + // [END dlp_v2_generated_DlpService_GetFileStoreDataProfile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_inspect_template.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_inspect_template.js new file mode 100644 index 000000000..d5b456bcc --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_inspect_template.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_GetInspectTemplate_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the organization and inspectTemplate to be read, + * for example `organizations/433245324/inspectTemplates/432452342` or + * projects/project-id/inspectTemplates/432452342. + */ + // const name = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callGetInspectTemplate() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.getInspectTemplate(request); + console.log(response); + } + + callGetInspectTemplate(); + // [END dlp_v2_generated_DlpService_GetInspectTemplate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_job_trigger.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_job_trigger.js new file mode 100644 index 000000000..6d2c00bb0 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_job_trigger.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_GetJobTrigger_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the project and the triggeredJob, for example + * `projects/dlp-test-project/jobTriggers/53234423`. + */ + // const name = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callGetJobTrigger() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.getJobTrigger(request); + console.log(response); + } + + callGetJobTrigger(); + // [END dlp_v2_generated_DlpService_GetJobTrigger_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_project_data_profile.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_project_data_profile.js new file mode 100644 index 000000000..0a231c0d8 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_project_data_profile.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_GetProjectDataProfile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name, for example + * `organizations/12345/locations/us/projectDataProfiles/53234423`. + */ + // const name = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callGetProjectDataProfile() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.getProjectDataProfile(request); + console.log(response); + } + + callGetProjectDataProfile(); + // [END dlp_v2_generated_DlpService_GetProjectDataProfile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_stored_info_type.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_stored_info_type.js new file mode 100644 index 000000000..123684df6 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_stored_info_type.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_GetStoredInfoType_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the organization and storedInfoType to be read, + * for example `organizations/433245324/storedInfoTypes/432452342` or + * projects/project-id/storedInfoTypes/432452342. + */ + // const name = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callGetStoredInfoType() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.getStoredInfoType(request); + console.log(response); + } + + callGetStoredInfoType(); + // [END dlp_v2_generated_DlpService_GetStoredInfoType_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_table_data_profile.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_table_data_profile.js new file mode 100644 index 000000000..277c18380 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.get_table_data_profile.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_GetTableDataProfile_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name, for example + * `organizations/12345/locations/us/tableDataProfiles/53234423`. + */ + // const name = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callGetTableDataProfile() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.getTableDataProfile(request); + console.log(response); + } + + callGetTableDataProfile(); + // [END dlp_v2_generated_DlpService_GetTableDataProfile_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.hybrid_inspect_dlp_job.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.hybrid_inspect_dlp_job.js new file mode 100644 index 000000000..c1252f98c --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.hybrid_inspect_dlp_job.js @@ -0,0 +1,66 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_HybridInspectDlpJob_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the job to execute a hybrid inspect on, for + * example `projects/dlp-test-project/dlpJob/53234423`. + */ + // const name = 'abc123' + /** + * The item to inspect. + */ + // const hybridItem = {} + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callHybridInspectDlpJob() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.hybridInspectDlpJob(request); + console.log(response); + } + + callHybridInspectDlpJob(); + // [END dlp_v2_generated_DlpService_HybridInspectDlpJob_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.hybrid_inspect_job_trigger.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.hybrid_inspect_job_trigger.js new file mode 100644 index 000000000..8c722e8c5 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.hybrid_inspect_job_trigger.js @@ -0,0 +1,66 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_HybridInspectJobTrigger_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the trigger to execute a hybrid inspect on, for + * example `projects/dlp-test-project/jobTriggers/53234423`. + */ + // const name = 'abc123' + /** + * The item to inspect. + */ + // const hybridItem = {} + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callHybridInspectJobTrigger() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.hybridInspectJobTrigger(request); + console.log(response); + } + + callHybridInspectJobTrigger(); + // [END dlp_v2_generated_DlpService_HybridInspectJobTrigger_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.inspect_content.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.inspect_content.js new file mode 100644 index 000000000..cf9aa33a2 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.inspect_content.js @@ -0,0 +1,88 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START dlp_v2_generated_DlpService_InspectContent_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Parent resource name. + * The format of this value varies depending on whether you have specified a + * processing + * location (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * parent=projects/example-project/locations/europe-west3 + */ + // const parent = 'abc123' + /** + * Configuration for the inspector. What specified here will override + * the template referenced by the inspect_template_name argument. + */ + // const inspectConfig = {} + /** + * The item to inspect. + */ + // const item = {} + /** + * Template to use. Any configuration directly specified in + * inspect_config will override those set in the template. Singular fields + * that are set in this request will replace their corresponding fields in the + * template. Repeated fields are appended. Singular sub-messages and groups + * are recursively merged. + */ + // const inspectTemplateName = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callInspectContent() { + // Construct request + const request = { + }; + + // Run request + const response = await dlpClient.inspectContent(request); + console.log(response); + } + + callInspectContent(); + // [END dlp_v2_generated_DlpService_InspectContent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_column_data_profiles.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_column_data_profiles.js new file mode 100644 index 000000000..af176ae45 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_column_data_profiles.js @@ -0,0 +1,126 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dlp_v2_generated_DlpService_ListColumnDataProfiles_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the organization or project, for + * example `organizations/433245324/locations/europe` or + * `projects/project-id/locations/asia`. + */ + // const parent = 'abc123' + /** + * Page token to continue retrieval. + */ + // const pageToken = 'abc123' + /** + * Size of the page. This value can be limited by the server. If zero, server + * returns a page of max size 100. + */ + // const pageSize = 1234 + /** + * Comma-separated list of fields to order by, followed by `asc` or `desc` + * postfix. This list is case insensitive. The default sorting order is + * ascending. Redundant space characters are insignificant. Only one order + * field at a time is allowed. + * Examples: + * * `project_id asc` + * * `table_id` + * * `sensitivity_level desc` + * Supported fields are: + * - `project_id`: The Google Cloud project ID. + * - `dataset_id`: The ID of a BigQuery dataset. + * - `table_id`: The ID of a BigQuery table. + * - `sensitivity_level`: How sensitive the data in a column is, at most. + * - `data_risk_level`: How much risk is associated with this data. + * - `profile_last_generated`: When the profile was last updated in epoch + * seconds. + */ + // const orderBy = 'abc123' + /** + * Allows filtering. + * Supported syntax: + * * Filter expressions are made up of one or more restrictions. + * * Restrictions can be combined by `AND` or `OR` logical operators. A + * sequence of restrictions implicitly uses `AND`. + * * A restriction has the form of `{field} {operator} {value}`. + * * Supported fields: + * - `table_data_profile_name`: The name of the related table data + * profile + * - `project_id`: The Google Cloud project ID (REQUIRED) + * - `dataset_id`: The BigQuery dataset ID (REQUIRED) + * - `table_id`: The BigQuery table ID (REQUIRED) + * - `field_id`: The ID of the BigQuery field + * - `info_type`: The infotype detected in the resource + * - `sensitivity_level`: HIGH|MEDIUM|LOW + * - `data_risk_level`: How much risk is associated with this data + * - `status_code`: An RPC status code as defined in + * https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + * - `profile_last_generated`: Date and time the profile was last + * generated + * * The operator must be `=` for project_id, dataset_id, and table_id. Other + * filters also support `!=`. The `profile_last_generated` filter also + * supports `<` and `>`. + * The syntax is based on https://google.aip.dev/160. + * Examples: + * * project_id = 12345 AND status_code = 1 + * * project_id = 12345 AND sensitivity_level = HIGH + * * project_id = 12345 AND info_type = STREET_ADDRESS + * * profile_last_generated < "2025-01-01T00:00:00.000Z" + * The length of this field should be no more than 500 characters. + */ + // const filter = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callListColumnDataProfiles() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dlpClient.listColumnDataProfilesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListColumnDataProfiles(); + // [END dlp_v2_generated_DlpService_ListColumnDataProfiles_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_connections.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_connections.js new file mode 100644 index 000000000..9ef9d929c --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_connections.js @@ -0,0 +1,79 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dlp_v2_generated_DlpService_ListConnections_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the organization or project, for + * example, `organizations/433245324/locations/europe` or + * `projects/project-id/locations/asia`. + */ + // const parent = 'abc123' + /** + * Optional. Number of results per page, max 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token from a previous page to return the next set of + * results. If set, all other request fields must match the original request. + */ + // const pageToken = 'abc123' + /** + * Optional. Supported field/value: `state` - MISSING|AVAILABLE|ERROR + * The syntax is based on https://google.aip.dev/160. + */ + // const filter = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callListConnections() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dlpClient.listConnectionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListConnections(); + // [END dlp_v2_generated_DlpService_ListConnections_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_deidentify_templates.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_deidentify_templates.js new file mode 100644 index 000000000..a9da8498f --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_deidentify_templates.js @@ -0,0 +1,101 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dlp_v2_generated_DlpService_ListDeidentifyTemplates_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent resource name. + * The format of this value varies depending on the scope of the request + * (project or organization) and whether you have specified a processing + * location (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + Organizations scope, location specified: + * `organizations/{org_id}/locations/{location_id}` + * + Organizations scope, no location specified (defaults to global): + * `organizations/{org_id}` + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * parent=projects/example-project/locations/europe-west3 + */ + // const parent = 'abc123' + /** + * Page token to continue retrieval. Comes from the previous call + * to `ListDeidentifyTemplates`. + */ + // const pageToken = 'abc123' + /** + * Size of the page. This value can be limited by the server. If zero server + * returns a page of max size 100. + */ + // const pageSize = 1234 + /** + * Comma-separated list of fields to order by, + * followed by `asc` or `desc` postfix. This list is case insensitive. The + * default sorting order is ascending. Redundant space characters are + * insignificant. + * Example: `name asc,update_time, create_time desc` + * Supported fields are: + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. + */ + // const orderBy = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callListDeidentifyTemplates() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dlpClient.listDeidentifyTemplatesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDeidentifyTemplates(); + // [END dlp_v2_generated_DlpService_ListDeidentifyTemplates_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_discovery_configs.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_discovery_configs.js new file mode 100644 index 000000000..939ab2e90 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_discovery_configs.js @@ -0,0 +1,91 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dlp_v2_generated_DlpService_ListDiscoveryConfigs_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent resource name. + * The format of this value is as follows: + * `projects/{project_id}/locations/{location_id}` + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * parent=projects/example-project/locations/europe-west3 + */ + // const parent = 'abc123' + /** + * Page token to continue retrieval. Comes from the previous call + * to ListDiscoveryConfigs. `order_by` field must not + * change for subsequent calls. + */ + // const pageToken = 'abc123' + /** + * Size of the page. This value can be limited by a server. + */ + // const pageSize = 1234 + /** + * Comma-separated list of config fields to order by, + * followed by `asc` or `desc` postfix. This list is case insensitive. The + * default sorting order is ascending. Redundant space characters are + * insignificant. + * Example: `name asc,update_time, create_time desc` + * Supported fields are: + * - `last_run_time`: corresponds to the last time the DiscoveryConfig ran. + * - `name`: corresponds to the DiscoveryConfig's name. + * - `status`: corresponds to DiscoveryConfig's status. + */ + // const orderBy = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callListDiscoveryConfigs() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dlpClient.listDiscoveryConfigsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDiscoveryConfigs(); + // [END dlp_v2_generated_DlpService_ListDiscoveryConfigs_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_dlp_jobs.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_dlp_jobs.js new file mode 100644 index 000000000..55b7e8d1a --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_dlp_jobs.js @@ -0,0 +1,126 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dlp_v2_generated_DlpService_ListDlpJobs_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent resource name. + * The format of this value varies depending on whether you have specified a + * processing + * location (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * parent=projects/example-project/locations/europe-west3 + */ + // const parent = 'abc123' + /** + * Allows filtering. + * Supported syntax: + * * Filter expressions are made up of one or more restrictions. + * * Restrictions can be combined by `AND` or `OR` logical operators. A + * sequence of restrictions implicitly uses `AND`. + * * A restriction has the form of `{field} {operator} {value}`. + * * Supported fields/values for inspect jobs: + * - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED + * - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY + * - `trigger_name` - The name of the trigger that created the job. + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. + * * Supported fields for risk analysis jobs: + * - `state` - RUNNING|CANCELED|FINISHED|FAILED + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. + * * The operator must be `=` or `!=`. + * The syntax is based on https://google.aip.dev/160. + * Examples: + * * inspected_storage = cloud_storage AND state = done + * * inspected_storage = cloud_storage OR inspected_storage = bigquery + * * inspected_storage = cloud_storage AND (state = done OR state = canceled) + * * end_time > \"2017-12-12T00:00:00+00:00\" + * The length of this field should be no more than 500 characters. + */ + // const filter = 'abc123' + /** + * The standard list page size. + */ + // const pageSize = 1234 + /** + * The standard list page token. + */ + // const pageToken = 'abc123' + /** + * The type of job. Defaults to `DlpJobType.INSPECT` + */ + // const type = {} + /** + * Comma-separated list of fields to order by, + * followed by `asc` or `desc` postfix. This list is case insensitive. The + * default sorting order is ascending. Redundant space characters are + * insignificant. + * Example: `name asc, end_time asc, create_time desc` + * Supported fields are: + * - `create_time`: corresponds to the time the job was created. + * - `end_time`: corresponds to the time the job ended. + * - `name`: corresponds to the job's name. + * - `state`: corresponds to `state` + */ + // const orderBy = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callListDlpJobs() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dlpClient.listDlpJobsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListDlpJobs(); + // [END dlp_v2_generated_DlpService_ListDlpJobs_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_file_store_data_profiles.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_file_store_data_profiles.js new file mode 100644 index 000000000..745decd57 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_file_store_data_profiles.js @@ -0,0 +1,129 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dlp_v2_generated_DlpService_ListFileStoreDataProfiles_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the organization or project, for + * example `organizations/433245324/locations/europe` or + * `projects/project-id/locations/asia`. + */ + // const parent = 'abc123' + /** + * Optional. Page token to continue retrieval. + */ + // const pageToken = 'abc123' + /** + * Optional. Size of the page. This value can be limited by the server. If + * zero, server returns a page of max size 100. + */ + // const pageSize = 1234 + /** + * Optional. Comma-separated list of fields to order by, followed by `asc` or + * `desc` postfix. This list is case insensitive. The default sorting order is + * ascending. Redundant space characters are insignificant. Only one order + * field at a time is allowed. + * Examples: + * * `project_id asc` + * * `name` + * * `sensitivity_level desc` + * Supported fields are: + * - `project_id`: The Google Cloud project ID. + * - `sensitivity_level`: How sensitive the data in a table is, at most. + * - `data_risk_level`: How much risk is associated with this data. + * - `profile_last_generated`: When the profile was last updated in epoch + * seconds. + * - `last_modified`: The last time the resource was modified. + * - `resource_visibility`: Visibility restriction for this resource. + * - `name`: The name of the profile. + * - `create_time`: The time the file store was first created. + */ + // const orderBy = 'abc123' + /** + * Optional. Allows filtering. + * Supported syntax: + * * Filter expressions are made up of one or more restrictions. + * * Restrictions can be combined by `AND` or `OR` logical operators. A + * sequence of restrictions implicitly uses `AND`. + * * A restriction has the form of `{field} {operator} {value}`. + * * Supported fields: + * - `project_id`: The Google Cloud project ID + * - `account_id`: The AWS account ID + * - `file_store_path`: The path like "gs://bucket" + * - `data_source_type`: The profile's data source type, like + * "google/storage/bucket" + * - `data_storage_location`: The location where the file store's data is + * stored, like "us-central1" + * - `sensitivity_level`: HIGH|MODERATE|LOW + * - `data_risk_level`: HIGH|MODERATE|LOW + * - `resource_visibility`: PUBLIC|RESTRICTED + * - `status_code`: an RPC status code as defined in + * https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + * - `profile_last_generated`: Date and time the profile was last + * generated + * * The operator must be `=` or `!=`. The `profile_last_generated` filter + * also supports `<` and `>`. + * The syntax is based on https://google.aip.dev/160. + * Examples: + * * `project_id = 12345 AND status_code = 1` + * * `project_id = 12345 AND sensitivity_level = HIGH` + * * `project_id = 12345 AND resource_visibility = PUBLIC` + * * `file_store_path = "gs://mybucket"` + * * `profile_last_generated < "2025-01-01T00:00:00.000Z"` + * The length of this field should be no more than 500 characters. + */ + // const filter = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callListFileStoreDataProfiles() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dlpClient.listFileStoreDataProfilesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListFileStoreDataProfiles(); + // [END dlp_v2_generated_DlpService_ListFileStoreDataProfiles_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_info_types.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_info_types.js new file mode 100644 index 000000000..faf6c4bd5 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_info_types.js @@ -0,0 +1,73 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START dlp_v2_generated_DlpService_ListInfoTypes_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * The parent resource name. + * The format of this value is as follows: + * `locations/{location_id}` + */ + // const parent = 'abc123' + /** + * BCP-47 language code for localized infoType friendly + * names. If omitted, or if localized strings are not available, + * en-US strings will be returned. + */ + // const languageCode = 'abc123' + /** + * filter to only return infoTypes supported by certain parts of the + * API. Defaults to supported_by=INSPECT. + */ + // const filter = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callListInfoTypes() { + // Construct request + const request = { + }; + + // Run request + const response = await dlpClient.listInfoTypes(request); + console.log(response); + } + + callListInfoTypes(); + // [END dlp_v2_generated_DlpService_ListInfoTypes_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_inspect_templates.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_inspect_templates.js new file mode 100644 index 000000000..0c4def7f6 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_inspect_templates.js @@ -0,0 +1,101 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dlp_v2_generated_DlpService_ListInspectTemplates_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent resource name. + * The format of this value varies depending on the scope of the request + * (project or organization) and whether you have specified a processing + * location (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + Organizations scope, location specified: + * `organizations/{org_id}/locations/{location_id}` + * + Organizations scope, no location specified (defaults to global): + * `organizations/{org_id}` + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * parent=projects/example-project/locations/europe-west3 + */ + // const parent = 'abc123' + /** + * Page token to continue retrieval. Comes from the previous call + * to `ListInspectTemplates`. + */ + // const pageToken = 'abc123' + /** + * Size of the page. This value can be limited by the server. If zero server + * returns a page of max size 100. + */ + // const pageSize = 1234 + /** + * Comma-separated list of fields to order by, + * followed by `asc` or `desc` postfix. This list is case insensitive. The + * default sorting order is ascending. Redundant space characters are + * insignificant. + * Example: `name asc,update_time, create_time desc` + * Supported fields are: + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. + */ + // const orderBy = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callListInspectTemplates() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dlpClient.listInspectTemplatesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListInspectTemplates(); + // [END dlp_v2_generated_DlpService_ListInspectTemplates_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_job_triggers.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_job_triggers.js new file mode 100644 index 000000000..531550016 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_job_triggers.js @@ -0,0 +1,126 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dlp_v2_generated_DlpService_ListJobTriggers_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent resource name. + * The format of this value varies depending on whether you have specified a + * processing + * location (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * parent=projects/example-project/locations/europe-west3 + */ + // const parent = 'abc123' + /** + * Page token to continue retrieval. Comes from the previous call + * to ListJobTriggers. `order_by` field must not + * change for subsequent calls. + */ + // const pageToken = 'abc123' + /** + * Size of the page. This value can be limited by a server. + */ + // const pageSize = 1234 + /** + * Comma-separated list of triggeredJob fields to order by, + * followed by `asc` or `desc` postfix. This list is case insensitive. The + * default sorting order is ascending. Redundant space characters are + * insignificant. + * Example: `name asc,update_time, create_time desc` + * Supported fields are: + * - `create_time`: corresponds to the time the JobTrigger was created. + * - `update_time`: corresponds to the time the JobTrigger was last updated. + * - `last_run_time`: corresponds to the last time the JobTrigger ran. + * - `name`: corresponds to the JobTrigger's name. + * - `display_name`: corresponds to the JobTrigger's display name. + * - `status`: corresponds to JobTrigger's status. + */ + // const orderBy = 'abc123' + /** + * Allows filtering. + * Supported syntax: + * * Filter expressions are made up of one or more restrictions. + * * Restrictions can be combined by `AND` or `OR` logical operators. A + * sequence of restrictions implicitly uses `AND`. + * * A restriction has the form of `{field} {operator} {value}`. + * * Supported fields/values for inspect triggers: + * - `status` - HEALTHY|PAUSED|CANCELLED + * - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY + * - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by + * quotation marks. Nanoseconds are ignored. + * - 'error_count' - Number of errors that have occurred while running. + * * The operator must be `=` or `!=` for status and inspected_storage. + * The syntax is based on https://google.aip.dev/160. + * Examples: + * * inspected_storage = cloud_storage AND status = HEALTHY + * * inspected_storage = cloud_storage OR inspected_storage = bigquery + * * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY) + * * last_run_time > \"2017-12-12T00:00:00+00:00\" + * The length of this field should be no more than 500 characters. + */ + // const filter = 'abc123' + /** + * The type of jobs. Will use `DlpJobType.INSPECT` if not set. + */ + // const type = {} + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callListJobTriggers() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dlpClient.listJobTriggersAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListJobTriggers(); + // [END dlp_v2_generated_DlpService_ListJobTriggers_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_project_data_profiles.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_project_data_profiles.js new file mode 100644 index 000000000..f915b1d5c --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_project_data_profiles.js @@ -0,0 +1,113 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dlp_v2_generated_DlpService_ListProjectDataProfiles_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. organizations/{org_id}/locations/{loc_id} + */ + // const parent = 'abc123' + /** + * Page token to continue retrieval. + */ + // const pageToken = 'abc123' + /** + * Size of the page. This value can be limited by the server. If zero, server + * returns a page of max size 100. + */ + // const pageSize = 1234 + /** + * Comma-separated list of fields to order by, followed by `asc` or `desc` + * postfix. This list is case insensitive. The default sorting order is + * ascending. Redundant space characters are insignificant. Only one order + * field at a time is allowed. + * Examples: + * * `project_id` + * * `sensitivity_level desc` + * Supported fields: + * - `project_id`: Google Cloud project ID + * - `sensitivity_level`: How sensitive the data in a project is, at most + * - `data_risk_level`: How much risk is associated with this data + * - `profile_last_generated`: Date and time (in epoch seconds) the profile + * was last generated + */ + // const orderBy = 'abc123' + /** + * Allows filtering. + * Supported syntax: + * * Filter expressions are made up of one or more restrictions. + * * Restrictions can be combined by `AND` or `OR` logical operators. A + * sequence of restrictions implicitly uses `AND`. + * * A restriction has the form of `{field} {operator} {value}`. + * * Supported fields: + * - `project_id`: the Google Cloud project ID + * - `sensitivity_level`: HIGH|MODERATE|LOW + * - `data_risk_level`: HIGH|MODERATE|LOW + * - `status_code`: an RPC status code as defined in + * https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + * - `profile_last_generated`: Date and time the profile was last + * generated + * * The operator must be `=` or `!=`. The `profile_last_generated` filter + * also supports `<` and `>`. + * The syntax is based on https://google.aip.dev/160. + * Examples: + * * `project_id = 12345 AND status_code = 1` + * * `project_id = 12345 AND sensitivity_level = HIGH` + * * `profile_last_generated < "2025-01-01T00:00:00.000Z"` + * The length of this field should be no more than 500 characters. + */ + // const filter = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callListProjectDataProfiles() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dlpClient.listProjectDataProfilesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListProjectDataProfiles(); + // [END dlp_v2_generated_DlpService_ListProjectDataProfiles_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_stored_info_types.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_stored_info_types.js new file mode 100644 index 000000000..8fdba4d16 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_stored_info_types.js @@ -0,0 +1,98 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dlp_v2_generated_DlpService_ListStoredInfoTypes_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent resource name. + * The format of this value varies depending on the scope of the request + * (project or organization) and whether you have specified a processing + * location (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * parent=projects/example-project/locations/europe-west3 + */ + // const parent = 'abc123' + /** + * Page token to continue retrieval. Comes from the previous call + * to `ListStoredInfoTypes`. + */ + // const pageToken = 'abc123' + /** + * Size of the page. This value can be limited by the server. If zero server + * returns a page of max size 100. + */ + // const pageSize = 1234 + /** + * Comma-separated list of fields to order by, + * followed by `asc` or `desc` postfix. This list is case insensitive. The + * default sorting order is ascending. Redundant space characters are + * insignificant. + * Example: `name asc, display_name, create_time desc` + * Supported fields are: + * - `create_time`: corresponds to the time the most recent version of the + * resource was created. + * - `state`: corresponds to the state of the resource. + * - `name`: corresponds to resource name. + * - `display_name`: corresponds to info type's display name. + */ + // const orderBy = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callListStoredInfoTypes() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dlpClient.listStoredInfoTypesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListStoredInfoTypes(); + // [END dlp_v2_generated_DlpService_ListStoredInfoTypes_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_table_data_profiles.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_table_data_profiles.js new file mode 100644 index 000000000..ac26c0d37 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.list_table_data_profiles.js @@ -0,0 +1,125 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dlp_v2_generated_DlpService_ListTableDataProfiles_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the organization or project, for + * example `organizations/433245324/locations/europe` or + * `projects/project-id/locations/asia`. + */ + // const parent = 'abc123' + /** + * Page token to continue retrieval. + */ + // const pageToken = 'abc123' + /** + * Size of the page. This value can be limited by the server. If zero, server + * returns a page of max size 100. + */ + // const pageSize = 1234 + /** + * Comma-separated list of fields to order by, followed by `asc` or `desc` + * postfix. This list is case insensitive. The default sorting order is + * ascending. Redundant space characters are insignificant. Only one order + * field at a time is allowed. + * Examples: + * * `project_id asc` + * * `table_id` + * * `sensitivity_level desc` + * Supported fields are: + * - `project_id`: The Google Cloud project ID. + * - `dataset_id`: The ID of a BigQuery dataset. + * - `table_id`: The ID of a BigQuery table. + * - `sensitivity_level`: How sensitive the data in a table is, at most. + * - `data_risk_level`: How much risk is associated with this data. + * - `profile_last_generated`: When the profile was last updated in epoch + * seconds. + * - `last_modified`: The last time the resource was modified. + * - `resource_visibility`: Visibility restriction for this resource. + * - `row_count`: Number of rows in this resource. + */ + // const orderBy = 'abc123' + /** + * Allows filtering. + * Supported syntax: + * * Filter expressions are made up of one or more restrictions. + * * Restrictions can be combined by `AND` or `OR` logical operators. A + * sequence of restrictions implicitly uses `AND`. + * * A restriction has the form of `{field} {operator} {value}`. + * * Supported fields: + * - `project_id`: The Google Cloud project ID + * - `dataset_id`: The BigQuery dataset ID + * - `table_id`: The ID of the BigQuery table + * - `sensitivity_level`: HIGH|MODERATE|LOW + * - `data_risk_level`: HIGH|MODERATE|LOW + * - `resource_visibility`: PUBLIC|RESTRICTED + * - `status_code`: an RPC status code as defined in + * https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + * - `profile_last_generated`: Date and time the profile was last + * generated + * * The operator must be `=` or `!=`. The `profile_last_generated` filter + * also supports `<` and `>`. + * The syntax is based on https://google.aip.dev/160. + * Examples: + * * `project_id = 12345 AND status_code = 1` + * * `project_id = 12345 AND sensitivity_level = HIGH` + * * `project_id = 12345 AND resource_visibility = PUBLIC` + * * `profile_last_generated < "2025-01-01T00:00:00.000Z"` + * The length of this field should be no more than 500 characters. + */ + // const filter = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callListTableDataProfiles() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dlpClient.listTableDataProfilesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListTableDataProfiles(); + // [END dlp_v2_generated_DlpService_ListTableDataProfiles_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.redact_image.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.redact_image.js new file mode 100644 index 000000000..64f0c54f8 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.redact_image.js @@ -0,0 +1,107 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main() { + // [START dlp_v2_generated_DlpService_RedactImage_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Parent resource name. + * The format of this value varies depending on whether you have specified a + * processing + * location (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * parent=projects/example-project/locations/europe-west3 + */ + // const parent = 'abc123' + /** + * Configuration for the inspector. + */ + // const inspectConfig = {} + /** + * The configuration for specifying what content to redact from images. + */ + // const imageRedactionConfigs = [1,2,3,4] + /** + * Whether the response should include findings along with the redacted + * image. + */ + // const includeFindings = true + /** + * The content must be PNG, JPEG, SVG or BMP. + */ + // const byteItem = {} + /** + * The full resource name of the inspection template to use. Settings in the + * main `inspect_config` field override the corresponding settings in this + * inspection template. + * The merge behavior is as follows: + * - Singular field: The main field's value replaces the value of the + * corresponding field in the template. + * - Repeated fields: The field values are appended to the list defined in + * the template. + * - Sub-messages and groups: The fields are recursively merged. + */ + // const inspectTemplate = 'abc123' + /** + * The full resource name of the de-identification template to use. Settings + * in the main `image_redaction_configs` field override the corresponding + * settings in this de-identification template. The request fails if the + * type of the template's deidentify_config is not image_transformations. + */ + // const deidentifyTemplate = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callRedactImage() { + // Construct request + const request = { + }; + + // Run request + const response = await dlpClient.redactImage(request); + console.log(response); + } + + callRedactImage(); + // [END dlp_v2_generated_DlpService_RedactImage_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.reidentify_content.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.reidentify_content.js new file mode 100644 index 000000000..f439c882b --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.reidentify_content.js @@ -0,0 +1,110 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dlp_v2_generated_DlpService_ReidentifyContent_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Parent resource name. + * The format of this value varies depending on whether you have specified a + * processing + * location (https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * parent=projects/example-project/locations/europe-west3 + */ + // const parent = 'abc123' + /** + * Configuration for the re-identification of the content item. + * This field shares the same proto message type that is used for + * de-identification, however its usage here is for the reversal of the + * previous de-identification. Re-identification is performed by examining + * the transformations used to de-identify the items and executing the + * reverse. This requires that only reversible transformations + * be provided here. The reversible transformations are: + * - `CryptoDeterministicConfig` + * - `CryptoReplaceFfxFpeConfig` + */ + // const reidentifyConfig = {} + /** + * Configuration for the inspector. + */ + // const inspectConfig = {} + /** + * The item to re-identify. Will be treated as text. + */ + // const item = {} + /** + * Template to use. Any configuration directly specified in + * `inspect_config` will override those set in the template. Singular fields + * that are set in this request will replace their corresponding fields in the + * template. Repeated fields are appended. Singular sub-messages and groups + * are recursively merged. + */ + // const inspectTemplateName = 'abc123' + /** + * Template to use. References an instance of `DeidentifyTemplate`. + * Any configuration directly specified in `reidentify_config` or + * `inspect_config` will override those set in the template. The + * `DeidentifyTemplate` used must include only reversible transformations. + * Singular fields that are set in this request will replace their + * corresponding fields in the template. Repeated fields are appended. + * Singular sub-messages and groups are recursively merged. + */ + // const reidentifyTemplateName = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callReidentifyContent() { + // Construct request + const request = { + parent, + }; + + // Run request + const response = await dlpClient.reidentifyContent(request); + console.log(response); + } + + callReidentifyContent(); + // [END dlp_v2_generated_DlpService_ReidentifyContent_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.search_connections.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.search_connections.js new file mode 100644 index 000000000..32115c2da --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.search_connections.js @@ -0,0 +1,79 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START dlp_v2_generated_DlpService_SearchConnections_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the organization or project with a wildcard + * location, for example, `organizations/433245324/locations/-` or + * `projects/project-id/locations/-`. + */ + // const parent = 'abc123' + /** + * Optional. Number of results per page, max 1000. + */ + // const pageSize = 1234 + /** + * Optional. Page token from a previous page to return the next set of + * results. If set, all other request fields must match the original request. + */ + // const pageToken = 'abc123' + /** + * Optional. Supported field/value: - `state` - MISSING|AVAILABLE|ERROR + * The syntax is based on https://google.aip.dev/160. + */ + // const filter = 'abc123' + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callSearchConnections() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = dlpClient.searchConnectionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callSearchConnections(); + // [END dlp_v2_generated_DlpService_SearchConnections_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.update_connection.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.update_connection.js new file mode 100644 index 000000000..74c8e2d0f --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.update_connection.js @@ -0,0 +1,71 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, connection) { + // [START dlp_v2_generated_DlpService_UpdateConnection_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name in the format: + * `projects/{project}/locations/{location}/connections/{connection}`. + */ + // const name = 'abc123' + /** + * Required. The connection with new values for the relevant fields. + */ + // const connection = {} + /** + * Optional. Mask to control which fields get updated. + */ + // const updateMask = {} + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callUpdateConnection() { + // Construct request + const request = { + name, + connection, + }; + + // Run request + const response = await dlpClient.updateConnection(request); + console.log(response); + } + + callUpdateConnection(); + // [END dlp_v2_generated_DlpService_UpdateConnection_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.update_deidentify_template.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.update_deidentify_template.js new file mode 100644 index 000000000..fbe79eb8e --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.update_deidentify_template.js @@ -0,0 +1,72 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_UpdateDeidentifyTemplate_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of organization and deidentify template to be + * updated, for example + * `organizations/433245324/deidentifyTemplates/432452342` or + * projects/project-id/deidentifyTemplates/432452342. + */ + // const name = 'abc123' + /** + * New DeidentifyTemplate value. + */ + // const deidentifyTemplate = {} + /** + * Mask to control which fields get updated. + */ + // const updateMask = {} + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callUpdateDeidentifyTemplate() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.updateDeidentifyTemplate(request); + console.log(response); + } + + callUpdateDeidentifyTemplate(); + // [END dlp_v2_generated_DlpService_UpdateDeidentifyTemplate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.update_discovery_config.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.update_discovery_config.js new file mode 100644 index 000000000..4a0b30a7e --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.update_discovery_config.js @@ -0,0 +1,71 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name, discoveryConfig) { + // [START dlp_v2_generated_DlpService_UpdateDiscoveryConfig_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the project and the configuration, for example + * `projects/dlp-test-project/discoveryConfigs/53234423`. + */ + // const name = 'abc123' + /** + * Required. New DiscoveryConfig value. + */ + // const discoveryConfig = {} + /** + * Mask to control which fields get updated. + */ + // const updateMask = {} + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callUpdateDiscoveryConfig() { + // Construct request + const request = { + name, + discoveryConfig, + }; + + // Run request + const response = await dlpClient.updateDiscoveryConfig(request); + console.log(response); + } + + callUpdateDiscoveryConfig(); + // [END dlp_v2_generated_DlpService_UpdateDiscoveryConfig_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.update_inspect_template.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.update_inspect_template.js new file mode 100644 index 000000000..fc56dc4e7 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.update_inspect_template.js @@ -0,0 +1,71 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_UpdateInspectTemplate_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of organization and inspectTemplate to be updated, + * for example `organizations/433245324/inspectTemplates/432452342` or + * projects/project-id/inspectTemplates/432452342. + */ + // const name = 'abc123' + /** + * New InspectTemplate value. + */ + // const inspectTemplate = {} + /** + * Mask to control which fields get updated. + */ + // const updateMask = {} + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callUpdateInspectTemplate() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.updateInspectTemplate(request); + console.log(response); + } + + callUpdateInspectTemplate(); + // [END dlp_v2_generated_DlpService_UpdateInspectTemplate_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.update_job_trigger.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.update_job_trigger.js new file mode 100644 index 000000000..2742ac678 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.update_job_trigger.js @@ -0,0 +1,70 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_UpdateJobTrigger_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of the project and the triggeredJob, for example + * `projects/dlp-test-project/jobTriggers/53234423`. + */ + // const name = 'abc123' + /** + * New JobTrigger value. + */ + // const jobTrigger = {} + /** + * Mask to control which fields get updated. + */ + // const updateMask = {} + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callUpdateJobTrigger() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.updateJobTrigger(request); + console.log(response); + } + + callUpdateJobTrigger(); + // [END dlp_v2_generated_DlpService_UpdateJobTrigger_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.update_stored_info_type.js b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.update_stored_info_type.js new file mode 100644 index 000000000..299b828f3 --- /dev/null +++ b/owl-bot-staging/dlp/v2/samples/generated/v2/dlp_service.update_stored_info_type.js @@ -0,0 +1,73 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START dlp_v2_generated_DlpService_UpdateStoredInfoType_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Resource name of organization and storedInfoType to be updated, + * for example `organizations/433245324/storedInfoTypes/432452342` or + * projects/project-id/storedInfoTypes/432452342. + */ + // const name = 'abc123' + /** + * Updated configuration for the storedInfoType. If not provided, a new + * version of the storedInfoType will be created with the existing + * configuration. + */ + // const config = {} + /** + * Mask to control which fields get updated. + */ + // const updateMask = {} + + // Imports the Dlp library + const {DlpServiceClient} = require('@google-cloud/dlp').v2; + + // Instantiates a client + const dlpClient = new DlpServiceClient(); + + async function callUpdateStoredInfoType() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await dlpClient.updateStoredInfoType(request); + console.log(response); + } + + callUpdateStoredInfoType(); + // [END dlp_v2_generated_DlpService_UpdateStoredInfoType_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/dlp/v2/src/index.ts b/owl-bot-staging/dlp/v2/src/index.ts new file mode 100644 index 000000000..097249753 --- /dev/null +++ b/owl-bot-staging/dlp/v2/src/index.ts @@ -0,0 +1,25 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as v2 from './v2'; +const DlpServiceClient = v2.DlpServiceClient; +type DlpServiceClient = v2.DlpServiceClient; +export { v2, DlpServiceClient }; +export default { v2, DlpServiceClient }; +import * as protos from '../protos/protos'; +export { protos }; diff --git a/owl-bot-staging/dlp/v2/src/v2/dlp_service_client.ts b/owl-bot-staging/dlp/v2/src/v2/dlp_service_client.ts new file mode 100644 index 000000000..3f8aad7f9 --- /dev/null +++ b/owl-bot-staging/dlp/v2/src/v2/dlp_service_client.ts @@ -0,0 +1,12867 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, + LocationsClient, + LocationProtos, +} from 'google-gax'; +import { Transform } from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import { loggingUtils as logging, decodeAnyProtosInArray } from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v2/dlp_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './dlp_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Sensitive Data Protection provides access to a powerful sensitive data + * inspection, classification, and de-identification platform that works + * on text, images, and Google Cloud storage repositories. + * To learn more about concepts and find how-to guides see + * https://cloud.google.com/sensitive-data-protection/docs/. + * @class + * @memberof v2 + */ +export class DlpServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: { [method: string]: gax.CallSettings }; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('dlp'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: { [name: string]: Function }; + locationsClient: LocationsClient; + pathTemplates: { [name: string]: gax.PathTemplate }; + dlpServiceStub?: Promise<{ [name: string]: Function }>; + + /** + * Construct an instance of DlpServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new DlpServiceClient({fallback: true}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback, + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof DlpServiceClient; + if ( + opts?.universe_domain && + opts?.universeDomain && + opts?.universe_domain !== opts?.universeDomain + ) { + throw new Error( + 'Please set either universe_domain or universeDomain, but not both.', + ); + } + const universeDomainEnvVar = + typeof process === 'object' && typeof process.env === 'object' + ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] + : undefined; + this._universeDomain = + opts?.universeDomain ?? + opts?.universe_domain ?? + universeDomainEnvVar ?? + 'googleapis.com'; + this._servicePath = 'dlp.' + this._universeDomain; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts); + + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + this.locationsClient = new this._gaxModule.LocationsClient( + this._gaxGrpc, + opts, + ); + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + discoveryConfigPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/discoveryConfigs/{discovery_config}', + ), + findingPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/findings/{finding}', + ), + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}', + ), + organizationPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}', + ), + organizationDeidentifyTemplatePathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/deidentifyTemplates/{deidentify_template}', + ), + organizationInspectTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/inspectTemplates/{inspect_template}', + ), + organizationLocationPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}', + ), + organizationLocationColumnDataProfilePathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/columnDataProfiles/{column_data_profile}', + ), + organizationLocationConnectionPathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/connections/{connection}', + ), + organizationLocationDeidentifyTemplatePathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/deidentifyTemplates/{deidentify_template}', + ), + organizationLocationFileStoreDataProfilePathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/fileStoreDataProfiles/{file_store_data_profile}', + ), + organizationLocationInspectTemplatePathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/inspectTemplates/{inspect_template}', + ), + organizationLocationProjectDataProfilePathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/projectDataProfiles/{project_data_profile}', + ), + organizationLocationStoredInfoTypePathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/storedInfoTypes/{stored_info_type}', + ), + organizationLocationTableDataProfilePathTemplate: + new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/tableDataProfiles/{table_data_profile}', + ), + organizationStoredInfoTypePathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/storedInfoTypes/{stored_info_type}', + ), + projectPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}', + ), + projectDeidentifyTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/deidentifyTemplates/{deidentify_template}', + ), + projectDlpContentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/dlpContent', + ), + projectDlpJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/dlpJobs/{dlp_job}', + ), + projectInspectTemplatePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/inspectTemplates/{inspect_template}', + ), + projectJobTriggerPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/jobTriggers/{job_trigger}', + ), + projectLocationColumnDataProfilePathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/columnDataProfiles/{column_data_profile}', + ), + projectLocationConnectionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/connections/{connection}', + ), + projectLocationDeidentifyTemplatePathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/deidentifyTemplates/{deidentify_template}', + ), + projectLocationDlpJobPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/dlpJobs/{dlp_job}', + ), + projectLocationFileStoreDataProfilePathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/fileStoreDataProfiles/{file_store_data_profile}', + ), + projectLocationInspectTemplatePathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/inspectTemplates/{inspect_template}', + ), + projectLocationJobTriggerPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/jobTriggers/{job_trigger}', + ), + projectLocationProjectDataProfilePathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/projectDataProfiles/{project_data_profile}', + ), + projectLocationStoredInfoTypePathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/storedInfoTypes/{stored_info_type}', + ), + projectLocationTableDataProfilePathTemplate: + new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/tableDataProfiles/{table_data_profile}', + ), + projectStoredInfoTypePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/storedInfoTypes/{stored_info_type}', + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listInspectTemplates: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'inspectTemplates', + ), + listDeidentifyTemplates: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'deidentifyTemplates', + ), + listJobTriggers: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'jobTriggers', + ), + listDiscoveryConfigs: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'discoveryConfigs', + ), + listDlpJobs: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'jobs', + ), + listStoredInfoTypes: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'storedInfoTypes', + ), + listProjectDataProfiles: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'projectDataProfiles', + ), + listTableDataProfiles: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'tableDataProfiles', + ), + listColumnDataProfiles: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'columnDataProfiles', + ), + listFileStoreDataProfiles: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'fileStoreDataProfiles', + ), + listConnections: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'connections', + ), + searchConnections: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'connections', + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.privacy.dlp.v2.DlpService', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + { 'x-goog-api-client': clientHeader.join(' ') }, + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.dlpServiceStub) { + return this.dlpServiceStub; + } + + // Put together the "service stub" for + // google.privacy.dlp.v2.DlpService. + this.dlpServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.privacy.dlp.v2.DlpService', + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.privacy.dlp.v2.DlpService, + this._opts, + this._providedCustomServicePath, + ) as Promise<{ [method: string]: Function }>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const dlpServiceStubMethods = [ + 'inspectContent', + 'redactImage', + 'deidentifyContent', + 'reidentifyContent', + 'listInfoTypes', + 'createInspectTemplate', + 'updateInspectTemplate', + 'getInspectTemplate', + 'listInspectTemplates', + 'deleteInspectTemplate', + 'createDeidentifyTemplate', + 'updateDeidentifyTemplate', + 'getDeidentifyTemplate', + 'listDeidentifyTemplates', + 'deleteDeidentifyTemplate', + 'createJobTrigger', + 'updateJobTrigger', + 'hybridInspectJobTrigger', + 'getJobTrigger', + 'listJobTriggers', + 'deleteJobTrigger', + 'activateJobTrigger', + 'createDiscoveryConfig', + 'updateDiscoveryConfig', + 'getDiscoveryConfig', + 'listDiscoveryConfigs', + 'deleteDiscoveryConfig', + 'createDlpJob', + 'listDlpJobs', + 'getDlpJob', + 'deleteDlpJob', + 'cancelDlpJob', + 'createStoredInfoType', + 'updateStoredInfoType', + 'getStoredInfoType', + 'listStoredInfoTypes', + 'deleteStoredInfoType', + 'listProjectDataProfiles', + 'listTableDataProfiles', + 'listColumnDataProfiles', + 'getProjectDataProfile', + 'listFileStoreDataProfiles', + 'getFileStoreDataProfile', + 'deleteFileStoreDataProfile', + 'getTableDataProfile', + 'getColumnDataProfile', + 'deleteTableDataProfile', + 'hybridInspectDlpJob', + 'finishDlpJob', + 'createConnection', + 'getConnection', + 'listConnections', + 'searchConnections', + 'deleteConnection', + 'updateConnection', + ]; + for (const methodName of dlpServiceStubMethods) { + const callPromise = this.dlpServiceStub.then( + (stub) => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + }, + ); + + const descriptor = this.descriptors.page[methodName] || undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback, + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.dlpServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static servicePath is deprecated, please use the instance method instead.', + 'DeprecationWarning', + ); + } + return 'dlp.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static apiEndpoint is deprecated, please use the instance method instead.', + 'DeprecationWarning', + ); + } + return 'dlp.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback, + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Finds potentially sensitive info in content. + * This method has limits on input size, processing time, and output size. + * + * When no InfoTypes or CustomInfoTypes are specified in this request, the + * system will automatically choose what detectors to run. By default this may + * be all types, but may change over time as detectors are updated. + * + * For how to guides, see + * https://cloud.google.com/sensitive-data-protection/docs/inspecting-images + * and + * https://cloud.google.com/sensitive-data-protection/docs/inspecting-text, + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Parent resource name. + * + * The format of this value varies depending on whether you have [specified a + * processing + * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {google.privacy.dlp.v2.InspectConfig} request.inspectConfig + * Configuration for the inspector. What specified here will override + * the template referenced by the inspect_template_name argument. + * @param {google.privacy.dlp.v2.ContentItem} request.item + * The item to inspect. + * @param {string} request.inspectTemplateName + * Template to use. Any configuration directly specified in + * inspect_config will override those set in the template. Singular fields + * that are set in this request will replace their corresponding fields in the + * template. Repeated fields are appended. Singular sub-messages and groups + * are recursively merged. + * @param {string} request.locationId + * Deprecated. This field has no effect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.InspectContentResponse|InspectContentResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.inspect_content.js + * region_tag:dlp_v2_generated_DlpService_InspectContent_async + */ + inspectContent( + request?: protos.google.privacy.dlp.v2.IInspectContentRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IInspectContentResponse, + protos.google.privacy.dlp.v2.IInspectContentRequest | undefined, + {} | undefined, + ] + >; + inspectContent( + request: protos.google.privacy.dlp.v2.IInspectContentRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IInspectContentResponse, + protos.google.privacy.dlp.v2.IInspectContentRequest | null | undefined, + {} | null | undefined + >, + ): void; + inspectContent( + request: protos.google.privacy.dlp.v2.IInspectContentRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IInspectContentResponse, + protos.google.privacy.dlp.v2.IInspectContentRequest | null | undefined, + {} | null | undefined + >, + ): void; + inspectContent( + request?: protos.google.privacy.dlp.v2.IInspectContentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IInspectContentResponse, + | protos.google.privacy.dlp.v2.IInspectContentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IInspectContentResponse, + protos.google.privacy.dlp.v2.IInspectContentRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IInspectContentResponse, + protos.google.privacy.dlp.v2.IInspectContentRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('inspectContent request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IInspectContentResponse, + | protos.google.privacy.dlp.v2.IInspectContentRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('inspectContent response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .inspectContent(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IInspectContentResponse, + protos.google.privacy.dlp.v2.IInspectContentRequest | undefined, + {} | undefined, + ]) => { + this._log.info('inspectContent response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Redacts potentially sensitive info from an image. + * This method has limits on input size, processing time, and output size. + * See + * https://cloud.google.com/sensitive-data-protection/docs/redacting-sensitive-data-images + * to learn more. + * + * When no InfoTypes or CustomInfoTypes are specified in this request, the + * system will automatically choose what detectors to run. By default this may + * be all types, but may change over time as detectors are updated. + * + * Only the first frame of each multiframe image is redacted. Metadata and + * other frames are omitted in the response. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Parent resource name. + * + * The format of this value varies depending on whether you have [specified a + * processing + * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {string} request.locationId + * Deprecated. This field has no effect. + * @param {google.privacy.dlp.v2.InspectConfig} request.inspectConfig + * Configuration for the inspector. + * @param {number[]} request.imageRedactionConfigs + * The configuration for specifying what content to redact from images. + * @param {boolean} request.includeFindings + * Whether the response should include findings along with the redacted + * image. + * @param {google.privacy.dlp.v2.ByteContentItem} request.byteItem + * The content must be PNG, JPEG, SVG or BMP. + * @param {string} request.inspectTemplate + * The full resource name of the inspection template to use. Settings in the + * main `inspect_config` field override the corresponding settings in this + * inspection template. + * + * The merge behavior is as follows: + * + * - Singular field: The main field's value replaces the value of the + * corresponding field in the template. + * - Repeated fields: The field values are appended to the list defined in + * the template. + * - Sub-messages and groups: The fields are recursively merged. + * @param {string} request.deidentifyTemplate + * The full resource name of the de-identification template to use. Settings + * in the main `image_redaction_configs` field override the corresponding + * settings in this de-identification template. The request fails if the + * type of the template's deidentify_config is not image_transformations. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.RedactImageResponse|RedactImageResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.redact_image.js + * region_tag:dlp_v2_generated_DlpService_RedactImage_async + */ + redactImage( + request?: protos.google.privacy.dlp.v2.IRedactImageRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IRedactImageResponse, + protos.google.privacy.dlp.v2.IRedactImageRequest | undefined, + {} | undefined, + ] + >; + redactImage( + request: protos.google.privacy.dlp.v2.IRedactImageRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IRedactImageResponse, + protos.google.privacy.dlp.v2.IRedactImageRequest | null | undefined, + {} | null | undefined + >, + ): void; + redactImage( + request: protos.google.privacy.dlp.v2.IRedactImageRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IRedactImageResponse, + protos.google.privacy.dlp.v2.IRedactImageRequest | null | undefined, + {} | null | undefined + >, + ): void; + redactImage( + request?: protos.google.privacy.dlp.v2.IRedactImageRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IRedactImageResponse, + protos.google.privacy.dlp.v2.IRedactImageRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IRedactImageResponse, + protos.google.privacy.dlp.v2.IRedactImageRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IRedactImageResponse, + protos.google.privacy.dlp.v2.IRedactImageRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('redactImage request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IRedactImageResponse, + protos.google.privacy.dlp.v2.IRedactImageRequest | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('redactImage response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .redactImage(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IRedactImageResponse, + protos.google.privacy.dlp.v2.IRedactImageRequest | undefined, + {} | undefined, + ]) => { + this._log.info('redactImage response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * De-identifies potentially sensitive info from a ContentItem. + * This method has limits on input size and output size. + * See + * https://cloud.google.com/sensitive-data-protection/docs/deidentify-sensitive-data + * to learn more. + * + * When no InfoTypes or CustomInfoTypes are specified in this request, the + * system will automatically choose what detectors to run. By default this may + * be all types, but may change over time as detectors are updated. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Parent resource name. + * + * The format of this value varies depending on whether you have [specified a + * processing + * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {google.privacy.dlp.v2.DeidentifyConfig} request.deidentifyConfig + * Configuration for the de-identification of the content item. + * Items specified here will override the template referenced by the + * deidentify_template_name argument. + * @param {google.privacy.dlp.v2.InspectConfig} request.inspectConfig + * Configuration for the inspector. + * Items specified here will override the template referenced by the + * inspect_template_name argument. + * @param {google.privacy.dlp.v2.ContentItem} request.item + * The item to de-identify. Will be treated as text. + * + * This value must be of type + * {@link protos.google.privacy.dlp.v2.Table|Table} if your + * {@link protos.google.privacy.dlp.v2.DeidentifyContentRequest.deidentify_config|deidentify_config} + * is a + * {@link protos.google.privacy.dlp.v2.RecordTransformations|RecordTransformations} + * object. + * @param {string} request.inspectTemplateName + * Template to use. Any configuration directly specified in + * inspect_config will override those set in the template. Singular fields + * that are set in this request will replace their corresponding fields in the + * template. Repeated fields are appended. Singular sub-messages and groups + * are recursively merged. + * @param {string} request.deidentifyTemplateName + * Template to use. Any configuration directly specified in + * deidentify_config will override those set in the template. Singular fields + * that are set in this request will replace their corresponding fields in the + * template. Repeated fields are appended. Singular sub-messages and groups + * are recursively merged. + * @param {string} request.locationId + * Deprecated. This field has no effect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.DeidentifyContentResponse|DeidentifyContentResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.deidentify_content.js + * region_tag:dlp_v2_generated_DlpService_DeidentifyContent_async + */ + deidentifyContent( + request?: protos.google.privacy.dlp.v2.IDeidentifyContentRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDeidentifyContentResponse, + protos.google.privacy.dlp.v2.IDeidentifyContentRequest | undefined, + {} | undefined, + ] + >; + deidentifyContent( + request: protos.google.privacy.dlp.v2.IDeidentifyContentRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IDeidentifyContentResponse, + protos.google.privacy.dlp.v2.IDeidentifyContentRequest | null | undefined, + {} | null | undefined + >, + ): void; + deidentifyContent( + request: protos.google.privacy.dlp.v2.IDeidentifyContentRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IDeidentifyContentResponse, + protos.google.privacy.dlp.v2.IDeidentifyContentRequest | null | undefined, + {} | null | undefined + >, + ): void; + deidentifyContent( + request?: protos.google.privacy.dlp.v2.IDeidentifyContentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IDeidentifyContentResponse, + | protos.google.privacy.dlp.v2.IDeidentifyContentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IDeidentifyContentResponse, + protos.google.privacy.dlp.v2.IDeidentifyContentRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDeidentifyContentResponse, + protos.google.privacy.dlp.v2.IDeidentifyContentRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('deidentifyContent request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IDeidentifyContentResponse, + | protos.google.privacy.dlp.v2.IDeidentifyContentRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deidentifyContent response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deidentifyContent(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IDeidentifyContentResponse, + protos.google.privacy.dlp.v2.IDeidentifyContentRequest | undefined, + {} | undefined, + ]) => { + this._log.info('deidentifyContent response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Re-identifies content that has been de-identified. + * See + * https://cloud.google.com/sensitive-data-protection/docs/pseudonymization#re-identification_in_free_text_code_example + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value varies depending on whether you have [specified a + * processing + * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {google.privacy.dlp.v2.DeidentifyConfig} request.reidentifyConfig + * Configuration for the re-identification of the content item. + * This field shares the same proto message type that is used for + * de-identification, however its usage here is for the reversal of the + * previous de-identification. Re-identification is performed by examining + * the transformations used to de-identify the items and executing the + * reverse. This requires that only reversible transformations + * be provided here. The reversible transformations are: + * + * - `CryptoDeterministicConfig` + * - `CryptoReplaceFfxFpeConfig` + * @param {google.privacy.dlp.v2.InspectConfig} request.inspectConfig + * Configuration for the inspector. + * @param {google.privacy.dlp.v2.ContentItem} request.item + * The item to re-identify. Will be treated as text. + * @param {string} request.inspectTemplateName + * Template to use. Any configuration directly specified in + * `inspect_config` will override those set in the template. Singular fields + * that are set in this request will replace their corresponding fields in the + * template. Repeated fields are appended. Singular sub-messages and groups + * are recursively merged. + * @param {string} request.reidentifyTemplateName + * Template to use. References an instance of `DeidentifyTemplate`. + * Any configuration directly specified in `reidentify_config` or + * `inspect_config` will override those set in the template. The + * `DeidentifyTemplate` used must include only reversible transformations. + * Singular fields that are set in this request will replace their + * corresponding fields in the template. Repeated fields are appended. + * Singular sub-messages and groups are recursively merged. + * @param {string} request.locationId + * Deprecated. This field has no effect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.ReidentifyContentResponse|ReidentifyContentResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.reidentify_content.js + * region_tag:dlp_v2_generated_DlpService_ReidentifyContent_async + */ + reidentifyContent( + request?: protos.google.privacy.dlp.v2.IReidentifyContentRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IReidentifyContentResponse, + protos.google.privacy.dlp.v2.IReidentifyContentRequest | undefined, + {} | undefined, + ] + >; + reidentifyContent( + request: protos.google.privacy.dlp.v2.IReidentifyContentRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IReidentifyContentResponse, + protos.google.privacy.dlp.v2.IReidentifyContentRequest | null | undefined, + {} | null | undefined + >, + ): void; + reidentifyContent( + request: protos.google.privacy.dlp.v2.IReidentifyContentRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IReidentifyContentResponse, + protos.google.privacy.dlp.v2.IReidentifyContentRequest | null | undefined, + {} | null | undefined + >, + ): void; + reidentifyContent( + request?: protos.google.privacy.dlp.v2.IReidentifyContentRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IReidentifyContentResponse, + | protos.google.privacy.dlp.v2.IReidentifyContentRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IReidentifyContentResponse, + protos.google.privacy.dlp.v2.IReidentifyContentRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IReidentifyContentResponse, + protos.google.privacy.dlp.v2.IReidentifyContentRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('reidentifyContent request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IReidentifyContentResponse, + | protos.google.privacy.dlp.v2.IReidentifyContentRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('reidentifyContent response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .reidentifyContent(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IReidentifyContentResponse, + protos.google.privacy.dlp.v2.IReidentifyContentRequest | undefined, + {} | undefined, + ]) => { + this._log.info('reidentifyContent response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Returns a list of the sensitive information types that the DLP API + * supports. See + * https://cloud.google.com/sensitive-data-protection/docs/infotypes-reference + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The parent resource name. + * + * The format of this value is as follows: + * + * `locations/{location_id}` + * @param {string} request.languageCode + * BCP-47 language code for localized infoType friendly + * names. If omitted, or if localized strings are not available, + * en-US strings will be returned. + * @param {string} request.filter + * filter to only return infoTypes supported by certain parts of the + * API. Defaults to supported_by=INSPECT. + * @param {string} request.locationId + * Deprecated. This field has no effect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.ListInfoTypesResponse|ListInfoTypesResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.list_info_types.js + * region_tag:dlp_v2_generated_DlpService_ListInfoTypes_async + */ + listInfoTypes( + request?: protos.google.privacy.dlp.v2.IListInfoTypesRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IListInfoTypesResponse, + protos.google.privacy.dlp.v2.IListInfoTypesRequest | undefined, + {} | undefined, + ] + >; + listInfoTypes( + request: protos.google.privacy.dlp.v2.IListInfoTypesRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IListInfoTypesResponse, + protos.google.privacy.dlp.v2.IListInfoTypesRequest | null | undefined, + {} | null | undefined + >, + ): void; + listInfoTypes( + request: protos.google.privacy.dlp.v2.IListInfoTypesRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IListInfoTypesResponse, + protos.google.privacy.dlp.v2.IListInfoTypesRequest | null | undefined, + {} | null | undefined + >, + ): void; + listInfoTypes( + request?: protos.google.privacy.dlp.v2.IListInfoTypesRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IListInfoTypesResponse, + protos.google.privacy.dlp.v2.IListInfoTypesRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IListInfoTypesResponse, + protos.google.privacy.dlp.v2.IListInfoTypesRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IListInfoTypesResponse, + protos.google.privacy.dlp.v2.IListInfoTypesRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listInfoTypes request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IListInfoTypesResponse, + protos.google.privacy.dlp.v2.IListInfoTypesRequest | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('listInfoTypes response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .listInfoTypes(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IListInfoTypesResponse, + protos.google.privacy.dlp.v2.IListInfoTypesRequest | undefined, + {} | undefined, + ]) => { + this._log.info('listInfoTypes response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Creates an InspectTemplate for reusing frequently used configuration + * for inspecting content, images, and storage. + * See + * https://cloud.google.com/sensitive-data-protection/docs/creating-templates + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value varies depending on the scope of the request + * (project or organization) and whether you have [specified a processing + * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + Organizations scope, location specified: + * `organizations/{org_id}/locations/{location_id}` + * + Organizations scope, no location specified (defaults to global): + * `organizations/{org_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {google.privacy.dlp.v2.InspectTemplate} request.inspectTemplate + * Required. The InspectTemplate to create. + * @param {string} request.templateId + * The template id can contain uppercase and lowercase letters, + * numbers, and hyphens; that is, it must match the regular + * expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + * characters. Can be empty to allow the system to generate one. + * @param {string} request.locationId + * Deprecated. This field has no effect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.InspectTemplate|InspectTemplate}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.create_inspect_template.js + * region_tag:dlp_v2_generated_DlpService_CreateInspectTemplate_async + */ + createInspectTemplate( + request?: protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IInspectTemplate, + protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest | undefined, + {} | undefined, + ] + >; + createInspectTemplate( + request: protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IInspectTemplate, + | protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + createInspectTemplate( + request: protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IInspectTemplate, + | protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + createInspectTemplate( + request?: protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IInspectTemplate, + | protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IInspectTemplate, + | protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IInspectTemplate, + protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('createInspectTemplate request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IInspectTemplate, + | protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createInspectTemplate response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .createInspectTemplate(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IInspectTemplate, + ( + | protos.google.privacy.dlp.v2.ICreateInspectTemplateRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('createInspectTemplate response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Updates the InspectTemplate. + * See + * https://cloud.google.com/sensitive-data-protection/docs/creating-templates + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of organization and inspectTemplate to be updated, + * for example `organizations/433245324/inspectTemplates/432452342` or + * projects/project-id/inspectTemplates/432452342. + * @param {google.privacy.dlp.v2.InspectTemplate} request.inspectTemplate + * New InspectTemplate value. + * @param {google.protobuf.FieldMask} request.updateMask + * Mask to control which fields get updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.InspectTemplate|InspectTemplate}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.update_inspect_template.js + * region_tag:dlp_v2_generated_DlpService_UpdateInspectTemplate_async + */ + updateInspectTemplate( + request?: protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IInspectTemplate, + protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest | undefined, + {} | undefined, + ] + >; + updateInspectTemplate( + request: protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IInspectTemplate, + | protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + updateInspectTemplate( + request: protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IInspectTemplate, + | protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + updateInspectTemplate( + request?: protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IInspectTemplate, + | protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IInspectTemplate, + | protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IInspectTemplate, + protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('updateInspectTemplate request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IInspectTemplate, + | protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateInspectTemplate response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .updateInspectTemplate(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IInspectTemplate, + ( + | protos.google.privacy.dlp.v2.IUpdateInspectTemplateRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('updateInspectTemplate response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets an InspectTemplate. + * See + * https://cloud.google.com/sensitive-data-protection/docs/creating-templates + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the organization and inspectTemplate to be read, + * for example `organizations/433245324/inspectTemplates/432452342` or + * projects/project-id/inspectTemplates/432452342. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.InspectTemplate|InspectTemplate}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.get_inspect_template.js + * region_tag:dlp_v2_generated_DlpService_GetInspectTemplate_async + */ + getInspectTemplate( + request?: protos.google.privacy.dlp.v2.IGetInspectTemplateRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IInspectTemplate, + protos.google.privacy.dlp.v2.IGetInspectTemplateRequest | undefined, + {} | undefined, + ] + >; + getInspectTemplate( + request: protos.google.privacy.dlp.v2.IGetInspectTemplateRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IInspectTemplate, + | protos.google.privacy.dlp.v2.IGetInspectTemplateRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getInspectTemplate( + request: protos.google.privacy.dlp.v2.IGetInspectTemplateRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IInspectTemplate, + | protos.google.privacy.dlp.v2.IGetInspectTemplateRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getInspectTemplate( + request?: protos.google.privacy.dlp.v2.IGetInspectTemplateRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IInspectTemplate, + | protos.google.privacy.dlp.v2.IGetInspectTemplateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IInspectTemplate, + | protos.google.privacy.dlp.v2.IGetInspectTemplateRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IInspectTemplate, + protos.google.privacy.dlp.v2.IGetInspectTemplateRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getInspectTemplate request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IInspectTemplate, + | protos.google.privacy.dlp.v2.IGetInspectTemplateRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getInspectTemplate response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getInspectTemplate(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IInspectTemplate, + protos.google.privacy.dlp.v2.IGetInspectTemplateRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getInspectTemplate response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Deletes an InspectTemplate. + * See + * https://cloud.google.com/sensitive-data-protection/docs/creating-templates + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the organization and inspectTemplate to be + * deleted, for example `organizations/433245324/inspectTemplates/432452342` + * or projects/project-id/inspectTemplates/432452342. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.delete_inspect_template.js + * region_tag:dlp_v2_generated_DlpService_DeleteInspectTemplate_async + */ + deleteInspectTemplate( + request?: protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest | undefined, + {} | undefined, + ] + >; + deleteInspectTemplate( + request: protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteInspectTemplate( + request: protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteInspectTemplate( + request?: protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('deleteInspectTemplate request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteInspectTemplate response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deleteInspectTemplate(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + ( + | protos.google.privacy.dlp.v2.IDeleteInspectTemplateRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('deleteInspectTemplate response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Creates a DeidentifyTemplate for reusing frequently used configuration + * for de-identifying content, images, and storage. + * See + * https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value varies depending on the scope of the request + * (project or organization) and whether you have [specified a processing + * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + Organizations scope, location specified: + * `organizations/{org_id}/locations/{location_id}` + * + Organizations scope, no location specified (defaults to global): + * `organizations/{org_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {google.privacy.dlp.v2.DeidentifyTemplate} request.deidentifyTemplate + * Required. The DeidentifyTemplate to create. + * @param {string} request.templateId + * The template id can contain uppercase and lowercase letters, + * numbers, and hyphens; that is, it must match the regular + * expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + * characters. Can be empty to allow the system to generate one. + * @param {string} request.locationId + * Deprecated. This field has no effect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.DeidentifyTemplate|DeidentifyTemplate}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.create_deidentify_template.js + * region_tag:dlp_v2_generated_DlpService_CreateDeidentifyTemplate_async + */ + createDeidentifyTemplate( + request?: protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDeidentifyTemplate, + protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest | undefined, + {} | undefined, + ] + >; + createDeidentifyTemplate( + request: protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IDeidentifyTemplate, + | protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + createDeidentifyTemplate( + request: protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IDeidentifyTemplate, + | protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + createDeidentifyTemplate( + request?: protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IDeidentifyTemplate, + | protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IDeidentifyTemplate, + | protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDeidentifyTemplate, + protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('createDeidentifyTemplate request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IDeidentifyTemplate, + | protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createDeidentifyTemplate response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .createDeidentifyTemplate(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IDeidentifyTemplate, + ( + | protos.google.privacy.dlp.v2.ICreateDeidentifyTemplateRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('createDeidentifyTemplate response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Updates the DeidentifyTemplate. + * See + * https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of organization and deidentify template to be + * updated, for example + * `organizations/433245324/deidentifyTemplates/432452342` or + * projects/project-id/deidentifyTemplates/432452342. + * @param {google.privacy.dlp.v2.DeidentifyTemplate} request.deidentifyTemplate + * New DeidentifyTemplate value. + * @param {google.protobuf.FieldMask} request.updateMask + * Mask to control which fields get updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.DeidentifyTemplate|DeidentifyTemplate}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.update_deidentify_template.js + * region_tag:dlp_v2_generated_DlpService_UpdateDeidentifyTemplate_async + */ + updateDeidentifyTemplate( + request?: protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDeidentifyTemplate, + protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest | undefined, + {} | undefined, + ] + >; + updateDeidentifyTemplate( + request: protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IDeidentifyTemplate, + | protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + updateDeidentifyTemplate( + request: protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IDeidentifyTemplate, + | protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + updateDeidentifyTemplate( + request?: protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IDeidentifyTemplate, + | protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IDeidentifyTemplate, + | protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDeidentifyTemplate, + protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('updateDeidentifyTemplate request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IDeidentifyTemplate, + | protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateDeidentifyTemplate response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .updateDeidentifyTemplate(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IDeidentifyTemplate, + ( + | protos.google.privacy.dlp.v2.IUpdateDeidentifyTemplateRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('updateDeidentifyTemplate response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets a DeidentifyTemplate. + * See + * https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the organization and deidentify template to be + * read, for example `organizations/433245324/deidentifyTemplates/432452342` + * or projects/project-id/deidentifyTemplates/432452342. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.DeidentifyTemplate|DeidentifyTemplate}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.get_deidentify_template.js + * region_tag:dlp_v2_generated_DlpService_GetDeidentifyTemplate_async + */ + getDeidentifyTemplate( + request?: protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDeidentifyTemplate, + protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest | undefined, + {} | undefined, + ] + >; + getDeidentifyTemplate( + request: protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IDeidentifyTemplate, + | protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getDeidentifyTemplate( + request: protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IDeidentifyTemplate, + | protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getDeidentifyTemplate( + request?: protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IDeidentifyTemplate, + | protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IDeidentifyTemplate, + | protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDeidentifyTemplate, + protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getDeidentifyTemplate request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IDeidentifyTemplate, + | protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getDeidentifyTemplate response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getDeidentifyTemplate(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IDeidentifyTemplate, + ( + | protos.google.privacy.dlp.v2.IGetDeidentifyTemplateRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('getDeidentifyTemplate response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Deletes a DeidentifyTemplate. + * See + * https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the organization and deidentify template to be + * deleted, for example + * `organizations/433245324/deidentifyTemplates/432452342` or + * projects/project-id/deidentifyTemplates/432452342. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.delete_deidentify_template.js + * region_tag:dlp_v2_generated_DlpService_DeleteDeidentifyTemplate_async + */ + deleteDeidentifyTemplate( + request?: protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest | undefined, + {} | undefined, + ] + >; + deleteDeidentifyTemplate( + request: protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteDeidentifyTemplate( + request: protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteDeidentifyTemplate( + request?: protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('deleteDeidentifyTemplate request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteDeidentifyTemplate response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deleteDeidentifyTemplate(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + ( + | protos.google.privacy.dlp.v2.IDeleteDeidentifyTemplateRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('deleteDeidentifyTemplate response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Creates a job trigger to run DLP actions such as scanning storage for + * sensitive information on a set schedule. + * See + * https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value varies depending on whether you have [specified a + * processing + * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {google.privacy.dlp.v2.JobTrigger} request.jobTrigger + * Required. The JobTrigger to create. + * @param {string} request.triggerId + * The trigger id can contain uppercase and lowercase letters, + * numbers, and hyphens; that is, it must match the regular + * expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + * characters. Can be empty to allow the system to generate one. + * @param {string} request.locationId + * Deprecated. This field has no effect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.JobTrigger|JobTrigger}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.create_job_trigger.js + * region_tag:dlp_v2_generated_DlpService_CreateJobTrigger_async + */ + createJobTrigger( + request?: protos.google.privacy.dlp.v2.ICreateJobTriggerRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IJobTrigger, + protos.google.privacy.dlp.v2.ICreateJobTriggerRequest | undefined, + {} | undefined, + ] + >; + createJobTrigger( + request: protos.google.privacy.dlp.v2.ICreateJobTriggerRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IJobTrigger, + protos.google.privacy.dlp.v2.ICreateJobTriggerRequest | null | undefined, + {} | null | undefined + >, + ): void; + createJobTrigger( + request: protos.google.privacy.dlp.v2.ICreateJobTriggerRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IJobTrigger, + protos.google.privacy.dlp.v2.ICreateJobTriggerRequest | null | undefined, + {} | null | undefined + >, + ): void; + createJobTrigger( + request?: protos.google.privacy.dlp.v2.ICreateJobTriggerRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IJobTrigger, + | protos.google.privacy.dlp.v2.ICreateJobTriggerRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IJobTrigger, + protos.google.privacy.dlp.v2.ICreateJobTriggerRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IJobTrigger, + protos.google.privacy.dlp.v2.ICreateJobTriggerRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('createJobTrigger request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IJobTrigger, + | protos.google.privacy.dlp.v2.ICreateJobTriggerRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createJobTrigger response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .createJobTrigger(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IJobTrigger, + protos.google.privacy.dlp.v2.ICreateJobTriggerRequest | undefined, + {} | undefined, + ]) => { + this._log.info('createJobTrigger response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Updates a job trigger. + * See + * https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the project and the triggeredJob, for example + * `projects/dlp-test-project/jobTriggers/53234423`. + * @param {google.privacy.dlp.v2.JobTrigger} request.jobTrigger + * New JobTrigger value. + * @param {google.protobuf.FieldMask} request.updateMask + * Mask to control which fields get updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.JobTrigger|JobTrigger}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.update_job_trigger.js + * region_tag:dlp_v2_generated_DlpService_UpdateJobTrigger_async + */ + updateJobTrigger( + request?: protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IJobTrigger, + protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest | undefined, + {} | undefined, + ] + >; + updateJobTrigger( + request: protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IJobTrigger, + protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest | null | undefined, + {} | null | undefined + >, + ): void; + updateJobTrigger( + request: protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IJobTrigger, + protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest | null | undefined, + {} | null | undefined + >, + ): void; + updateJobTrigger( + request?: protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IJobTrigger, + | protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IJobTrigger, + protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IJobTrigger, + protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('updateJobTrigger request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IJobTrigger, + | protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateJobTrigger response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .updateJobTrigger(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IJobTrigger, + protos.google.privacy.dlp.v2.IUpdateJobTriggerRequest | undefined, + {} | undefined, + ]) => { + this._log.info('updateJobTrigger response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Inspect hybrid content and store findings to a trigger. The inspection + * will be processed asynchronously. To review the findings monitor the + * jobs within the trigger. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the trigger to execute a hybrid inspect on, for + * example `projects/dlp-test-project/jobTriggers/53234423`. + * @param {google.privacy.dlp.v2.HybridContentItem} request.hybridItem + * The item to inspect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.HybridInspectResponse|HybridInspectResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.hybrid_inspect_job_trigger.js + * region_tag:dlp_v2_generated_DlpService_HybridInspectJobTrigger_async + */ + hybridInspectJobTrigger( + request?: protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IHybridInspectResponse, + protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest | undefined, + {} | undefined, + ] + >; + hybridInspectJobTrigger( + request: protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IHybridInspectResponse, + | protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + hybridInspectJobTrigger( + request: protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IHybridInspectResponse, + | protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + hybridInspectJobTrigger( + request?: protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IHybridInspectResponse, + | protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IHybridInspectResponse, + | protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IHybridInspectResponse, + protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('hybridInspectJobTrigger request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IHybridInspectResponse, + | protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('hybridInspectJobTrigger response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .hybridInspectJobTrigger(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IHybridInspectResponse, + ( + | protos.google.privacy.dlp.v2.IHybridInspectJobTriggerRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('hybridInspectJobTrigger response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets a job trigger. + * See + * https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the project and the triggeredJob, for example + * `projects/dlp-test-project/jobTriggers/53234423`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.JobTrigger|JobTrigger}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.get_job_trigger.js + * region_tag:dlp_v2_generated_DlpService_GetJobTrigger_async + */ + getJobTrigger( + request?: protos.google.privacy.dlp.v2.IGetJobTriggerRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IJobTrigger, + protos.google.privacy.dlp.v2.IGetJobTriggerRequest | undefined, + {} | undefined, + ] + >; + getJobTrigger( + request: protos.google.privacy.dlp.v2.IGetJobTriggerRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IJobTrigger, + protos.google.privacy.dlp.v2.IGetJobTriggerRequest | null | undefined, + {} | null | undefined + >, + ): void; + getJobTrigger( + request: protos.google.privacy.dlp.v2.IGetJobTriggerRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IJobTrigger, + protos.google.privacy.dlp.v2.IGetJobTriggerRequest | null | undefined, + {} | null | undefined + >, + ): void; + getJobTrigger( + request?: protos.google.privacy.dlp.v2.IGetJobTriggerRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IJobTrigger, + protos.google.privacy.dlp.v2.IGetJobTriggerRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IJobTrigger, + protos.google.privacy.dlp.v2.IGetJobTriggerRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IJobTrigger, + protos.google.privacy.dlp.v2.IGetJobTriggerRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getJobTrigger request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IJobTrigger, + protos.google.privacy.dlp.v2.IGetJobTriggerRequest | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getJobTrigger response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getJobTrigger(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IJobTrigger, + protos.google.privacy.dlp.v2.IGetJobTriggerRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getJobTrigger response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Deletes a job trigger. + * See + * https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the project and the triggeredJob, for example + * `projects/dlp-test-project/jobTriggers/53234423`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.delete_job_trigger.js + * region_tag:dlp_v2_generated_DlpService_DeleteJobTrigger_async + */ + deleteJobTrigger( + request?: protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest | undefined, + {} | undefined, + ] + >; + deleteJobTrigger( + request: protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest | null | undefined, + {} | null | undefined + >, + ): void; + deleteJobTrigger( + request: protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest | null | undefined, + {} | null | undefined + >, + ): void; + deleteJobTrigger( + request?: protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('deleteJobTrigger request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteJobTrigger response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deleteJobTrigger(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteJobTriggerRequest | undefined, + {} | undefined, + ]) => { + this._log.info('deleteJobTrigger response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Activate a job trigger. Causes the immediate execute of a trigger + * instead of waiting on the trigger event to occur. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the trigger to activate, for example + * `projects/dlp-test-project/jobTriggers/53234423`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.DlpJob|DlpJob}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.activate_job_trigger.js + * region_tag:dlp_v2_generated_DlpService_ActivateJobTrigger_async + */ + activateJobTrigger( + request?: protos.google.privacy.dlp.v2.IActivateJobTriggerRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDlpJob, + protos.google.privacy.dlp.v2.IActivateJobTriggerRequest | undefined, + {} | undefined, + ] + >; + activateJobTrigger( + request: protos.google.privacy.dlp.v2.IActivateJobTriggerRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IDlpJob, + | protos.google.privacy.dlp.v2.IActivateJobTriggerRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + activateJobTrigger( + request: protos.google.privacy.dlp.v2.IActivateJobTriggerRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IDlpJob, + | protos.google.privacy.dlp.v2.IActivateJobTriggerRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + activateJobTrigger( + request?: protos.google.privacy.dlp.v2.IActivateJobTriggerRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IDlpJob, + | protos.google.privacy.dlp.v2.IActivateJobTriggerRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IDlpJob, + | protos.google.privacy.dlp.v2.IActivateJobTriggerRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDlpJob, + protos.google.privacy.dlp.v2.IActivateJobTriggerRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('activateJobTrigger request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IDlpJob, + | protos.google.privacy.dlp.v2.IActivateJobTriggerRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('activateJobTrigger response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .activateJobTrigger(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IDlpJob, + protos.google.privacy.dlp.v2.IActivateJobTriggerRequest | undefined, + {} | undefined, + ]) => { + this._log.info('activateJobTrigger response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Creates a config for discovery to scan and profile storage. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value varies depending on the scope of the request + * (project or organization): + * + * + Projects scope: + * `projects/{project_id}/locations/{location_id}` + * + Organizations scope: + * `organizations/{org_id}/locations/{location_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {google.privacy.dlp.v2.DiscoveryConfig} request.discoveryConfig + * Required. The DiscoveryConfig to create. + * @param {string} request.configId + * The config ID can contain uppercase and lowercase letters, + * numbers, and hyphens; that is, it must match the regular + * expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + * characters. Can be empty to allow the system to generate one. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.DiscoveryConfig|DiscoveryConfig}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.create_discovery_config.js + * region_tag:dlp_v2_generated_DlpService_CreateDiscoveryConfig_async + */ + createDiscoveryConfig( + request?: protos.google.privacy.dlp.v2.ICreateDiscoveryConfigRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDiscoveryConfig, + protos.google.privacy.dlp.v2.ICreateDiscoveryConfigRequest | undefined, + {} | undefined, + ] + >; + createDiscoveryConfig( + request: protos.google.privacy.dlp.v2.ICreateDiscoveryConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IDiscoveryConfig, + | protos.google.privacy.dlp.v2.ICreateDiscoveryConfigRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + createDiscoveryConfig( + request: protos.google.privacy.dlp.v2.ICreateDiscoveryConfigRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IDiscoveryConfig, + | protos.google.privacy.dlp.v2.ICreateDiscoveryConfigRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + createDiscoveryConfig( + request?: protos.google.privacy.dlp.v2.ICreateDiscoveryConfigRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IDiscoveryConfig, + | protos.google.privacy.dlp.v2.ICreateDiscoveryConfigRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IDiscoveryConfig, + | protos.google.privacy.dlp.v2.ICreateDiscoveryConfigRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDiscoveryConfig, + protos.google.privacy.dlp.v2.ICreateDiscoveryConfigRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('createDiscoveryConfig request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IDiscoveryConfig, + | protos.google.privacy.dlp.v2.ICreateDiscoveryConfigRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createDiscoveryConfig response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .createDiscoveryConfig(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IDiscoveryConfig, + ( + | protos.google.privacy.dlp.v2.ICreateDiscoveryConfigRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('createDiscoveryConfig response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Updates a discovery configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the project and the configuration, for example + * `projects/dlp-test-project/discoveryConfigs/53234423`. + * @param {google.privacy.dlp.v2.DiscoveryConfig} request.discoveryConfig + * Required. New DiscoveryConfig value. + * @param {google.protobuf.FieldMask} request.updateMask + * Mask to control which fields get updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.DiscoveryConfig|DiscoveryConfig}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.update_discovery_config.js + * region_tag:dlp_v2_generated_DlpService_UpdateDiscoveryConfig_async + */ + updateDiscoveryConfig( + request?: protos.google.privacy.dlp.v2.IUpdateDiscoveryConfigRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDiscoveryConfig, + protos.google.privacy.dlp.v2.IUpdateDiscoveryConfigRequest | undefined, + {} | undefined, + ] + >; + updateDiscoveryConfig( + request: protos.google.privacy.dlp.v2.IUpdateDiscoveryConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IDiscoveryConfig, + | protos.google.privacy.dlp.v2.IUpdateDiscoveryConfigRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + updateDiscoveryConfig( + request: protos.google.privacy.dlp.v2.IUpdateDiscoveryConfigRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IDiscoveryConfig, + | protos.google.privacy.dlp.v2.IUpdateDiscoveryConfigRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + updateDiscoveryConfig( + request?: protos.google.privacy.dlp.v2.IUpdateDiscoveryConfigRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IDiscoveryConfig, + | protos.google.privacy.dlp.v2.IUpdateDiscoveryConfigRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IDiscoveryConfig, + | protos.google.privacy.dlp.v2.IUpdateDiscoveryConfigRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDiscoveryConfig, + protos.google.privacy.dlp.v2.IUpdateDiscoveryConfigRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('updateDiscoveryConfig request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IDiscoveryConfig, + | protos.google.privacy.dlp.v2.IUpdateDiscoveryConfigRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateDiscoveryConfig response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .updateDiscoveryConfig(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IDiscoveryConfig, + ( + | protos.google.privacy.dlp.v2.IUpdateDiscoveryConfigRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('updateDiscoveryConfig response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets a discovery configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the project and the configuration, for example + * `projects/dlp-test-project/discoveryConfigs/53234423`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.DiscoveryConfig|DiscoveryConfig}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.get_discovery_config.js + * region_tag:dlp_v2_generated_DlpService_GetDiscoveryConfig_async + */ + getDiscoveryConfig( + request?: protos.google.privacy.dlp.v2.IGetDiscoveryConfigRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDiscoveryConfig, + protos.google.privacy.dlp.v2.IGetDiscoveryConfigRequest | undefined, + {} | undefined, + ] + >; + getDiscoveryConfig( + request: protos.google.privacy.dlp.v2.IGetDiscoveryConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IDiscoveryConfig, + | protos.google.privacy.dlp.v2.IGetDiscoveryConfigRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getDiscoveryConfig( + request: protos.google.privacy.dlp.v2.IGetDiscoveryConfigRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IDiscoveryConfig, + | protos.google.privacy.dlp.v2.IGetDiscoveryConfigRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getDiscoveryConfig( + request?: protos.google.privacy.dlp.v2.IGetDiscoveryConfigRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IDiscoveryConfig, + | protos.google.privacy.dlp.v2.IGetDiscoveryConfigRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IDiscoveryConfig, + | protos.google.privacy.dlp.v2.IGetDiscoveryConfigRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDiscoveryConfig, + protos.google.privacy.dlp.v2.IGetDiscoveryConfigRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getDiscoveryConfig request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IDiscoveryConfig, + | protos.google.privacy.dlp.v2.IGetDiscoveryConfigRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getDiscoveryConfig response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getDiscoveryConfig(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IDiscoveryConfig, + protos.google.privacy.dlp.v2.IGetDiscoveryConfigRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getDiscoveryConfig response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Deletes a discovery configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the project and the config, for example + * `projects/dlp-test-project/discoveryConfigs/53234423`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.delete_discovery_config.js + * region_tag:dlp_v2_generated_DlpService_DeleteDiscoveryConfig_async + */ + deleteDiscoveryConfig( + request?: protos.google.privacy.dlp.v2.IDeleteDiscoveryConfigRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteDiscoveryConfigRequest | undefined, + {} | undefined, + ] + >; + deleteDiscoveryConfig( + request: protos.google.privacy.dlp.v2.IDeleteDiscoveryConfigRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteDiscoveryConfigRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteDiscoveryConfig( + request: protos.google.privacy.dlp.v2.IDeleteDiscoveryConfigRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteDiscoveryConfigRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteDiscoveryConfig( + request?: protos.google.privacy.dlp.v2.IDeleteDiscoveryConfigRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteDiscoveryConfigRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteDiscoveryConfigRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteDiscoveryConfigRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('deleteDiscoveryConfig request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteDiscoveryConfigRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteDiscoveryConfig response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deleteDiscoveryConfig(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + ( + | protos.google.privacy.dlp.v2.IDeleteDiscoveryConfigRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('deleteDiscoveryConfig response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Creates a new job to inspect storage or calculate risk metrics. + * See + * https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage + * and + * https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis + * to learn more. + * + * When no InfoTypes or CustomInfoTypes are specified in inspect jobs, the + * system will automatically choose what detectors to run. By default this may + * be all types, but may change over time as detectors are updated. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value varies depending on whether you have [specified a + * processing + * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {google.privacy.dlp.v2.InspectJobConfig} request.inspectJob + * An inspection job scans a storage repository for InfoTypes. + * @param {google.privacy.dlp.v2.RiskAnalysisJobConfig} request.riskJob + * A risk analysis job calculates re-identification risk metrics for a + * BigQuery table. + * @param {string} request.jobId + * The job id can contain uppercase and lowercase letters, + * numbers, and hyphens; that is, it must match the regular + * expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + * characters. Can be empty to allow the system to generate one. + * @param {string} request.locationId + * Deprecated. This field has no effect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.DlpJob|DlpJob}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.create_dlp_job.js + * region_tag:dlp_v2_generated_DlpService_CreateDlpJob_async + */ + createDlpJob( + request?: protos.google.privacy.dlp.v2.ICreateDlpJobRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDlpJob, + protos.google.privacy.dlp.v2.ICreateDlpJobRequest | undefined, + {} | undefined, + ] + >; + createDlpJob( + request: protos.google.privacy.dlp.v2.ICreateDlpJobRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IDlpJob, + protos.google.privacy.dlp.v2.ICreateDlpJobRequest | null | undefined, + {} | null | undefined + >, + ): void; + createDlpJob( + request: protos.google.privacy.dlp.v2.ICreateDlpJobRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IDlpJob, + protos.google.privacy.dlp.v2.ICreateDlpJobRequest | null | undefined, + {} | null | undefined + >, + ): void; + createDlpJob( + request?: protos.google.privacy.dlp.v2.ICreateDlpJobRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IDlpJob, + protos.google.privacy.dlp.v2.ICreateDlpJobRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IDlpJob, + protos.google.privacy.dlp.v2.ICreateDlpJobRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDlpJob, + protos.google.privacy.dlp.v2.ICreateDlpJobRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('createDlpJob request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IDlpJob, + protos.google.privacy.dlp.v2.ICreateDlpJobRequest | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createDlpJob response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .createDlpJob(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IDlpJob, + protos.google.privacy.dlp.v2.ICreateDlpJobRequest | undefined, + {} | undefined, + ]) => { + this._log.info('createDlpJob response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets the latest state of a long-running DlpJob. + * See + * https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage + * and + * https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the DlpJob resource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.DlpJob|DlpJob}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.get_dlp_job.js + * region_tag:dlp_v2_generated_DlpService_GetDlpJob_async + */ + getDlpJob( + request?: protos.google.privacy.dlp.v2.IGetDlpJobRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDlpJob, + protos.google.privacy.dlp.v2.IGetDlpJobRequest | undefined, + {} | undefined, + ] + >; + getDlpJob( + request: protos.google.privacy.dlp.v2.IGetDlpJobRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IDlpJob, + protos.google.privacy.dlp.v2.IGetDlpJobRequest | null | undefined, + {} | null | undefined + >, + ): void; + getDlpJob( + request: protos.google.privacy.dlp.v2.IGetDlpJobRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IDlpJob, + protos.google.privacy.dlp.v2.IGetDlpJobRequest | null | undefined, + {} | null | undefined + >, + ): void; + getDlpJob( + request?: protos.google.privacy.dlp.v2.IGetDlpJobRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IDlpJob, + protos.google.privacy.dlp.v2.IGetDlpJobRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IDlpJob, + protos.google.privacy.dlp.v2.IGetDlpJobRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDlpJob, + protos.google.privacy.dlp.v2.IGetDlpJobRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getDlpJob request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IDlpJob, + protos.google.privacy.dlp.v2.IGetDlpJobRequest | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getDlpJob response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getDlpJob(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IDlpJob, + protos.google.privacy.dlp.v2.IGetDlpJobRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getDlpJob response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Deletes a long-running DlpJob. This method indicates that the client is + * no longer interested in the DlpJob result. The job will be canceled if + * possible. + * See + * https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage + * and + * https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the DlpJob resource to be deleted. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.delete_dlp_job.js + * region_tag:dlp_v2_generated_DlpService_DeleteDlpJob_async + */ + deleteDlpJob( + request?: protos.google.privacy.dlp.v2.IDeleteDlpJobRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteDlpJobRequest | undefined, + {} | undefined, + ] + >; + deleteDlpJob( + request: protos.google.privacy.dlp.v2.IDeleteDlpJobRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteDlpJobRequest | null | undefined, + {} | null | undefined + >, + ): void; + deleteDlpJob( + request: protos.google.privacy.dlp.v2.IDeleteDlpJobRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteDlpJobRequest | null | undefined, + {} | null | undefined + >, + ): void; + deleteDlpJob( + request?: protos.google.privacy.dlp.v2.IDeleteDlpJobRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteDlpJobRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteDlpJobRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteDlpJobRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('deleteDlpJob request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteDlpJobRequest | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteDlpJob response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deleteDlpJob(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteDlpJobRequest | undefined, + {} | undefined, + ]) => { + this._log.info('deleteDlpJob response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Starts asynchronous cancellation on a long-running DlpJob. The server + * makes a best effort to cancel the DlpJob, but success is not + * guaranteed. + * See + * https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage + * and + * https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the DlpJob resource to be cancelled. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.cancel_dlp_job.js + * region_tag:dlp_v2_generated_DlpService_CancelDlpJob_async + */ + cancelDlpJob( + request?: protos.google.privacy.dlp.v2.ICancelDlpJobRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.ICancelDlpJobRequest | undefined, + {} | undefined, + ] + >; + cancelDlpJob( + request: protos.google.privacy.dlp.v2.ICancelDlpJobRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.ICancelDlpJobRequest | null | undefined, + {} | null | undefined + >, + ): void; + cancelDlpJob( + request: protos.google.privacy.dlp.v2.ICancelDlpJobRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.ICancelDlpJobRequest | null | undefined, + {} | null | undefined + >, + ): void; + cancelDlpJob( + request?: protos.google.privacy.dlp.v2.ICancelDlpJobRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.ICancelDlpJobRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.ICancelDlpJobRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.ICancelDlpJobRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('cancelDlpJob request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.ICancelDlpJobRequest | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('cancelDlpJob response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .cancelDlpJob(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.ICancelDlpJobRequest | undefined, + {} | undefined, + ]) => { + this._log.info('cancelDlpJob response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Creates a pre-built stored infoType to be used for inspection. + * See + * https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value varies depending on the scope of the request + * (project or organization) and whether you have [specified a processing + * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + Organizations scope, location specified: + * `organizations/{org_id}/locations/{location_id}` + * + Organizations scope, no location specified (defaults to global): + * `organizations/{org_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {google.privacy.dlp.v2.StoredInfoTypeConfig} request.config + * Required. Configuration of the storedInfoType to create. + * @param {string} request.storedInfoTypeId + * The storedInfoType ID can contain uppercase and lowercase letters, + * numbers, and hyphens; that is, it must match the regular + * expression: `[a-zA-Z\d-_]+`. The maximum length is 100 + * characters. Can be empty to allow the system to generate one. + * @param {string} request.locationId + * Deprecated. This field has no effect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.StoredInfoType|StoredInfoType}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.create_stored_info_type.js + * region_tag:dlp_v2_generated_DlpService_CreateStoredInfoType_async + */ + createStoredInfoType( + request?: protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IStoredInfoType, + protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest | undefined, + {} | undefined, + ] + >; + createStoredInfoType( + request: protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IStoredInfoType, + | protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + createStoredInfoType( + request: protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IStoredInfoType, + | protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + createStoredInfoType( + request?: protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IStoredInfoType, + | protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IStoredInfoType, + | protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IStoredInfoType, + protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('createStoredInfoType request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IStoredInfoType, + | protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createStoredInfoType response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .createStoredInfoType(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IStoredInfoType, + protos.google.privacy.dlp.v2.ICreateStoredInfoTypeRequest | undefined, + {} | undefined, + ]) => { + this._log.info('createStoredInfoType response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Updates the stored infoType by creating a new version. The existing version + * will continue to be used until the new version is ready. + * See + * https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of organization and storedInfoType to be updated, + * for example `organizations/433245324/storedInfoTypes/432452342` or + * projects/project-id/storedInfoTypes/432452342. + * @param {google.privacy.dlp.v2.StoredInfoTypeConfig} request.config + * Updated configuration for the storedInfoType. If not provided, a new + * version of the storedInfoType will be created with the existing + * configuration. + * @param {google.protobuf.FieldMask} request.updateMask + * Mask to control which fields get updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.StoredInfoType|StoredInfoType}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.update_stored_info_type.js + * region_tag:dlp_v2_generated_DlpService_UpdateStoredInfoType_async + */ + updateStoredInfoType( + request?: protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IStoredInfoType, + protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest | undefined, + {} | undefined, + ] + >; + updateStoredInfoType( + request: protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IStoredInfoType, + | protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + updateStoredInfoType( + request: protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IStoredInfoType, + | protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + updateStoredInfoType( + request?: protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IStoredInfoType, + | protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IStoredInfoType, + | protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IStoredInfoType, + protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('updateStoredInfoType request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IStoredInfoType, + | protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateStoredInfoType response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .updateStoredInfoType(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IStoredInfoType, + protos.google.privacy.dlp.v2.IUpdateStoredInfoTypeRequest | undefined, + {} | undefined, + ]) => { + this._log.info('updateStoredInfoType response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets a stored infoType. + * See + * https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the organization and storedInfoType to be read, + * for example `organizations/433245324/storedInfoTypes/432452342` or + * projects/project-id/storedInfoTypes/432452342. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.StoredInfoType|StoredInfoType}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.get_stored_info_type.js + * region_tag:dlp_v2_generated_DlpService_GetStoredInfoType_async + */ + getStoredInfoType( + request?: protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IStoredInfoType, + protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest | undefined, + {} | undefined, + ] + >; + getStoredInfoType( + request: protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IStoredInfoType, + protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest | null | undefined, + {} | null | undefined + >, + ): void; + getStoredInfoType( + request: protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IStoredInfoType, + protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest | null | undefined, + {} | null | undefined + >, + ): void; + getStoredInfoType( + request?: protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IStoredInfoType, + | protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IStoredInfoType, + protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IStoredInfoType, + protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getStoredInfoType request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IStoredInfoType, + | protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getStoredInfoType response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getStoredInfoType(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IStoredInfoType, + protos.google.privacy.dlp.v2.IGetStoredInfoTypeRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getStoredInfoType response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Deletes a stored infoType. + * See + * https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the organization and storedInfoType to be + * deleted, for example `organizations/433245324/storedInfoTypes/432452342` or + * projects/project-id/storedInfoTypes/432452342. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.delete_stored_info_type.js + * region_tag:dlp_v2_generated_DlpService_DeleteStoredInfoType_async + */ + deleteStoredInfoType( + request?: protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest | undefined, + {} | undefined, + ] + >; + deleteStoredInfoType( + request: protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteStoredInfoType( + request: protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteStoredInfoType( + request?: protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('deleteStoredInfoType request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteStoredInfoType response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deleteStoredInfoType(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteStoredInfoTypeRequest | undefined, + {} | undefined, + ]) => { + this._log.info('deleteStoredInfoType response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets a project data profile. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name, for example + * `organizations/12345/locations/us/projectDataProfiles/53234423`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.ProjectDataProfile|ProjectDataProfile}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.get_project_data_profile.js + * region_tag:dlp_v2_generated_DlpService_GetProjectDataProfile_async + */ + getProjectDataProfile( + request?: protos.google.privacy.dlp.v2.IGetProjectDataProfileRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IProjectDataProfile, + protos.google.privacy.dlp.v2.IGetProjectDataProfileRequest | undefined, + {} | undefined, + ] + >; + getProjectDataProfile( + request: protos.google.privacy.dlp.v2.IGetProjectDataProfileRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IProjectDataProfile, + | protos.google.privacy.dlp.v2.IGetProjectDataProfileRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getProjectDataProfile( + request: protos.google.privacy.dlp.v2.IGetProjectDataProfileRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IProjectDataProfile, + | protos.google.privacy.dlp.v2.IGetProjectDataProfileRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getProjectDataProfile( + request?: protos.google.privacy.dlp.v2.IGetProjectDataProfileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IProjectDataProfile, + | protos.google.privacy.dlp.v2.IGetProjectDataProfileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IProjectDataProfile, + | protos.google.privacy.dlp.v2.IGetProjectDataProfileRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IProjectDataProfile, + protos.google.privacy.dlp.v2.IGetProjectDataProfileRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getProjectDataProfile request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IProjectDataProfile, + | protos.google.privacy.dlp.v2.IGetProjectDataProfileRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getProjectDataProfile response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getProjectDataProfile(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IProjectDataProfile, + ( + | protos.google.privacy.dlp.v2.IGetProjectDataProfileRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('getProjectDataProfile response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets a file store data profile. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name, for example + * `organizations/12345/locations/us/fileStoreDataProfiles/53234423`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.FileStoreDataProfile|FileStoreDataProfile}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.get_file_store_data_profile.js + * region_tag:dlp_v2_generated_DlpService_GetFileStoreDataProfile_async + */ + getFileStoreDataProfile( + request?: protos.google.privacy.dlp.v2.IGetFileStoreDataProfileRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IFileStoreDataProfile, + protos.google.privacy.dlp.v2.IGetFileStoreDataProfileRequest | undefined, + {} | undefined, + ] + >; + getFileStoreDataProfile( + request: protos.google.privacy.dlp.v2.IGetFileStoreDataProfileRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IFileStoreDataProfile, + | protos.google.privacy.dlp.v2.IGetFileStoreDataProfileRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getFileStoreDataProfile( + request: protos.google.privacy.dlp.v2.IGetFileStoreDataProfileRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IFileStoreDataProfile, + | protos.google.privacy.dlp.v2.IGetFileStoreDataProfileRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getFileStoreDataProfile( + request?: protos.google.privacy.dlp.v2.IGetFileStoreDataProfileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IFileStoreDataProfile, + | protos.google.privacy.dlp.v2.IGetFileStoreDataProfileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IFileStoreDataProfile, + | protos.google.privacy.dlp.v2.IGetFileStoreDataProfileRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IFileStoreDataProfile, + protos.google.privacy.dlp.v2.IGetFileStoreDataProfileRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getFileStoreDataProfile request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IFileStoreDataProfile, + | protos.google.privacy.dlp.v2.IGetFileStoreDataProfileRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getFileStoreDataProfile response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getFileStoreDataProfile(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IFileStoreDataProfile, + ( + | protos.google.privacy.dlp.v2.IGetFileStoreDataProfileRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('getFileStoreDataProfile response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Delete a FileStoreDataProfile. Will not prevent the profile from being + * regenerated if the resource is still included in a discovery configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the file store data profile. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.delete_file_store_data_profile.js + * region_tag:dlp_v2_generated_DlpService_DeleteFileStoreDataProfile_async + */ + deleteFileStoreDataProfile( + request?: protos.google.privacy.dlp.v2.IDeleteFileStoreDataProfileRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.privacy.dlp.v2.IDeleteFileStoreDataProfileRequest + | undefined + ), + {} | undefined, + ] + >; + deleteFileStoreDataProfile( + request: protos.google.privacy.dlp.v2.IDeleteFileStoreDataProfileRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteFileStoreDataProfileRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteFileStoreDataProfile( + request: protos.google.privacy.dlp.v2.IDeleteFileStoreDataProfileRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteFileStoreDataProfileRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteFileStoreDataProfile( + request?: protos.google.privacy.dlp.v2.IDeleteFileStoreDataProfileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteFileStoreDataProfileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteFileStoreDataProfileRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.privacy.dlp.v2.IDeleteFileStoreDataProfileRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('deleteFileStoreDataProfile request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteFileStoreDataProfileRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteFileStoreDataProfile response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deleteFileStoreDataProfile(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + ( + | protos.google.privacy.dlp.v2.IDeleteFileStoreDataProfileRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('deleteFileStoreDataProfile response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets a table data profile. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name, for example + * `organizations/12345/locations/us/tableDataProfiles/53234423`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.TableDataProfile|TableDataProfile}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.get_table_data_profile.js + * region_tag:dlp_v2_generated_DlpService_GetTableDataProfile_async + */ + getTableDataProfile( + request?: protos.google.privacy.dlp.v2.IGetTableDataProfileRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.ITableDataProfile, + protos.google.privacy.dlp.v2.IGetTableDataProfileRequest | undefined, + {} | undefined, + ] + >; + getTableDataProfile( + request: protos.google.privacy.dlp.v2.IGetTableDataProfileRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.ITableDataProfile, + | protos.google.privacy.dlp.v2.IGetTableDataProfileRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getTableDataProfile( + request: protos.google.privacy.dlp.v2.IGetTableDataProfileRequest, + callback: Callback< + protos.google.privacy.dlp.v2.ITableDataProfile, + | protos.google.privacy.dlp.v2.IGetTableDataProfileRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getTableDataProfile( + request?: protos.google.privacy.dlp.v2.IGetTableDataProfileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.ITableDataProfile, + | protos.google.privacy.dlp.v2.IGetTableDataProfileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.ITableDataProfile, + | protos.google.privacy.dlp.v2.IGetTableDataProfileRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.ITableDataProfile, + protos.google.privacy.dlp.v2.IGetTableDataProfileRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getTableDataProfile request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.ITableDataProfile, + | protos.google.privacy.dlp.v2.IGetTableDataProfileRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getTableDataProfile response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getTableDataProfile(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.ITableDataProfile, + protos.google.privacy.dlp.v2.IGetTableDataProfileRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getTableDataProfile response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets a column data profile. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name, for example + * `organizations/12345/locations/us/columnDataProfiles/53234423`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.ColumnDataProfile|ColumnDataProfile}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.get_column_data_profile.js + * region_tag:dlp_v2_generated_DlpService_GetColumnDataProfile_async + */ + getColumnDataProfile( + request?: protos.google.privacy.dlp.v2.IGetColumnDataProfileRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IColumnDataProfile, + protos.google.privacy.dlp.v2.IGetColumnDataProfileRequest | undefined, + {} | undefined, + ] + >; + getColumnDataProfile( + request: protos.google.privacy.dlp.v2.IGetColumnDataProfileRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IColumnDataProfile, + | protos.google.privacy.dlp.v2.IGetColumnDataProfileRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getColumnDataProfile( + request: protos.google.privacy.dlp.v2.IGetColumnDataProfileRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IColumnDataProfile, + | protos.google.privacy.dlp.v2.IGetColumnDataProfileRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getColumnDataProfile( + request?: protos.google.privacy.dlp.v2.IGetColumnDataProfileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IColumnDataProfile, + | protos.google.privacy.dlp.v2.IGetColumnDataProfileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IColumnDataProfile, + | protos.google.privacy.dlp.v2.IGetColumnDataProfileRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IColumnDataProfile, + protos.google.privacy.dlp.v2.IGetColumnDataProfileRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getColumnDataProfile request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IColumnDataProfile, + | protos.google.privacy.dlp.v2.IGetColumnDataProfileRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getColumnDataProfile response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getColumnDataProfile(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IColumnDataProfile, + protos.google.privacy.dlp.v2.IGetColumnDataProfileRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getColumnDataProfile response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Delete a TableDataProfile. Will not prevent the profile from being + * regenerated if the table is still included in a discovery configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the table data profile. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.delete_table_data_profile.js + * region_tag:dlp_v2_generated_DlpService_DeleteTableDataProfile_async + */ + deleteTableDataProfile( + request?: protos.google.privacy.dlp.v2.IDeleteTableDataProfileRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteTableDataProfileRequest | undefined, + {} | undefined, + ] + >; + deleteTableDataProfile( + request: protos.google.privacy.dlp.v2.IDeleteTableDataProfileRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteTableDataProfileRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteTableDataProfile( + request: protos.google.privacy.dlp.v2.IDeleteTableDataProfileRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteTableDataProfileRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteTableDataProfile( + request?: protos.google.privacy.dlp.v2.IDeleteTableDataProfileRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteTableDataProfileRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteTableDataProfileRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteTableDataProfileRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('deleteTableDataProfile request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteTableDataProfileRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteTableDataProfile response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deleteTableDataProfile(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + ( + | protos.google.privacy.dlp.v2.IDeleteTableDataProfileRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('deleteTableDataProfile response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Inspect hybrid content and store findings to a job. + * To review the findings, inspect the job. Inspection will occur + * asynchronously. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the job to execute a hybrid inspect on, for + * example `projects/dlp-test-project/dlpJob/53234423`. + * @param {google.privacy.dlp.v2.HybridContentItem} request.hybridItem + * The item to inspect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.HybridInspectResponse|HybridInspectResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.hybrid_inspect_dlp_job.js + * region_tag:dlp_v2_generated_DlpService_HybridInspectDlpJob_async + */ + hybridInspectDlpJob( + request?: protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IHybridInspectResponse, + protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest | undefined, + {} | undefined, + ] + >; + hybridInspectDlpJob( + request: protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IHybridInspectResponse, + | protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + hybridInspectDlpJob( + request: protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IHybridInspectResponse, + | protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + hybridInspectDlpJob( + request?: protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IHybridInspectResponse, + | protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IHybridInspectResponse, + | protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IHybridInspectResponse, + protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('hybridInspectDlpJob request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IHybridInspectResponse, + | protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('hybridInspectDlpJob response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .hybridInspectDlpJob(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IHybridInspectResponse, + protos.google.privacy.dlp.v2.IHybridInspectDlpJobRequest | undefined, + {} | undefined, + ]) => { + this._log.info('hybridInspectDlpJob response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Finish a running hybrid DlpJob. Triggers the finalization steps and running + * of any enabled actions that have not yet run. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the DlpJob resource to be finished. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.finish_dlp_job.js + * region_tag:dlp_v2_generated_DlpService_FinishDlpJob_async + */ + finishDlpJob( + request?: protos.google.privacy.dlp.v2.IFinishDlpJobRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IFinishDlpJobRequest | undefined, + {} | undefined, + ] + >; + finishDlpJob( + request: protos.google.privacy.dlp.v2.IFinishDlpJobRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IFinishDlpJobRequest | null | undefined, + {} | null | undefined + >, + ): void; + finishDlpJob( + request: protos.google.privacy.dlp.v2.IFinishDlpJobRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IFinishDlpJobRequest | null | undefined, + {} | null | undefined + >, + ): void; + finishDlpJob( + request?: protos.google.privacy.dlp.v2.IFinishDlpJobRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IFinishDlpJobRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IFinishDlpJobRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IFinishDlpJobRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('finishDlpJob request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IFinishDlpJobRequest | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('finishDlpJob response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .finishDlpJob(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IFinishDlpJobRequest | undefined, + {} | undefined, + ]) => { + this._log.info('finishDlpJob response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Create a Connection to an external data source. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value varies depending on the scope of the request + * (project or organization): + * + * + Projects scope: + * `projects/{project_id}/locations/{location_id}` + * + Organizations scope: + * `organizations/{org_id}/locations/{location_id}` + * @param {google.privacy.dlp.v2.Connection} request.connection + * Required. The connection resource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.Connection|Connection}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.create_connection.js + * region_tag:dlp_v2_generated_DlpService_CreateConnection_async + */ + createConnection( + request?: protos.google.privacy.dlp.v2.ICreateConnectionRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IConnection, + protos.google.privacy.dlp.v2.ICreateConnectionRequest | undefined, + {} | undefined, + ] + >; + createConnection( + request: protos.google.privacy.dlp.v2.ICreateConnectionRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IConnection, + protos.google.privacy.dlp.v2.ICreateConnectionRequest | null | undefined, + {} | null | undefined + >, + ): void; + createConnection( + request: protos.google.privacy.dlp.v2.ICreateConnectionRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IConnection, + protos.google.privacy.dlp.v2.ICreateConnectionRequest | null | undefined, + {} | null | undefined + >, + ): void; + createConnection( + request?: protos.google.privacy.dlp.v2.ICreateConnectionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IConnection, + | protos.google.privacy.dlp.v2.ICreateConnectionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IConnection, + protos.google.privacy.dlp.v2.ICreateConnectionRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IConnection, + protos.google.privacy.dlp.v2.ICreateConnectionRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('createConnection request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IConnection, + | protos.google.privacy.dlp.v2.ICreateConnectionRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createConnection response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .createConnection(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IConnection, + protos.google.privacy.dlp.v2.ICreateConnectionRequest | undefined, + {} | undefined, + ]) => { + this._log.info('createConnection response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Get a Connection by name. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name in the format: + * `projects/{project}/locations/{location}/connections/{connection}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.Connection|Connection}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.get_connection.js + * region_tag:dlp_v2_generated_DlpService_GetConnection_async + */ + getConnection( + request?: protos.google.privacy.dlp.v2.IGetConnectionRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IConnection, + protos.google.privacy.dlp.v2.IGetConnectionRequest | undefined, + {} | undefined, + ] + >; + getConnection( + request: protos.google.privacy.dlp.v2.IGetConnectionRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IConnection, + protos.google.privacy.dlp.v2.IGetConnectionRequest | null | undefined, + {} | null | undefined + >, + ): void; + getConnection( + request: protos.google.privacy.dlp.v2.IGetConnectionRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IConnection, + protos.google.privacy.dlp.v2.IGetConnectionRequest | null | undefined, + {} | null | undefined + >, + ): void; + getConnection( + request?: protos.google.privacy.dlp.v2.IGetConnectionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IConnection, + protos.google.privacy.dlp.v2.IGetConnectionRequest | null | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IConnection, + protos.google.privacy.dlp.v2.IGetConnectionRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IConnection, + protos.google.privacy.dlp.v2.IGetConnectionRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getConnection request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IConnection, + protos.google.privacy.dlp.v2.IGetConnectionRequest | null | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getConnection response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getConnection(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IConnection, + protos.google.privacy.dlp.v2.IGetConnectionRequest | undefined, + {} | undefined, + ]) => { + this._log.info('getConnection response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Delete a Connection. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name of the Connection to be deleted, in the format: + * `projects/{project}/locations/{location}/connections/{connection}`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.delete_connection.js + * region_tag:dlp_v2_generated_DlpService_DeleteConnection_async + */ + deleteConnection( + request?: protos.google.privacy.dlp.v2.IDeleteConnectionRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteConnectionRequest | undefined, + {} | undefined, + ] + >; + deleteConnection( + request: protos.google.privacy.dlp.v2.IDeleteConnectionRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteConnectionRequest | null | undefined, + {} | null | undefined + >, + ): void; + deleteConnection( + request: protos.google.privacy.dlp.v2.IDeleteConnectionRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteConnectionRequest | null | undefined, + {} | null | undefined + >, + ): void; + deleteConnection( + request?: protos.google.privacy.dlp.v2.IDeleteConnectionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteConnectionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteConnectionRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteConnectionRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('deleteConnection request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.privacy.dlp.v2.IDeleteConnectionRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteConnection response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deleteConnection(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + protos.google.privacy.dlp.v2.IDeleteConnectionRequest | undefined, + {} | undefined, + ]) => { + this._log.info('deleteConnection response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Update a Connection. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Resource name in the format: + * `projects/{project}/locations/{location}/connections/{connection}`. + * @param {google.privacy.dlp.v2.Connection} request.connection + * Required. The connection with new values for the relevant fields. + * @param {google.protobuf.FieldMask} [request.updateMask] + * Optional. Mask to control which fields get updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.privacy.dlp.v2.Connection|Connection}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.update_connection.js + * region_tag:dlp_v2_generated_DlpService_UpdateConnection_async + */ + updateConnection( + request?: protos.google.privacy.dlp.v2.IUpdateConnectionRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IConnection, + protos.google.privacy.dlp.v2.IUpdateConnectionRequest | undefined, + {} | undefined, + ] + >; + updateConnection( + request: protos.google.privacy.dlp.v2.IUpdateConnectionRequest, + options: CallOptions, + callback: Callback< + protos.google.privacy.dlp.v2.IConnection, + protos.google.privacy.dlp.v2.IUpdateConnectionRequest | null | undefined, + {} | null | undefined + >, + ): void; + updateConnection( + request: protos.google.privacy.dlp.v2.IUpdateConnectionRequest, + callback: Callback< + protos.google.privacy.dlp.v2.IConnection, + protos.google.privacy.dlp.v2.IUpdateConnectionRequest | null | undefined, + {} | null | undefined + >, + ): void; + updateConnection( + request?: protos.google.privacy.dlp.v2.IUpdateConnectionRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.privacy.dlp.v2.IConnection, + | protos.google.privacy.dlp.v2.IUpdateConnectionRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.privacy.dlp.v2.IConnection, + protos.google.privacy.dlp.v2.IUpdateConnectionRequest | null | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IConnection, + protos.google.privacy.dlp.v2.IUpdateConnectionRequest | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('updateConnection request %j', request); + const wrappedCallback: + | Callback< + protos.google.privacy.dlp.v2.IConnection, + | protos.google.privacy.dlp.v2.IUpdateConnectionRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('updateConnection response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .updateConnection(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.privacy.dlp.v2.IConnection, + protos.google.privacy.dlp.v2.IUpdateConnectionRequest | undefined, + {} | undefined, + ]) => { + this._log.info('updateConnection response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + + /** + * Lists InspectTemplates. + * See + * https://cloud.google.com/sensitive-data-protection/docs/creating-templates + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value varies depending on the scope of the request + * (project or organization) and whether you have [specified a processing + * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + Organizations scope, location specified: + * `organizations/{org_id}/locations/{location_id}` + * + Organizations scope, no location specified (defaults to global): + * `organizations/{org_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {string} request.pageToken + * Page token to continue retrieval. Comes from the previous call + * to `ListInspectTemplates`. + * @param {number} request.pageSize + * Size of the page. This value can be limited by the server. If zero server + * returns a page of max size 100. + * @param {string} request.orderBy + * Comma-separated list of fields to order by, + * followed by `asc` or `desc` postfix. This list is case insensitive. The + * default sorting order is ascending. Redundant space characters are + * insignificant. + * + * Example: `name asc,update_time, create_time desc` + * + * Supported fields are: + * + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. + * @param {string} request.locationId + * Deprecated. This field has no effect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.privacy.dlp.v2.InspectTemplate|InspectTemplate}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listInspectTemplatesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listInspectTemplates( + request?: protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IInspectTemplate[], + protos.google.privacy.dlp.v2.IListInspectTemplatesRequest | null, + protos.google.privacy.dlp.v2.IListInspectTemplatesResponse, + ] + >; + listInspectTemplates( + request: protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, + | protos.google.privacy.dlp.v2.IListInspectTemplatesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IInspectTemplate + >, + ): void; + listInspectTemplates( + request: protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, + | protos.google.privacy.dlp.v2.IListInspectTemplatesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IInspectTemplate + >, + ): void; + listInspectTemplates( + request?: protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, + | protos.google.privacy.dlp.v2.IListInspectTemplatesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IInspectTemplate + >, + callback?: PaginationCallback< + protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, + | protos.google.privacy.dlp.v2.IListInspectTemplatesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IInspectTemplate + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IInspectTemplate[], + protos.google.privacy.dlp.v2.IListInspectTemplatesRequest | null, + protos.google.privacy.dlp.v2.IListInspectTemplatesResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, + | protos.google.privacy.dlp.v2.IListInspectTemplatesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IInspectTemplate + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listInspectTemplates values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listInspectTemplates request %j', request); + return this.innerApiCalls + .listInspectTemplates(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.privacy.dlp.v2.IInspectTemplate[], + protos.google.privacy.dlp.v2.IListInspectTemplatesRequest | null, + protos.google.privacy.dlp.v2.IListInspectTemplatesResponse, + ]) => { + this._log.info('listInspectTemplates values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listInspectTemplates`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value varies depending on the scope of the request + * (project or organization) and whether you have [specified a processing + * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + Organizations scope, location specified: + * `organizations/{org_id}/locations/{location_id}` + * + Organizations scope, no location specified (defaults to global): + * `organizations/{org_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {string} request.pageToken + * Page token to continue retrieval. Comes from the previous call + * to `ListInspectTemplates`. + * @param {number} request.pageSize + * Size of the page. This value can be limited by the server. If zero server + * returns a page of max size 100. + * @param {string} request.orderBy + * Comma-separated list of fields to order by, + * followed by `asc` or `desc` postfix. This list is case insensitive. The + * default sorting order is ascending. Redundant space characters are + * insignificant. + * + * Example: `name asc,update_time, create_time desc` + * + * Supported fields are: + * + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. + * @param {string} request.locationId + * Deprecated. This field has no effect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.privacy.dlp.v2.InspectTemplate|InspectTemplate} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listInspectTemplatesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listInspectTemplatesStream( + request?: protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listInspectTemplates']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listInspectTemplates stream %j', request); + return this.descriptors.page.listInspectTemplates.createStream( + this.innerApiCalls.listInspectTemplates as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listInspectTemplates`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value varies depending on the scope of the request + * (project or organization) and whether you have [specified a processing + * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + Organizations scope, location specified: + * `organizations/{org_id}/locations/{location_id}` + * + Organizations scope, no location specified (defaults to global): + * `organizations/{org_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {string} request.pageToken + * Page token to continue retrieval. Comes from the previous call + * to `ListInspectTemplates`. + * @param {number} request.pageSize + * Size of the page. This value can be limited by the server. If zero server + * returns a page of max size 100. + * @param {string} request.orderBy + * Comma-separated list of fields to order by, + * followed by `asc` or `desc` postfix. This list is case insensitive. The + * default sorting order is ascending. Redundant space characters are + * insignificant. + * + * Example: `name asc,update_time, create_time desc` + * + * Supported fields are: + * + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. + * @param {string} request.locationId + * Deprecated. This field has no effect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.privacy.dlp.v2.InspectTemplate|InspectTemplate}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.list_inspect_templates.js + * region_tag:dlp_v2_generated_DlpService_ListInspectTemplates_async + */ + listInspectTemplatesAsync( + request?: protos.google.privacy.dlp.v2.IListInspectTemplatesRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listInspectTemplates']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listInspectTemplates iterate %j', request); + return this.descriptors.page.listInspectTemplates.asyncIterate( + this.innerApiCalls['listInspectTemplates'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists DeidentifyTemplates. + * See + * https://cloud.google.com/sensitive-data-protection/docs/creating-templates-deid + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value varies depending on the scope of the request + * (project or organization) and whether you have [specified a processing + * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + Organizations scope, location specified: + * `organizations/{org_id}/locations/{location_id}` + * + Organizations scope, no location specified (defaults to global): + * `organizations/{org_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {string} request.pageToken + * Page token to continue retrieval. Comes from the previous call + * to `ListDeidentifyTemplates`. + * @param {number} request.pageSize + * Size of the page. This value can be limited by the server. If zero server + * returns a page of max size 100. + * @param {string} request.orderBy + * Comma-separated list of fields to order by, + * followed by `asc` or `desc` postfix. This list is case insensitive. The + * default sorting order is ascending. Redundant space characters are + * insignificant. + * + * Example: `name asc,update_time, create_time desc` + * + * Supported fields are: + * + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. + * @param {string} request.locationId + * Deprecated. This field has no effect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.privacy.dlp.v2.DeidentifyTemplate|DeidentifyTemplate}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listDeidentifyTemplatesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDeidentifyTemplates( + request?: protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDeidentifyTemplate[], + protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest | null, + protos.google.privacy.dlp.v2.IListDeidentifyTemplatesResponse, + ] + >; + listDeidentifyTemplates( + request: protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, + | protos.google.privacy.dlp.v2.IListDeidentifyTemplatesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IDeidentifyTemplate + >, + ): void; + listDeidentifyTemplates( + request: protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, + | protos.google.privacy.dlp.v2.IListDeidentifyTemplatesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IDeidentifyTemplate + >, + ): void; + listDeidentifyTemplates( + request?: protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, + | protos.google.privacy.dlp.v2.IListDeidentifyTemplatesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IDeidentifyTemplate + >, + callback?: PaginationCallback< + protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, + | protos.google.privacy.dlp.v2.IListDeidentifyTemplatesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IDeidentifyTemplate + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDeidentifyTemplate[], + protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest | null, + protos.google.privacy.dlp.v2.IListDeidentifyTemplatesResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, + | protos.google.privacy.dlp.v2.IListDeidentifyTemplatesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IDeidentifyTemplate + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listDeidentifyTemplates values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listDeidentifyTemplates request %j', request); + return this.innerApiCalls + .listDeidentifyTemplates(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.privacy.dlp.v2.IDeidentifyTemplate[], + protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest | null, + protos.google.privacy.dlp.v2.IListDeidentifyTemplatesResponse, + ]) => { + this._log.info('listDeidentifyTemplates values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listDeidentifyTemplates`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value varies depending on the scope of the request + * (project or organization) and whether you have [specified a processing + * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + Organizations scope, location specified: + * `organizations/{org_id}/locations/{location_id}` + * + Organizations scope, no location specified (defaults to global): + * `organizations/{org_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {string} request.pageToken + * Page token to continue retrieval. Comes from the previous call + * to `ListDeidentifyTemplates`. + * @param {number} request.pageSize + * Size of the page. This value can be limited by the server. If zero server + * returns a page of max size 100. + * @param {string} request.orderBy + * Comma-separated list of fields to order by, + * followed by `asc` or `desc` postfix. This list is case insensitive. The + * default sorting order is ascending. Redundant space characters are + * insignificant. + * + * Example: `name asc,update_time, create_time desc` + * + * Supported fields are: + * + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. + * @param {string} request.locationId + * Deprecated. This field has no effect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.privacy.dlp.v2.DeidentifyTemplate|DeidentifyTemplate} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listDeidentifyTemplatesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDeidentifyTemplatesStream( + request?: protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDeidentifyTemplates']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listDeidentifyTemplates stream %j', request); + return this.descriptors.page.listDeidentifyTemplates.createStream( + this.innerApiCalls.listDeidentifyTemplates as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listDeidentifyTemplates`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value varies depending on the scope of the request + * (project or organization) and whether you have [specified a processing + * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + Organizations scope, location specified: + * `organizations/{org_id}/locations/{location_id}` + * + Organizations scope, no location specified (defaults to global): + * `organizations/{org_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {string} request.pageToken + * Page token to continue retrieval. Comes from the previous call + * to `ListDeidentifyTemplates`. + * @param {number} request.pageSize + * Size of the page. This value can be limited by the server. If zero server + * returns a page of max size 100. + * @param {string} request.orderBy + * Comma-separated list of fields to order by, + * followed by `asc` or `desc` postfix. This list is case insensitive. The + * default sorting order is ascending. Redundant space characters are + * insignificant. + * + * Example: `name asc,update_time, create_time desc` + * + * Supported fields are: + * + * - `create_time`: corresponds to the time the template was created. + * - `update_time`: corresponds to the time the template was last updated. + * - `name`: corresponds to the template's name. + * - `display_name`: corresponds to the template's display name. + * @param {string} request.locationId + * Deprecated. This field has no effect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.privacy.dlp.v2.DeidentifyTemplate|DeidentifyTemplate}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.list_deidentify_templates.js + * region_tag:dlp_v2_generated_DlpService_ListDeidentifyTemplates_async + */ + listDeidentifyTemplatesAsync( + request?: protos.google.privacy.dlp.v2.IListDeidentifyTemplatesRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDeidentifyTemplates']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listDeidentifyTemplates iterate %j', request); + return this.descriptors.page.listDeidentifyTemplates.asyncIterate( + this.innerApiCalls['listDeidentifyTemplates'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists job triggers. + * See + * https://cloud.google.com/sensitive-data-protection/docs/creating-job-triggers + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value varies depending on whether you have [specified a + * processing + * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {string} request.pageToken + * Page token to continue retrieval. Comes from the previous call + * to ListJobTriggers. `order_by` field must not + * change for subsequent calls. + * @param {number} request.pageSize + * Size of the page. This value can be limited by a server. + * @param {string} request.orderBy + * Comma-separated list of triggeredJob fields to order by, + * followed by `asc` or `desc` postfix. This list is case insensitive. The + * default sorting order is ascending. Redundant space characters are + * insignificant. + * + * Example: `name asc,update_time, create_time desc` + * + * Supported fields are: + * + * - `create_time`: corresponds to the time the JobTrigger was created. + * - `update_time`: corresponds to the time the JobTrigger was last updated. + * - `last_run_time`: corresponds to the last time the JobTrigger ran. + * - `name`: corresponds to the JobTrigger's name. + * - `display_name`: corresponds to the JobTrigger's display name. + * - `status`: corresponds to JobTrigger's status. + * @param {string} request.filter + * Allows filtering. + * + * Supported syntax: + * + * * Filter expressions are made up of one or more restrictions. + * * Restrictions can be combined by `AND` or `OR` logical operators. A + * sequence of restrictions implicitly uses `AND`. + * * A restriction has the form of `{field} {operator} {value}`. + * * Supported fields/values for inspect triggers: + * - `status` - HEALTHY|PAUSED|CANCELLED + * - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY + * - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by + * quotation marks. Nanoseconds are ignored. + * - 'error_count' - Number of errors that have occurred while running. + * * The operator must be `=` or `!=` for status and inspected_storage. + * + * The syntax is based on https://google.aip.dev/160. + * + * Examples: + * + * * inspected_storage = cloud_storage AND status = HEALTHY + * * inspected_storage = cloud_storage OR inspected_storage = bigquery + * * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY) + * * last_run_time > \"2017-12-12T00:00:00+00:00\" + * + * The length of this field should be no more than 500 characters. + * @param {google.privacy.dlp.v2.DlpJobType} request.type + * The type of jobs. Will use `DlpJobType.INSPECT` if not set. + * @param {string} request.locationId + * Deprecated. This field has no effect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.privacy.dlp.v2.JobTrigger|JobTrigger}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listJobTriggersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listJobTriggers( + request?: protos.google.privacy.dlp.v2.IListJobTriggersRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IJobTrigger[], + protos.google.privacy.dlp.v2.IListJobTriggersRequest | null, + protos.google.privacy.dlp.v2.IListJobTriggersResponse, + ] + >; + listJobTriggers( + request: protos.google.privacy.dlp.v2.IListJobTriggersRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListJobTriggersRequest, + protos.google.privacy.dlp.v2.IListJobTriggersResponse | null | undefined, + protos.google.privacy.dlp.v2.IJobTrigger + >, + ): void; + listJobTriggers( + request: protos.google.privacy.dlp.v2.IListJobTriggersRequest, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListJobTriggersRequest, + protos.google.privacy.dlp.v2.IListJobTriggersResponse | null | undefined, + protos.google.privacy.dlp.v2.IJobTrigger + >, + ): void; + listJobTriggers( + request?: protos.google.privacy.dlp.v2.IListJobTriggersRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.privacy.dlp.v2.IListJobTriggersRequest, + | protos.google.privacy.dlp.v2.IListJobTriggersResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IJobTrigger + >, + callback?: PaginationCallback< + protos.google.privacy.dlp.v2.IListJobTriggersRequest, + protos.google.privacy.dlp.v2.IListJobTriggersResponse | null | undefined, + protos.google.privacy.dlp.v2.IJobTrigger + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IJobTrigger[], + protos.google.privacy.dlp.v2.IListJobTriggersRequest | null, + protos.google.privacy.dlp.v2.IListJobTriggersResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.privacy.dlp.v2.IListJobTriggersRequest, + | protos.google.privacy.dlp.v2.IListJobTriggersResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IJobTrigger + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listJobTriggers values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listJobTriggers request %j', request); + return this.innerApiCalls + .listJobTriggers(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.privacy.dlp.v2.IJobTrigger[], + protos.google.privacy.dlp.v2.IListJobTriggersRequest | null, + protos.google.privacy.dlp.v2.IListJobTriggersResponse, + ]) => { + this._log.info('listJobTriggers values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listJobTriggers`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value varies depending on whether you have [specified a + * processing + * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {string} request.pageToken + * Page token to continue retrieval. Comes from the previous call + * to ListJobTriggers. `order_by` field must not + * change for subsequent calls. + * @param {number} request.pageSize + * Size of the page. This value can be limited by a server. + * @param {string} request.orderBy + * Comma-separated list of triggeredJob fields to order by, + * followed by `asc` or `desc` postfix. This list is case insensitive. The + * default sorting order is ascending. Redundant space characters are + * insignificant. + * + * Example: `name asc,update_time, create_time desc` + * + * Supported fields are: + * + * - `create_time`: corresponds to the time the JobTrigger was created. + * - `update_time`: corresponds to the time the JobTrigger was last updated. + * - `last_run_time`: corresponds to the last time the JobTrigger ran. + * - `name`: corresponds to the JobTrigger's name. + * - `display_name`: corresponds to the JobTrigger's display name. + * - `status`: corresponds to JobTrigger's status. + * @param {string} request.filter + * Allows filtering. + * + * Supported syntax: + * + * * Filter expressions are made up of one or more restrictions. + * * Restrictions can be combined by `AND` or `OR` logical operators. A + * sequence of restrictions implicitly uses `AND`. + * * A restriction has the form of `{field} {operator} {value}`. + * * Supported fields/values for inspect triggers: + * - `status` - HEALTHY|PAUSED|CANCELLED + * - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY + * - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by + * quotation marks. Nanoseconds are ignored. + * - 'error_count' - Number of errors that have occurred while running. + * * The operator must be `=` or `!=` for status and inspected_storage. + * + * The syntax is based on https://google.aip.dev/160. + * + * Examples: + * + * * inspected_storage = cloud_storage AND status = HEALTHY + * * inspected_storage = cloud_storage OR inspected_storage = bigquery + * * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY) + * * last_run_time > \"2017-12-12T00:00:00+00:00\" + * + * The length of this field should be no more than 500 characters. + * @param {google.privacy.dlp.v2.DlpJobType} request.type + * The type of jobs. Will use `DlpJobType.INSPECT` if not set. + * @param {string} request.locationId + * Deprecated. This field has no effect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.privacy.dlp.v2.JobTrigger|JobTrigger} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listJobTriggersAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listJobTriggersStream( + request?: protos.google.privacy.dlp.v2.IListJobTriggersRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listJobTriggers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listJobTriggers stream %j', request); + return this.descriptors.page.listJobTriggers.createStream( + this.innerApiCalls.listJobTriggers as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listJobTriggers`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value varies depending on whether you have [specified a + * processing + * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {string} request.pageToken + * Page token to continue retrieval. Comes from the previous call + * to ListJobTriggers. `order_by` field must not + * change for subsequent calls. + * @param {number} request.pageSize + * Size of the page. This value can be limited by a server. + * @param {string} request.orderBy + * Comma-separated list of triggeredJob fields to order by, + * followed by `asc` or `desc` postfix. This list is case insensitive. The + * default sorting order is ascending. Redundant space characters are + * insignificant. + * + * Example: `name asc,update_time, create_time desc` + * + * Supported fields are: + * + * - `create_time`: corresponds to the time the JobTrigger was created. + * - `update_time`: corresponds to the time the JobTrigger was last updated. + * - `last_run_time`: corresponds to the last time the JobTrigger ran. + * - `name`: corresponds to the JobTrigger's name. + * - `display_name`: corresponds to the JobTrigger's display name. + * - `status`: corresponds to JobTrigger's status. + * @param {string} request.filter + * Allows filtering. + * + * Supported syntax: + * + * * Filter expressions are made up of one or more restrictions. + * * Restrictions can be combined by `AND` or `OR` logical operators. A + * sequence of restrictions implicitly uses `AND`. + * * A restriction has the form of `{field} {operator} {value}`. + * * Supported fields/values for inspect triggers: + * - `status` - HEALTHY|PAUSED|CANCELLED + * - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY + * - 'last_run_time` - RFC 3339 formatted timestamp, surrounded by + * quotation marks. Nanoseconds are ignored. + * - 'error_count' - Number of errors that have occurred while running. + * * The operator must be `=` or `!=` for status and inspected_storage. + * + * The syntax is based on https://google.aip.dev/160. + * + * Examples: + * + * * inspected_storage = cloud_storage AND status = HEALTHY + * * inspected_storage = cloud_storage OR inspected_storage = bigquery + * * inspected_storage = cloud_storage AND (state = PAUSED OR state = HEALTHY) + * * last_run_time > \"2017-12-12T00:00:00+00:00\" + * + * The length of this field should be no more than 500 characters. + * @param {google.privacy.dlp.v2.DlpJobType} request.type + * The type of jobs. Will use `DlpJobType.INSPECT` if not set. + * @param {string} request.locationId + * Deprecated. This field has no effect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.privacy.dlp.v2.JobTrigger|JobTrigger}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.list_job_triggers.js + * region_tag:dlp_v2_generated_DlpService_ListJobTriggers_async + */ + listJobTriggersAsync( + request?: protos.google.privacy.dlp.v2.IListJobTriggersRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listJobTriggers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listJobTriggers iterate %j', request); + return this.descriptors.page.listJobTriggers.asyncIterate( + this.innerApiCalls['listJobTriggers'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists discovery configurations. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value is as follows: + * `projects/{project_id}/locations/{location_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {string} request.pageToken + * Page token to continue retrieval. Comes from the previous call + * to ListDiscoveryConfigs. `order_by` field must not + * change for subsequent calls. + * @param {number} request.pageSize + * Size of the page. This value can be limited by a server. + * @param {string} request.orderBy + * Comma-separated list of config fields to order by, + * followed by `asc` or `desc` postfix. This list is case insensitive. The + * default sorting order is ascending. Redundant space characters are + * insignificant. + * + * Example: `name asc,update_time, create_time desc` + * + * Supported fields are: + * + * - `last_run_time`: corresponds to the last time the DiscoveryConfig ran. + * - `name`: corresponds to the DiscoveryConfig's name. + * - `status`: corresponds to DiscoveryConfig's status. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.privacy.dlp.v2.DiscoveryConfig|DiscoveryConfig}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listDiscoveryConfigsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDiscoveryConfigs( + request?: protos.google.privacy.dlp.v2.IListDiscoveryConfigsRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDiscoveryConfig[], + protos.google.privacy.dlp.v2.IListDiscoveryConfigsRequest | null, + protos.google.privacy.dlp.v2.IListDiscoveryConfigsResponse, + ] + >; + listDiscoveryConfigs( + request: protos.google.privacy.dlp.v2.IListDiscoveryConfigsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListDiscoveryConfigsRequest, + | protos.google.privacy.dlp.v2.IListDiscoveryConfigsResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IDiscoveryConfig + >, + ): void; + listDiscoveryConfigs( + request: protos.google.privacy.dlp.v2.IListDiscoveryConfigsRequest, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListDiscoveryConfigsRequest, + | protos.google.privacy.dlp.v2.IListDiscoveryConfigsResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IDiscoveryConfig + >, + ): void; + listDiscoveryConfigs( + request?: protos.google.privacy.dlp.v2.IListDiscoveryConfigsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.privacy.dlp.v2.IListDiscoveryConfigsRequest, + | protos.google.privacy.dlp.v2.IListDiscoveryConfigsResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IDiscoveryConfig + >, + callback?: PaginationCallback< + protos.google.privacy.dlp.v2.IListDiscoveryConfigsRequest, + | protos.google.privacy.dlp.v2.IListDiscoveryConfigsResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IDiscoveryConfig + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDiscoveryConfig[], + protos.google.privacy.dlp.v2.IListDiscoveryConfigsRequest | null, + protos.google.privacy.dlp.v2.IListDiscoveryConfigsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.privacy.dlp.v2.IListDiscoveryConfigsRequest, + | protos.google.privacy.dlp.v2.IListDiscoveryConfigsResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IDiscoveryConfig + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listDiscoveryConfigs values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listDiscoveryConfigs request %j', request); + return this.innerApiCalls + .listDiscoveryConfigs(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.privacy.dlp.v2.IDiscoveryConfig[], + protos.google.privacy.dlp.v2.IListDiscoveryConfigsRequest | null, + protos.google.privacy.dlp.v2.IListDiscoveryConfigsResponse, + ]) => { + this._log.info('listDiscoveryConfigs values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listDiscoveryConfigs`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value is as follows: + * `projects/{project_id}/locations/{location_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {string} request.pageToken + * Page token to continue retrieval. Comes from the previous call + * to ListDiscoveryConfigs. `order_by` field must not + * change for subsequent calls. + * @param {number} request.pageSize + * Size of the page. This value can be limited by a server. + * @param {string} request.orderBy + * Comma-separated list of config fields to order by, + * followed by `asc` or `desc` postfix. This list is case insensitive. The + * default sorting order is ascending. Redundant space characters are + * insignificant. + * + * Example: `name asc,update_time, create_time desc` + * + * Supported fields are: + * + * - `last_run_time`: corresponds to the last time the DiscoveryConfig ran. + * - `name`: corresponds to the DiscoveryConfig's name. + * - `status`: corresponds to DiscoveryConfig's status. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.privacy.dlp.v2.DiscoveryConfig|DiscoveryConfig} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listDiscoveryConfigsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDiscoveryConfigsStream( + request?: protos.google.privacy.dlp.v2.IListDiscoveryConfigsRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDiscoveryConfigs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listDiscoveryConfigs stream %j', request); + return this.descriptors.page.listDiscoveryConfigs.createStream( + this.innerApiCalls.listDiscoveryConfigs as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listDiscoveryConfigs`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value is as follows: + * `projects/{project_id}/locations/{location_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {string} request.pageToken + * Page token to continue retrieval. Comes from the previous call + * to ListDiscoveryConfigs. `order_by` field must not + * change for subsequent calls. + * @param {number} request.pageSize + * Size of the page. This value can be limited by a server. + * @param {string} request.orderBy + * Comma-separated list of config fields to order by, + * followed by `asc` or `desc` postfix. This list is case insensitive. The + * default sorting order is ascending. Redundant space characters are + * insignificant. + * + * Example: `name asc,update_time, create_time desc` + * + * Supported fields are: + * + * - `last_run_time`: corresponds to the last time the DiscoveryConfig ran. + * - `name`: corresponds to the DiscoveryConfig's name. + * - `status`: corresponds to DiscoveryConfig's status. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.privacy.dlp.v2.DiscoveryConfig|DiscoveryConfig}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.list_discovery_configs.js + * region_tag:dlp_v2_generated_DlpService_ListDiscoveryConfigs_async + */ + listDiscoveryConfigsAsync( + request?: protos.google.privacy.dlp.v2.IListDiscoveryConfigsRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDiscoveryConfigs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listDiscoveryConfigs iterate %j', request); + return this.descriptors.page.listDiscoveryConfigs.asyncIterate( + this.innerApiCalls['listDiscoveryConfigs'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists DlpJobs that match the specified filter in the request. + * See + * https://cloud.google.com/sensitive-data-protection/docs/inspecting-storage + * and + * https://cloud.google.com/sensitive-data-protection/docs/compute-risk-analysis + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value varies depending on whether you have [specified a + * processing + * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {string} request.filter + * Allows filtering. + * + * Supported syntax: + * + * * Filter expressions are made up of one or more restrictions. + * * Restrictions can be combined by `AND` or `OR` logical operators. A + * sequence of restrictions implicitly uses `AND`. + * * A restriction has the form of `{field} {operator} {value}`. + * * Supported fields/values for inspect jobs: + * - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED + * - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY + * - `trigger_name` - The name of the trigger that created the job. + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. + * * Supported fields for risk analysis jobs: + * - `state` - RUNNING|CANCELED|FINISHED|FAILED + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. + * * The operator must be `=` or `!=`. + * + * The syntax is based on https://google.aip.dev/160. + * + * Examples: + * + * * inspected_storage = cloud_storage AND state = done + * * inspected_storage = cloud_storage OR inspected_storage = bigquery + * * inspected_storage = cloud_storage AND (state = done OR state = canceled) + * * end_time > \"2017-12-12T00:00:00+00:00\" + * + * The length of this field should be no more than 500 characters. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {google.privacy.dlp.v2.DlpJobType} request.type + * The type of job. Defaults to `DlpJobType.INSPECT` + * @param {string} request.orderBy + * Comma-separated list of fields to order by, + * followed by `asc` or `desc` postfix. This list is case insensitive. The + * default sorting order is ascending. Redundant space characters are + * insignificant. + * + * Example: `name asc, end_time asc, create_time desc` + * + * Supported fields are: + * + * - `create_time`: corresponds to the time the job was created. + * - `end_time`: corresponds to the time the job ended. + * - `name`: corresponds to the job's name. + * - `state`: corresponds to `state` + * @param {string} request.locationId + * Deprecated. This field has no effect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.privacy.dlp.v2.DlpJob|DlpJob}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listDlpJobsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDlpJobs( + request?: protos.google.privacy.dlp.v2.IListDlpJobsRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDlpJob[], + protos.google.privacy.dlp.v2.IListDlpJobsRequest | null, + protos.google.privacy.dlp.v2.IListDlpJobsResponse, + ] + >; + listDlpJobs( + request: protos.google.privacy.dlp.v2.IListDlpJobsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListDlpJobsRequest, + protos.google.privacy.dlp.v2.IListDlpJobsResponse | null | undefined, + protos.google.privacy.dlp.v2.IDlpJob + >, + ): void; + listDlpJobs( + request: protos.google.privacy.dlp.v2.IListDlpJobsRequest, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListDlpJobsRequest, + protos.google.privacy.dlp.v2.IListDlpJobsResponse | null | undefined, + protos.google.privacy.dlp.v2.IDlpJob + >, + ): void; + listDlpJobs( + request?: protos.google.privacy.dlp.v2.IListDlpJobsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.privacy.dlp.v2.IListDlpJobsRequest, + protos.google.privacy.dlp.v2.IListDlpJobsResponse | null | undefined, + protos.google.privacy.dlp.v2.IDlpJob + >, + callback?: PaginationCallback< + protos.google.privacy.dlp.v2.IListDlpJobsRequest, + protos.google.privacy.dlp.v2.IListDlpJobsResponse | null | undefined, + protos.google.privacy.dlp.v2.IDlpJob + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IDlpJob[], + protos.google.privacy.dlp.v2.IListDlpJobsRequest | null, + protos.google.privacy.dlp.v2.IListDlpJobsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.privacy.dlp.v2.IListDlpJobsRequest, + protos.google.privacy.dlp.v2.IListDlpJobsResponse | null | undefined, + protos.google.privacy.dlp.v2.IDlpJob + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listDlpJobs values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listDlpJobs request %j', request); + return this.innerApiCalls + .listDlpJobs(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.privacy.dlp.v2.IDlpJob[], + protos.google.privacy.dlp.v2.IListDlpJobsRequest | null, + protos.google.privacy.dlp.v2.IListDlpJobsResponse, + ]) => { + this._log.info('listDlpJobs values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listDlpJobs`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value varies depending on whether you have [specified a + * processing + * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {string} request.filter + * Allows filtering. + * + * Supported syntax: + * + * * Filter expressions are made up of one or more restrictions. + * * Restrictions can be combined by `AND` or `OR` logical operators. A + * sequence of restrictions implicitly uses `AND`. + * * A restriction has the form of `{field} {operator} {value}`. + * * Supported fields/values for inspect jobs: + * - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED + * - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY + * - `trigger_name` - The name of the trigger that created the job. + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. + * * Supported fields for risk analysis jobs: + * - `state` - RUNNING|CANCELED|FINISHED|FAILED + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. + * * The operator must be `=` or `!=`. + * + * The syntax is based on https://google.aip.dev/160. + * + * Examples: + * + * * inspected_storage = cloud_storage AND state = done + * * inspected_storage = cloud_storage OR inspected_storage = bigquery + * * inspected_storage = cloud_storage AND (state = done OR state = canceled) + * * end_time > \"2017-12-12T00:00:00+00:00\" + * + * The length of this field should be no more than 500 characters. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {google.privacy.dlp.v2.DlpJobType} request.type + * The type of job. Defaults to `DlpJobType.INSPECT` + * @param {string} request.orderBy + * Comma-separated list of fields to order by, + * followed by `asc` or `desc` postfix. This list is case insensitive. The + * default sorting order is ascending. Redundant space characters are + * insignificant. + * + * Example: `name asc, end_time asc, create_time desc` + * + * Supported fields are: + * + * - `create_time`: corresponds to the time the job was created. + * - `end_time`: corresponds to the time the job ended. + * - `name`: corresponds to the job's name. + * - `state`: corresponds to `state` + * @param {string} request.locationId + * Deprecated. This field has no effect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.privacy.dlp.v2.DlpJob|DlpJob} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listDlpJobsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listDlpJobsStream( + request?: protos.google.privacy.dlp.v2.IListDlpJobsRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDlpJobs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listDlpJobs stream %j', request); + return this.descriptors.page.listDlpJobs.createStream( + this.innerApiCalls.listDlpJobs as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listDlpJobs`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value varies depending on whether you have [specified a + * processing + * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {string} request.filter + * Allows filtering. + * + * Supported syntax: + * + * * Filter expressions are made up of one or more restrictions. + * * Restrictions can be combined by `AND` or `OR` logical operators. A + * sequence of restrictions implicitly uses `AND`. + * * A restriction has the form of `{field} {operator} {value}`. + * * Supported fields/values for inspect jobs: + * - `state` - PENDING|RUNNING|CANCELED|FINISHED|FAILED + * - `inspected_storage` - DATASTORE|CLOUD_STORAGE|BIGQUERY + * - `trigger_name` - The name of the trigger that created the job. + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. + * * Supported fields for risk analysis jobs: + * - `state` - RUNNING|CANCELED|FINISHED|FAILED + * - 'end_time` - Corresponds to the time the job finished. + * - 'start_time` - Corresponds to the time the job finished. + * * The operator must be `=` or `!=`. + * + * The syntax is based on https://google.aip.dev/160. + * + * Examples: + * + * * inspected_storage = cloud_storage AND state = done + * * inspected_storage = cloud_storage OR inspected_storage = bigquery + * * inspected_storage = cloud_storage AND (state = done OR state = canceled) + * * end_time > \"2017-12-12T00:00:00+00:00\" + * + * The length of this field should be no more than 500 characters. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {google.privacy.dlp.v2.DlpJobType} request.type + * The type of job. Defaults to `DlpJobType.INSPECT` + * @param {string} request.orderBy + * Comma-separated list of fields to order by, + * followed by `asc` or `desc` postfix. This list is case insensitive. The + * default sorting order is ascending. Redundant space characters are + * insignificant. + * + * Example: `name asc, end_time asc, create_time desc` + * + * Supported fields are: + * + * - `create_time`: corresponds to the time the job was created. + * - `end_time`: corresponds to the time the job ended. + * - `name`: corresponds to the job's name. + * - `state`: corresponds to `state` + * @param {string} request.locationId + * Deprecated. This field has no effect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.privacy.dlp.v2.DlpJob|DlpJob}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.list_dlp_jobs.js + * region_tag:dlp_v2_generated_DlpService_ListDlpJobs_async + */ + listDlpJobsAsync( + request?: protos.google.privacy.dlp.v2.IListDlpJobsRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listDlpJobs']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listDlpJobs iterate %j', request); + return this.descriptors.page.listDlpJobs.asyncIterate( + this.innerApiCalls['listDlpJobs'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists stored infoTypes. + * See + * https://cloud.google.com/sensitive-data-protection/docs/creating-stored-infotypes + * to learn more. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value varies depending on the scope of the request + * (project or organization) and whether you have [specified a processing + * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {string} request.pageToken + * Page token to continue retrieval. Comes from the previous call + * to `ListStoredInfoTypes`. + * @param {number} request.pageSize + * Size of the page. This value can be limited by the server. If zero server + * returns a page of max size 100. + * @param {string} request.orderBy + * Comma-separated list of fields to order by, + * followed by `asc` or `desc` postfix. This list is case insensitive. The + * default sorting order is ascending. Redundant space characters are + * insignificant. + * + * Example: `name asc, display_name, create_time desc` + * + * Supported fields are: + * + * - `create_time`: corresponds to the time the most recent version of the + * resource was created. + * - `state`: corresponds to the state of the resource. + * - `name`: corresponds to resource name. + * - `display_name`: corresponds to info type's display name. + * @param {string} request.locationId + * Deprecated. This field has no effect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.privacy.dlp.v2.StoredInfoType|StoredInfoType}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listStoredInfoTypesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listStoredInfoTypes( + request?: protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IStoredInfoType[], + protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest | null, + protos.google.privacy.dlp.v2.IListStoredInfoTypesResponse, + ] + >; + listStoredInfoTypes( + request: protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, + | protos.google.privacy.dlp.v2.IListStoredInfoTypesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IStoredInfoType + >, + ): void; + listStoredInfoTypes( + request: protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, + | protos.google.privacy.dlp.v2.IListStoredInfoTypesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IStoredInfoType + >, + ): void; + listStoredInfoTypes( + request?: protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, + | protos.google.privacy.dlp.v2.IListStoredInfoTypesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IStoredInfoType + >, + callback?: PaginationCallback< + protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, + | protos.google.privacy.dlp.v2.IListStoredInfoTypesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IStoredInfoType + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IStoredInfoType[], + protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest | null, + protos.google.privacy.dlp.v2.IListStoredInfoTypesResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, + | protos.google.privacy.dlp.v2.IListStoredInfoTypesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IStoredInfoType + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listStoredInfoTypes values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listStoredInfoTypes request %j', request); + return this.innerApiCalls + .listStoredInfoTypes(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.privacy.dlp.v2.IStoredInfoType[], + protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest | null, + protos.google.privacy.dlp.v2.IListStoredInfoTypesResponse, + ]) => { + this._log.info('listStoredInfoTypes values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listStoredInfoTypes`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value varies depending on the scope of the request + * (project or organization) and whether you have [specified a processing + * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {string} request.pageToken + * Page token to continue retrieval. Comes from the previous call + * to `ListStoredInfoTypes`. + * @param {number} request.pageSize + * Size of the page. This value can be limited by the server. If zero server + * returns a page of max size 100. + * @param {string} request.orderBy + * Comma-separated list of fields to order by, + * followed by `asc` or `desc` postfix. This list is case insensitive. The + * default sorting order is ascending. Redundant space characters are + * insignificant. + * + * Example: `name asc, display_name, create_time desc` + * + * Supported fields are: + * + * - `create_time`: corresponds to the time the most recent version of the + * resource was created. + * - `state`: corresponds to the state of the resource. + * - `name`: corresponds to resource name. + * - `display_name`: corresponds to info type's display name. + * @param {string} request.locationId + * Deprecated. This field has no effect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.privacy.dlp.v2.StoredInfoType|StoredInfoType} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listStoredInfoTypesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listStoredInfoTypesStream( + request?: protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listStoredInfoTypes']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listStoredInfoTypes stream %j', request); + return this.descriptors.page.listStoredInfoTypes.createStream( + this.innerApiCalls.listStoredInfoTypes as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listStoredInfoTypes`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Parent resource name. + * + * The format of this value varies depending on the scope of the request + * (project or organization) and whether you have [specified a processing + * location](https://cloud.google.com/sensitive-data-protection/docs/specifying-location): + * + * + Projects scope, location specified: + * `projects/{project_id}/locations/{location_id}` + * + Projects scope, no location specified (defaults to global): + * `projects/{project_id}` + * + * The following example `parent` string specifies a parent project with the + * identifier `example-project`, and specifies the `europe-west3` location + * for processing data: + * + * parent=projects/example-project/locations/europe-west3 + * @param {string} request.pageToken + * Page token to continue retrieval. Comes from the previous call + * to `ListStoredInfoTypes`. + * @param {number} request.pageSize + * Size of the page. This value can be limited by the server. If zero server + * returns a page of max size 100. + * @param {string} request.orderBy + * Comma-separated list of fields to order by, + * followed by `asc` or `desc` postfix. This list is case insensitive. The + * default sorting order is ascending. Redundant space characters are + * insignificant. + * + * Example: `name asc, display_name, create_time desc` + * + * Supported fields are: + * + * - `create_time`: corresponds to the time the most recent version of the + * resource was created. + * - `state`: corresponds to the state of the resource. + * - `name`: corresponds to resource name. + * - `display_name`: corresponds to info type's display name. + * @param {string} request.locationId + * Deprecated. This field has no effect. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.privacy.dlp.v2.StoredInfoType|StoredInfoType}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.list_stored_info_types.js + * region_tag:dlp_v2_generated_DlpService_ListStoredInfoTypes_async + */ + listStoredInfoTypesAsync( + request?: protos.google.privacy.dlp.v2.IListStoredInfoTypesRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listStoredInfoTypes']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listStoredInfoTypes iterate %j', request); + return this.descriptors.page.listStoredInfoTypes.asyncIterate( + this.innerApiCalls['listStoredInfoTypes'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists project data profiles for an organization. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. organizations/{org_id}/locations/{loc_id} + * @param {string} request.pageToken + * Page token to continue retrieval. + * @param {number} request.pageSize + * Size of the page. This value can be limited by the server. If zero, server + * returns a page of max size 100. + * @param {string} request.orderBy + * Comma-separated list of fields to order by, followed by `asc` or `desc` + * postfix. This list is case insensitive. The default sorting order is + * ascending. Redundant space characters are insignificant. Only one order + * field at a time is allowed. + * + * Examples: + * * `project_id` + * * `sensitivity_level desc` + * + * Supported fields: + * + * - `project_id`: Google Cloud project ID + * - `sensitivity_level`: How sensitive the data in a project is, at most + * - `data_risk_level`: How much risk is associated with this data + * - `profile_last_generated`: Date and time (in epoch seconds) the profile + * was last generated + * @param {string} request.filter + * Allows filtering. + * + * Supported syntax: + * + * * Filter expressions are made up of one or more restrictions. + * * Restrictions can be combined by `AND` or `OR` logical operators. A + * sequence of restrictions implicitly uses `AND`. + * * A restriction has the form of `{field} {operator} {value}`. + * * Supported fields: + * - `project_id`: the Google Cloud project ID + * - `sensitivity_level`: HIGH|MODERATE|LOW + * - `data_risk_level`: HIGH|MODERATE|LOW + * - `status_code`: an RPC status code as defined in + * https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + * - `profile_last_generated`: Date and time the profile was last + * generated + * * The operator must be `=` or `!=`. The `profile_last_generated` filter + * also supports `<` and `>`. + * + * The syntax is based on https://google.aip.dev/160. + * + * Examples: + * + * * `project_id = 12345 AND status_code = 1` + * * `project_id = 12345 AND sensitivity_level = HIGH` + * * `profile_last_generated < "2025-01-01T00:00:00.000Z"` + * + * The length of this field should be no more than 500 characters. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.privacy.dlp.v2.ProjectDataProfile|ProjectDataProfile}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listProjectDataProfilesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listProjectDataProfiles( + request?: protos.google.privacy.dlp.v2.IListProjectDataProfilesRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IProjectDataProfile[], + protos.google.privacy.dlp.v2.IListProjectDataProfilesRequest | null, + protos.google.privacy.dlp.v2.IListProjectDataProfilesResponse, + ] + >; + listProjectDataProfiles( + request: protos.google.privacy.dlp.v2.IListProjectDataProfilesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListProjectDataProfilesRequest, + | protos.google.privacy.dlp.v2.IListProjectDataProfilesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IProjectDataProfile + >, + ): void; + listProjectDataProfiles( + request: protos.google.privacy.dlp.v2.IListProjectDataProfilesRequest, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListProjectDataProfilesRequest, + | protos.google.privacy.dlp.v2.IListProjectDataProfilesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IProjectDataProfile + >, + ): void; + listProjectDataProfiles( + request?: protos.google.privacy.dlp.v2.IListProjectDataProfilesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.privacy.dlp.v2.IListProjectDataProfilesRequest, + | protos.google.privacy.dlp.v2.IListProjectDataProfilesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IProjectDataProfile + >, + callback?: PaginationCallback< + protos.google.privacy.dlp.v2.IListProjectDataProfilesRequest, + | protos.google.privacy.dlp.v2.IListProjectDataProfilesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IProjectDataProfile + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IProjectDataProfile[], + protos.google.privacy.dlp.v2.IListProjectDataProfilesRequest | null, + protos.google.privacy.dlp.v2.IListProjectDataProfilesResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.privacy.dlp.v2.IListProjectDataProfilesRequest, + | protos.google.privacy.dlp.v2.IListProjectDataProfilesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IProjectDataProfile + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listProjectDataProfiles values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listProjectDataProfiles request %j', request); + return this.innerApiCalls + .listProjectDataProfiles(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.privacy.dlp.v2.IProjectDataProfile[], + protos.google.privacy.dlp.v2.IListProjectDataProfilesRequest | null, + protos.google.privacy.dlp.v2.IListProjectDataProfilesResponse, + ]) => { + this._log.info('listProjectDataProfiles values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listProjectDataProfiles`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. organizations/{org_id}/locations/{loc_id} + * @param {string} request.pageToken + * Page token to continue retrieval. + * @param {number} request.pageSize + * Size of the page. This value can be limited by the server. If zero, server + * returns a page of max size 100. + * @param {string} request.orderBy + * Comma-separated list of fields to order by, followed by `asc` or `desc` + * postfix. This list is case insensitive. The default sorting order is + * ascending. Redundant space characters are insignificant. Only one order + * field at a time is allowed. + * + * Examples: + * * `project_id` + * * `sensitivity_level desc` + * + * Supported fields: + * + * - `project_id`: Google Cloud project ID + * - `sensitivity_level`: How sensitive the data in a project is, at most + * - `data_risk_level`: How much risk is associated with this data + * - `profile_last_generated`: Date and time (in epoch seconds) the profile + * was last generated + * @param {string} request.filter + * Allows filtering. + * + * Supported syntax: + * + * * Filter expressions are made up of one or more restrictions. + * * Restrictions can be combined by `AND` or `OR` logical operators. A + * sequence of restrictions implicitly uses `AND`. + * * A restriction has the form of `{field} {operator} {value}`. + * * Supported fields: + * - `project_id`: the Google Cloud project ID + * - `sensitivity_level`: HIGH|MODERATE|LOW + * - `data_risk_level`: HIGH|MODERATE|LOW + * - `status_code`: an RPC status code as defined in + * https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + * - `profile_last_generated`: Date and time the profile was last + * generated + * * The operator must be `=` or `!=`. The `profile_last_generated` filter + * also supports `<` and `>`. + * + * The syntax is based on https://google.aip.dev/160. + * + * Examples: + * + * * `project_id = 12345 AND status_code = 1` + * * `project_id = 12345 AND sensitivity_level = HIGH` + * * `profile_last_generated < "2025-01-01T00:00:00.000Z"` + * + * The length of this field should be no more than 500 characters. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.privacy.dlp.v2.ProjectDataProfile|ProjectDataProfile} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listProjectDataProfilesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listProjectDataProfilesStream( + request?: protos.google.privacy.dlp.v2.IListProjectDataProfilesRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listProjectDataProfiles']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listProjectDataProfiles stream %j', request); + return this.descriptors.page.listProjectDataProfiles.createStream( + this.innerApiCalls.listProjectDataProfiles as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listProjectDataProfiles`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. organizations/{org_id}/locations/{loc_id} + * @param {string} request.pageToken + * Page token to continue retrieval. + * @param {number} request.pageSize + * Size of the page. This value can be limited by the server. If zero, server + * returns a page of max size 100. + * @param {string} request.orderBy + * Comma-separated list of fields to order by, followed by `asc` or `desc` + * postfix. This list is case insensitive. The default sorting order is + * ascending. Redundant space characters are insignificant. Only one order + * field at a time is allowed. + * + * Examples: + * * `project_id` + * * `sensitivity_level desc` + * + * Supported fields: + * + * - `project_id`: Google Cloud project ID + * - `sensitivity_level`: How sensitive the data in a project is, at most + * - `data_risk_level`: How much risk is associated with this data + * - `profile_last_generated`: Date and time (in epoch seconds) the profile + * was last generated + * @param {string} request.filter + * Allows filtering. + * + * Supported syntax: + * + * * Filter expressions are made up of one or more restrictions. + * * Restrictions can be combined by `AND` or `OR` logical operators. A + * sequence of restrictions implicitly uses `AND`. + * * A restriction has the form of `{field} {operator} {value}`. + * * Supported fields: + * - `project_id`: the Google Cloud project ID + * - `sensitivity_level`: HIGH|MODERATE|LOW + * - `data_risk_level`: HIGH|MODERATE|LOW + * - `status_code`: an RPC status code as defined in + * https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + * - `profile_last_generated`: Date and time the profile was last + * generated + * * The operator must be `=` or `!=`. The `profile_last_generated` filter + * also supports `<` and `>`. + * + * The syntax is based on https://google.aip.dev/160. + * + * Examples: + * + * * `project_id = 12345 AND status_code = 1` + * * `project_id = 12345 AND sensitivity_level = HIGH` + * * `profile_last_generated < "2025-01-01T00:00:00.000Z"` + * + * The length of this field should be no more than 500 characters. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.privacy.dlp.v2.ProjectDataProfile|ProjectDataProfile}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.list_project_data_profiles.js + * region_tag:dlp_v2_generated_DlpService_ListProjectDataProfiles_async + */ + listProjectDataProfilesAsync( + request?: protos.google.privacy.dlp.v2.IListProjectDataProfilesRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listProjectDataProfiles']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listProjectDataProfiles iterate %j', request); + return this.descriptors.page.listProjectDataProfiles.asyncIterate( + this.innerApiCalls['listProjectDataProfiles'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists table data profiles for an organization. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the organization or project, for + * example `organizations/433245324/locations/europe` or + * `projects/project-id/locations/asia`. + * @param {string} request.pageToken + * Page token to continue retrieval. + * @param {number} request.pageSize + * Size of the page. This value can be limited by the server. If zero, server + * returns a page of max size 100. + * @param {string} request.orderBy + * Comma-separated list of fields to order by, followed by `asc` or `desc` + * postfix. This list is case insensitive. The default sorting order is + * ascending. Redundant space characters are insignificant. Only one order + * field at a time is allowed. + * + * Examples: + * * `project_id asc` + * * `table_id` + * * `sensitivity_level desc` + * + * Supported fields are: + * + * - `project_id`: The Google Cloud project ID. + * - `dataset_id`: The ID of a BigQuery dataset. + * - `table_id`: The ID of a BigQuery table. + * - `sensitivity_level`: How sensitive the data in a table is, at most. + * - `data_risk_level`: How much risk is associated with this data. + * - `profile_last_generated`: When the profile was last updated in epoch + * seconds. + * - `last_modified`: The last time the resource was modified. + * - `resource_visibility`: Visibility restriction for this resource. + * - `row_count`: Number of rows in this resource. + * @param {string} request.filter + * Allows filtering. + * + * Supported syntax: + * + * * Filter expressions are made up of one or more restrictions. + * * Restrictions can be combined by `AND` or `OR` logical operators. A + * sequence of restrictions implicitly uses `AND`. + * * A restriction has the form of `{field} {operator} {value}`. + * * Supported fields: + * - `project_id`: The Google Cloud project ID + * - `dataset_id`: The BigQuery dataset ID + * - `table_id`: The ID of the BigQuery table + * - `sensitivity_level`: HIGH|MODERATE|LOW + * - `data_risk_level`: HIGH|MODERATE|LOW + * - `resource_visibility`: PUBLIC|RESTRICTED + * - `status_code`: an RPC status code as defined in + * https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + * - `profile_last_generated`: Date and time the profile was last + * generated + * + * * The operator must be `=` or `!=`. The `profile_last_generated` filter + * also supports `<` and `>`. + * + * The syntax is based on https://google.aip.dev/160. + * + * Examples: + * + * * `project_id = 12345 AND status_code = 1` + * * `project_id = 12345 AND sensitivity_level = HIGH` + * * `project_id = 12345 AND resource_visibility = PUBLIC` + * * `profile_last_generated < "2025-01-01T00:00:00.000Z"` + * + * The length of this field should be no more than 500 characters. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.privacy.dlp.v2.TableDataProfile|TableDataProfile}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listTableDataProfilesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listTableDataProfiles( + request?: protos.google.privacy.dlp.v2.IListTableDataProfilesRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.ITableDataProfile[], + protos.google.privacy.dlp.v2.IListTableDataProfilesRequest | null, + protos.google.privacy.dlp.v2.IListTableDataProfilesResponse, + ] + >; + listTableDataProfiles( + request: protos.google.privacy.dlp.v2.IListTableDataProfilesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListTableDataProfilesRequest, + | protos.google.privacy.dlp.v2.IListTableDataProfilesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.ITableDataProfile + >, + ): void; + listTableDataProfiles( + request: protos.google.privacy.dlp.v2.IListTableDataProfilesRequest, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListTableDataProfilesRequest, + | protos.google.privacy.dlp.v2.IListTableDataProfilesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.ITableDataProfile + >, + ): void; + listTableDataProfiles( + request?: protos.google.privacy.dlp.v2.IListTableDataProfilesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.privacy.dlp.v2.IListTableDataProfilesRequest, + | protos.google.privacy.dlp.v2.IListTableDataProfilesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.ITableDataProfile + >, + callback?: PaginationCallback< + protos.google.privacy.dlp.v2.IListTableDataProfilesRequest, + | protos.google.privacy.dlp.v2.IListTableDataProfilesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.ITableDataProfile + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.ITableDataProfile[], + protos.google.privacy.dlp.v2.IListTableDataProfilesRequest | null, + protos.google.privacy.dlp.v2.IListTableDataProfilesResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.privacy.dlp.v2.IListTableDataProfilesRequest, + | protos.google.privacy.dlp.v2.IListTableDataProfilesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.ITableDataProfile + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listTableDataProfiles values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listTableDataProfiles request %j', request); + return this.innerApiCalls + .listTableDataProfiles(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.privacy.dlp.v2.ITableDataProfile[], + protos.google.privacy.dlp.v2.IListTableDataProfilesRequest | null, + protos.google.privacy.dlp.v2.IListTableDataProfilesResponse, + ]) => { + this._log.info('listTableDataProfiles values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listTableDataProfiles`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the organization or project, for + * example `organizations/433245324/locations/europe` or + * `projects/project-id/locations/asia`. + * @param {string} request.pageToken + * Page token to continue retrieval. + * @param {number} request.pageSize + * Size of the page. This value can be limited by the server. If zero, server + * returns a page of max size 100. + * @param {string} request.orderBy + * Comma-separated list of fields to order by, followed by `asc` or `desc` + * postfix. This list is case insensitive. The default sorting order is + * ascending. Redundant space characters are insignificant. Only one order + * field at a time is allowed. + * + * Examples: + * * `project_id asc` + * * `table_id` + * * `sensitivity_level desc` + * + * Supported fields are: + * + * - `project_id`: The Google Cloud project ID. + * - `dataset_id`: The ID of a BigQuery dataset. + * - `table_id`: The ID of a BigQuery table. + * - `sensitivity_level`: How sensitive the data in a table is, at most. + * - `data_risk_level`: How much risk is associated with this data. + * - `profile_last_generated`: When the profile was last updated in epoch + * seconds. + * - `last_modified`: The last time the resource was modified. + * - `resource_visibility`: Visibility restriction for this resource. + * - `row_count`: Number of rows in this resource. + * @param {string} request.filter + * Allows filtering. + * + * Supported syntax: + * + * * Filter expressions are made up of one or more restrictions. + * * Restrictions can be combined by `AND` or `OR` logical operators. A + * sequence of restrictions implicitly uses `AND`. + * * A restriction has the form of `{field} {operator} {value}`. + * * Supported fields: + * - `project_id`: The Google Cloud project ID + * - `dataset_id`: The BigQuery dataset ID + * - `table_id`: The ID of the BigQuery table + * - `sensitivity_level`: HIGH|MODERATE|LOW + * - `data_risk_level`: HIGH|MODERATE|LOW + * - `resource_visibility`: PUBLIC|RESTRICTED + * - `status_code`: an RPC status code as defined in + * https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + * - `profile_last_generated`: Date and time the profile was last + * generated + * + * * The operator must be `=` or `!=`. The `profile_last_generated` filter + * also supports `<` and `>`. + * + * The syntax is based on https://google.aip.dev/160. + * + * Examples: + * + * * `project_id = 12345 AND status_code = 1` + * * `project_id = 12345 AND sensitivity_level = HIGH` + * * `project_id = 12345 AND resource_visibility = PUBLIC` + * * `profile_last_generated < "2025-01-01T00:00:00.000Z"` + * + * The length of this field should be no more than 500 characters. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.privacy.dlp.v2.TableDataProfile|TableDataProfile} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listTableDataProfilesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listTableDataProfilesStream( + request?: protos.google.privacy.dlp.v2.IListTableDataProfilesRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listTableDataProfiles']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listTableDataProfiles stream %j', request); + return this.descriptors.page.listTableDataProfiles.createStream( + this.innerApiCalls.listTableDataProfiles as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listTableDataProfiles`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the organization or project, for + * example `organizations/433245324/locations/europe` or + * `projects/project-id/locations/asia`. + * @param {string} request.pageToken + * Page token to continue retrieval. + * @param {number} request.pageSize + * Size of the page. This value can be limited by the server. If zero, server + * returns a page of max size 100. + * @param {string} request.orderBy + * Comma-separated list of fields to order by, followed by `asc` or `desc` + * postfix. This list is case insensitive. The default sorting order is + * ascending. Redundant space characters are insignificant. Only one order + * field at a time is allowed. + * + * Examples: + * * `project_id asc` + * * `table_id` + * * `sensitivity_level desc` + * + * Supported fields are: + * + * - `project_id`: The Google Cloud project ID. + * - `dataset_id`: The ID of a BigQuery dataset. + * - `table_id`: The ID of a BigQuery table. + * - `sensitivity_level`: How sensitive the data in a table is, at most. + * - `data_risk_level`: How much risk is associated with this data. + * - `profile_last_generated`: When the profile was last updated in epoch + * seconds. + * - `last_modified`: The last time the resource was modified. + * - `resource_visibility`: Visibility restriction for this resource. + * - `row_count`: Number of rows in this resource. + * @param {string} request.filter + * Allows filtering. + * + * Supported syntax: + * + * * Filter expressions are made up of one or more restrictions. + * * Restrictions can be combined by `AND` or `OR` logical operators. A + * sequence of restrictions implicitly uses `AND`. + * * A restriction has the form of `{field} {operator} {value}`. + * * Supported fields: + * - `project_id`: The Google Cloud project ID + * - `dataset_id`: The BigQuery dataset ID + * - `table_id`: The ID of the BigQuery table + * - `sensitivity_level`: HIGH|MODERATE|LOW + * - `data_risk_level`: HIGH|MODERATE|LOW + * - `resource_visibility`: PUBLIC|RESTRICTED + * - `status_code`: an RPC status code as defined in + * https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + * - `profile_last_generated`: Date and time the profile was last + * generated + * + * * The operator must be `=` or `!=`. The `profile_last_generated` filter + * also supports `<` and `>`. + * + * The syntax is based on https://google.aip.dev/160. + * + * Examples: + * + * * `project_id = 12345 AND status_code = 1` + * * `project_id = 12345 AND sensitivity_level = HIGH` + * * `project_id = 12345 AND resource_visibility = PUBLIC` + * * `profile_last_generated < "2025-01-01T00:00:00.000Z"` + * + * The length of this field should be no more than 500 characters. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.privacy.dlp.v2.TableDataProfile|TableDataProfile}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.list_table_data_profiles.js + * region_tag:dlp_v2_generated_DlpService_ListTableDataProfiles_async + */ + listTableDataProfilesAsync( + request?: protos.google.privacy.dlp.v2.IListTableDataProfilesRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listTableDataProfiles']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listTableDataProfiles iterate %j', request); + return this.descriptors.page.listTableDataProfiles.asyncIterate( + this.innerApiCalls['listTableDataProfiles'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists column data profiles for an organization. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the organization or project, for + * example `organizations/433245324/locations/europe` or + * `projects/project-id/locations/asia`. + * @param {string} request.pageToken + * Page token to continue retrieval. + * @param {number} request.pageSize + * Size of the page. This value can be limited by the server. If zero, server + * returns a page of max size 100. + * @param {string} request.orderBy + * Comma-separated list of fields to order by, followed by `asc` or `desc` + * postfix. This list is case insensitive. The default sorting order is + * ascending. Redundant space characters are insignificant. Only one order + * field at a time is allowed. + * + * Examples: + * + * * `project_id asc` + * * `table_id` + * * `sensitivity_level desc` + * + * Supported fields are: + * + * - `project_id`: The Google Cloud project ID. + * - `dataset_id`: The ID of a BigQuery dataset. + * - `table_id`: The ID of a BigQuery table. + * - `sensitivity_level`: How sensitive the data in a column is, at most. + * - `data_risk_level`: How much risk is associated with this data. + * - `profile_last_generated`: When the profile was last updated in epoch + * seconds. + * @param {string} request.filter + * Allows filtering. + * + * Supported syntax: + * + * * Filter expressions are made up of one or more restrictions. + * * Restrictions can be combined by `AND` or `OR` logical operators. A + * sequence of restrictions implicitly uses `AND`. + * * A restriction has the form of `{field} {operator} {value}`. + * * Supported fields: + * - `table_data_profile_name`: The name of the related table data + * profile + * - `project_id`: The Google Cloud project ID (REQUIRED) + * - `dataset_id`: The BigQuery dataset ID (REQUIRED) + * - `table_id`: The BigQuery table ID (REQUIRED) + * - `field_id`: The ID of the BigQuery field + * - `info_type`: The infotype detected in the resource + * - `sensitivity_level`: HIGH|MEDIUM|LOW + * - `data_risk_level`: How much risk is associated with this data + * - `status_code`: An RPC status code as defined in + * https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + * - `profile_last_generated`: Date and time the profile was last + * generated + * * The operator must be `=` for project_id, dataset_id, and table_id. Other + * filters also support `!=`. The `profile_last_generated` filter also + * supports `<` and `>`. + * + * The syntax is based on https://google.aip.dev/160. + * + * Examples: + * + * * project_id = 12345 AND status_code = 1 + * * project_id = 12345 AND sensitivity_level = HIGH + * * project_id = 12345 AND info_type = STREET_ADDRESS + * * profile_last_generated < "2025-01-01T00:00:00.000Z" + * + * The length of this field should be no more than 500 characters. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.privacy.dlp.v2.ColumnDataProfile|ColumnDataProfile}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listColumnDataProfilesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listColumnDataProfiles( + request?: protos.google.privacy.dlp.v2.IListColumnDataProfilesRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IColumnDataProfile[], + protos.google.privacy.dlp.v2.IListColumnDataProfilesRequest | null, + protos.google.privacy.dlp.v2.IListColumnDataProfilesResponse, + ] + >; + listColumnDataProfiles( + request: protos.google.privacy.dlp.v2.IListColumnDataProfilesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListColumnDataProfilesRequest, + | protos.google.privacy.dlp.v2.IListColumnDataProfilesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IColumnDataProfile + >, + ): void; + listColumnDataProfiles( + request: protos.google.privacy.dlp.v2.IListColumnDataProfilesRequest, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListColumnDataProfilesRequest, + | protos.google.privacy.dlp.v2.IListColumnDataProfilesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IColumnDataProfile + >, + ): void; + listColumnDataProfiles( + request?: protos.google.privacy.dlp.v2.IListColumnDataProfilesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.privacy.dlp.v2.IListColumnDataProfilesRequest, + | protos.google.privacy.dlp.v2.IListColumnDataProfilesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IColumnDataProfile + >, + callback?: PaginationCallback< + protos.google.privacy.dlp.v2.IListColumnDataProfilesRequest, + | protos.google.privacy.dlp.v2.IListColumnDataProfilesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IColumnDataProfile + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IColumnDataProfile[], + protos.google.privacy.dlp.v2.IListColumnDataProfilesRequest | null, + protos.google.privacy.dlp.v2.IListColumnDataProfilesResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.privacy.dlp.v2.IListColumnDataProfilesRequest, + | protos.google.privacy.dlp.v2.IListColumnDataProfilesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IColumnDataProfile + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listColumnDataProfiles values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listColumnDataProfiles request %j', request); + return this.innerApiCalls + .listColumnDataProfiles(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.privacy.dlp.v2.IColumnDataProfile[], + protos.google.privacy.dlp.v2.IListColumnDataProfilesRequest | null, + protos.google.privacy.dlp.v2.IListColumnDataProfilesResponse, + ]) => { + this._log.info('listColumnDataProfiles values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listColumnDataProfiles`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the organization or project, for + * example `organizations/433245324/locations/europe` or + * `projects/project-id/locations/asia`. + * @param {string} request.pageToken + * Page token to continue retrieval. + * @param {number} request.pageSize + * Size of the page. This value can be limited by the server. If zero, server + * returns a page of max size 100. + * @param {string} request.orderBy + * Comma-separated list of fields to order by, followed by `asc` or `desc` + * postfix. This list is case insensitive. The default sorting order is + * ascending. Redundant space characters are insignificant. Only one order + * field at a time is allowed. + * + * Examples: + * + * * `project_id asc` + * * `table_id` + * * `sensitivity_level desc` + * + * Supported fields are: + * + * - `project_id`: The Google Cloud project ID. + * - `dataset_id`: The ID of a BigQuery dataset. + * - `table_id`: The ID of a BigQuery table. + * - `sensitivity_level`: How sensitive the data in a column is, at most. + * - `data_risk_level`: How much risk is associated with this data. + * - `profile_last_generated`: When the profile was last updated in epoch + * seconds. + * @param {string} request.filter + * Allows filtering. + * + * Supported syntax: + * + * * Filter expressions are made up of one or more restrictions. + * * Restrictions can be combined by `AND` or `OR` logical operators. A + * sequence of restrictions implicitly uses `AND`. + * * A restriction has the form of `{field} {operator} {value}`. + * * Supported fields: + * - `table_data_profile_name`: The name of the related table data + * profile + * - `project_id`: The Google Cloud project ID (REQUIRED) + * - `dataset_id`: The BigQuery dataset ID (REQUIRED) + * - `table_id`: The BigQuery table ID (REQUIRED) + * - `field_id`: The ID of the BigQuery field + * - `info_type`: The infotype detected in the resource + * - `sensitivity_level`: HIGH|MEDIUM|LOW + * - `data_risk_level`: How much risk is associated with this data + * - `status_code`: An RPC status code as defined in + * https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + * - `profile_last_generated`: Date and time the profile was last + * generated + * * The operator must be `=` for project_id, dataset_id, and table_id. Other + * filters also support `!=`. The `profile_last_generated` filter also + * supports `<` and `>`. + * + * The syntax is based on https://google.aip.dev/160. + * + * Examples: + * + * * project_id = 12345 AND status_code = 1 + * * project_id = 12345 AND sensitivity_level = HIGH + * * project_id = 12345 AND info_type = STREET_ADDRESS + * * profile_last_generated < "2025-01-01T00:00:00.000Z" + * + * The length of this field should be no more than 500 characters. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.privacy.dlp.v2.ColumnDataProfile|ColumnDataProfile} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listColumnDataProfilesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listColumnDataProfilesStream( + request?: protos.google.privacy.dlp.v2.IListColumnDataProfilesRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listColumnDataProfiles']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listColumnDataProfiles stream %j', request); + return this.descriptors.page.listColumnDataProfiles.createStream( + this.innerApiCalls.listColumnDataProfiles as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listColumnDataProfiles`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the organization or project, for + * example `organizations/433245324/locations/europe` or + * `projects/project-id/locations/asia`. + * @param {string} request.pageToken + * Page token to continue retrieval. + * @param {number} request.pageSize + * Size of the page. This value can be limited by the server. If zero, server + * returns a page of max size 100. + * @param {string} request.orderBy + * Comma-separated list of fields to order by, followed by `asc` or `desc` + * postfix. This list is case insensitive. The default sorting order is + * ascending. Redundant space characters are insignificant. Only one order + * field at a time is allowed. + * + * Examples: + * + * * `project_id asc` + * * `table_id` + * * `sensitivity_level desc` + * + * Supported fields are: + * + * - `project_id`: The Google Cloud project ID. + * - `dataset_id`: The ID of a BigQuery dataset. + * - `table_id`: The ID of a BigQuery table. + * - `sensitivity_level`: How sensitive the data in a column is, at most. + * - `data_risk_level`: How much risk is associated with this data. + * - `profile_last_generated`: When the profile was last updated in epoch + * seconds. + * @param {string} request.filter + * Allows filtering. + * + * Supported syntax: + * + * * Filter expressions are made up of one or more restrictions. + * * Restrictions can be combined by `AND` or `OR` logical operators. A + * sequence of restrictions implicitly uses `AND`. + * * A restriction has the form of `{field} {operator} {value}`. + * * Supported fields: + * - `table_data_profile_name`: The name of the related table data + * profile + * - `project_id`: The Google Cloud project ID (REQUIRED) + * - `dataset_id`: The BigQuery dataset ID (REQUIRED) + * - `table_id`: The BigQuery table ID (REQUIRED) + * - `field_id`: The ID of the BigQuery field + * - `info_type`: The infotype detected in the resource + * - `sensitivity_level`: HIGH|MEDIUM|LOW + * - `data_risk_level`: How much risk is associated with this data + * - `status_code`: An RPC status code as defined in + * https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + * - `profile_last_generated`: Date and time the profile was last + * generated + * * The operator must be `=` for project_id, dataset_id, and table_id. Other + * filters also support `!=`. The `profile_last_generated` filter also + * supports `<` and `>`. + * + * The syntax is based on https://google.aip.dev/160. + * + * Examples: + * + * * project_id = 12345 AND status_code = 1 + * * project_id = 12345 AND sensitivity_level = HIGH + * * project_id = 12345 AND info_type = STREET_ADDRESS + * * profile_last_generated < "2025-01-01T00:00:00.000Z" + * + * The length of this field should be no more than 500 characters. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.privacy.dlp.v2.ColumnDataProfile|ColumnDataProfile}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.list_column_data_profiles.js + * region_tag:dlp_v2_generated_DlpService_ListColumnDataProfiles_async + */ + listColumnDataProfilesAsync( + request?: protos.google.privacy.dlp.v2.IListColumnDataProfilesRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listColumnDataProfiles']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listColumnDataProfiles iterate %j', request); + return this.descriptors.page.listColumnDataProfiles.asyncIterate( + this.innerApiCalls['listColumnDataProfiles'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists file store data profiles for an organization. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the organization or project, for + * example `organizations/433245324/locations/europe` or + * `projects/project-id/locations/asia`. + * @param {string} [request.pageToken] + * Optional. Page token to continue retrieval. + * @param {number} [request.pageSize] + * Optional. Size of the page. This value can be limited by the server. If + * zero, server returns a page of max size 100. + * @param {string} [request.orderBy] + * Optional. Comma-separated list of fields to order by, followed by `asc` or + * `desc` postfix. This list is case insensitive. The default sorting order is + * ascending. Redundant space characters are insignificant. Only one order + * field at a time is allowed. + * + * Examples: + * + * * `project_id asc` + * * `name` + * * `sensitivity_level desc` + * + * Supported fields are: + * + * - `project_id`: The Google Cloud project ID. + * - `sensitivity_level`: How sensitive the data in a table is, at most. + * - `data_risk_level`: How much risk is associated with this data. + * - `profile_last_generated`: When the profile was last updated in epoch + * seconds. + * - `last_modified`: The last time the resource was modified. + * - `resource_visibility`: Visibility restriction for this resource. + * - `name`: The name of the profile. + * - `create_time`: The time the file store was first created. + * @param {string} [request.filter] + * Optional. Allows filtering. + * + * Supported syntax: + * + * * Filter expressions are made up of one or more restrictions. + * * Restrictions can be combined by `AND` or `OR` logical operators. A + * sequence of restrictions implicitly uses `AND`. + * * A restriction has the form of `{field} {operator} {value}`. + * * Supported fields: + * - `project_id`: The Google Cloud project ID + * - `account_id`: The AWS account ID + * - `file_store_path`: The path like "gs://bucket" + * - `data_source_type`: The profile's data source type, like + * "google/storage/bucket" + * - `data_storage_location`: The location where the file store's data is + * stored, like "us-central1" + * - `sensitivity_level`: HIGH|MODERATE|LOW + * - `data_risk_level`: HIGH|MODERATE|LOW + * - `resource_visibility`: PUBLIC|RESTRICTED + * - `status_code`: an RPC status code as defined in + * https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + * - `profile_last_generated`: Date and time the profile was last + * generated + * + * * The operator must be `=` or `!=`. The `profile_last_generated` filter + * also supports `<` and `>`. + * + * The syntax is based on https://google.aip.dev/160. + * + * Examples: + * + * * `project_id = 12345 AND status_code = 1` + * * `project_id = 12345 AND sensitivity_level = HIGH` + * * `project_id = 12345 AND resource_visibility = PUBLIC` + * * `file_store_path = "gs://mybucket"` + * * `profile_last_generated < "2025-01-01T00:00:00.000Z"` + * + * The length of this field should be no more than 500 characters. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.privacy.dlp.v2.FileStoreDataProfile|FileStoreDataProfile}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listFileStoreDataProfilesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listFileStoreDataProfiles( + request?: protos.google.privacy.dlp.v2.IListFileStoreDataProfilesRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IFileStoreDataProfile[], + protos.google.privacy.dlp.v2.IListFileStoreDataProfilesRequest | null, + protos.google.privacy.dlp.v2.IListFileStoreDataProfilesResponse, + ] + >; + listFileStoreDataProfiles( + request: protos.google.privacy.dlp.v2.IListFileStoreDataProfilesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListFileStoreDataProfilesRequest, + | protos.google.privacy.dlp.v2.IListFileStoreDataProfilesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IFileStoreDataProfile + >, + ): void; + listFileStoreDataProfiles( + request: protos.google.privacy.dlp.v2.IListFileStoreDataProfilesRequest, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListFileStoreDataProfilesRequest, + | protos.google.privacy.dlp.v2.IListFileStoreDataProfilesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IFileStoreDataProfile + >, + ): void; + listFileStoreDataProfiles( + request?: protos.google.privacy.dlp.v2.IListFileStoreDataProfilesRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.privacy.dlp.v2.IListFileStoreDataProfilesRequest, + | protos.google.privacy.dlp.v2.IListFileStoreDataProfilesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IFileStoreDataProfile + >, + callback?: PaginationCallback< + protos.google.privacy.dlp.v2.IListFileStoreDataProfilesRequest, + | protos.google.privacy.dlp.v2.IListFileStoreDataProfilesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IFileStoreDataProfile + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IFileStoreDataProfile[], + protos.google.privacy.dlp.v2.IListFileStoreDataProfilesRequest | null, + protos.google.privacy.dlp.v2.IListFileStoreDataProfilesResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.privacy.dlp.v2.IListFileStoreDataProfilesRequest, + | protos.google.privacy.dlp.v2.IListFileStoreDataProfilesResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IFileStoreDataProfile + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listFileStoreDataProfiles values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listFileStoreDataProfiles request %j', request); + return this.innerApiCalls + .listFileStoreDataProfiles(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.privacy.dlp.v2.IFileStoreDataProfile[], + protos.google.privacy.dlp.v2.IListFileStoreDataProfilesRequest | null, + protos.google.privacy.dlp.v2.IListFileStoreDataProfilesResponse, + ]) => { + this._log.info('listFileStoreDataProfiles values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listFileStoreDataProfiles`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the organization or project, for + * example `organizations/433245324/locations/europe` or + * `projects/project-id/locations/asia`. + * @param {string} [request.pageToken] + * Optional. Page token to continue retrieval. + * @param {number} [request.pageSize] + * Optional. Size of the page. This value can be limited by the server. If + * zero, server returns a page of max size 100. + * @param {string} [request.orderBy] + * Optional. Comma-separated list of fields to order by, followed by `asc` or + * `desc` postfix. This list is case insensitive. The default sorting order is + * ascending. Redundant space characters are insignificant. Only one order + * field at a time is allowed. + * + * Examples: + * + * * `project_id asc` + * * `name` + * * `sensitivity_level desc` + * + * Supported fields are: + * + * - `project_id`: The Google Cloud project ID. + * - `sensitivity_level`: How sensitive the data in a table is, at most. + * - `data_risk_level`: How much risk is associated with this data. + * - `profile_last_generated`: When the profile was last updated in epoch + * seconds. + * - `last_modified`: The last time the resource was modified. + * - `resource_visibility`: Visibility restriction for this resource. + * - `name`: The name of the profile. + * - `create_time`: The time the file store was first created. + * @param {string} [request.filter] + * Optional. Allows filtering. + * + * Supported syntax: + * + * * Filter expressions are made up of one or more restrictions. + * * Restrictions can be combined by `AND` or `OR` logical operators. A + * sequence of restrictions implicitly uses `AND`. + * * A restriction has the form of `{field} {operator} {value}`. + * * Supported fields: + * - `project_id`: The Google Cloud project ID + * - `account_id`: The AWS account ID + * - `file_store_path`: The path like "gs://bucket" + * - `data_source_type`: The profile's data source type, like + * "google/storage/bucket" + * - `data_storage_location`: The location where the file store's data is + * stored, like "us-central1" + * - `sensitivity_level`: HIGH|MODERATE|LOW + * - `data_risk_level`: HIGH|MODERATE|LOW + * - `resource_visibility`: PUBLIC|RESTRICTED + * - `status_code`: an RPC status code as defined in + * https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + * - `profile_last_generated`: Date and time the profile was last + * generated + * + * * The operator must be `=` or `!=`. The `profile_last_generated` filter + * also supports `<` and `>`. + * + * The syntax is based on https://google.aip.dev/160. + * + * Examples: + * + * * `project_id = 12345 AND status_code = 1` + * * `project_id = 12345 AND sensitivity_level = HIGH` + * * `project_id = 12345 AND resource_visibility = PUBLIC` + * * `file_store_path = "gs://mybucket"` + * * `profile_last_generated < "2025-01-01T00:00:00.000Z"` + * + * The length of this field should be no more than 500 characters. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.privacy.dlp.v2.FileStoreDataProfile|FileStoreDataProfile} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listFileStoreDataProfilesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listFileStoreDataProfilesStream( + request?: protos.google.privacy.dlp.v2.IListFileStoreDataProfilesRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFileStoreDataProfiles']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listFileStoreDataProfiles stream %j', request); + return this.descriptors.page.listFileStoreDataProfiles.createStream( + this.innerApiCalls.listFileStoreDataProfiles as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listFileStoreDataProfiles`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the organization or project, for + * example `organizations/433245324/locations/europe` or + * `projects/project-id/locations/asia`. + * @param {string} [request.pageToken] + * Optional. Page token to continue retrieval. + * @param {number} [request.pageSize] + * Optional. Size of the page. This value can be limited by the server. If + * zero, server returns a page of max size 100. + * @param {string} [request.orderBy] + * Optional. Comma-separated list of fields to order by, followed by `asc` or + * `desc` postfix. This list is case insensitive. The default sorting order is + * ascending. Redundant space characters are insignificant. Only one order + * field at a time is allowed. + * + * Examples: + * + * * `project_id asc` + * * `name` + * * `sensitivity_level desc` + * + * Supported fields are: + * + * - `project_id`: The Google Cloud project ID. + * - `sensitivity_level`: How sensitive the data in a table is, at most. + * - `data_risk_level`: How much risk is associated with this data. + * - `profile_last_generated`: When the profile was last updated in epoch + * seconds. + * - `last_modified`: The last time the resource was modified. + * - `resource_visibility`: Visibility restriction for this resource. + * - `name`: The name of the profile. + * - `create_time`: The time the file store was first created. + * @param {string} [request.filter] + * Optional. Allows filtering. + * + * Supported syntax: + * + * * Filter expressions are made up of one or more restrictions. + * * Restrictions can be combined by `AND` or `OR` logical operators. A + * sequence of restrictions implicitly uses `AND`. + * * A restriction has the form of `{field} {operator} {value}`. + * * Supported fields: + * - `project_id`: The Google Cloud project ID + * - `account_id`: The AWS account ID + * - `file_store_path`: The path like "gs://bucket" + * - `data_source_type`: The profile's data source type, like + * "google/storage/bucket" + * - `data_storage_location`: The location where the file store's data is + * stored, like "us-central1" + * - `sensitivity_level`: HIGH|MODERATE|LOW + * - `data_risk_level`: HIGH|MODERATE|LOW + * - `resource_visibility`: PUBLIC|RESTRICTED + * - `status_code`: an RPC status code as defined in + * https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto + * - `profile_last_generated`: Date and time the profile was last + * generated + * + * * The operator must be `=` or `!=`. The `profile_last_generated` filter + * also supports `<` and `>`. + * + * The syntax is based on https://google.aip.dev/160. + * + * Examples: + * + * * `project_id = 12345 AND status_code = 1` + * * `project_id = 12345 AND sensitivity_level = HIGH` + * * `project_id = 12345 AND resource_visibility = PUBLIC` + * * `file_store_path = "gs://mybucket"` + * * `profile_last_generated < "2025-01-01T00:00:00.000Z"` + * + * The length of this field should be no more than 500 characters. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.privacy.dlp.v2.FileStoreDataProfile|FileStoreDataProfile}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.list_file_store_data_profiles.js + * region_tag:dlp_v2_generated_DlpService_ListFileStoreDataProfiles_async + */ + listFileStoreDataProfilesAsync( + request?: protos.google.privacy.dlp.v2.IListFileStoreDataProfilesRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFileStoreDataProfiles']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listFileStoreDataProfiles iterate %j', request); + return this.descriptors.page.listFileStoreDataProfiles.asyncIterate( + this.innerApiCalls['listFileStoreDataProfiles'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists Connections in a parent. Use SearchConnections to see all connections + * within an organization. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the organization or project, for + * example, `organizations/433245324/locations/europe` or + * `projects/project-id/locations/asia`. + * @param {number} [request.pageSize] + * Optional. Number of results per page, max 1000. + * @param {string} [request.pageToken] + * Optional. Page token from a previous page to return the next set of + * results. If set, all other request fields must match the original request. + * @param {string} [request.filter] + * Optional. Supported field/value: `state` - MISSING|AVAILABLE|ERROR + * + * The syntax is based on https://google.aip.dev/160. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.privacy.dlp.v2.Connection|Connection}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listConnectionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listConnections( + request?: protos.google.privacy.dlp.v2.IListConnectionsRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IConnection[], + protos.google.privacy.dlp.v2.IListConnectionsRequest | null, + protos.google.privacy.dlp.v2.IListConnectionsResponse, + ] + >; + listConnections( + request: protos.google.privacy.dlp.v2.IListConnectionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListConnectionsRequest, + protos.google.privacy.dlp.v2.IListConnectionsResponse | null | undefined, + protos.google.privacy.dlp.v2.IConnection + >, + ): void; + listConnections( + request: protos.google.privacy.dlp.v2.IListConnectionsRequest, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.IListConnectionsRequest, + protos.google.privacy.dlp.v2.IListConnectionsResponse | null | undefined, + protos.google.privacy.dlp.v2.IConnection + >, + ): void; + listConnections( + request?: protos.google.privacy.dlp.v2.IListConnectionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.privacy.dlp.v2.IListConnectionsRequest, + | protos.google.privacy.dlp.v2.IListConnectionsResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IConnection + >, + callback?: PaginationCallback< + protos.google.privacy.dlp.v2.IListConnectionsRequest, + protos.google.privacy.dlp.v2.IListConnectionsResponse | null | undefined, + protos.google.privacy.dlp.v2.IConnection + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IConnection[], + protos.google.privacy.dlp.v2.IListConnectionsRequest | null, + protos.google.privacy.dlp.v2.IListConnectionsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.privacy.dlp.v2.IListConnectionsRequest, + | protos.google.privacy.dlp.v2.IListConnectionsResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IConnection + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listConnections values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listConnections request %j', request); + return this.innerApiCalls + .listConnections(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.privacy.dlp.v2.IConnection[], + protos.google.privacy.dlp.v2.IListConnectionsRequest | null, + protos.google.privacy.dlp.v2.IListConnectionsResponse, + ]) => { + this._log.info('listConnections values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listConnections`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the organization or project, for + * example, `organizations/433245324/locations/europe` or + * `projects/project-id/locations/asia`. + * @param {number} [request.pageSize] + * Optional. Number of results per page, max 1000. + * @param {string} [request.pageToken] + * Optional. Page token from a previous page to return the next set of + * results. If set, all other request fields must match the original request. + * @param {string} [request.filter] + * Optional. Supported field/value: `state` - MISSING|AVAILABLE|ERROR + * + * The syntax is based on https://google.aip.dev/160. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.privacy.dlp.v2.Connection|Connection} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listConnectionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listConnectionsStream( + request?: protos.google.privacy.dlp.v2.IListConnectionsRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listConnections']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listConnections stream %j', request); + return this.descriptors.page.listConnections.createStream( + this.innerApiCalls.listConnections as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listConnections`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the organization or project, for + * example, `organizations/433245324/locations/europe` or + * `projects/project-id/locations/asia`. + * @param {number} [request.pageSize] + * Optional. Number of results per page, max 1000. + * @param {string} [request.pageToken] + * Optional. Page token from a previous page to return the next set of + * results. If set, all other request fields must match the original request. + * @param {string} [request.filter] + * Optional. Supported field/value: `state` - MISSING|AVAILABLE|ERROR + * + * The syntax is based on https://google.aip.dev/160. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.privacy.dlp.v2.Connection|Connection}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.list_connections.js + * region_tag:dlp_v2_generated_DlpService_ListConnections_async + */ + listConnectionsAsync( + request?: protos.google.privacy.dlp.v2.IListConnectionsRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listConnections']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listConnections iterate %j', request); + return this.descriptors.page.listConnections.asyncIterate( + this.innerApiCalls['listConnections'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Searches for Connections in a parent. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the organization or project with a wildcard + * location, for example, `organizations/433245324/locations/-` or + * `projects/project-id/locations/-`. + * @param {number} [request.pageSize] + * Optional. Number of results per page, max 1000. + * @param {string} [request.pageToken] + * Optional. Page token from a previous page to return the next set of + * results. If set, all other request fields must match the original request. + * @param {string} [request.filter] + * Optional. Supported field/value: - `state` - MISSING|AVAILABLE|ERROR + * + * The syntax is based on https://google.aip.dev/160. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.privacy.dlp.v2.Connection|Connection}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `searchConnectionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + searchConnections( + request?: protos.google.privacy.dlp.v2.ISearchConnectionsRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.privacy.dlp.v2.IConnection[], + protos.google.privacy.dlp.v2.ISearchConnectionsRequest | null, + protos.google.privacy.dlp.v2.ISearchConnectionsResponse, + ] + >; + searchConnections( + request: protos.google.privacy.dlp.v2.ISearchConnectionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.ISearchConnectionsRequest, + | protos.google.privacy.dlp.v2.ISearchConnectionsResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IConnection + >, + ): void; + searchConnections( + request: protos.google.privacy.dlp.v2.ISearchConnectionsRequest, + callback: PaginationCallback< + protos.google.privacy.dlp.v2.ISearchConnectionsRequest, + | protos.google.privacy.dlp.v2.ISearchConnectionsResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IConnection + >, + ): void; + searchConnections( + request?: protos.google.privacy.dlp.v2.ISearchConnectionsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.privacy.dlp.v2.ISearchConnectionsRequest, + | protos.google.privacy.dlp.v2.ISearchConnectionsResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IConnection + >, + callback?: PaginationCallback< + protos.google.privacy.dlp.v2.ISearchConnectionsRequest, + | protos.google.privacy.dlp.v2.ISearchConnectionsResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IConnection + >, + ): Promise< + [ + protos.google.privacy.dlp.v2.IConnection[], + protos.google.privacy.dlp.v2.ISearchConnectionsRequest | null, + protos.google.privacy.dlp.v2.ISearchConnectionsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.privacy.dlp.v2.ISearchConnectionsRequest, + | protos.google.privacy.dlp.v2.ISearchConnectionsResponse + | null + | undefined, + protos.google.privacy.dlp.v2.IConnection + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('searchConnections values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('searchConnections request %j', request); + return this.innerApiCalls + .searchConnections(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.privacy.dlp.v2.IConnection[], + protos.google.privacy.dlp.v2.ISearchConnectionsRequest | null, + protos.google.privacy.dlp.v2.ISearchConnectionsResponse, + ]) => { + this._log.info('searchConnections values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `searchConnections`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the organization or project with a wildcard + * location, for example, `organizations/433245324/locations/-` or + * `projects/project-id/locations/-`. + * @param {number} [request.pageSize] + * Optional. Number of results per page, max 1000. + * @param {string} [request.pageToken] + * Optional. Page token from a previous page to return the next set of + * results. If set, all other request fields must match the original request. + * @param {string} [request.filter] + * Optional. Supported field/value: - `state` - MISSING|AVAILABLE|ERROR + * + * The syntax is based on https://google.aip.dev/160. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.privacy.dlp.v2.Connection|Connection} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `searchConnectionsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + searchConnectionsStream( + request?: protos.google.privacy.dlp.v2.ISearchConnectionsRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['searchConnections']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('searchConnections stream %j', request); + return this.descriptors.page.searchConnections.createStream( + this.innerApiCalls.searchConnections as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `searchConnections`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. Resource name of the organization or project with a wildcard + * location, for example, `organizations/433245324/locations/-` or + * `projects/project-id/locations/-`. + * @param {number} [request.pageSize] + * Optional. Number of results per page, max 1000. + * @param {string} [request.pageToken] + * Optional. Page token from a previous page to return the next set of + * results. If set, all other request fields must match the original request. + * @param {string} [request.filter] + * Optional. Supported field/value: - `state` - MISSING|AVAILABLE|ERROR + * + * The syntax is based on https://google.aip.dev/160. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.privacy.dlp.v2.Connection|Connection}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v2/dlp_service.search_connections.js + * region_tag:dlp_v2_generated_DlpService_SearchConnections_async + */ + searchConnectionsAsync( + request?: protos.google.privacy.dlp.v2.ISearchConnectionsRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['searchConnections']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('searchConnections iterate %j', request); + return this.descriptors.page.searchConnections.asyncIterate( + this.innerApiCalls['searchConnections'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + + /** + * Gets information about a location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Resource name for the location. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link google.cloud.location.Location | Location}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example + * ``` + * const [response] = await client.getLocation(request); + * ``` + */ + getLocation( + request: LocationProtos.google.cloud.location.IGetLocationRequest, + options?: + | gax.CallOptions + | Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + LocationProtos.google.cloud.location.ILocation, + | LocationProtos.google.cloud.location.IGetLocationRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise { + return this.locationsClient.getLocation(request, options, callback); + } + /** + * Lists information about the supported locations for this service. Returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource that owns the locations collection, if applicable. + * @param {string} request.filter + * The standard list filter. + * @param {number} request.pageSize + * The standard list page size. + * @param {string} request.pageToken + * The standard list page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example + * ``` + * const iterable = client.listLocationsAsync(request); + * for await (const response of iterable) { + * // process response + * } + * ``` + */ + listLocationsAsync( + request: LocationProtos.google.cloud.location.IListLocationsRequest, + options?: CallOptions, + ): AsyncIterable { + return this.locationsClient.listLocationsAsync(request, options); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified discoveryConfig resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} discovery_config + * @returns {string} Resource name string. + */ + discoveryConfigPath( + project: string, + location: string, + discoveryConfig: string, + ) { + return this.pathTemplates.discoveryConfigPathTemplate.render({ + project: project, + location: location, + discovery_config: discoveryConfig, + }); + } + + /** + * Parse the project from DiscoveryConfig resource. + * + * @param {string} discoveryConfigName + * A fully-qualified path representing DiscoveryConfig resource. + * @returns {string} A string representing the project. + */ + matchProjectFromDiscoveryConfigName(discoveryConfigName: string) { + return this.pathTemplates.discoveryConfigPathTemplate.match( + discoveryConfigName, + ).project; + } + + /** + * Parse the location from DiscoveryConfig resource. + * + * @param {string} discoveryConfigName + * A fully-qualified path representing DiscoveryConfig resource. + * @returns {string} A string representing the location. + */ + matchLocationFromDiscoveryConfigName(discoveryConfigName: string) { + return this.pathTemplates.discoveryConfigPathTemplate.match( + discoveryConfigName, + ).location; + } + + /** + * Parse the discovery_config from DiscoveryConfig resource. + * + * @param {string} discoveryConfigName + * A fully-qualified path representing DiscoveryConfig resource. + * @returns {string} A string representing the discovery_config. + */ + matchDiscoveryConfigFromDiscoveryConfigName(discoveryConfigName: string) { + return this.pathTemplates.discoveryConfigPathTemplate.match( + discoveryConfigName, + ).discovery_config; + } + + /** + * Return a fully-qualified finding resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} finding + * @returns {string} Resource name string. + */ + findingPath(project: string, location: string, finding: string) { + return this.pathTemplates.findingPathTemplate.render({ + project: project, + location: location, + finding: finding, + }); + } + + /** + * Parse the project from Finding resource. + * + * @param {string} findingName + * A fully-qualified path representing Finding resource. + * @returns {string} A string representing the project. + */ + matchProjectFromFindingName(findingName: string) { + return this.pathTemplates.findingPathTemplate.match(findingName).project; + } + + /** + * Parse the location from Finding resource. + * + * @param {string} findingName + * A fully-qualified path representing Finding resource. + * @returns {string} A string representing the location. + */ + matchLocationFromFindingName(findingName: string) { + return this.pathTemplates.findingPathTemplate.match(findingName).location; + } + + /** + * Parse the finding from Finding resource. + * + * @param {string} findingName + * A fully-qualified path representing Finding resource. + * @returns {string} A string representing the finding. + */ + matchFindingFromFindingName(findingName: string) { + return this.pathTemplates.findingPathTemplate.match(findingName).finding; + } + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified organization resource name string. + * + * @param {string} organization + * @returns {string} Resource name string. + */ + organizationPath(organization: string) { + return this.pathTemplates.organizationPathTemplate.render({ + organization: organization, + }); + } + + /** + * Parse the organization from Organization resource. + * + * @param {string} organizationName + * A fully-qualified path representing Organization resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationName(organizationName: string) { + return this.pathTemplates.organizationPathTemplate.match(organizationName) + .organization; + } + + /** + * Return a fully-qualified organizationDeidentifyTemplate resource name string. + * + * @param {string} organization + * @param {string} deidentify_template + * @returns {string} Resource name string. + */ + organizationDeidentifyTemplatePath( + organization: string, + deidentifyTemplate: string, + ) { + return this.pathTemplates.organizationDeidentifyTemplatePathTemplate.render( + { + organization: organization, + deidentify_template: deidentifyTemplate, + }, + ); + } + + /** + * Parse the organization from OrganizationDeidentifyTemplate resource. + * + * @param {string} organizationDeidentifyTemplateName + * A fully-qualified path representing organization_deidentify_template resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationDeidentifyTemplateName( + organizationDeidentifyTemplateName: string, + ) { + return this.pathTemplates.organizationDeidentifyTemplatePathTemplate.match( + organizationDeidentifyTemplateName, + ).organization; + } + + /** + * Parse the deidentify_template from OrganizationDeidentifyTemplate resource. + * + * @param {string} organizationDeidentifyTemplateName + * A fully-qualified path representing organization_deidentify_template resource. + * @returns {string} A string representing the deidentify_template. + */ + matchDeidentifyTemplateFromOrganizationDeidentifyTemplateName( + organizationDeidentifyTemplateName: string, + ) { + return this.pathTemplates.organizationDeidentifyTemplatePathTemplate.match( + organizationDeidentifyTemplateName, + ).deidentify_template; + } + + /** + * Return a fully-qualified organizationInspectTemplate resource name string. + * + * @param {string} organization + * @param {string} inspect_template + * @returns {string} Resource name string. + */ + organizationInspectTemplatePath( + organization: string, + inspectTemplate: string, + ) { + return this.pathTemplates.organizationInspectTemplatePathTemplate.render({ + organization: organization, + inspect_template: inspectTemplate, + }); + } + + /** + * Parse the organization from OrganizationInspectTemplate resource. + * + * @param {string} organizationInspectTemplateName + * A fully-qualified path representing organization_inspect_template resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationInspectTemplateName( + organizationInspectTemplateName: string, + ) { + return this.pathTemplates.organizationInspectTemplatePathTemplate.match( + organizationInspectTemplateName, + ).organization; + } + + /** + * Parse the inspect_template from OrganizationInspectTemplate resource. + * + * @param {string} organizationInspectTemplateName + * A fully-qualified path representing organization_inspect_template resource. + * @returns {string} A string representing the inspect_template. + */ + matchInspectTemplateFromOrganizationInspectTemplateName( + organizationInspectTemplateName: string, + ) { + return this.pathTemplates.organizationInspectTemplatePathTemplate.match( + organizationInspectTemplateName, + ).inspect_template; + } + + /** + * Return a fully-qualified organizationLocation resource name string. + * + * @param {string} organization + * @param {string} location + * @returns {string} Resource name string. + */ + organizationLocationPath(organization: string, location: string) { + return this.pathTemplates.organizationLocationPathTemplate.render({ + organization: organization, + location: location, + }); + } + + /** + * Parse the organization from OrganizationLocation resource. + * + * @param {string} organizationLocationName + * A fully-qualified path representing OrganizationLocation resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationName( + organizationLocationName: string, + ) { + return this.pathTemplates.organizationLocationPathTemplate.match( + organizationLocationName, + ).organization; + } + + /** + * Parse the location from OrganizationLocation resource. + * + * @param {string} organizationLocationName + * A fully-qualified path representing OrganizationLocation resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationName(organizationLocationName: string) { + return this.pathTemplates.organizationLocationPathTemplate.match( + organizationLocationName, + ).location; + } + + /** + * Return a fully-qualified organizationLocationColumnDataProfile resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} column_data_profile + * @returns {string} Resource name string. + */ + organizationLocationColumnDataProfilePath( + organization: string, + location: string, + columnDataProfile: string, + ) { + return this.pathTemplates.organizationLocationColumnDataProfilePathTemplate.render( + { + organization: organization, + location: location, + column_data_profile: columnDataProfile, + }, + ); + } + + /** + * Parse the organization from OrganizationLocationColumnDataProfile resource. + * + * @param {string} organizationLocationColumnDataProfileName + * A fully-qualified path representing organization_location_column_data_profile resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationColumnDataProfileName( + organizationLocationColumnDataProfileName: string, + ) { + return this.pathTemplates.organizationLocationColumnDataProfilePathTemplate.match( + organizationLocationColumnDataProfileName, + ).organization; + } + + /** + * Parse the location from OrganizationLocationColumnDataProfile resource. + * + * @param {string} organizationLocationColumnDataProfileName + * A fully-qualified path representing organization_location_column_data_profile resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationColumnDataProfileName( + organizationLocationColumnDataProfileName: string, + ) { + return this.pathTemplates.organizationLocationColumnDataProfilePathTemplate.match( + organizationLocationColumnDataProfileName, + ).location; + } + + /** + * Parse the column_data_profile from OrganizationLocationColumnDataProfile resource. + * + * @param {string} organizationLocationColumnDataProfileName + * A fully-qualified path representing organization_location_column_data_profile resource. + * @returns {string} A string representing the column_data_profile. + */ + matchColumnDataProfileFromOrganizationLocationColumnDataProfileName( + organizationLocationColumnDataProfileName: string, + ) { + return this.pathTemplates.organizationLocationColumnDataProfilePathTemplate.match( + organizationLocationColumnDataProfileName, + ).column_data_profile; + } + + /** + * Return a fully-qualified organizationLocationConnection resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} connection + * @returns {string} Resource name string. + */ + organizationLocationConnectionPath( + organization: string, + location: string, + connection: string, + ) { + return this.pathTemplates.organizationLocationConnectionPathTemplate.render( + { + organization: organization, + location: location, + connection: connection, + }, + ); + } + + /** + * Parse the organization from OrganizationLocationConnection resource. + * + * @param {string} organizationLocationConnectionName + * A fully-qualified path representing organization_location_connection resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationConnectionName( + organizationLocationConnectionName: string, + ) { + return this.pathTemplates.organizationLocationConnectionPathTemplate.match( + organizationLocationConnectionName, + ).organization; + } + + /** + * Parse the location from OrganizationLocationConnection resource. + * + * @param {string} organizationLocationConnectionName + * A fully-qualified path representing organization_location_connection resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationConnectionName( + organizationLocationConnectionName: string, + ) { + return this.pathTemplates.organizationLocationConnectionPathTemplate.match( + organizationLocationConnectionName, + ).location; + } + + /** + * Parse the connection from OrganizationLocationConnection resource. + * + * @param {string} organizationLocationConnectionName + * A fully-qualified path representing organization_location_connection resource. + * @returns {string} A string representing the connection. + */ + matchConnectionFromOrganizationLocationConnectionName( + organizationLocationConnectionName: string, + ) { + return this.pathTemplates.organizationLocationConnectionPathTemplate.match( + organizationLocationConnectionName, + ).connection; + } + + /** + * Return a fully-qualified organizationLocationDeidentifyTemplate resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} deidentify_template + * @returns {string} Resource name string. + */ + organizationLocationDeidentifyTemplatePath( + organization: string, + location: string, + deidentifyTemplate: string, + ) { + return this.pathTemplates.organizationLocationDeidentifyTemplatePathTemplate.render( + { + organization: organization, + location: location, + deidentify_template: deidentifyTemplate, + }, + ); + } + + /** + * Parse the organization from OrganizationLocationDeidentifyTemplate resource. + * + * @param {string} organizationLocationDeidentifyTemplateName + * A fully-qualified path representing organization_location_deidentify_template resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationDeidentifyTemplateName( + organizationLocationDeidentifyTemplateName: string, + ) { + return this.pathTemplates.organizationLocationDeidentifyTemplatePathTemplate.match( + organizationLocationDeidentifyTemplateName, + ).organization; + } + + /** + * Parse the location from OrganizationLocationDeidentifyTemplate resource. + * + * @param {string} organizationLocationDeidentifyTemplateName + * A fully-qualified path representing organization_location_deidentify_template resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationDeidentifyTemplateName( + organizationLocationDeidentifyTemplateName: string, + ) { + return this.pathTemplates.organizationLocationDeidentifyTemplatePathTemplate.match( + organizationLocationDeidentifyTemplateName, + ).location; + } + + /** + * Parse the deidentify_template from OrganizationLocationDeidentifyTemplate resource. + * + * @param {string} organizationLocationDeidentifyTemplateName + * A fully-qualified path representing organization_location_deidentify_template resource. + * @returns {string} A string representing the deidentify_template. + */ + matchDeidentifyTemplateFromOrganizationLocationDeidentifyTemplateName( + organizationLocationDeidentifyTemplateName: string, + ) { + return this.pathTemplates.organizationLocationDeidentifyTemplatePathTemplate.match( + organizationLocationDeidentifyTemplateName, + ).deidentify_template; + } + + /** + * Return a fully-qualified organizationLocationFileStoreDataProfile resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} file_store_data_profile + * @returns {string} Resource name string. + */ + organizationLocationFileStoreDataProfilePath( + organization: string, + location: string, + fileStoreDataProfile: string, + ) { + return this.pathTemplates.organizationLocationFileStoreDataProfilePathTemplate.render( + { + organization: organization, + location: location, + file_store_data_profile: fileStoreDataProfile, + }, + ); + } + + /** + * Parse the organization from OrganizationLocationFileStoreDataProfile resource. + * + * @param {string} organizationLocationFileStoreDataProfileName + * A fully-qualified path representing organization_location_file_store_data_profile resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFileStoreDataProfileName( + organizationLocationFileStoreDataProfileName: string, + ) { + return this.pathTemplates.organizationLocationFileStoreDataProfilePathTemplate.match( + organizationLocationFileStoreDataProfileName, + ).organization; + } + + /** + * Parse the location from OrganizationLocationFileStoreDataProfile resource. + * + * @param {string} organizationLocationFileStoreDataProfileName + * A fully-qualified path representing organization_location_file_store_data_profile resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFileStoreDataProfileName( + organizationLocationFileStoreDataProfileName: string, + ) { + return this.pathTemplates.organizationLocationFileStoreDataProfilePathTemplate.match( + organizationLocationFileStoreDataProfileName, + ).location; + } + + /** + * Parse the file_store_data_profile from OrganizationLocationFileStoreDataProfile resource. + * + * @param {string} organizationLocationFileStoreDataProfileName + * A fully-qualified path representing organization_location_file_store_data_profile resource. + * @returns {string} A string representing the file_store_data_profile. + */ + matchFileStoreDataProfileFromOrganizationLocationFileStoreDataProfileName( + organizationLocationFileStoreDataProfileName: string, + ) { + return this.pathTemplates.organizationLocationFileStoreDataProfilePathTemplate.match( + organizationLocationFileStoreDataProfileName, + ).file_store_data_profile; + } + + /** + * Return a fully-qualified organizationLocationInspectTemplate resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} inspect_template + * @returns {string} Resource name string. + */ + organizationLocationInspectTemplatePath( + organization: string, + location: string, + inspectTemplate: string, + ) { + return this.pathTemplates.organizationLocationInspectTemplatePathTemplate.render( + { + organization: organization, + location: location, + inspect_template: inspectTemplate, + }, + ); + } + + /** + * Parse the organization from OrganizationLocationInspectTemplate resource. + * + * @param {string} organizationLocationInspectTemplateName + * A fully-qualified path representing organization_location_inspect_template resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationInspectTemplateName( + organizationLocationInspectTemplateName: string, + ) { + return this.pathTemplates.organizationLocationInspectTemplatePathTemplate.match( + organizationLocationInspectTemplateName, + ).organization; + } + + /** + * Parse the location from OrganizationLocationInspectTemplate resource. + * + * @param {string} organizationLocationInspectTemplateName + * A fully-qualified path representing organization_location_inspect_template resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationInspectTemplateName( + organizationLocationInspectTemplateName: string, + ) { + return this.pathTemplates.organizationLocationInspectTemplatePathTemplate.match( + organizationLocationInspectTemplateName, + ).location; + } + + /** + * Parse the inspect_template from OrganizationLocationInspectTemplate resource. + * + * @param {string} organizationLocationInspectTemplateName + * A fully-qualified path representing organization_location_inspect_template resource. + * @returns {string} A string representing the inspect_template. + */ + matchInspectTemplateFromOrganizationLocationInspectTemplateName( + organizationLocationInspectTemplateName: string, + ) { + return this.pathTemplates.organizationLocationInspectTemplatePathTemplate.match( + organizationLocationInspectTemplateName, + ).inspect_template; + } + + /** + * Return a fully-qualified organizationLocationProjectDataProfile resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} project_data_profile + * @returns {string} Resource name string. + */ + organizationLocationProjectDataProfilePath( + organization: string, + location: string, + projectDataProfile: string, + ) { + return this.pathTemplates.organizationLocationProjectDataProfilePathTemplate.render( + { + organization: organization, + location: location, + project_data_profile: projectDataProfile, + }, + ); + } + + /** + * Parse the organization from OrganizationLocationProjectDataProfile resource. + * + * @param {string} organizationLocationProjectDataProfileName + * A fully-qualified path representing organization_location_project_data_profile resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationProjectDataProfileName( + organizationLocationProjectDataProfileName: string, + ) { + return this.pathTemplates.organizationLocationProjectDataProfilePathTemplate.match( + organizationLocationProjectDataProfileName, + ).organization; + } + + /** + * Parse the location from OrganizationLocationProjectDataProfile resource. + * + * @param {string} organizationLocationProjectDataProfileName + * A fully-qualified path representing organization_location_project_data_profile resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationProjectDataProfileName( + organizationLocationProjectDataProfileName: string, + ) { + return this.pathTemplates.organizationLocationProjectDataProfilePathTemplate.match( + organizationLocationProjectDataProfileName, + ).location; + } + + /** + * Parse the project_data_profile from OrganizationLocationProjectDataProfile resource. + * + * @param {string} organizationLocationProjectDataProfileName + * A fully-qualified path representing organization_location_project_data_profile resource. + * @returns {string} A string representing the project_data_profile. + */ + matchProjectDataProfileFromOrganizationLocationProjectDataProfileName( + organizationLocationProjectDataProfileName: string, + ) { + return this.pathTemplates.organizationLocationProjectDataProfilePathTemplate.match( + organizationLocationProjectDataProfileName, + ).project_data_profile; + } + + /** + * Return a fully-qualified organizationLocationStoredInfoType resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} stored_info_type + * @returns {string} Resource name string. + */ + organizationLocationStoredInfoTypePath( + organization: string, + location: string, + storedInfoType: string, + ) { + return this.pathTemplates.organizationLocationStoredInfoTypePathTemplate.render( + { + organization: organization, + location: location, + stored_info_type: storedInfoType, + }, + ); + } + + /** + * Parse the organization from OrganizationLocationStoredInfoType resource. + * + * @param {string} organizationLocationStoredInfoTypeName + * A fully-qualified path representing organization_location_stored_info_type resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationStoredInfoTypeName( + organizationLocationStoredInfoTypeName: string, + ) { + return this.pathTemplates.organizationLocationStoredInfoTypePathTemplate.match( + organizationLocationStoredInfoTypeName, + ).organization; + } + + /** + * Parse the location from OrganizationLocationStoredInfoType resource. + * + * @param {string} organizationLocationStoredInfoTypeName + * A fully-qualified path representing organization_location_stored_info_type resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationStoredInfoTypeName( + organizationLocationStoredInfoTypeName: string, + ) { + return this.pathTemplates.organizationLocationStoredInfoTypePathTemplate.match( + organizationLocationStoredInfoTypeName, + ).location; + } + + /** + * Parse the stored_info_type from OrganizationLocationStoredInfoType resource. + * + * @param {string} organizationLocationStoredInfoTypeName + * A fully-qualified path representing organization_location_stored_info_type resource. + * @returns {string} A string representing the stored_info_type. + */ + matchStoredInfoTypeFromOrganizationLocationStoredInfoTypeName( + organizationLocationStoredInfoTypeName: string, + ) { + return this.pathTemplates.organizationLocationStoredInfoTypePathTemplate.match( + organizationLocationStoredInfoTypeName, + ).stored_info_type; + } + + /** + * Return a fully-qualified organizationLocationTableDataProfile resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} table_data_profile + * @returns {string} Resource name string. + */ + organizationLocationTableDataProfilePath( + organization: string, + location: string, + tableDataProfile: string, + ) { + return this.pathTemplates.organizationLocationTableDataProfilePathTemplate.render( + { + organization: organization, + location: location, + table_data_profile: tableDataProfile, + }, + ); + } + + /** + * Parse the organization from OrganizationLocationTableDataProfile resource. + * + * @param {string} organizationLocationTableDataProfileName + * A fully-qualified path representing organization_location_table_data_profile resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationTableDataProfileName( + organizationLocationTableDataProfileName: string, + ) { + return this.pathTemplates.organizationLocationTableDataProfilePathTemplate.match( + organizationLocationTableDataProfileName, + ).organization; + } + + /** + * Parse the location from OrganizationLocationTableDataProfile resource. + * + * @param {string} organizationLocationTableDataProfileName + * A fully-qualified path representing organization_location_table_data_profile resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationTableDataProfileName( + organizationLocationTableDataProfileName: string, + ) { + return this.pathTemplates.organizationLocationTableDataProfilePathTemplate.match( + organizationLocationTableDataProfileName, + ).location; + } + + /** + * Parse the table_data_profile from OrganizationLocationTableDataProfile resource. + * + * @param {string} organizationLocationTableDataProfileName + * A fully-qualified path representing organization_location_table_data_profile resource. + * @returns {string} A string representing the table_data_profile. + */ + matchTableDataProfileFromOrganizationLocationTableDataProfileName( + organizationLocationTableDataProfileName: string, + ) { + return this.pathTemplates.organizationLocationTableDataProfilePathTemplate.match( + organizationLocationTableDataProfileName, + ).table_data_profile; + } + + /** + * Return a fully-qualified organizationStoredInfoType resource name string. + * + * @param {string} organization + * @param {string} stored_info_type + * @returns {string} Resource name string. + */ + organizationStoredInfoTypePath(organization: string, storedInfoType: string) { + return this.pathTemplates.organizationStoredInfoTypePathTemplate.render({ + organization: organization, + stored_info_type: storedInfoType, + }); + } + + /** + * Parse the organization from OrganizationStoredInfoType resource. + * + * @param {string} organizationStoredInfoTypeName + * A fully-qualified path representing organization_stored_info_type resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationStoredInfoTypeName( + organizationStoredInfoTypeName: string, + ) { + return this.pathTemplates.organizationStoredInfoTypePathTemplate.match( + organizationStoredInfoTypeName, + ).organization; + } + + /** + * Parse the stored_info_type from OrganizationStoredInfoType resource. + * + * @param {string} organizationStoredInfoTypeName + * A fully-qualified path representing organization_stored_info_type resource. + * @returns {string} A string representing the stored_info_type. + */ + matchStoredInfoTypeFromOrganizationStoredInfoTypeName( + organizationStoredInfoTypeName: string, + ) { + return this.pathTemplates.organizationStoredInfoTypePathTemplate.match( + organizationStoredInfoTypeName, + ).stored_info_type; + } + + /** + * Return a fully-qualified project resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectPath(project: string) { + return this.pathTemplates.projectPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from Project resource. + * + * @param {string} projectName + * A fully-qualified path representing Project resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectName(projectName: string) { + return this.pathTemplates.projectPathTemplate.match(projectName).project; + } + + /** + * Return a fully-qualified projectDeidentifyTemplate resource name string. + * + * @param {string} project + * @param {string} deidentify_template + * @returns {string} Resource name string. + */ + projectDeidentifyTemplatePath(project: string, deidentifyTemplate: string) { + return this.pathTemplates.projectDeidentifyTemplatePathTemplate.render({ + project: project, + deidentify_template: deidentifyTemplate, + }); + } + + /** + * Parse the project from ProjectDeidentifyTemplate resource. + * + * @param {string} projectDeidentifyTemplateName + * A fully-qualified path representing project_deidentify_template resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectDeidentifyTemplateName( + projectDeidentifyTemplateName: string, + ) { + return this.pathTemplates.projectDeidentifyTemplatePathTemplate.match( + projectDeidentifyTemplateName, + ).project; + } + + /** + * Parse the deidentify_template from ProjectDeidentifyTemplate resource. + * + * @param {string} projectDeidentifyTemplateName + * A fully-qualified path representing project_deidentify_template resource. + * @returns {string} A string representing the deidentify_template. + */ + matchDeidentifyTemplateFromProjectDeidentifyTemplateName( + projectDeidentifyTemplateName: string, + ) { + return this.pathTemplates.projectDeidentifyTemplatePathTemplate.match( + projectDeidentifyTemplateName, + ).deidentify_template; + } + + /** + * Return a fully-qualified projectDlpContent resource name string. + * + * @param {string} project + * @returns {string} Resource name string. + */ + projectDlpContentPath(project: string) { + return this.pathTemplates.projectDlpContentPathTemplate.render({ + project: project, + }); + } + + /** + * Parse the project from ProjectDlpContent resource. + * + * @param {string} projectDlpContentName + * A fully-qualified path representing project_dlpContent resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectDlpContentName(projectDlpContentName: string) { + return this.pathTemplates.projectDlpContentPathTemplate.match( + projectDlpContentName, + ).project; + } + + /** + * Return a fully-qualified projectDlpJob resource name string. + * + * @param {string} project + * @param {string} dlp_job + * @returns {string} Resource name string. + */ + projectDlpJobPath(project: string, dlpJob: string) { + return this.pathTemplates.projectDlpJobPathTemplate.render({ + project: project, + dlp_job: dlpJob, + }); + } + + /** + * Parse the project from ProjectDlpJob resource. + * + * @param {string} projectDlpJobName + * A fully-qualified path representing project_dlp_job resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectDlpJobName(projectDlpJobName: string) { + return this.pathTemplates.projectDlpJobPathTemplate.match(projectDlpJobName) + .project; + } + + /** + * Parse the dlp_job from ProjectDlpJob resource. + * + * @param {string} projectDlpJobName + * A fully-qualified path representing project_dlp_job resource. + * @returns {string} A string representing the dlp_job. + */ + matchDlpJobFromProjectDlpJobName(projectDlpJobName: string) { + return this.pathTemplates.projectDlpJobPathTemplate.match(projectDlpJobName) + .dlp_job; + } + + /** + * Return a fully-qualified projectInspectTemplate resource name string. + * + * @param {string} project + * @param {string} inspect_template + * @returns {string} Resource name string. + */ + projectInspectTemplatePath(project: string, inspectTemplate: string) { + return this.pathTemplates.projectInspectTemplatePathTemplate.render({ + project: project, + inspect_template: inspectTemplate, + }); + } + + /** + * Parse the project from ProjectInspectTemplate resource. + * + * @param {string} projectInspectTemplateName + * A fully-qualified path representing project_inspect_template resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectInspectTemplateName( + projectInspectTemplateName: string, + ) { + return this.pathTemplates.projectInspectTemplatePathTemplate.match( + projectInspectTemplateName, + ).project; + } + + /** + * Parse the inspect_template from ProjectInspectTemplate resource. + * + * @param {string} projectInspectTemplateName + * A fully-qualified path representing project_inspect_template resource. + * @returns {string} A string representing the inspect_template. + */ + matchInspectTemplateFromProjectInspectTemplateName( + projectInspectTemplateName: string, + ) { + return this.pathTemplates.projectInspectTemplatePathTemplate.match( + projectInspectTemplateName, + ).inspect_template; + } + + /** + * Return a fully-qualified projectJobTrigger resource name string. + * + * @param {string} project + * @param {string} job_trigger + * @returns {string} Resource name string. + */ + projectJobTriggerPath(project: string, jobTrigger: string) { + return this.pathTemplates.projectJobTriggerPathTemplate.render({ + project: project, + job_trigger: jobTrigger, + }); + } + + /** + * Parse the project from ProjectJobTrigger resource. + * + * @param {string} projectJobTriggerName + * A fully-qualified path representing project_job_trigger resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectJobTriggerName(projectJobTriggerName: string) { + return this.pathTemplates.projectJobTriggerPathTemplate.match( + projectJobTriggerName, + ).project; + } + + /** + * Parse the job_trigger from ProjectJobTrigger resource. + * + * @param {string} projectJobTriggerName + * A fully-qualified path representing project_job_trigger resource. + * @returns {string} A string representing the job_trigger. + */ + matchJobTriggerFromProjectJobTriggerName(projectJobTriggerName: string) { + return this.pathTemplates.projectJobTriggerPathTemplate.match( + projectJobTriggerName, + ).job_trigger; + } + + /** + * Return a fully-qualified projectLocationColumnDataProfile resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} column_data_profile + * @returns {string} Resource name string. + */ + projectLocationColumnDataProfilePath( + project: string, + location: string, + columnDataProfile: string, + ) { + return this.pathTemplates.projectLocationColumnDataProfilePathTemplate.render( + { + project: project, + location: location, + column_data_profile: columnDataProfile, + }, + ); + } + + /** + * Parse the project from ProjectLocationColumnDataProfile resource. + * + * @param {string} projectLocationColumnDataProfileName + * A fully-qualified path representing project_location_column_data_profile resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationColumnDataProfileName( + projectLocationColumnDataProfileName: string, + ) { + return this.pathTemplates.projectLocationColumnDataProfilePathTemplate.match( + projectLocationColumnDataProfileName, + ).project; + } + + /** + * Parse the location from ProjectLocationColumnDataProfile resource. + * + * @param {string} projectLocationColumnDataProfileName + * A fully-qualified path representing project_location_column_data_profile resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationColumnDataProfileName( + projectLocationColumnDataProfileName: string, + ) { + return this.pathTemplates.projectLocationColumnDataProfilePathTemplate.match( + projectLocationColumnDataProfileName, + ).location; + } + + /** + * Parse the column_data_profile from ProjectLocationColumnDataProfile resource. + * + * @param {string} projectLocationColumnDataProfileName + * A fully-qualified path representing project_location_column_data_profile resource. + * @returns {string} A string representing the column_data_profile. + */ + matchColumnDataProfileFromProjectLocationColumnDataProfileName( + projectLocationColumnDataProfileName: string, + ) { + return this.pathTemplates.projectLocationColumnDataProfilePathTemplate.match( + projectLocationColumnDataProfileName, + ).column_data_profile; + } + + /** + * Return a fully-qualified projectLocationConnection resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} connection + * @returns {string} Resource name string. + */ + projectLocationConnectionPath( + project: string, + location: string, + connection: string, + ) { + return this.pathTemplates.projectLocationConnectionPathTemplate.render({ + project: project, + location: location, + connection: connection, + }); + } + + /** + * Parse the project from ProjectLocationConnection resource. + * + * @param {string} projectLocationConnectionName + * A fully-qualified path representing project_location_connection resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationConnectionName( + projectLocationConnectionName: string, + ) { + return this.pathTemplates.projectLocationConnectionPathTemplate.match( + projectLocationConnectionName, + ).project; + } + + /** + * Parse the location from ProjectLocationConnection resource. + * + * @param {string} projectLocationConnectionName + * A fully-qualified path representing project_location_connection resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationConnectionName( + projectLocationConnectionName: string, + ) { + return this.pathTemplates.projectLocationConnectionPathTemplate.match( + projectLocationConnectionName, + ).location; + } + + /** + * Parse the connection from ProjectLocationConnection resource. + * + * @param {string} projectLocationConnectionName + * A fully-qualified path representing project_location_connection resource. + * @returns {string} A string representing the connection. + */ + matchConnectionFromProjectLocationConnectionName( + projectLocationConnectionName: string, + ) { + return this.pathTemplates.projectLocationConnectionPathTemplate.match( + projectLocationConnectionName, + ).connection; + } + + /** + * Return a fully-qualified projectLocationDeidentifyTemplate resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} deidentify_template + * @returns {string} Resource name string. + */ + projectLocationDeidentifyTemplatePath( + project: string, + location: string, + deidentifyTemplate: string, + ) { + return this.pathTemplates.projectLocationDeidentifyTemplatePathTemplate.render( + { + project: project, + location: location, + deidentify_template: deidentifyTemplate, + }, + ); + } + + /** + * Parse the project from ProjectLocationDeidentifyTemplate resource. + * + * @param {string} projectLocationDeidentifyTemplateName + * A fully-qualified path representing project_location_deidentify_template resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDeidentifyTemplateName( + projectLocationDeidentifyTemplateName: string, + ) { + return this.pathTemplates.projectLocationDeidentifyTemplatePathTemplate.match( + projectLocationDeidentifyTemplateName, + ).project; + } + + /** + * Parse the location from ProjectLocationDeidentifyTemplate resource. + * + * @param {string} projectLocationDeidentifyTemplateName + * A fully-qualified path representing project_location_deidentify_template resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDeidentifyTemplateName( + projectLocationDeidentifyTemplateName: string, + ) { + return this.pathTemplates.projectLocationDeidentifyTemplatePathTemplate.match( + projectLocationDeidentifyTemplateName, + ).location; + } + + /** + * Parse the deidentify_template from ProjectLocationDeidentifyTemplate resource. + * + * @param {string} projectLocationDeidentifyTemplateName + * A fully-qualified path representing project_location_deidentify_template resource. + * @returns {string} A string representing the deidentify_template. + */ + matchDeidentifyTemplateFromProjectLocationDeidentifyTemplateName( + projectLocationDeidentifyTemplateName: string, + ) { + return this.pathTemplates.projectLocationDeidentifyTemplatePathTemplate.match( + projectLocationDeidentifyTemplateName, + ).deidentify_template; + } + + /** + * Return a fully-qualified projectLocationDlpJob resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} dlp_job + * @returns {string} Resource name string. + */ + projectLocationDlpJobPath(project: string, location: string, dlpJob: string) { + return this.pathTemplates.projectLocationDlpJobPathTemplate.render({ + project: project, + location: location, + dlp_job: dlpJob, + }); + } + + /** + * Parse the project from ProjectLocationDlpJob resource. + * + * @param {string} projectLocationDlpJobName + * A fully-qualified path representing project_location_dlp_job resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationDlpJobName(projectLocationDlpJobName: string) { + return this.pathTemplates.projectLocationDlpJobPathTemplate.match( + projectLocationDlpJobName, + ).project; + } + + /** + * Parse the location from ProjectLocationDlpJob resource. + * + * @param {string} projectLocationDlpJobName + * A fully-qualified path representing project_location_dlp_job resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationDlpJobName( + projectLocationDlpJobName: string, + ) { + return this.pathTemplates.projectLocationDlpJobPathTemplate.match( + projectLocationDlpJobName, + ).location; + } + + /** + * Parse the dlp_job from ProjectLocationDlpJob resource. + * + * @param {string} projectLocationDlpJobName + * A fully-qualified path representing project_location_dlp_job resource. + * @returns {string} A string representing the dlp_job. + */ + matchDlpJobFromProjectLocationDlpJobName(projectLocationDlpJobName: string) { + return this.pathTemplates.projectLocationDlpJobPathTemplate.match( + projectLocationDlpJobName, + ).dlp_job; + } + + /** + * Return a fully-qualified projectLocationFileStoreDataProfile resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} file_store_data_profile + * @returns {string} Resource name string. + */ + projectLocationFileStoreDataProfilePath( + project: string, + location: string, + fileStoreDataProfile: string, + ) { + return this.pathTemplates.projectLocationFileStoreDataProfilePathTemplate.render( + { + project: project, + location: location, + file_store_data_profile: fileStoreDataProfile, + }, + ); + } + + /** + * Parse the project from ProjectLocationFileStoreDataProfile resource. + * + * @param {string} projectLocationFileStoreDataProfileName + * A fully-qualified path representing project_location_file_store_data_profile resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFileStoreDataProfileName( + projectLocationFileStoreDataProfileName: string, + ) { + return this.pathTemplates.projectLocationFileStoreDataProfilePathTemplate.match( + projectLocationFileStoreDataProfileName, + ).project; + } + + /** + * Parse the location from ProjectLocationFileStoreDataProfile resource. + * + * @param {string} projectLocationFileStoreDataProfileName + * A fully-qualified path representing project_location_file_store_data_profile resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFileStoreDataProfileName( + projectLocationFileStoreDataProfileName: string, + ) { + return this.pathTemplates.projectLocationFileStoreDataProfilePathTemplate.match( + projectLocationFileStoreDataProfileName, + ).location; + } + + /** + * Parse the file_store_data_profile from ProjectLocationFileStoreDataProfile resource. + * + * @param {string} projectLocationFileStoreDataProfileName + * A fully-qualified path representing project_location_file_store_data_profile resource. + * @returns {string} A string representing the file_store_data_profile. + */ + matchFileStoreDataProfileFromProjectLocationFileStoreDataProfileName( + projectLocationFileStoreDataProfileName: string, + ) { + return this.pathTemplates.projectLocationFileStoreDataProfilePathTemplate.match( + projectLocationFileStoreDataProfileName, + ).file_store_data_profile; + } + + /** + * Return a fully-qualified projectLocationInspectTemplate resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} inspect_template + * @returns {string} Resource name string. + */ + projectLocationInspectTemplatePath( + project: string, + location: string, + inspectTemplate: string, + ) { + return this.pathTemplates.projectLocationInspectTemplatePathTemplate.render( + { + project: project, + location: location, + inspect_template: inspectTemplate, + }, + ); + } + + /** + * Parse the project from ProjectLocationInspectTemplate resource. + * + * @param {string} projectLocationInspectTemplateName + * A fully-qualified path representing project_location_inspect_template resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationInspectTemplateName( + projectLocationInspectTemplateName: string, + ) { + return this.pathTemplates.projectLocationInspectTemplatePathTemplate.match( + projectLocationInspectTemplateName, + ).project; + } + + /** + * Parse the location from ProjectLocationInspectTemplate resource. + * + * @param {string} projectLocationInspectTemplateName + * A fully-qualified path representing project_location_inspect_template resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationInspectTemplateName( + projectLocationInspectTemplateName: string, + ) { + return this.pathTemplates.projectLocationInspectTemplatePathTemplate.match( + projectLocationInspectTemplateName, + ).location; + } + + /** + * Parse the inspect_template from ProjectLocationInspectTemplate resource. + * + * @param {string} projectLocationInspectTemplateName + * A fully-qualified path representing project_location_inspect_template resource. + * @returns {string} A string representing the inspect_template. + */ + matchInspectTemplateFromProjectLocationInspectTemplateName( + projectLocationInspectTemplateName: string, + ) { + return this.pathTemplates.projectLocationInspectTemplatePathTemplate.match( + projectLocationInspectTemplateName, + ).inspect_template; + } + + /** + * Return a fully-qualified projectLocationJobTrigger resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} job_trigger + * @returns {string} Resource name string. + */ + projectLocationJobTriggerPath( + project: string, + location: string, + jobTrigger: string, + ) { + return this.pathTemplates.projectLocationJobTriggerPathTemplate.render({ + project: project, + location: location, + job_trigger: jobTrigger, + }); + } + + /** + * Parse the project from ProjectLocationJobTrigger resource. + * + * @param {string} projectLocationJobTriggerName + * A fully-qualified path representing project_location_job_trigger resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationJobTriggerName( + projectLocationJobTriggerName: string, + ) { + return this.pathTemplates.projectLocationJobTriggerPathTemplate.match( + projectLocationJobTriggerName, + ).project; + } + + /** + * Parse the location from ProjectLocationJobTrigger resource. + * + * @param {string} projectLocationJobTriggerName + * A fully-qualified path representing project_location_job_trigger resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationJobTriggerName( + projectLocationJobTriggerName: string, + ) { + return this.pathTemplates.projectLocationJobTriggerPathTemplate.match( + projectLocationJobTriggerName, + ).location; + } + + /** + * Parse the job_trigger from ProjectLocationJobTrigger resource. + * + * @param {string} projectLocationJobTriggerName + * A fully-qualified path representing project_location_job_trigger resource. + * @returns {string} A string representing the job_trigger. + */ + matchJobTriggerFromProjectLocationJobTriggerName( + projectLocationJobTriggerName: string, + ) { + return this.pathTemplates.projectLocationJobTriggerPathTemplate.match( + projectLocationJobTriggerName, + ).job_trigger; + } + + /** + * Return a fully-qualified projectLocationProjectDataProfile resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} project_data_profile + * @returns {string} Resource name string. + */ + projectLocationProjectDataProfilePath( + project: string, + location: string, + projectDataProfile: string, + ) { + return this.pathTemplates.projectLocationProjectDataProfilePathTemplate.render( + { + project: project, + location: location, + project_data_profile: projectDataProfile, + }, + ); + } + + /** + * Parse the project from ProjectLocationProjectDataProfile resource. + * + * @param {string} projectLocationProjectDataProfileName + * A fully-qualified path representing project_location_project_data_profile resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationProjectDataProfileName( + projectLocationProjectDataProfileName: string, + ) { + return this.pathTemplates.projectLocationProjectDataProfilePathTemplate.match( + projectLocationProjectDataProfileName, + ).project; + } + + /** + * Parse the location from ProjectLocationProjectDataProfile resource. + * + * @param {string} projectLocationProjectDataProfileName + * A fully-qualified path representing project_location_project_data_profile resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationProjectDataProfileName( + projectLocationProjectDataProfileName: string, + ) { + return this.pathTemplates.projectLocationProjectDataProfilePathTemplate.match( + projectLocationProjectDataProfileName, + ).location; + } + + /** + * Parse the project_data_profile from ProjectLocationProjectDataProfile resource. + * + * @param {string} projectLocationProjectDataProfileName + * A fully-qualified path representing project_location_project_data_profile resource. + * @returns {string} A string representing the project_data_profile. + */ + matchProjectDataProfileFromProjectLocationProjectDataProfileName( + projectLocationProjectDataProfileName: string, + ) { + return this.pathTemplates.projectLocationProjectDataProfilePathTemplate.match( + projectLocationProjectDataProfileName, + ).project_data_profile; + } + + /** + * Return a fully-qualified projectLocationStoredInfoType resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} stored_info_type + * @returns {string} Resource name string. + */ + projectLocationStoredInfoTypePath( + project: string, + location: string, + storedInfoType: string, + ) { + return this.pathTemplates.projectLocationStoredInfoTypePathTemplate.render({ + project: project, + location: location, + stored_info_type: storedInfoType, + }); + } + + /** + * Parse the project from ProjectLocationStoredInfoType resource. + * + * @param {string} projectLocationStoredInfoTypeName + * A fully-qualified path representing project_location_stored_info_type resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationStoredInfoTypeName( + projectLocationStoredInfoTypeName: string, + ) { + return this.pathTemplates.projectLocationStoredInfoTypePathTemplate.match( + projectLocationStoredInfoTypeName, + ).project; + } + + /** + * Parse the location from ProjectLocationStoredInfoType resource. + * + * @param {string} projectLocationStoredInfoTypeName + * A fully-qualified path representing project_location_stored_info_type resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationStoredInfoTypeName( + projectLocationStoredInfoTypeName: string, + ) { + return this.pathTemplates.projectLocationStoredInfoTypePathTemplate.match( + projectLocationStoredInfoTypeName, + ).location; + } + + /** + * Parse the stored_info_type from ProjectLocationStoredInfoType resource. + * + * @param {string} projectLocationStoredInfoTypeName + * A fully-qualified path representing project_location_stored_info_type resource. + * @returns {string} A string representing the stored_info_type. + */ + matchStoredInfoTypeFromProjectLocationStoredInfoTypeName( + projectLocationStoredInfoTypeName: string, + ) { + return this.pathTemplates.projectLocationStoredInfoTypePathTemplate.match( + projectLocationStoredInfoTypeName, + ).stored_info_type; + } + + /** + * Return a fully-qualified projectLocationTableDataProfile resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} table_data_profile + * @returns {string} Resource name string. + */ + projectLocationTableDataProfilePath( + project: string, + location: string, + tableDataProfile: string, + ) { + return this.pathTemplates.projectLocationTableDataProfilePathTemplate.render( + { + project: project, + location: location, + table_data_profile: tableDataProfile, + }, + ); + } + + /** + * Parse the project from ProjectLocationTableDataProfile resource. + * + * @param {string} projectLocationTableDataProfileName + * A fully-qualified path representing project_location_table_data_profile resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationTableDataProfileName( + projectLocationTableDataProfileName: string, + ) { + return this.pathTemplates.projectLocationTableDataProfilePathTemplate.match( + projectLocationTableDataProfileName, + ).project; + } + + /** + * Parse the location from ProjectLocationTableDataProfile resource. + * + * @param {string} projectLocationTableDataProfileName + * A fully-qualified path representing project_location_table_data_profile resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationTableDataProfileName( + projectLocationTableDataProfileName: string, + ) { + return this.pathTemplates.projectLocationTableDataProfilePathTemplate.match( + projectLocationTableDataProfileName, + ).location; + } + + /** + * Parse the table_data_profile from ProjectLocationTableDataProfile resource. + * + * @param {string} projectLocationTableDataProfileName + * A fully-qualified path representing project_location_table_data_profile resource. + * @returns {string} A string representing the table_data_profile. + */ + matchTableDataProfileFromProjectLocationTableDataProfileName( + projectLocationTableDataProfileName: string, + ) { + return this.pathTemplates.projectLocationTableDataProfilePathTemplate.match( + projectLocationTableDataProfileName, + ).table_data_profile; + } + + /** + * Return a fully-qualified projectStoredInfoType resource name string. + * + * @param {string} project + * @param {string} stored_info_type + * @returns {string} Resource name string. + */ + projectStoredInfoTypePath(project: string, storedInfoType: string) { + return this.pathTemplates.projectStoredInfoTypePathTemplate.render({ + project: project, + stored_info_type: storedInfoType, + }); + } + + /** + * Parse the project from ProjectStoredInfoType resource. + * + * @param {string} projectStoredInfoTypeName + * A fully-qualified path representing project_stored_info_type resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectStoredInfoTypeName(projectStoredInfoTypeName: string) { + return this.pathTemplates.projectStoredInfoTypePathTemplate.match( + projectStoredInfoTypeName, + ).project; + } + + /** + * Parse the stored_info_type from ProjectStoredInfoType resource. + * + * @param {string} projectStoredInfoTypeName + * A fully-qualified path representing project_stored_info_type resource. + * @returns {string} A string representing the stored_info_type. + */ + matchStoredInfoTypeFromProjectStoredInfoTypeName( + projectStoredInfoTypeName: string, + ) { + return this.pathTemplates.projectStoredInfoTypePathTemplate.match( + projectStoredInfoTypeName, + ).stored_info_type; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.dlpServiceStub && !this._terminated) { + return this.dlpServiceStub.then((stub) => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + this.locationsClient.close().catch((err) => { + throw err; + }); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/dlp/v2/src/v2/dlp_service_client_config.json b/owl-bot-staging/dlp/v2/src/v2/dlp_service_client_config.json new file mode 100644 index 000000000..6796693ed --- /dev/null +++ b/owl-bot-staging/dlp/v2/src/v2/dlp_service_client_config.json @@ -0,0 +1,294 @@ +{ + "interfaces": { + "google.privacy.dlp.v2.DlpService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "InspectContent": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "RedactImage": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "DeidentifyContent": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ReidentifyContent": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListInfoTypes": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CreateInspectTemplate": { + "timeout_millis": 300000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateInspectTemplate": { + "timeout_millis": 300000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetInspectTemplate": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListInspectTemplates": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "DeleteInspectTemplate": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CreateDeidentifyTemplate": { + "timeout_millis": 300000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateDeidentifyTemplate": { + "timeout_millis": 300000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetDeidentifyTemplate": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListDeidentifyTemplates": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "DeleteDeidentifyTemplate": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CreateJobTrigger": { + "timeout_millis": 300000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateJobTrigger": { + "timeout_millis": 300000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "HybridInspectJobTrigger": { + "timeout_millis": 300000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetJobTrigger": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListJobTriggers": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "DeleteJobTrigger": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ActivateJobTrigger": { + "timeout_millis": 300000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateDiscoveryConfig": { + "timeout_millis": 300000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateDiscoveryConfig": { + "timeout_millis": 300000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetDiscoveryConfig": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListDiscoveryConfigs": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "DeleteDiscoveryConfig": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CreateDlpJob": { + "timeout_millis": 300000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListDlpJobs": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetDlpJob": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "DeleteDlpJob": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "CancelDlpJob": { + "timeout_millis": 300000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateStoredInfoType": { + "timeout_millis": 300000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateStoredInfoType": { + "timeout_millis": 300000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetStoredInfoType": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListStoredInfoTypes": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "DeleteStoredInfoType": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListProjectDataProfiles": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListTableDataProfiles": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListColumnDataProfiles": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetProjectDataProfile": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "ListFileStoreDataProfiles": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetFileStoreDataProfile": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "DeleteFileStoreDataProfile": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetTableDataProfile": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "GetColumnDataProfile": { + "timeout_millis": 300000, + "retry_codes_name": "idempotent", + "retry_params_name": "default" + }, + "DeleteTableDataProfile": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "HybridInspectDlpJob": { + "timeout_millis": 300000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FinishDlpJob": { + "timeout_millis": 300000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateConnection": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetConnection": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListConnections": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SearchConnections": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteConnection": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateConnection": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/dlp/v2/src/v2/dlp_service_proto_list.json b/owl-bot-staging/dlp/v2/src/v2/dlp_service_proto_list.json new file mode 100644 index 000000000..482924bde --- /dev/null +++ b/owl-bot-staging/dlp/v2/src/v2/dlp_service_proto_list.json @@ -0,0 +1,4 @@ +[ + "../../protos/google/privacy/dlp/v2/dlp.proto", + "../../protos/google/privacy/dlp/v2/storage.proto" +] diff --git a/owl-bot-staging/dlp/v2/src/v2/gapic_metadata.json b/owl-bot-staging/dlp/v2/src/v2/gapic_metadata.json new file mode 100644 index 000000000..a4fb78fa6 --- /dev/null +++ b/owl-bot-staging/dlp/v2/src/v2/gapic_metadata.json @@ -0,0 +1,621 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.privacy.dlp.v2", + "libraryPackage": "@google-cloud/dlp", + "services": { + "DlpService": { + "clients": { + "grpc": { + "libraryClient": "DlpServiceClient", + "rpcs": { + "InspectContent": { + "methods": [ + "inspectContent" + ] + }, + "RedactImage": { + "methods": [ + "redactImage" + ] + }, + "DeidentifyContent": { + "methods": [ + "deidentifyContent" + ] + }, + "ReidentifyContent": { + "methods": [ + "reidentifyContent" + ] + }, + "ListInfoTypes": { + "methods": [ + "listInfoTypes" + ] + }, + "CreateInspectTemplate": { + "methods": [ + "createInspectTemplate" + ] + }, + "UpdateInspectTemplate": { + "methods": [ + "updateInspectTemplate" + ] + }, + "GetInspectTemplate": { + "methods": [ + "getInspectTemplate" + ] + }, + "DeleteInspectTemplate": { + "methods": [ + "deleteInspectTemplate" + ] + }, + "CreateDeidentifyTemplate": { + "methods": [ + "createDeidentifyTemplate" + ] + }, + "UpdateDeidentifyTemplate": { + "methods": [ + "updateDeidentifyTemplate" + ] + }, + "GetDeidentifyTemplate": { + "methods": [ + "getDeidentifyTemplate" + ] + }, + "DeleteDeidentifyTemplate": { + "methods": [ + "deleteDeidentifyTemplate" + ] + }, + "CreateJobTrigger": { + "methods": [ + "createJobTrigger" + ] + }, + "UpdateJobTrigger": { + "methods": [ + "updateJobTrigger" + ] + }, + "HybridInspectJobTrigger": { + "methods": [ + "hybridInspectJobTrigger" + ] + }, + "GetJobTrigger": { + "methods": [ + "getJobTrigger" + ] + }, + "DeleteJobTrigger": { + "methods": [ + "deleteJobTrigger" + ] + }, + "ActivateJobTrigger": { + "methods": [ + "activateJobTrigger" + ] + }, + "CreateDiscoveryConfig": { + "methods": [ + "createDiscoveryConfig" + ] + }, + "UpdateDiscoveryConfig": { + "methods": [ + "updateDiscoveryConfig" + ] + }, + "GetDiscoveryConfig": { + "methods": [ + "getDiscoveryConfig" + ] + }, + "DeleteDiscoveryConfig": { + "methods": [ + "deleteDiscoveryConfig" + ] + }, + "CreateDlpJob": { + "methods": [ + "createDlpJob" + ] + }, + "GetDlpJob": { + "methods": [ + "getDlpJob" + ] + }, + "DeleteDlpJob": { + "methods": [ + "deleteDlpJob" + ] + }, + "CancelDlpJob": { + "methods": [ + "cancelDlpJob" + ] + }, + "CreateStoredInfoType": { + "methods": [ + "createStoredInfoType" + ] + }, + "UpdateStoredInfoType": { + "methods": [ + "updateStoredInfoType" + ] + }, + "GetStoredInfoType": { + "methods": [ + "getStoredInfoType" + ] + }, + "DeleteStoredInfoType": { + "methods": [ + "deleteStoredInfoType" + ] + }, + "GetProjectDataProfile": { + "methods": [ + "getProjectDataProfile" + ] + }, + "GetFileStoreDataProfile": { + "methods": [ + "getFileStoreDataProfile" + ] + }, + "DeleteFileStoreDataProfile": { + "methods": [ + "deleteFileStoreDataProfile" + ] + }, + "GetTableDataProfile": { + "methods": [ + "getTableDataProfile" + ] + }, + "GetColumnDataProfile": { + "methods": [ + "getColumnDataProfile" + ] + }, + "DeleteTableDataProfile": { + "methods": [ + "deleteTableDataProfile" + ] + }, + "HybridInspectDlpJob": { + "methods": [ + "hybridInspectDlpJob" + ] + }, + "FinishDlpJob": { + "methods": [ + "finishDlpJob" + ] + }, + "CreateConnection": { + "methods": [ + "createConnection" + ] + }, + "GetConnection": { + "methods": [ + "getConnection" + ] + }, + "DeleteConnection": { + "methods": [ + "deleteConnection" + ] + }, + "UpdateConnection": { + "methods": [ + "updateConnection" + ] + }, + "ListInspectTemplates": { + "methods": [ + "listInspectTemplates", + "listInspectTemplatesStream", + "listInspectTemplatesAsync" + ] + }, + "ListDeidentifyTemplates": { + "methods": [ + "listDeidentifyTemplates", + "listDeidentifyTemplatesStream", + "listDeidentifyTemplatesAsync" + ] + }, + "ListJobTriggers": { + "methods": [ + "listJobTriggers", + "listJobTriggersStream", + "listJobTriggersAsync" + ] + }, + "ListDiscoveryConfigs": { + "methods": [ + "listDiscoveryConfigs", + "listDiscoveryConfigsStream", + "listDiscoveryConfigsAsync" + ] + }, + "ListDlpJobs": { + "methods": [ + "listDlpJobs", + "listDlpJobsStream", + "listDlpJobsAsync" + ] + }, + "ListStoredInfoTypes": { + "methods": [ + "listStoredInfoTypes", + "listStoredInfoTypesStream", + "listStoredInfoTypesAsync" + ] + }, + "ListProjectDataProfiles": { + "methods": [ + "listProjectDataProfiles", + "listProjectDataProfilesStream", + "listProjectDataProfilesAsync" + ] + }, + "ListTableDataProfiles": { + "methods": [ + "listTableDataProfiles", + "listTableDataProfilesStream", + "listTableDataProfilesAsync" + ] + }, + "ListColumnDataProfiles": { + "methods": [ + "listColumnDataProfiles", + "listColumnDataProfilesStream", + "listColumnDataProfilesAsync" + ] + }, + "ListFileStoreDataProfiles": { + "methods": [ + "listFileStoreDataProfiles", + "listFileStoreDataProfilesStream", + "listFileStoreDataProfilesAsync" + ] + }, + "ListConnections": { + "methods": [ + "listConnections", + "listConnectionsStream", + "listConnectionsAsync" + ] + }, + "SearchConnections": { + "methods": [ + "searchConnections", + "searchConnectionsStream", + "searchConnectionsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "DlpServiceClient", + "rpcs": { + "InspectContent": { + "methods": [ + "inspectContent" + ] + }, + "RedactImage": { + "methods": [ + "redactImage" + ] + }, + "DeidentifyContent": { + "methods": [ + "deidentifyContent" + ] + }, + "ReidentifyContent": { + "methods": [ + "reidentifyContent" + ] + }, + "ListInfoTypes": { + "methods": [ + "listInfoTypes" + ] + }, + "CreateInspectTemplate": { + "methods": [ + "createInspectTemplate" + ] + }, + "UpdateInspectTemplate": { + "methods": [ + "updateInspectTemplate" + ] + }, + "GetInspectTemplate": { + "methods": [ + "getInspectTemplate" + ] + }, + "DeleteInspectTemplate": { + "methods": [ + "deleteInspectTemplate" + ] + }, + "CreateDeidentifyTemplate": { + "methods": [ + "createDeidentifyTemplate" + ] + }, + "UpdateDeidentifyTemplate": { + "methods": [ + "updateDeidentifyTemplate" + ] + }, + "GetDeidentifyTemplate": { + "methods": [ + "getDeidentifyTemplate" + ] + }, + "DeleteDeidentifyTemplate": { + "methods": [ + "deleteDeidentifyTemplate" + ] + }, + "CreateJobTrigger": { + "methods": [ + "createJobTrigger" + ] + }, + "UpdateJobTrigger": { + "methods": [ + "updateJobTrigger" + ] + }, + "HybridInspectJobTrigger": { + "methods": [ + "hybridInspectJobTrigger" + ] + }, + "GetJobTrigger": { + "methods": [ + "getJobTrigger" + ] + }, + "DeleteJobTrigger": { + "methods": [ + "deleteJobTrigger" + ] + }, + "ActivateJobTrigger": { + "methods": [ + "activateJobTrigger" + ] + }, + "CreateDiscoveryConfig": { + "methods": [ + "createDiscoveryConfig" + ] + }, + "UpdateDiscoveryConfig": { + "methods": [ + "updateDiscoveryConfig" + ] + }, + "GetDiscoveryConfig": { + "methods": [ + "getDiscoveryConfig" + ] + }, + "DeleteDiscoveryConfig": { + "methods": [ + "deleteDiscoveryConfig" + ] + }, + "CreateDlpJob": { + "methods": [ + "createDlpJob" + ] + }, + "GetDlpJob": { + "methods": [ + "getDlpJob" + ] + }, + "DeleteDlpJob": { + "methods": [ + "deleteDlpJob" + ] + }, + "CancelDlpJob": { + "methods": [ + "cancelDlpJob" + ] + }, + "CreateStoredInfoType": { + "methods": [ + "createStoredInfoType" + ] + }, + "UpdateStoredInfoType": { + "methods": [ + "updateStoredInfoType" + ] + }, + "GetStoredInfoType": { + "methods": [ + "getStoredInfoType" + ] + }, + "DeleteStoredInfoType": { + "methods": [ + "deleteStoredInfoType" + ] + }, + "GetProjectDataProfile": { + "methods": [ + "getProjectDataProfile" + ] + }, + "GetFileStoreDataProfile": { + "methods": [ + "getFileStoreDataProfile" + ] + }, + "DeleteFileStoreDataProfile": { + "methods": [ + "deleteFileStoreDataProfile" + ] + }, + "GetTableDataProfile": { + "methods": [ + "getTableDataProfile" + ] + }, + "GetColumnDataProfile": { + "methods": [ + "getColumnDataProfile" + ] + }, + "DeleteTableDataProfile": { + "methods": [ + "deleteTableDataProfile" + ] + }, + "HybridInspectDlpJob": { + "methods": [ + "hybridInspectDlpJob" + ] + }, + "FinishDlpJob": { + "methods": [ + "finishDlpJob" + ] + }, + "CreateConnection": { + "methods": [ + "createConnection" + ] + }, + "GetConnection": { + "methods": [ + "getConnection" + ] + }, + "DeleteConnection": { + "methods": [ + "deleteConnection" + ] + }, + "UpdateConnection": { + "methods": [ + "updateConnection" + ] + }, + "ListInspectTemplates": { + "methods": [ + "listInspectTemplates", + "listInspectTemplatesStream", + "listInspectTemplatesAsync" + ] + }, + "ListDeidentifyTemplates": { + "methods": [ + "listDeidentifyTemplates", + "listDeidentifyTemplatesStream", + "listDeidentifyTemplatesAsync" + ] + }, + "ListJobTriggers": { + "methods": [ + "listJobTriggers", + "listJobTriggersStream", + "listJobTriggersAsync" + ] + }, + "ListDiscoveryConfigs": { + "methods": [ + "listDiscoveryConfigs", + "listDiscoveryConfigsStream", + "listDiscoveryConfigsAsync" + ] + }, + "ListDlpJobs": { + "methods": [ + "listDlpJobs", + "listDlpJobsStream", + "listDlpJobsAsync" + ] + }, + "ListStoredInfoTypes": { + "methods": [ + "listStoredInfoTypes", + "listStoredInfoTypesStream", + "listStoredInfoTypesAsync" + ] + }, + "ListProjectDataProfiles": { + "methods": [ + "listProjectDataProfiles", + "listProjectDataProfilesStream", + "listProjectDataProfilesAsync" + ] + }, + "ListTableDataProfiles": { + "methods": [ + "listTableDataProfiles", + "listTableDataProfilesStream", + "listTableDataProfilesAsync" + ] + }, + "ListColumnDataProfiles": { + "methods": [ + "listColumnDataProfiles", + "listColumnDataProfilesStream", + "listColumnDataProfilesAsync" + ] + }, + "ListFileStoreDataProfiles": { + "methods": [ + "listFileStoreDataProfiles", + "listFileStoreDataProfilesStream", + "listFileStoreDataProfilesAsync" + ] + }, + "ListConnections": { + "methods": [ + "listConnections", + "listConnectionsStream", + "listConnectionsAsync" + ] + }, + "SearchConnections": { + "methods": [ + "searchConnections", + "searchConnectionsStream", + "searchConnectionsAsync" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/dlp/v2/src/v2/index.ts b/owl-bot-staging/dlp/v2/src/v2/index.ts new file mode 100644 index 000000000..824f284af --- /dev/null +++ b/owl-bot-staging/dlp/v2/src/v2/index.ts @@ -0,0 +1,19 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export { DlpServiceClient } from './dlp_service_client'; diff --git a/owl-bot-staging/dlp/v2/system-test/fixtures/sample/src/index.js b/owl-bot-staging/dlp/v2/system-test/fixtures/sample/src/index.js new file mode 100644 index 000000000..91598b7e0 --- /dev/null +++ b/owl-bot-staging/dlp/v2/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const dlp = require('@google-cloud/dlp'); + +function main() { + const dlpServiceClient = new dlp.DlpServiceClient(); +} + +main(); diff --git a/owl-bot-staging/dlp/v2/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/dlp/v2/system-test/fixtures/sample/src/index.ts new file mode 100644 index 000000000..4ee42c22c --- /dev/null +++ b/owl-bot-staging/dlp/v2/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import { DlpServiceClient } from '@google-cloud/dlp'; + +// check that the client class type name can be used +function doStuffWithDlpServiceClient(client: DlpServiceClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const dlpServiceClient = new DlpServiceClient(); + doStuffWithDlpServiceClient(dlpServiceClient); +} + +main(); diff --git a/owl-bot-staging/dlp/v2/system-test/install.ts b/owl-bot-staging/dlp/v2/system-test/install.ts new file mode 100644 index 000000000..ccf167042 --- /dev/null +++ b/owl-bot-staging/dlp/v2/system-test/install.ts @@ -0,0 +1,51 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import { packNTest } from 'pack-n-play'; +import { readFileSync } from 'fs'; +import { describe, it } from 'mocha'; + +describe('📦 pack-n-play test', () => { + it('TypeScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts', + ).toString(), + }, + }; + await packNTest(options); + }); + + it('JavaScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + cjs: readFileSync( + './system-test/fixtures/sample/src/index.js', + ).toString(), + }, + }; + await packNTest(options); + }); +}); diff --git a/owl-bot-staging/dlp/v2/test/gapic_dlp_service_v2.ts b/owl-bot-staging/dlp/v2/test/gapic_dlp_service_v2.ts new file mode 100644 index 000000000..777acc827 --- /dev/null +++ b/owl-bot-staging/dlp/v2/test/gapic_dlp_service_v2.ts @@ -0,0 +1,12581 @@ +// Copyright 2026 Google LLC +// +// 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 +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import { SinonStub } from 'sinon'; +import { describe, it } from 'mocha'; +import * as dlpserviceModule from '../src'; + +import { PassThrough } from 'stream'; + +import { protobuf, LocationProtos } from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json'), +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, { defaults: true }); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject, + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error, +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error, +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error, +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({ done: true, value: undefined }); + } + return Promise.resolve({ done: false, value: responses![counter++] }); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v2.DlpServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new dlpserviceModule.v2.DlpServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'dlp.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new dlpserviceModule.v2.DlpServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, 'googleapis.com'); + }); + + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = dlpserviceModule.v2.DlpServiceClient.servicePath; + assert.strictEqual(servicePath, 'dlp.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = dlpserviceModule.v2.DlpServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'dlp.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + universeDomain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dlp.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + universe_domain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dlp.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new dlpserviceModule.v2.DlpServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dlp.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new dlpserviceModule.v2.DlpServiceClient({ + universeDomain: 'configured.example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'dlp.configured.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { + new dlpserviceModule.v2.DlpServiceClient({ + universe_domain: 'example.com', + universeDomain: 'example.net', + }); + }); + }); + + it('has port', () => { + const port = dlpserviceModule.v2.DlpServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new dlpserviceModule.v2.DlpServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + assert.strictEqual(client.dlpServiceStub, undefined); + await client.initialize(); + assert(client.dlpServiceStub); + }); + + it('has close method for the initialized client', (done) => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.initialize().catch((err) => { + throw err; + }); + assert(client.dlpServiceStub); + client + .close() + .then(() => { + done(); + }) + .catch((err) => { + throw err; + }); + }); + + it('has close method for the non-initialized client', (done) => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + assert.strictEqual(client.dlpServiceStub, undefined); + client + .close() + .then(() => { + done(); + }) + .catch((err) => { + throw err; + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('inspectContent', () => { + it('invokes inspectContent without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.InspectContentRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.InspectContentRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.InspectContentResponse(), + ); + client.innerApiCalls.inspectContent = stubSimpleCall(expectedResponse); + const [response] = await client.inspectContent(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.inspectContent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.inspectContent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes inspectContent without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.InspectContentRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.InspectContentRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.InspectContentResponse(), + ); + client.innerApiCalls.inspectContent = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.inspectContent( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IInspectContentResponse | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.inspectContent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.inspectContent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes inspectContent with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.InspectContentRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.InspectContentRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.inspectContent = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.inspectContent(request), expectedError); + const actualRequest = ( + client.innerApiCalls.inspectContent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.inspectContent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes inspectContent with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.InspectContentRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.InspectContentRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.inspectContent(request), expectedError); + }); + }); + + describe('redactImage', () => { + it('invokes redactImage without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.RedactImageRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.RedactImageRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.RedactImageResponse(), + ); + client.innerApiCalls.redactImage = stubSimpleCall(expectedResponse); + const [response] = await client.redactImage(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.redactImage as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.redactImage as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes redactImage without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.RedactImageRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.RedactImageRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.RedactImageResponse(), + ); + client.innerApiCalls.redactImage = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.redactImage( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IRedactImageResponse | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.redactImage as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.redactImage as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes redactImage with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.RedactImageRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.RedactImageRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.redactImage = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.redactImage(request), expectedError); + const actualRequest = ( + client.innerApiCalls.redactImage as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.redactImage as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes redactImage with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.RedactImageRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.RedactImageRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.redactImage(request), expectedError); + }); + }); + + describe('deidentifyContent', () => { + it('invokes deidentifyContent without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeidentifyContentRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeidentifyContentRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeidentifyContentResponse(), + ); + client.innerApiCalls.deidentifyContent = stubSimpleCall(expectedResponse); + const [response] = await client.deidentifyContent(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deidentifyContent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deidentifyContent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deidentifyContent without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeidentifyContentRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeidentifyContentRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeidentifyContentResponse(), + ); + client.innerApiCalls.deidentifyContent = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deidentifyContent( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IDeidentifyContentResponse | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deidentifyContent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deidentifyContent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deidentifyContent with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeidentifyContentRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeidentifyContentRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deidentifyContent = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.deidentifyContent(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deidentifyContent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deidentifyContent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deidentifyContent with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeidentifyContentRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeidentifyContentRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.deidentifyContent(request), expectedError); + }); + }); + + describe('reidentifyContent', () => { + it('invokes reidentifyContent without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ReidentifyContentRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ReidentifyContentRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.ReidentifyContentResponse(), + ); + client.innerApiCalls.reidentifyContent = stubSimpleCall(expectedResponse); + const [response] = await client.reidentifyContent(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.reidentifyContent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.reidentifyContent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes reidentifyContent without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ReidentifyContentRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ReidentifyContentRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.ReidentifyContentResponse(), + ); + client.innerApiCalls.reidentifyContent = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.reidentifyContent( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IReidentifyContentResponse | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.reidentifyContent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.reidentifyContent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes reidentifyContent with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ReidentifyContentRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ReidentifyContentRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.reidentifyContent = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.reidentifyContent(request), expectedError); + const actualRequest = ( + client.innerApiCalls.reidentifyContent as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.reidentifyContent as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes reidentifyContent with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ReidentifyContentRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ReidentifyContentRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.reidentifyContent(request), expectedError); + }); + }); + + describe('listInfoTypes', () => { + it('invokes listInfoTypes without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListInfoTypesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListInfoTypesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListInfoTypesResponse(), + ); + client.innerApiCalls.listInfoTypes = stubSimpleCall(expectedResponse); + const [response] = await client.listInfoTypes(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listInfoTypes as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listInfoTypes as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listInfoTypes without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListInfoTypesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListInfoTypesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListInfoTypesResponse(), + ); + client.innerApiCalls.listInfoTypes = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listInfoTypes( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IListInfoTypesResponse | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listInfoTypes as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listInfoTypes as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listInfoTypes with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListInfoTypesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListInfoTypesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listInfoTypes = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.listInfoTypes(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listInfoTypes as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listInfoTypes as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listInfoTypes with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListInfoTypesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListInfoTypesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.listInfoTypes(request), expectedError); + }); + }); + + describe('createInspectTemplate', () => { + it('invokes createInspectTemplate without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateInspectTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateInspectTemplateRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.InspectTemplate(), + ); + client.innerApiCalls.createInspectTemplate = + stubSimpleCall(expectedResponse); + const [response] = await client.createInspectTemplate(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createInspectTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createInspectTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createInspectTemplate without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateInspectTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateInspectTemplateRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.InspectTemplate(), + ); + client.innerApiCalls.createInspectTemplate = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createInspectTemplate( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IInspectTemplate | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createInspectTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createInspectTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createInspectTemplate with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateInspectTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateInspectTemplateRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createInspectTemplate = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.createInspectTemplate(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.createInspectTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createInspectTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createInspectTemplate with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateInspectTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateInspectTemplateRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects( + client.createInspectTemplate(request), + expectedError, + ); + }); + }); + + describe('updateInspectTemplate', () => { + it('invokes updateInspectTemplate without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateInspectTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.UpdateInspectTemplateRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.InspectTemplate(), + ); + client.innerApiCalls.updateInspectTemplate = + stubSimpleCall(expectedResponse); + const [response] = await client.updateInspectTemplate(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateInspectTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateInspectTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateInspectTemplate without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateInspectTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.UpdateInspectTemplateRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.InspectTemplate(), + ); + client.innerApiCalls.updateInspectTemplate = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateInspectTemplate( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IInspectTemplate | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateInspectTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateInspectTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateInspectTemplate with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateInspectTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.UpdateInspectTemplateRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateInspectTemplate = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.updateInspectTemplate(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.updateInspectTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateInspectTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateInspectTemplate with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateInspectTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.UpdateInspectTemplateRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects( + client.updateInspectTemplate(request), + expectedError, + ); + }); + }); + + describe('getInspectTemplate', () => { + it('invokes getInspectTemplate without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetInspectTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetInspectTemplateRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.InspectTemplate(), + ); + client.innerApiCalls.getInspectTemplate = + stubSimpleCall(expectedResponse); + const [response] = await client.getInspectTemplate(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getInspectTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getInspectTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getInspectTemplate without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetInspectTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetInspectTemplateRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.InspectTemplate(), + ); + client.innerApiCalls.getInspectTemplate = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getInspectTemplate( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IInspectTemplate | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getInspectTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getInspectTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getInspectTemplate with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetInspectTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetInspectTemplateRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getInspectTemplate = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.getInspectTemplate(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getInspectTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getInspectTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getInspectTemplate with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetInspectTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetInspectTemplateRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.getInspectTemplate(request), expectedError); + }); + }); + + describe('deleteInspectTemplate', () => { + it('invokes deleteInspectTemplate without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteInspectTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteInspectTemplateRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteInspectTemplate = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteInspectTemplate(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteInspectTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteInspectTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteInspectTemplate without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteInspectTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteInspectTemplateRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteInspectTemplate = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteInspectTemplate( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteInspectTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteInspectTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteInspectTemplate with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteInspectTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteInspectTemplateRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteInspectTemplate = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.deleteInspectTemplate(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.deleteInspectTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteInspectTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteInspectTemplate with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteInspectTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteInspectTemplateRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects( + client.deleteInspectTemplate(request), + expectedError, + ); + }); + }); + + describe('createDeidentifyTemplate', () => { + it('invokes createDeidentifyTemplate without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeidentifyTemplate(), + ); + client.innerApiCalls.createDeidentifyTemplate = + stubSimpleCall(expectedResponse); + const [response] = await client.createDeidentifyTemplate(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createDeidentifyTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDeidentifyTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDeidentifyTemplate without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeidentifyTemplate(), + ); + client.innerApiCalls.createDeidentifyTemplate = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createDeidentifyTemplate( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IDeidentifyTemplate | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createDeidentifyTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDeidentifyTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDeidentifyTemplate with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDeidentifyTemplate = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.createDeidentifyTemplate(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.createDeidentifyTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDeidentifyTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDeidentifyTemplate with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateDeidentifyTemplateRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects( + client.createDeidentifyTemplate(request), + expectedError, + ); + }); + }); + + describe('updateDeidentifyTemplate', () => { + it('invokes updateDeidentifyTemplate without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeidentifyTemplate(), + ); + client.innerApiCalls.updateDeidentifyTemplate = + stubSimpleCall(expectedResponse); + const [response] = await client.updateDeidentifyTemplate(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDeidentifyTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDeidentifyTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDeidentifyTemplate without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeidentifyTemplate(), + ); + client.innerApiCalls.updateDeidentifyTemplate = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDeidentifyTemplate( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IDeidentifyTemplate | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDeidentifyTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDeidentifyTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDeidentifyTemplate with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDeidentifyTemplate = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.updateDeidentifyTemplate(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.updateDeidentifyTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDeidentifyTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDeidentifyTemplate with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.UpdateDeidentifyTemplateRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects( + client.updateDeidentifyTemplate(request), + expectedError, + ); + }); + }); + + describe('getDeidentifyTemplate', () => { + it('invokes getDeidentifyTemplate without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetDeidentifyTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetDeidentifyTemplateRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeidentifyTemplate(), + ); + client.innerApiCalls.getDeidentifyTemplate = + stubSimpleCall(expectedResponse); + const [response] = await client.getDeidentifyTemplate(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDeidentifyTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDeidentifyTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDeidentifyTemplate without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetDeidentifyTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetDeidentifyTemplateRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeidentifyTemplate(), + ); + client.innerApiCalls.getDeidentifyTemplate = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDeidentifyTemplate( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IDeidentifyTemplate | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDeidentifyTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDeidentifyTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDeidentifyTemplate with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetDeidentifyTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetDeidentifyTemplateRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDeidentifyTemplate = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.getDeidentifyTemplate(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.getDeidentifyTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDeidentifyTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDeidentifyTemplate with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetDeidentifyTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetDeidentifyTemplateRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects( + client.getDeidentifyTemplate(request), + expectedError, + ); + }); + }); + + describe('deleteDeidentifyTemplate', () => { + it('invokes deleteDeidentifyTemplate without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteDeidentifyTemplate = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteDeidentifyTemplate(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteDeidentifyTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDeidentifyTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDeidentifyTemplate without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteDeidentifyTemplate = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteDeidentifyTemplate( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteDeidentifyTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDeidentifyTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDeidentifyTemplate with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDeidentifyTemplate = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.deleteDeidentifyTemplate(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.deleteDeidentifyTemplate as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDeidentifyTemplate as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDeidentifyTemplate with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteDeidentifyTemplateRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects( + client.deleteDeidentifyTemplate(request), + expectedError, + ); + }); + }); + + describe('createJobTrigger', () => { + it('invokes createJobTrigger without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateJobTriggerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateJobTriggerRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.JobTrigger(), + ); + client.innerApiCalls.createJobTrigger = stubSimpleCall(expectedResponse); + const [response] = await client.createJobTrigger(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createJobTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createJobTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createJobTrigger without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateJobTriggerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateJobTriggerRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.JobTrigger(), + ); + client.innerApiCalls.createJobTrigger = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createJobTrigger( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IJobTrigger | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createJobTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createJobTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createJobTrigger with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateJobTriggerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateJobTriggerRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createJobTrigger = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.createJobTrigger(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createJobTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createJobTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createJobTrigger with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateJobTriggerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateJobTriggerRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.createJobTrigger(request), expectedError); + }); + }); + + describe('updateJobTrigger', () => { + it('invokes updateJobTrigger without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateJobTriggerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.UpdateJobTriggerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.JobTrigger(), + ); + client.innerApiCalls.updateJobTrigger = stubSimpleCall(expectedResponse); + const [response] = await client.updateJobTrigger(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateJobTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateJobTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateJobTrigger without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateJobTriggerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.UpdateJobTriggerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.JobTrigger(), + ); + client.innerApiCalls.updateJobTrigger = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateJobTrigger( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IJobTrigger | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateJobTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateJobTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateJobTrigger with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateJobTriggerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.UpdateJobTriggerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateJobTrigger = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.updateJobTrigger(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateJobTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateJobTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateJobTrigger with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateJobTriggerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.UpdateJobTriggerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.updateJobTrigger(request), expectedError); + }); + }); + + describe('hybridInspectJobTrigger', () => { + it('invokes hybridInspectJobTrigger without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.HybridInspectJobTriggerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.HybridInspectJobTriggerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.HybridInspectResponse(), + ); + client.innerApiCalls.hybridInspectJobTrigger = + stubSimpleCall(expectedResponse); + const [response] = await client.hybridInspectJobTrigger(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.hybridInspectJobTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.hybridInspectJobTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes hybridInspectJobTrigger without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.HybridInspectJobTriggerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.HybridInspectJobTriggerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.HybridInspectResponse(), + ); + client.innerApiCalls.hybridInspectJobTrigger = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.hybridInspectJobTrigger( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IHybridInspectResponse | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.hybridInspectJobTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.hybridInspectJobTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes hybridInspectJobTrigger with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.HybridInspectJobTriggerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.HybridInspectJobTriggerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.hybridInspectJobTrigger = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.hybridInspectJobTrigger(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.hybridInspectJobTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.hybridInspectJobTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes hybridInspectJobTrigger with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.HybridInspectJobTriggerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.HybridInspectJobTriggerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects( + client.hybridInspectJobTrigger(request), + expectedError, + ); + }); + }); + + describe('getJobTrigger', () => { + it('invokes getJobTrigger without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetJobTriggerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetJobTriggerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.JobTrigger(), + ); + client.innerApiCalls.getJobTrigger = stubSimpleCall(expectedResponse); + const [response] = await client.getJobTrigger(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getJobTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getJobTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getJobTrigger without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetJobTriggerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetJobTriggerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.JobTrigger(), + ); + client.innerApiCalls.getJobTrigger = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getJobTrigger( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IJobTrigger | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getJobTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getJobTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getJobTrigger with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetJobTriggerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetJobTriggerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getJobTrigger = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.getJobTrigger(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getJobTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getJobTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getJobTrigger with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetJobTriggerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetJobTriggerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.getJobTrigger(request), expectedError); + }); + }); + + describe('deleteJobTrigger', () => { + it('invokes deleteJobTrigger without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteJobTriggerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteJobTriggerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteJobTrigger = stubSimpleCall(expectedResponse); + const [response] = await client.deleteJobTrigger(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteJobTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteJobTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteJobTrigger without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteJobTriggerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteJobTriggerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteJobTrigger = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteJobTrigger( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteJobTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteJobTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteJobTrigger with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteJobTriggerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteJobTriggerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteJobTrigger = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.deleteJobTrigger(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteJobTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteJobTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteJobTrigger with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteJobTriggerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteJobTriggerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.deleteJobTrigger(request), expectedError); + }); + }); + + describe('activateJobTrigger', () => { + it('invokes activateJobTrigger without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ActivateJobTriggerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ActivateJobTriggerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.DlpJob(), + ); + client.innerApiCalls.activateJobTrigger = + stubSimpleCall(expectedResponse); + const [response] = await client.activateJobTrigger(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.activateJobTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.activateJobTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes activateJobTrigger without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ActivateJobTriggerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ActivateJobTriggerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.DlpJob(), + ); + client.innerApiCalls.activateJobTrigger = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.activateJobTrigger( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IDlpJob | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.activateJobTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.activateJobTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes activateJobTrigger with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ActivateJobTriggerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ActivateJobTriggerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.activateJobTrigger = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.activateJobTrigger(request), expectedError); + const actualRequest = ( + client.innerApiCalls.activateJobTrigger as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.activateJobTrigger as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes activateJobTrigger with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ActivateJobTriggerRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ActivateJobTriggerRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.activateJobTrigger(request), expectedError); + }); + }); + + describe('createDiscoveryConfig', () => { + it('invokes createDiscoveryConfig without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateDiscoveryConfigRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateDiscoveryConfigRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.DiscoveryConfig(), + ); + client.innerApiCalls.createDiscoveryConfig = + stubSimpleCall(expectedResponse); + const [response] = await client.createDiscoveryConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createDiscoveryConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDiscoveryConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDiscoveryConfig without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateDiscoveryConfigRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateDiscoveryConfigRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.DiscoveryConfig(), + ); + client.innerApiCalls.createDiscoveryConfig = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createDiscoveryConfig( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IDiscoveryConfig | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createDiscoveryConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDiscoveryConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDiscoveryConfig with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateDiscoveryConfigRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateDiscoveryConfigRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDiscoveryConfig = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.createDiscoveryConfig(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.createDiscoveryConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDiscoveryConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDiscoveryConfig with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateDiscoveryConfigRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateDiscoveryConfigRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects( + client.createDiscoveryConfig(request), + expectedError, + ); + }); + }); + + describe('updateDiscoveryConfig', () => { + it('invokes updateDiscoveryConfig without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateDiscoveryConfigRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.UpdateDiscoveryConfigRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.DiscoveryConfig(), + ); + client.innerApiCalls.updateDiscoveryConfig = + stubSimpleCall(expectedResponse); + const [response] = await client.updateDiscoveryConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDiscoveryConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDiscoveryConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDiscoveryConfig without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateDiscoveryConfigRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.UpdateDiscoveryConfigRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.DiscoveryConfig(), + ); + client.innerApiCalls.updateDiscoveryConfig = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateDiscoveryConfig( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IDiscoveryConfig | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateDiscoveryConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDiscoveryConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDiscoveryConfig with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateDiscoveryConfigRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.UpdateDiscoveryConfigRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateDiscoveryConfig = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.updateDiscoveryConfig(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.updateDiscoveryConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateDiscoveryConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateDiscoveryConfig with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateDiscoveryConfigRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.UpdateDiscoveryConfigRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects( + client.updateDiscoveryConfig(request), + expectedError, + ); + }); + }); + + describe('getDiscoveryConfig', () => { + it('invokes getDiscoveryConfig without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetDiscoveryConfigRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetDiscoveryConfigRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.DiscoveryConfig(), + ); + client.innerApiCalls.getDiscoveryConfig = + stubSimpleCall(expectedResponse); + const [response] = await client.getDiscoveryConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDiscoveryConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDiscoveryConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDiscoveryConfig without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetDiscoveryConfigRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetDiscoveryConfigRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.DiscoveryConfig(), + ); + client.innerApiCalls.getDiscoveryConfig = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDiscoveryConfig( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IDiscoveryConfig | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDiscoveryConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDiscoveryConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDiscoveryConfig with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetDiscoveryConfigRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetDiscoveryConfigRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDiscoveryConfig = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.getDiscoveryConfig(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getDiscoveryConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDiscoveryConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDiscoveryConfig with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetDiscoveryConfigRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetDiscoveryConfigRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.getDiscoveryConfig(request), expectedError); + }); + }); + + describe('deleteDiscoveryConfig', () => { + it('invokes deleteDiscoveryConfig without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteDiscoveryConfigRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteDiscoveryConfigRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteDiscoveryConfig = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteDiscoveryConfig(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteDiscoveryConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDiscoveryConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDiscoveryConfig without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteDiscoveryConfigRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteDiscoveryConfigRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteDiscoveryConfig = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteDiscoveryConfig( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteDiscoveryConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDiscoveryConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDiscoveryConfig with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteDiscoveryConfigRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteDiscoveryConfigRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDiscoveryConfig = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.deleteDiscoveryConfig(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.deleteDiscoveryConfig as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDiscoveryConfig as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDiscoveryConfig with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteDiscoveryConfigRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteDiscoveryConfigRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects( + client.deleteDiscoveryConfig(request), + expectedError, + ); + }); + }); + + describe('createDlpJob', () => { + it('invokes createDlpJob without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateDlpJobRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateDlpJobRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.DlpJob(), + ); + client.innerApiCalls.createDlpJob = stubSimpleCall(expectedResponse); + const [response] = await client.createDlpJob(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createDlpJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDlpJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDlpJob without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateDlpJobRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateDlpJobRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.DlpJob(), + ); + client.innerApiCalls.createDlpJob = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createDlpJob( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IDlpJob | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createDlpJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDlpJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDlpJob with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateDlpJobRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateDlpJobRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createDlpJob = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.createDlpJob(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createDlpJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createDlpJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createDlpJob with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateDlpJobRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateDlpJobRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.createDlpJob(request), expectedError); + }); + }); + + describe('getDlpJob', () => { + it('invokes getDlpJob without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetDlpJobRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetDlpJobRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.DlpJob(), + ); + client.innerApiCalls.getDlpJob = stubSimpleCall(expectedResponse); + const [response] = await client.getDlpJob(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDlpJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDlpJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDlpJob without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetDlpJobRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetDlpJobRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.DlpJob(), + ); + client.innerApiCalls.getDlpJob = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getDlpJob( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IDlpJob | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getDlpJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDlpJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDlpJob with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetDlpJobRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetDlpJobRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getDlpJob = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getDlpJob(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getDlpJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getDlpJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getDlpJob with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetDlpJobRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetDlpJobRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.getDlpJob(request), expectedError); + }); + }); + + describe('deleteDlpJob', () => { + it('invokes deleteDlpJob without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteDlpJobRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteDlpJobRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteDlpJob = stubSimpleCall(expectedResponse); + const [response] = await client.deleteDlpJob(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteDlpJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDlpJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDlpJob without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteDlpJobRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteDlpJobRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteDlpJob = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteDlpJob( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteDlpJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDlpJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDlpJob with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteDlpJobRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteDlpJobRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteDlpJob = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.deleteDlpJob(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteDlpJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteDlpJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteDlpJob with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteDlpJobRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteDlpJobRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.deleteDlpJob(request), expectedError); + }); + }); + + describe('cancelDlpJob', () => { + it('invokes cancelDlpJob without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CancelDlpJobRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CancelDlpJobRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.cancelDlpJob = stubSimpleCall(expectedResponse); + const [response] = await client.cancelDlpJob(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.cancelDlpJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelDlpJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelDlpJob without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CancelDlpJobRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CancelDlpJobRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.cancelDlpJob = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.cancelDlpJob( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.cancelDlpJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelDlpJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelDlpJob with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CancelDlpJobRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CancelDlpJobRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.cancelDlpJob = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.cancelDlpJob(request), expectedError); + const actualRequest = ( + client.innerApiCalls.cancelDlpJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelDlpJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelDlpJob with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CancelDlpJobRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CancelDlpJobRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.cancelDlpJob(request), expectedError); + }); + }); + + describe('createStoredInfoType', () => { + it('invokes createStoredInfoType without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateStoredInfoTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateStoredInfoTypeRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.StoredInfoType(), + ); + client.innerApiCalls.createStoredInfoType = + stubSimpleCall(expectedResponse); + const [response] = await client.createStoredInfoType(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createStoredInfoType as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createStoredInfoType as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createStoredInfoType without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateStoredInfoTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateStoredInfoTypeRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.StoredInfoType(), + ); + client.innerApiCalls.createStoredInfoType = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createStoredInfoType( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IStoredInfoType | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createStoredInfoType as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createStoredInfoType as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createStoredInfoType with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateStoredInfoTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateStoredInfoTypeRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createStoredInfoType = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.createStoredInfoType(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createStoredInfoType as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createStoredInfoType as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createStoredInfoType with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateStoredInfoTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateStoredInfoTypeRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.createStoredInfoType(request), expectedError); + }); + }); + + describe('updateStoredInfoType', () => { + it('invokes updateStoredInfoType without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.StoredInfoType(), + ); + client.innerApiCalls.updateStoredInfoType = + stubSimpleCall(expectedResponse); + const [response] = await client.updateStoredInfoType(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateStoredInfoType as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateStoredInfoType as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateStoredInfoType without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.StoredInfoType(), + ); + client.innerApiCalls.updateStoredInfoType = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateStoredInfoType( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IStoredInfoType | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateStoredInfoType as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateStoredInfoType as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateStoredInfoType with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateStoredInfoType = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.updateStoredInfoType(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateStoredInfoType as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateStoredInfoType as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateStoredInfoType with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.UpdateStoredInfoTypeRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.updateStoredInfoType(request), expectedError); + }); + }); + + describe('getStoredInfoType', () => { + it('invokes getStoredInfoType without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetStoredInfoTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetStoredInfoTypeRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.StoredInfoType(), + ); + client.innerApiCalls.getStoredInfoType = stubSimpleCall(expectedResponse); + const [response] = await client.getStoredInfoType(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getStoredInfoType as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getStoredInfoType as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getStoredInfoType without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetStoredInfoTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetStoredInfoTypeRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.StoredInfoType(), + ); + client.innerApiCalls.getStoredInfoType = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getStoredInfoType( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IStoredInfoType | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getStoredInfoType as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getStoredInfoType as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getStoredInfoType with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetStoredInfoTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetStoredInfoTypeRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getStoredInfoType = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.getStoredInfoType(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getStoredInfoType as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getStoredInfoType as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getStoredInfoType with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetStoredInfoTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetStoredInfoTypeRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.getStoredInfoType(request), expectedError); + }); + }); + + describe('deleteStoredInfoType', () => { + it('invokes deleteStoredInfoType without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteStoredInfoType = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteStoredInfoType(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteStoredInfoType as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteStoredInfoType as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteStoredInfoType without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteStoredInfoType = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteStoredInfoType( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteStoredInfoType as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteStoredInfoType as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteStoredInfoType with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteStoredInfoType = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.deleteStoredInfoType(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteStoredInfoType as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteStoredInfoType as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteStoredInfoType with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteStoredInfoTypeRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.deleteStoredInfoType(request), expectedError); + }); + }); + + describe('getProjectDataProfile', () => { + it('invokes getProjectDataProfile without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetProjectDataProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetProjectDataProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.ProjectDataProfile(), + ); + client.innerApiCalls.getProjectDataProfile = + stubSimpleCall(expectedResponse); + const [response] = await client.getProjectDataProfile(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getProjectDataProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getProjectDataProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getProjectDataProfile without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetProjectDataProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetProjectDataProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.ProjectDataProfile(), + ); + client.innerApiCalls.getProjectDataProfile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getProjectDataProfile( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IProjectDataProfile | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getProjectDataProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getProjectDataProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getProjectDataProfile with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetProjectDataProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetProjectDataProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getProjectDataProfile = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.getProjectDataProfile(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.getProjectDataProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getProjectDataProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getProjectDataProfile with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetProjectDataProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetProjectDataProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects( + client.getProjectDataProfile(request), + expectedError, + ); + }); + }); + + describe('getFileStoreDataProfile', () => { + it('invokes getFileStoreDataProfile without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetFileStoreDataProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetFileStoreDataProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.FileStoreDataProfile(), + ); + client.innerApiCalls.getFileStoreDataProfile = + stubSimpleCall(expectedResponse); + const [response] = await client.getFileStoreDataProfile(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getFileStoreDataProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getFileStoreDataProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFileStoreDataProfile without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetFileStoreDataProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetFileStoreDataProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.FileStoreDataProfile(), + ); + client.innerApiCalls.getFileStoreDataProfile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getFileStoreDataProfile( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IFileStoreDataProfile | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getFileStoreDataProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getFileStoreDataProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFileStoreDataProfile with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetFileStoreDataProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetFileStoreDataProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getFileStoreDataProfile = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.getFileStoreDataProfile(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.getFileStoreDataProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getFileStoreDataProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getFileStoreDataProfile with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetFileStoreDataProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetFileStoreDataProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects( + client.getFileStoreDataProfile(request), + expectedError, + ); + }); + }); + + describe('deleteFileStoreDataProfile', () => { + it('invokes deleteFileStoreDataProfile without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteFileStoreDataProfile = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteFileStoreDataProfile(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteFileStoreDataProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFileStoreDataProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFileStoreDataProfile without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteFileStoreDataProfile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteFileStoreDataProfile( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteFileStoreDataProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFileStoreDataProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFileStoreDataProfile with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteFileStoreDataProfile = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.deleteFileStoreDataProfile(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.deleteFileStoreDataProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteFileStoreDataProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFileStoreDataProfile with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteFileStoreDataProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects( + client.deleteFileStoreDataProfile(request), + expectedError, + ); + }); + }); + + describe('getTableDataProfile', () => { + it('invokes getTableDataProfile without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetTableDataProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetTableDataProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.TableDataProfile(), + ); + client.innerApiCalls.getTableDataProfile = + stubSimpleCall(expectedResponse); + const [response] = await client.getTableDataProfile(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getTableDataProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getTableDataProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTableDataProfile without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetTableDataProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetTableDataProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.TableDataProfile(), + ); + client.innerApiCalls.getTableDataProfile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getTableDataProfile( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.ITableDataProfile | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getTableDataProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getTableDataProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTableDataProfile with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetTableDataProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetTableDataProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getTableDataProfile = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.getTableDataProfile(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getTableDataProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getTableDataProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getTableDataProfile with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetTableDataProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetTableDataProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.getTableDataProfile(request), expectedError); + }); + }); + + describe('getColumnDataProfile', () => { + it('invokes getColumnDataProfile without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetColumnDataProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetColumnDataProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.ColumnDataProfile(), + ); + client.innerApiCalls.getColumnDataProfile = + stubSimpleCall(expectedResponse); + const [response] = await client.getColumnDataProfile(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getColumnDataProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getColumnDataProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getColumnDataProfile without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetColumnDataProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetColumnDataProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.ColumnDataProfile(), + ); + client.innerApiCalls.getColumnDataProfile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getColumnDataProfile( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IColumnDataProfile | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getColumnDataProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getColumnDataProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getColumnDataProfile with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetColumnDataProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetColumnDataProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getColumnDataProfile = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.getColumnDataProfile(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getColumnDataProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getColumnDataProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getColumnDataProfile with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetColumnDataProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetColumnDataProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.getColumnDataProfile(request), expectedError); + }); + }); + + describe('deleteTableDataProfile', () => { + it('invokes deleteTableDataProfile without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteTableDataProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteTableDataProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteTableDataProfile = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteTableDataProfile(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteTableDataProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteTableDataProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteTableDataProfile without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteTableDataProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteTableDataProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteTableDataProfile = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteTableDataProfile( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteTableDataProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteTableDataProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteTableDataProfile with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteTableDataProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteTableDataProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteTableDataProfile = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.deleteTableDataProfile(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.deleteTableDataProfile as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteTableDataProfile as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteTableDataProfile with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteTableDataProfileRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteTableDataProfileRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects( + client.deleteTableDataProfile(request), + expectedError, + ); + }); + }); + + describe('hybridInspectDlpJob', () => { + it('invokes hybridInspectDlpJob without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.HybridInspectDlpJobRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.HybridInspectDlpJobRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.HybridInspectResponse(), + ); + client.innerApiCalls.hybridInspectDlpJob = + stubSimpleCall(expectedResponse); + const [response] = await client.hybridInspectDlpJob(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.hybridInspectDlpJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.hybridInspectDlpJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes hybridInspectDlpJob without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.HybridInspectDlpJobRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.HybridInspectDlpJobRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.HybridInspectResponse(), + ); + client.innerApiCalls.hybridInspectDlpJob = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.hybridInspectDlpJob( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IHybridInspectResponse | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.hybridInspectDlpJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.hybridInspectDlpJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes hybridInspectDlpJob with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.HybridInspectDlpJobRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.HybridInspectDlpJobRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.hybridInspectDlpJob = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.hybridInspectDlpJob(request), expectedError); + const actualRequest = ( + client.innerApiCalls.hybridInspectDlpJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.hybridInspectDlpJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes hybridInspectDlpJob with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.HybridInspectDlpJobRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.HybridInspectDlpJobRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.hybridInspectDlpJob(request), expectedError); + }); + }); + + describe('finishDlpJob', () => { + it('invokes finishDlpJob without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.FinishDlpJobRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.FinishDlpJobRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.finishDlpJob = stubSimpleCall(expectedResponse); + const [response] = await client.finishDlpJob(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.finishDlpJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.finishDlpJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes finishDlpJob without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.FinishDlpJobRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.FinishDlpJobRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.finishDlpJob = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.finishDlpJob( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.finishDlpJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.finishDlpJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes finishDlpJob with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.FinishDlpJobRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.FinishDlpJobRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.finishDlpJob = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.finishDlpJob(request), expectedError); + const actualRequest = ( + client.innerApiCalls.finishDlpJob as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.finishDlpJob as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes finishDlpJob with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.FinishDlpJobRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.FinishDlpJobRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.finishDlpJob(request), expectedError); + }); + }); + + describe('createConnection', () => { + it('invokes createConnection without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateConnectionRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateConnectionRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.Connection(), + ); + client.innerApiCalls.createConnection = stubSimpleCall(expectedResponse); + const [response] = await client.createConnection(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConnection without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateConnectionRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateConnectionRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.Connection(), + ); + client.innerApiCalls.createConnection = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createConnection( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IConnection | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConnection with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateConnectionRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateConnectionRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createConnection = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.createConnection(request), expectedError); + const actualRequest = ( + client.innerApiCalls.createConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createConnection with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.CreateConnectionRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.CreateConnectionRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.createConnection(request), expectedError); + }); + }); + + describe('getConnection', () => { + it('invokes getConnection without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetConnectionRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetConnectionRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.Connection(), + ); + client.innerApiCalls.getConnection = stubSimpleCall(expectedResponse); + const [response] = await client.getConnection(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConnection without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetConnectionRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetConnectionRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.Connection(), + ); + client.innerApiCalls.getConnection = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getConnection( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IConnection | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConnection with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetConnectionRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetConnectionRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getConnection = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.getConnection(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getConnection with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.GetConnectionRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.GetConnectionRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.getConnection(request), expectedError); + }); + }); + + describe('deleteConnection', () => { + it('invokes deleteConnection without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteConnectionRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteConnectionRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteConnection = stubSimpleCall(expectedResponse); + const [response] = await client.deleteConnection(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnection without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteConnectionRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteConnectionRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteConnection = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteConnection( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnection with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteConnectionRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteConnectionRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteConnection = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.deleteConnection(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteConnection with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.DeleteConnectionRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.DeleteConnectionRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.deleteConnection(request), expectedError); + }); + }); + + describe('updateConnection', () => { + it('invokes updateConnection without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateConnectionRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.UpdateConnectionRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.Connection(), + ); + client.innerApiCalls.updateConnection = stubSimpleCall(expectedResponse); + const [response] = await client.updateConnection(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConnection without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateConnectionRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.UpdateConnectionRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.privacy.dlp.v2.Connection(), + ); + client.innerApiCalls.updateConnection = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateConnection( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IConnection | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConnection with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateConnectionRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.UpdateConnectionRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateConnection = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.updateConnection(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateConnection as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateConnection as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateConnection with closed client', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.UpdateConnectionRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.UpdateConnectionRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.updateConnection(request), expectedError); + }); + }); + + describe('listInspectTemplates', () => { + it('invokes listInspectTemplates without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListInspectTemplatesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListInspectTemplatesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.InspectTemplate(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.InspectTemplate(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.InspectTemplate(), + ), + ]; + client.innerApiCalls.listInspectTemplates = + stubSimpleCall(expectedResponse); + const [response] = await client.listInspectTemplates(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listInspectTemplates as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listInspectTemplates as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listInspectTemplates without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListInspectTemplatesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListInspectTemplatesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.InspectTemplate(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.InspectTemplate(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.InspectTemplate(), + ), + ]; + client.innerApiCalls.listInspectTemplates = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listInspectTemplates( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IInspectTemplate[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listInspectTemplates as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listInspectTemplates as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listInspectTemplates with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListInspectTemplatesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListInspectTemplatesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listInspectTemplates = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.listInspectTemplates(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listInspectTemplates as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listInspectTemplates as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listInspectTemplatesStream without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListInspectTemplatesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListInspectTemplatesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.InspectTemplate(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.InspectTemplate(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.InspectTemplate(), + ), + ]; + client.descriptors.page.listInspectTemplates.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listInspectTemplatesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.privacy.dlp.v2.InspectTemplate[] = []; + stream.on( + 'data', + (response: protos.google.privacy.dlp.v2.InspectTemplate) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listInspectTemplates.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listInspectTemplates, request), + ); + assert( + (client.descriptors.page.listInspectTemplates.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('invokes listInspectTemplatesStream with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListInspectTemplatesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListInspectTemplatesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listInspectTemplates.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listInspectTemplatesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.privacy.dlp.v2.InspectTemplate[] = []; + stream.on( + 'data', + (response: protos.google.privacy.dlp.v2.InspectTemplate) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listInspectTemplates.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listInspectTemplates, request), + ); + assert( + (client.descriptors.page.listInspectTemplates.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listInspectTemplates without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListInspectTemplatesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListInspectTemplatesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.InspectTemplate(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.InspectTemplate(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.InspectTemplate(), + ), + ]; + client.descriptors.page.listInspectTemplates.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.privacy.dlp.v2.IInspectTemplate[] = []; + const iterable = client.listInspectTemplatesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listInspectTemplates.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listInspectTemplates.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listInspectTemplates with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListInspectTemplatesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListInspectTemplatesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listInspectTemplates.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listInspectTemplatesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.privacy.dlp.v2.IInspectTemplate[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listInspectTemplates.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listInspectTemplates.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + }); + + describe('listDeidentifyTemplates', () => { + it('invokes listDeidentifyTemplates without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.DeidentifyTemplate(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.DeidentifyTemplate(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.DeidentifyTemplate(), + ), + ]; + client.innerApiCalls.listDeidentifyTemplates = + stubSimpleCall(expectedResponse); + const [response] = await client.listDeidentifyTemplates(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDeidentifyTemplates as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDeidentifyTemplates as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDeidentifyTemplates without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.DeidentifyTemplate(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.DeidentifyTemplate(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.DeidentifyTemplate(), + ), + ]; + client.innerApiCalls.listDeidentifyTemplates = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDeidentifyTemplates( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IDeidentifyTemplate[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDeidentifyTemplates as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDeidentifyTemplates as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDeidentifyTemplates with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDeidentifyTemplates = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.listDeidentifyTemplates(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.listDeidentifyTemplates as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDeidentifyTemplates as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDeidentifyTemplatesStream without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.DeidentifyTemplate(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.DeidentifyTemplate(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.DeidentifyTemplate(), + ), + ]; + client.descriptors.page.listDeidentifyTemplates.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listDeidentifyTemplatesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.privacy.dlp.v2.DeidentifyTemplate[] = []; + stream.on( + 'data', + (response: protos.google.privacy.dlp.v2.DeidentifyTemplate) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listDeidentifyTemplates + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listDeidentifyTemplates, request), + ); + assert( + ( + client.descriptors.page.listDeidentifyTemplates + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes listDeidentifyTemplatesStream with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDeidentifyTemplates.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listDeidentifyTemplatesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.privacy.dlp.v2.DeidentifyTemplate[] = []; + stream.on( + 'data', + (response: protos.google.privacy.dlp.v2.DeidentifyTemplate) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listDeidentifyTemplates + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listDeidentifyTemplates, request), + ); + assert( + ( + client.descriptors.page.listDeidentifyTemplates + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listDeidentifyTemplates without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.DeidentifyTemplate(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.DeidentifyTemplate(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.DeidentifyTemplate(), + ), + ]; + client.descriptors.page.listDeidentifyTemplates.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.privacy.dlp.v2.IDeidentifyTemplate[] = []; + const iterable = client.listDeidentifyTemplatesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listDeidentifyTemplates + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listDeidentifyTemplates + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listDeidentifyTemplates with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListDeidentifyTemplatesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDeidentifyTemplates.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDeidentifyTemplatesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.privacy.dlp.v2.IDeidentifyTemplate[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listDeidentifyTemplates + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listDeidentifyTemplates + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('listJobTriggers', () => { + it('invokes listJobTriggers without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListJobTriggersRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListJobTriggersRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.privacy.dlp.v2.JobTrigger()), + generateSampleMessage(new protos.google.privacy.dlp.v2.JobTrigger()), + generateSampleMessage(new protos.google.privacy.dlp.v2.JobTrigger()), + ]; + client.innerApiCalls.listJobTriggers = stubSimpleCall(expectedResponse); + const [response] = await client.listJobTriggers(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listJobTriggers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listJobTriggers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listJobTriggers without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListJobTriggersRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListJobTriggersRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.privacy.dlp.v2.JobTrigger()), + generateSampleMessage(new protos.google.privacy.dlp.v2.JobTrigger()), + generateSampleMessage(new protos.google.privacy.dlp.v2.JobTrigger()), + ]; + client.innerApiCalls.listJobTriggers = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listJobTriggers( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IJobTrigger[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listJobTriggers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listJobTriggers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listJobTriggers with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListJobTriggersRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListJobTriggersRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listJobTriggers = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.listJobTriggers(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listJobTriggers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listJobTriggers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listJobTriggersStream without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListJobTriggersRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListJobTriggersRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.privacy.dlp.v2.JobTrigger()), + generateSampleMessage(new protos.google.privacy.dlp.v2.JobTrigger()), + generateSampleMessage(new protos.google.privacy.dlp.v2.JobTrigger()), + ]; + client.descriptors.page.listJobTriggers.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listJobTriggersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.privacy.dlp.v2.JobTrigger[] = []; + stream.on( + 'data', + (response: protos.google.privacy.dlp.v2.JobTrigger) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listJobTriggers.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listJobTriggers, request), + ); + assert( + (client.descriptors.page.listJobTriggers.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('invokes listJobTriggersStream with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListJobTriggersRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListJobTriggersRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listJobTriggers.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listJobTriggersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.privacy.dlp.v2.JobTrigger[] = []; + stream.on( + 'data', + (response: protos.google.privacy.dlp.v2.JobTrigger) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listJobTriggers.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listJobTriggers, request), + ); + assert( + (client.descriptors.page.listJobTriggers.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listJobTriggers without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListJobTriggersRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListJobTriggersRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.privacy.dlp.v2.JobTrigger()), + generateSampleMessage(new protos.google.privacy.dlp.v2.JobTrigger()), + generateSampleMessage(new protos.google.privacy.dlp.v2.JobTrigger()), + ]; + client.descriptors.page.listJobTriggers.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.privacy.dlp.v2.IJobTrigger[] = []; + const iterable = client.listJobTriggersAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listJobTriggers.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listJobTriggers.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listJobTriggers with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListJobTriggersRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListJobTriggersRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listJobTriggers.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listJobTriggersAsync(request); + await assert.rejects(async () => { + const responses: protos.google.privacy.dlp.v2.IJobTrigger[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listJobTriggers.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listJobTriggers.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + }); + + describe('listDiscoveryConfigs', () => { + it('invokes listDiscoveryConfigs without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListDiscoveryConfigsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListDiscoveryConfigsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.DiscoveryConfig(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.DiscoveryConfig(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.DiscoveryConfig(), + ), + ]; + client.innerApiCalls.listDiscoveryConfigs = + stubSimpleCall(expectedResponse); + const [response] = await client.listDiscoveryConfigs(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDiscoveryConfigs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDiscoveryConfigs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDiscoveryConfigs without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListDiscoveryConfigsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListDiscoveryConfigsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.DiscoveryConfig(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.DiscoveryConfig(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.DiscoveryConfig(), + ), + ]; + client.innerApiCalls.listDiscoveryConfigs = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDiscoveryConfigs( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IDiscoveryConfig[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDiscoveryConfigs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDiscoveryConfigs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDiscoveryConfigs with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListDiscoveryConfigsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListDiscoveryConfigsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDiscoveryConfigs = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.listDiscoveryConfigs(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listDiscoveryConfigs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDiscoveryConfigs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDiscoveryConfigsStream without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListDiscoveryConfigsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListDiscoveryConfigsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.DiscoveryConfig(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.DiscoveryConfig(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.DiscoveryConfig(), + ), + ]; + client.descriptors.page.listDiscoveryConfigs.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listDiscoveryConfigsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.privacy.dlp.v2.DiscoveryConfig[] = []; + stream.on( + 'data', + (response: protos.google.privacy.dlp.v2.DiscoveryConfig) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listDiscoveryConfigs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDiscoveryConfigs, request), + ); + assert( + (client.descriptors.page.listDiscoveryConfigs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('invokes listDiscoveryConfigsStream with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListDiscoveryConfigsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListDiscoveryConfigsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDiscoveryConfigs.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listDiscoveryConfigsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.privacy.dlp.v2.DiscoveryConfig[] = []; + stream.on( + 'data', + (response: protos.google.privacy.dlp.v2.DiscoveryConfig) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listDiscoveryConfigs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDiscoveryConfigs, request), + ); + assert( + (client.descriptors.page.listDiscoveryConfigs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listDiscoveryConfigs without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListDiscoveryConfigsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListDiscoveryConfigsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.DiscoveryConfig(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.DiscoveryConfig(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.DiscoveryConfig(), + ), + ]; + client.descriptors.page.listDiscoveryConfigs.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.privacy.dlp.v2.IDiscoveryConfig[] = []; + const iterable = client.listDiscoveryConfigsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listDiscoveryConfigs.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listDiscoveryConfigs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listDiscoveryConfigs with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListDiscoveryConfigsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListDiscoveryConfigsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDiscoveryConfigs.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listDiscoveryConfigsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.privacy.dlp.v2.IDiscoveryConfig[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listDiscoveryConfigs.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listDiscoveryConfigs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + }); + + describe('listDlpJobs', () => { + it('invokes listDlpJobs without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListDlpJobsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListDlpJobsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.privacy.dlp.v2.DlpJob()), + generateSampleMessage(new protos.google.privacy.dlp.v2.DlpJob()), + generateSampleMessage(new protos.google.privacy.dlp.v2.DlpJob()), + ]; + client.innerApiCalls.listDlpJobs = stubSimpleCall(expectedResponse); + const [response] = await client.listDlpJobs(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDlpJobs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDlpJobs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDlpJobs without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListDlpJobsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListDlpJobsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.privacy.dlp.v2.DlpJob()), + generateSampleMessage(new protos.google.privacy.dlp.v2.DlpJob()), + generateSampleMessage(new protos.google.privacy.dlp.v2.DlpJob()), + ]; + client.innerApiCalls.listDlpJobs = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listDlpJobs( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IDlpJob[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listDlpJobs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDlpJobs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDlpJobs with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListDlpJobsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListDlpJobsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listDlpJobs = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.listDlpJobs(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listDlpJobs as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listDlpJobs as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listDlpJobsStream without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListDlpJobsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListDlpJobsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.privacy.dlp.v2.DlpJob()), + generateSampleMessage(new protos.google.privacy.dlp.v2.DlpJob()), + generateSampleMessage(new protos.google.privacy.dlp.v2.DlpJob()), + ]; + client.descriptors.page.listDlpJobs.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listDlpJobsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.privacy.dlp.v2.DlpJob[] = []; + stream.on('data', (response: protos.google.privacy.dlp.v2.DlpJob) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listDlpJobs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDlpJobs, request), + ); + assert( + (client.descriptors.page.listDlpJobs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('invokes listDlpJobsStream with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListDlpJobsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListDlpJobsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDlpJobs.createStream = stubPageStreamingCall( + undefined, + expectedError, + ); + const stream = client.listDlpJobsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.privacy.dlp.v2.DlpJob[] = []; + stream.on('data', (response: protos.google.privacy.dlp.v2.DlpJob) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listDlpJobs.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listDlpJobs, request), + ); + assert( + (client.descriptors.page.listDlpJobs.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listDlpJobs without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListDlpJobsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListDlpJobsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.privacy.dlp.v2.DlpJob()), + generateSampleMessage(new protos.google.privacy.dlp.v2.DlpJob()), + generateSampleMessage(new protos.google.privacy.dlp.v2.DlpJob()), + ]; + client.descriptors.page.listDlpJobs.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.privacy.dlp.v2.IDlpJob[] = []; + const iterable = client.listDlpJobsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listDlpJobs.asyncIterate as SinonStub).getCall( + 0, + ).args[1], + request, + ); + assert( + (client.descriptors.page.listDlpJobs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listDlpJobs with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListDlpJobsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListDlpJobsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listDlpJobs.asyncIterate = stubAsyncIterationCall( + undefined, + expectedError, + ); + const iterable = client.listDlpJobsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.privacy.dlp.v2.IDlpJob[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listDlpJobs.asyncIterate as SinonStub).getCall( + 0, + ).args[1], + request, + ); + assert( + (client.descriptors.page.listDlpJobs.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + }); + + describe('listStoredInfoTypes', () => { + it('invokes listStoredInfoTypes without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListStoredInfoTypesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListStoredInfoTypesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.StoredInfoType(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.StoredInfoType(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.StoredInfoType(), + ), + ]; + client.innerApiCalls.listStoredInfoTypes = + stubSimpleCall(expectedResponse); + const [response] = await client.listStoredInfoTypes(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listStoredInfoTypes as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listStoredInfoTypes as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listStoredInfoTypes without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListStoredInfoTypesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListStoredInfoTypesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.StoredInfoType(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.StoredInfoType(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.StoredInfoType(), + ), + ]; + client.innerApiCalls.listStoredInfoTypes = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listStoredInfoTypes( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IStoredInfoType[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listStoredInfoTypes as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listStoredInfoTypes as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listStoredInfoTypes with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListStoredInfoTypesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListStoredInfoTypesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listStoredInfoTypes = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.listStoredInfoTypes(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listStoredInfoTypes as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listStoredInfoTypes as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listStoredInfoTypesStream without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListStoredInfoTypesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListStoredInfoTypesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.StoredInfoType(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.StoredInfoType(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.StoredInfoType(), + ), + ]; + client.descriptors.page.listStoredInfoTypes.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listStoredInfoTypesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.privacy.dlp.v2.StoredInfoType[] = []; + stream.on( + 'data', + (response: protos.google.privacy.dlp.v2.StoredInfoType) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listStoredInfoTypes.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listStoredInfoTypes, request), + ); + assert( + (client.descriptors.page.listStoredInfoTypes.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('invokes listStoredInfoTypesStream with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListStoredInfoTypesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListStoredInfoTypesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listStoredInfoTypes.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listStoredInfoTypesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.privacy.dlp.v2.StoredInfoType[] = []; + stream.on( + 'data', + (response: protos.google.privacy.dlp.v2.StoredInfoType) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listStoredInfoTypes.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listStoredInfoTypes, request), + ); + assert( + (client.descriptors.page.listStoredInfoTypes.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listStoredInfoTypes without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListStoredInfoTypesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListStoredInfoTypesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.StoredInfoType(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.StoredInfoType(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.StoredInfoType(), + ), + ]; + client.descriptors.page.listStoredInfoTypes.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.privacy.dlp.v2.IStoredInfoType[] = []; + const iterable = client.listStoredInfoTypesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listStoredInfoTypes.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listStoredInfoTypes.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listStoredInfoTypes with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListStoredInfoTypesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListStoredInfoTypesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listStoredInfoTypes.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listStoredInfoTypesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.privacy.dlp.v2.IStoredInfoType[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listStoredInfoTypes.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listStoredInfoTypes.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + }); + + describe('listProjectDataProfiles', () => { + it('invokes listProjectDataProfiles without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListProjectDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListProjectDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.ProjectDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.ProjectDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.ProjectDataProfile(), + ), + ]; + client.innerApiCalls.listProjectDataProfiles = + stubSimpleCall(expectedResponse); + const [response] = await client.listProjectDataProfiles(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listProjectDataProfiles as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listProjectDataProfiles as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listProjectDataProfiles without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListProjectDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListProjectDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.ProjectDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.ProjectDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.ProjectDataProfile(), + ), + ]; + client.innerApiCalls.listProjectDataProfiles = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listProjectDataProfiles( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IProjectDataProfile[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listProjectDataProfiles as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listProjectDataProfiles as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listProjectDataProfiles with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListProjectDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListProjectDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listProjectDataProfiles = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.listProjectDataProfiles(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.listProjectDataProfiles as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listProjectDataProfiles as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listProjectDataProfilesStream without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListProjectDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListProjectDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.ProjectDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.ProjectDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.ProjectDataProfile(), + ), + ]; + client.descriptors.page.listProjectDataProfiles.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listProjectDataProfilesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.privacy.dlp.v2.ProjectDataProfile[] = []; + stream.on( + 'data', + (response: protos.google.privacy.dlp.v2.ProjectDataProfile) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listProjectDataProfiles + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listProjectDataProfiles, request), + ); + assert( + ( + client.descriptors.page.listProjectDataProfiles + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes listProjectDataProfilesStream with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListProjectDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListProjectDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listProjectDataProfiles.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listProjectDataProfilesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.privacy.dlp.v2.ProjectDataProfile[] = []; + stream.on( + 'data', + (response: protos.google.privacy.dlp.v2.ProjectDataProfile) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listProjectDataProfiles + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listProjectDataProfiles, request), + ); + assert( + ( + client.descriptors.page.listProjectDataProfiles + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listProjectDataProfiles without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListProjectDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListProjectDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.ProjectDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.ProjectDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.ProjectDataProfile(), + ), + ]; + client.descriptors.page.listProjectDataProfiles.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.privacy.dlp.v2.IProjectDataProfile[] = []; + const iterable = client.listProjectDataProfilesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listProjectDataProfiles + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listProjectDataProfiles + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listProjectDataProfiles with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListProjectDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListProjectDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listProjectDataProfiles.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listProjectDataProfilesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.privacy.dlp.v2.IProjectDataProfile[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listProjectDataProfiles + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listProjectDataProfiles + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('listTableDataProfiles', () => { + it('invokes listTableDataProfiles without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListTableDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListTableDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.TableDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.TableDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.TableDataProfile(), + ), + ]; + client.innerApiCalls.listTableDataProfiles = + stubSimpleCall(expectedResponse); + const [response] = await client.listTableDataProfiles(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listTableDataProfiles as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listTableDataProfiles as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTableDataProfiles without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListTableDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListTableDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.TableDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.TableDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.TableDataProfile(), + ), + ]; + client.innerApiCalls.listTableDataProfiles = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listTableDataProfiles( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.ITableDataProfile[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listTableDataProfiles as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listTableDataProfiles as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTableDataProfiles with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListTableDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListTableDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listTableDataProfiles = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.listTableDataProfiles(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.listTableDataProfiles as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listTableDataProfiles as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listTableDataProfilesStream without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListTableDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListTableDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.TableDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.TableDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.TableDataProfile(), + ), + ]; + client.descriptors.page.listTableDataProfiles.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listTableDataProfilesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.privacy.dlp.v2.TableDataProfile[] = []; + stream.on( + 'data', + (response: protos.google.privacy.dlp.v2.TableDataProfile) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listTableDataProfiles + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listTableDataProfiles, request), + ); + assert( + ( + client.descriptors.page.listTableDataProfiles + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes listTableDataProfilesStream with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListTableDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListTableDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listTableDataProfiles.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listTableDataProfilesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.privacy.dlp.v2.TableDataProfile[] = []; + stream.on( + 'data', + (response: protos.google.privacy.dlp.v2.TableDataProfile) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listTableDataProfiles + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listTableDataProfiles, request), + ); + assert( + ( + client.descriptors.page.listTableDataProfiles + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listTableDataProfiles without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListTableDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListTableDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.TableDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.TableDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.TableDataProfile(), + ), + ]; + client.descriptors.page.listTableDataProfiles.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.privacy.dlp.v2.ITableDataProfile[] = []; + const iterable = client.listTableDataProfilesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listTableDataProfiles + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listTableDataProfiles + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listTableDataProfiles with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListTableDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListTableDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listTableDataProfiles.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listTableDataProfilesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.privacy.dlp.v2.ITableDataProfile[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listTableDataProfiles + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listTableDataProfiles + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('listColumnDataProfiles', () => { + it('invokes listColumnDataProfiles without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListColumnDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListColumnDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.ColumnDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.ColumnDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.ColumnDataProfile(), + ), + ]; + client.innerApiCalls.listColumnDataProfiles = + stubSimpleCall(expectedResponse); + const [response] = await client.listColumnDataProfiles(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listColumnDataProfiles as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listColumnDataProfiles as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listColumnDataProfiles without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListColumnDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListColumnDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.ColumnDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.ColumnDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.ColumnDataProfile(), + ), + ]; + client.innerApiCalls.listColumnDataProfiles = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listColumnDataProfiles( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IColumnDataProfile[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listColumnDataProfiles as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listColumnDataProfiles as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listColumnDataProfiles with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListColumnDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListColumnDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listColumnDataProfiles = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.listColumnDataProfiles(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.listColumnDataProfiles as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listColumnDataProfiles as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listColumnDataProfilesStream without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListColumnDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListColumnDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.ColumnDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.ColumnDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.ColumnDataProfile(), + ), + ]; + client.descriptors.page.listColumnDataProfiles.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listColumnDataProfilesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.privacy.dlp.v2.ColumnDataProfile[] = []; + stream.on( + 'data', + (response: protos.google.privacy.dlp.v2.ColumnDataProfile) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listColumnDataProfiles + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listColumnDataProfiles, request), + ); + assert( + ( + client.descriptors.page.listColumnDataProfiles + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes listColumnDataProfilesStream with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListColumnDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListColumnDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listColumnDataProfiles.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listColumnDataProfilesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.privacy.dlp.v2.ColumnDataProfile[] = []; + stream.on( + 'data', + (response: protos.google.privacy.dlp.v2.ColumnDataProfile) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listColumnDataProfiles + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listColumnDataProfiles, request), + ); + assert( + ( + client.descriptors.page.listColumnDataProfiles + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listColumnDataProfiles without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListColumnDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListColumnDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.ColumnDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.ColumnDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.ColumnDataProfile(), + ), + ]; + client.descriptors.page.listColumnDataProfiles.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.privacy.dlp.v2.IColumnDataProfile[] = []; + const iterable = client.listColumnDataProfilesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listColumnDataProfiles + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listColumnDataProfiles + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listColumnDataProfiles with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListColumnDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListColumnDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listColumnDataProfiles.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listColumnDataProfilesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.privacy.dlp.v2.IColumnDataProfile[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listColumnDataProfiles + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listColumnDataProfiles + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('listFileStoreDataProfiles', () => { + it('invokes listFileStoreDataProfiles without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListFileStoreDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListFileStoreDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.FileStoreDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.FileStoreDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.FileStoreDataProfile(), + ), + ]; + client.innerApiCalls.listFileStoreDataProfiles = + stubSimpleCall(expectedResponse); + const [response] = await client.listFileStoreDataProfiles(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listFileStoreDataProfiles as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listFileStoreDataProfiles as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFileStoreDataProfiles without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListFileStoreDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListFileStoreDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.FileStoreDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.FileStoreDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.FileStoreDataProfile(), + ), + ]; + client.innerApiCalls.listFileStoreDataProfiles = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listFileStoreDataProfiles( + request, + ( + err?: Error | null, + result?: + | protos.google.privacy.dlp.v2.IFileStoreDataProfile[] + | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listFileStoreDataProfiles as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listFileStoreDataProfiles as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFileStoreDataProfiles with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListFileStoreDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListFileStoreDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listFileStoreDataProfiles = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.listFileStoreDataProfiles(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.listFileStoreDataProfiles as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listFileStoreDataProfiles as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFileStoreDataProfilesStream without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListFileStoreDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListFileStoreDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.FileStoreDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.FileStoreDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.FileStoreDataProfile(), + ), + ]; + client.descriptors.page.listFileStoreDataProfiles.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listFileStoreDataProfilesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.privacy.dlp.v2.FileStoreDataProfile[] = + []; + stream.on( + 'data', + (response: protos.google.privacy.dlp.v2.FileStoreDataProfile) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listFileStoreDataProfiles + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listFileStoreDataProfiles, request), + ); + assert( + ( + client.descriptors.page.listFileStoreDataProfiles + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes listFileStoreDataProfilesStream with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListFileStoreDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListFileStoreDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listFileStoreDataProfiles.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listFileStoreDataProfilesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.privacy.dlp.v2.FileStoreDataProfile[] = + []; + stream.on( + 'data', + (response: protos.google.privacy.dlp.v2.FileStoreDataProfile) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listFileStoreDataProfiles + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listFileStoreDataProfiles, request), + ); + assert( + ( + client.descriptors.page.listFileStoreDataProfiles + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listFileStoreDataProfiles without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListFileStoreDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListFileStoreDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.privacy.dlp.v2.FileStoreDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.FileStoreDataProfile(), + ), + generateSampleMessage( + new protos.google.privacy.dlp.v2.FileStoreDataProfile(), + ), + ]; + client.descriptors.page.listFileStoreDataProfiles.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.privacy.dlp.v2.IFileStoreDataProfile[] = + []; + const iterable = client.listFileStoreDataProfilesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listFileStoreDataProfiles + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listFileStoreDataProfiles + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listFileStoreDataProfiles with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListFileStoreDataProfilesRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListFileStoreDataProfilesRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listFileStoreDataProfiles.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listFileStoreDataProfilesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.privacy.dlp.v2.IFileStoreDataProfile[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listFileStoreDataProfiles + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listFileStoreDataProfiles + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('listConnections', () => { + it('invokes listConnections without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListConnectionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListConnectionsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.privacy.dlp.v2.Connection()), + generateSampleMessage(new protos.google.privacy.dlp.v2.Connection()), + generateSampleMessage(new protos.google.privacy.dlp.v2.Connection()), + ]; + client.innerApiCalls.listConnections = stubSimpleCall(expectedResponse); + const [response] = await client.listConnections(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listConnections as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConnections as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnections without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListConnectionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListConnectionsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.privacy.dlp.v2.Connection()), + generateSampleMessage(new protos.google.privacy.dlp.v2.Connection()), + generateSampleMessage(new protos.google.privacy.dlp.v2.Connection()), + ]; + client.innerApiCalls.listConnections = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listConnections( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IConnection[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listConnections as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConnections as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnections with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListConnectionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListConnectionsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listConnections = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.listConnections(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listConnections as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConnections as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConnectionsStream without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListConnectionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListConnectionsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.privacy.dlp.v2.Connection()), + generateSampleMessage(new protos.google.privacy.dlp.v2.Connection()), + generateSampleMessage(new protos.google.privacy.dlp.v2.Connection()), + ]; + client.descriptors.page.listConnections.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listConnectionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.privacy.dlp.v2.Connection[] = []; + stream.on( + 'data', + (response: protos.google.privacy.dlp.v2.Connection) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.listConnections.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listConnections, request), + ); + assert( + (client.descriptors.page.listConnections.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('invokes listConnectionsStream with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListConnectionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListConnectionsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConnections.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listConnectionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.privacy.dlp.v2.Connection[] = []; + stream.on( + 'data', + (response: protos.google.privacy.dlp.v2.Connection) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.listConnections.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listConnections, request), + ); + assert( + (client.descriptors.page.listConnections.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listConnections without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListConnectionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListConnectionsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.privacy.dlp.v2.Connection()), + generateSampleMessage(new protos.google.privacy.dlp.v2.Connection()), + generateSampleMessage(new protos.google.privacy.dlp.v2.Connection()), + ]; + client.descriptors.page.listConnections.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.privacy.dlp.v2.IConnection[] = []; + const iterable = client.listConnectionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listConnections.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listConnections.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with listConnections with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.ListConnectionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.ListConnectionsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listConnections.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listConnectionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.privacy.dlp.v2.IConnection[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listConnections.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.listConnections.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + }); + + describe('searchConnections', () => { + it('invokes searchConnections without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.SearchConnectionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.SearchConnectionsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.privacy.dlp.v2.Connection()), + generateSampleMessage(new protos.google.privacy.dlp.v2.Connection()), + generateSampleMessage(new protos.google.privacy.dlp.v2.Connection()), + ]; + client.innerApiCalls.searchConnections = stubSimpleCall(expectedResponse); + const [response] = await client.searchConnections(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.searchConnections as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.searchConnections as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchConnections without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.SearchConnectionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.SearchConnectionsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.privacy.dlp.v2.Connection()), + generateSampleMessage(new protos.google.privacy.dlp.v2.Connection()), + generateSampleMessage(new protos.google.privacy.dlp.v2.Connection()), + ]; + client.innerApiCalls.searchConnections = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.searchConnections( + request, + ( + err?: Error | null, + result?: protos.google.privacy.dlp.v2.IConnection[] | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.searchConnections as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.searchConnections as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchConnections with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.SearchConnectionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.SearchConnectionsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.searchConnections = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.searchConnections(request), expectedError); + const actualRequest = ( + client.innerApiCalls.searchConnections as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.searchConnections as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes searchConnectionsStream without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.SearchConnectionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.SearchConnectionsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.privacy.dlp.v2.Connection()), + generateSampleMessage(new protos.google.privacy.dlp.v2.Connection()), + generateSampleMessage(new protos.google.privacy.dlp.v2.Connection()), + ]; + client.descriptors.page.searchConnections.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.searchConnectionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.privacy.dlp.v2.Connection[] = []; + stream.on( + 'data', + (response: protos.google.privacy.dlp.v2.Connection) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + (client.descriptors.page.searchConnections.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.searchConnections, request), + ); + assert( + (client.descriptors.page.searchConnections.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('invokes searchConnectionsStream with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.SearchConnectionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.SearchConnectionsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.searchConnections.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.searchConnectionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.privacy.dlp.v2.Connection[] = []; + stream.on( + 'data', + (response: protos.google.privacy.dlp.v2.Connection) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + (client.descriptors.page.searchConnections.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.searchConnections, request), + ); + assert( + (client.descriptors.page.searchConnections.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with searchConnections without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.SearchConnectionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.SearchConnectionsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.privacy.dlp.v2.Connection()), + generateSampleMessage(new protos.google.privacy.dlp.v2.Connection()), + generateSampleMessage(new protos.google.privacy.dlp.v2.Connection()), + ]; + client.descriptors.page.searchConnections.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.privacy.dlp.v2.IConnection[] = []; + const iterable = client.searchConnectionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.searchConnections.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.searchConnections.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + + it('uses async iteration with searchConnections with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.privacy.dlp.v2.SearchConnectionsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.privacy.dlp.v2.SearchConnectionsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.searchConnections.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.searchConnectionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.privacy.dlp.v2.IConnection[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.searchConnections.asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + (client.descriptors.page.searchConnections.asyncIterate as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams), + ); + }); + }); + describe('getLocation', () => { + it('invokes getLocation without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest(), + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location(), + ); + client.locationsClient.getLocation = stubSimpleCall(expectedResponse); + const response = await client.getLocation(request, expectedOptions); + assert.deepStrictEqual(response, [expectedResponse]); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined), + ); + }); + it('invokes getLocation without error using callback', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest(), + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new LocationProtos.google.cloud.location.Location(), + ); + client.locationsClient.getLocation = sinon + .stub() + .callsArgWith(2, null, expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLocation( + request, + expectedOptions, + ( + err?: Error | null, + result?: LocationProtos.google.cloud.location.ILocation | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + assert((client.locationsClient.getLocation as SinonStub).getCall(0)); + }); + it('invokes getLocation with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.GetLocationRequest(), + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.locationsClient.getLocation = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.getLocation(request, expectedOptions), + expectedError, + ); + assert( + (client.locationsClient.getLocation as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined), + ); + }); + }); + describe('listLocationsAsync', () => { + it('uses async iteration with listLocations without error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest(), + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedResponse = [ + generateSampleMessage( + new LocationProtos.google.cloud.location.Location(), + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location(), + ), + generateSampleMessage( + new LocationProtos.google.cloud.location.Location(), + ), + ]; + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + const iterable = client.listLocationsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + it('uses async iteration with listLocations with error', async () => { + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new LocationProtos.google.cloud.location.ListLocationsRequest(), + ); + request.name = ''; + const expectedHeaderRequestParams = 'name='; + const expectedError = new Error('expected'); + client.locationsClient.descriptors.page.listLocations.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listLocationsAsync(request); + await assert.rejects(async () => { + const responses: LocationProtos.google.cloud.location.ILocation[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.locationsClient.descriptors.page.listLocations + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('Path templates', () => { + describe('discoveryConfig', async () => { + const fakePath = '/rendered/path/discoveryConfig'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + discovery_config: 'discoveryConfigValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.discoveryConfigPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.discoveryConfigPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('discoveryConfigPath', () => { + const result = client.discoveryConfigPath( + 'projectValue', + 'locationValue', + 'discoveryConfigValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.discoveryConfigPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromDiscoveryConfigName', () => { + const result = client.matchProjectFromDiscoveryConfigName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.discoveryConfigPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromDiscoveryConfigName', () => { + const result = client.matchLocationFromDiscoveryConfigName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.discoveryConfigPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchDiscoveryConfigFromDiscoveryConfigName', () => { + const result = + client.matchDiscoveryConfigFromDiscoveryConfigName(fakePath); + assert.strictEqual(result, 'discoveryConfigValue'); + assert( + (client.pathTemplates.discoveryConfigPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('finding', async () => { + const fakePath = '/rendered/path/finding'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + finding: 'findingValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.findingPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.findingPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('findingPath', () => { + const result = client.findingPath( + 'projectValue', + 'locationValue', + 'findingValue', + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.findingPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromFindingName', () => { + const result = client.matchProjectFromFindingName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.findingPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromFindingName', () => { + const result = client.matchLocationFromFindingName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.findingPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchFindingFromFindingName', () => { + const result = client.matchFindingFromFindingName(fakePath); + assert.strictEqual(result, 'findingValue'); + assert( + (client.pathTemplates.findingPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('location', async () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('organization', async () => { + const fakePath = '/rendered/path/organization'; + const expectedParameters = { + organization: 'organizationValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationPath', () => { + const result = client.organizationPath('organizationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchOrganizationFromOrganizationName', () => { + const result = client.matchOrganizationFromOrganizationName(fakePath); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('organizationDeidentifyTemplate', async () => { + const fakePath = '/rendered/path/organizationDeidentifyTemplate'; + const expectedParameters = { + organization: 'organizationValue', + deidentify_template: 'deidentifyTemplateValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationDeidentifyTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationDeidentifyTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationDeidentifyTemplatePath', () => { + const result = client.organizationDeidentifyTemplatePath( + 'organizationValue', + 'deidentifyTemplateValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.organizationDeidentifyTemplatePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchOrganizationFromOrganizationDeidentifyTemplateName', () => { + const result = + client.matchOrganizationFromOrganizationDeidentifyTemplateName( + fakePath, + ); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates.organizationDeidentifyTemplatePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchDeidentifyTemplateFromOrganizationDeidentifyTemplateName', () => { + const result = + client.matchDeidentifyTemplateFromOrganizationDeidentifyTemplateName( + fakePath, + ); + assert.strictEqual(result, 'deidentifyTemplateValue'); + assert( + ( + client.pathTemplates.organizationDeidentifyTemplatePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('organizationInspectTemplate', async () => { + const fakePath = '/rendered/path/organizationInspectTemplate'; + const expectedParameters = { + organization: 'organizationValue', + inspect_template: 'inspectTemplateValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationInspectTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationInspectTemplatePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationInspectTemplatePath', () => { + const result = client.organizationInspectTemplatePath( + 'organizationValue', + 'inspectTemplateValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.organizationInspectTemplatePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchOrganizationFromOrganizationInspectTemplateName', () => { + const result = + client.matchOrganizationFromOrganizationInspectTemplateName(fakePath); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates.organizationInspectTemplatePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInspectTemplateFromOrganizationInspectTemplateName', () => { + const result = + client.matchInspectTemplateFromOrganizationInspectTemplateName( + fakePath, + ); + assert.strictEqual(result, 'inspectTemplateValue'); + assert( + ( + client.pathTemplates.organizationInspectTemplatePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('organizationLocation', async () => { + const fakePath = '/rendered/path/organizationLocation'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationLocationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationLocationPath', () => { + const result = client.organizationLocationPath( + 'organizationValue', + 'locationValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.organizationLocationPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchOrganizationFromOrganizationLocationName', () => { + const result = + client.matchOrganizationFromOrganizationLocationName(fakePath); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates.organizationLocationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromOrganizationLocationName', () => { + const result = + client.matchLocationFromOrganizationLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.organizationLocationPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('organizationLocationColumnDataProfile', async () => { + const fakePath = '/rendered/path/organizationLocationColumnDataProfile'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + column_data_profile: 'columnDataProfileValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationColumnDataProfilePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationColumnDataProfilePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationColumnDataProfilePath', () => { + const result = client.organizationLocationColumnDataProfilePath( + 'organizationValue', + 'locationValue', + 'columnDataProfileValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .organizationLocationColumnDataProfilePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchOrganizationFromOrganizationLocationColumnDataProfileName', () => { + const result = + client.matchOrganizationFromOrganizationLocationColumnDataProfileName( + fakePath, + ); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates + .organizationLocationColumnDataProfilePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromOrganizationLocationColumnDataProfileName', () => { + const result = + client.matchLocationFromOrganizationLocationColumnDataProfileName( + fakePath, + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .organizationLocationColumnDataProfilePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchColumnDataProfileFromOrganizationLocationColumnDataProfileName', () => { + const result = + client.matchColumnDataProfileFromOrganizationLocationColumnDataProfileName( + fakePath, + ); + assert.strictEqual(result, 'columnDataProfileValue'); + assert( + ( + client.pathTemplates + .organizationLocationColumnDataProfilePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('organizationLocationConnection', async () => { + const fakePath = '/rendered/path/organizationLocationConnection'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + connection: 'connectionValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationConnectionPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationConnectionPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationConnectionPath', () => { + const result = client.organizationLocationConnectionPath( + 'organizationValue', + 'locationValue', + 'connectionValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.organizationLocationConnectionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchOrganizationFromOrganizationLocationConnectionName', () => { + const result = + client.matchOrganizationFromOrganizationLocationConnectionName( + fakePath, + ); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates.organizationLocationConnectionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromOrganizationLocationConnectionName', () => { + const result = + client.matchLocationFromOrganizationLocationConnectionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.organizationLocationConnectionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchConnectionFromOrganizationLocationConnectionName', () => { + const result = + client.matchConnectionFromOrganizationLocationConnectionName( + fakePath, + ); + assert.strictEqual(result, 'connectionValue'); + assert( + ( + client.pathTemplates.organizationLocationConnectionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('organizationLocationDeidentifyTemplate', async () => { + const fakePath = '/rendered/path/organizationLocationDeidentifyTemplate'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + deidentify_template: 'deidentifyTemplateValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationDeidentifyTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationDeidentifyTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationDeidentifyTemplatePath', () => { + const result = client.organizationLocationDeidentifyTemplatePath( + 'organizationValue', + 'locationValue', + 'deidentifyTemplateValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .organizationLocationDeidentifyTemplatePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchOrganizationFromOrganizationLocationDeidentifyTemplateName', () => { + const result = + client.matchOrganizationFromOrganizationLocationDeidentifyTemplateName( + fakePath, + ); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates + .organizationLocationDeidentifyTemplatePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromOrganizationLocationDeidentifyTemplateName', () => { + const result = + client.matchLocationFromOrganizationLocationDeidentifyTemplateName( + fakePath, + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .organizationLocationDeidentifyTemplatePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchDeidentifyTemplateFromOrganizationLocationDeidentifyTemplateName', () => { + const result = + client.matchDeidentifyTemplateFromOrganizationLocationDeidentifyTemplateName( + fakePath, + ); + assert.strictEqual(result, 'deidentifyTemplateValue'); + assert( + ( + client.pathTemplates + .organizationLocationDeidentifyTemplatePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('organizationLocationFileStoreDataProfile', async () => { + const fakePath = + '/rendered/path/organizationLocationFileStoreDataProfile'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + file_store_data_profile: 'fileStoreDataProfileValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFileStoreDataProfilePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFileStoreDataProfilePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFileStoreDataProfilePath', () => { + const result = client.organizationLocationFileStoreDataProfilePath( + 'organizationValue', + 'locationValue', + 'fileStoreDataProfileValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .organizationLocationFileStoreDataProfilePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchOrganizationFromOrganizationLocationFileStoreDataProfileName', () => { + const result = + client.matchOrganizationFromOrganizationLocationFileStoreDataProfileName( + fakePath, + ); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates + .organizationLocationFileStoreDataProfilePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromOrganizationLocationFileStoreDataProfileName', () => { + const result = + client.matchLocationFromOrganizationLocationFileStoreDataProfileName( + fakePath, + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .organizationLocationFileStoreDataProfilePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchFileStoreDataProfileFromOrganizationLocationFileStoreDataProfileName', () => { + const result = + client.matchFileStoreDataProfileFromOrganizationLocationFileStoreDataProfileName( + fakePath, + ); + assert.strictEqual(result, 'fileStoreDataProfileValue'); + assert( + ( + client.pathTemplates + .organizationLocationFileStoreDataProfilePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('organizationLocationInspectTemplate', async () => { + const fakePath = '/rendered/path/organizationLocationInspectTemplate'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + inspect_template: 'inspectTemplateValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationInspectTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationInspectTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationInspectTemplatePath', () => { + const result = client.organizationLocationInspectTemplatePath( + 'organizationValue', + 'locationValue', + 'inspectTemplateValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.organizationLocationInspectTemplatePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchOrganizationFromOrganizationLocationInspectTemplateName', () => { + const result = + client.matchOrganizationFromOrganizationLocationInspectTemplateName( + fakePath, + ); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates.organizationLocationInspectTemplatePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromOrganizationLocationInspectTemplateName', () => { + const result = + client.matchLocationFromOrganizationLocationInspectTemplateName( + fakePath, + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.organizationLocationInspectTemplatePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInspectTemplateFromOrganizationLocationInspectTemplateName', () => { + const result = + client.matchInspectTemplateFromOrganizationLocationInspectTemplateName( + fakePath, + ); + assert.strictEqual(result, 'inspectTemplateValue'); + assert( + ( + client.pathTemplates.organizationLocationInspectTemplatePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('organizationLocationProjectDataProfile', async () => { + const fakePath = '/rendered/path/organizationLocationProjectDataProfile'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + project_data_profile: 'projectDataProfileValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationProjectDataProfilePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationProjectDataProfilePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationProjectDataProfilePath', () => { + const result = client.organizationLocationProjectDataProfilePath( + 'organizationValue', + 'locationValue', + 'projectDataProfileValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .organizationLocationProjectDataProfilePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchOrganizationFromOrganizationLocationProjectDataProfileName', () => { + const result = + client.matchOrganizationFromOrganizationLocationProjectDataProfileName( + fakePath, + ); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates + .organizationLocationProjectDataProfilePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromOrganizationLocationProjectDataProfileName', () => { + const result = + client.matchLocationFromOrganizationLocationProjectDataProfileName( + fakePath, + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .organizationLocationProjectDataProfilePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchProjectDataProfileFromOrganizationLocationProjectDataProfileName', () => { + const result = + client.matchProjectDataProfileFromOrganizationLocationProjectDataProfileName( + fakePath, + ); + assert.strictEqual(result, 'projectDataProfileValue'); + assert( + ( + client.pathTemplates + .organizationLocationProjectDataProfilePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('organizationLocationStoredInfoType', async () => { + const fakePath = '/rendered/path/organizationLocationStoredInfoType'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + stored_info_type: 'storedInfoTypeValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationStoredInfoTypePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationStoredInfoTypePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationStoredInfoTypePath', () => { + const result = client.organizationLocationStoredInfoTypePath( + 'organizationValue', + 'locationValue', + 'storedInfoTypeValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.organizationLocationStoredInfoTypePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchOrganizationFromOrganizationLocationStoredInfoTypeName', () => { + const result = + client.matchOrganizationFromOrganizationLocationStoredInfoTypeName( + fakePath, + ); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates.organizationLocationStoredInfoTypePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromOrganizationLocationStoredInfoTypeName', () => { + const result = + client.matchLocationFromOrganizationLocationStoredInfoTypeName( + fakePath, + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.organizationLocationStoredInfoTypePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchStoredInfoTypeFromOrganizationLocationStoredInfoTypeName', () => { + const result = + client.matchStoredInfoTypeFromOrganizationLocationStoredInfoTypeName( + fakePath, + ); + assert.strictEqual(result, 'storedInfoTypeValue'); + assert( + ( + client.pathTemplates.organizationLocationStoredInfoTypePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('organizationLocationTableDataProfile', async () => { + const fakePath = '/rendered/path/organizationLocationTableDataProfile'; + const expectedParameters = { + organization: 'organizationValue', + location: 'locationValue', + table_data_profile: 'tableDataProfileValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationTableDataProfilePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationTableDataProfilePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationTableDataProfilePath', () => { + const result = client.organizationLocationTableDataProfilePath( + 'organizationValue', + 'locationValue', + 'tableDataProfileValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates + .organizationLocationTableDataProfilePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchOrganizationFromOrganizationLocationTableDataProfileName', () => { + const result = + client.matchOrganizationFromOrganizationLocationTableDataProfileName( + fakePath, + ); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates + .organizationLocationTableDataProfilePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromOrganizationLocationTableDataProfileName', () => { + const result = + client.matchLocationFromOrganizationLocationTableDataProfileName( + fakePath, + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates + .organizationLocationTableDataProfilePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchTableDataProfileFromOrganizationLocationTableDataProfileName', () => { + const result = + client.matchTableDataProfileFromOrganizationLocationTableDataProfileName( + fakePath, + ); + assert.strictEqual(result, 'tableDataProfileValue'); + assert( + ( + client.pathTemplates + .organizationLocationTableDataProfilePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('organizationStoredInfoType', async () => { + const fakePath = '/rendered/path/organizationStoredInfoType'; + const expectedParameters = { + organization: 'organizationValue', + stored_info_type: 'storedInfoTypeValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationStoredInfoTypePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationStoredInfoTypePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationStoredInfoTypePath', () => { + const result = client.organizationStoredInfoTypePath( + 'organizationValue', + 'storedInfoTypeValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.organizationStoredInfoTypePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchOrganizationFromOrganizationStoredInfoTypeName', () => { + const result = + client.matchOrganizationFromOrganizationStoredInfoTypeName(fakePath); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates.organizationStoredInfoTypePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchStoredInfoTypeFromOrganizationStoredInfoTypeName', () => { + const result = + client.matchStoredInfoTypeFromOrganizationStoredInfoTypeName( + fakePath, + ); + assert.strictEqual(result, 'storedInfoTypeValue'); + assert( + ( + client.pathTemplates.organizationStoredInfoTypePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('project', async () => { + const fakePath = '/rendered/path/project'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectPath', () => { + const result = client.projectPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromProjectName', () => { + const result = client.matchProjectFromProjectName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('projectDeidentifyTemplate', async () => { + const fakePath = '/rendered/path/projectDeidentifyTemplate'; + const expectedParameters = { + project: 'projectValue', + deidentify_template: 'deidentifyTemplateValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectDeidentifyTemplatePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectDeidentifyTemplatePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectDeidentifyTemplatePath', () => { + const result = client.projectDeidentifyTemplatePath( + 'projectValue', + 'deidentifyTemplateValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectDeidentifyTemplatePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromProjectDeidentifyTemplateName', () => { + const result = + client.matchProjectFromProjectDeidentifyTemplateName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectDeidentifyTemplatePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchDeidentifyTemplateFromProjectDeidentifyTemplateName', () => { + const result = + client.matchDeidentifyTemplateFromProjectDeidentifyTemplateName( + fakePath, + ); + assert.strictEqual(result, 'deidentifyTemplateValue'); + assert( + ( + client.pathTemplates.projectDeidentifyTemplatePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('projectDlpContent', async () => { + const fakePath = '/rendered/path/projectDlpContent'; + const expectedParameters = { + project: 'projectValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectDlpContentPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectDlpContentPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectDlpContentPath', () => { + const result = client.projectDlpContentPath('projectValue'); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectDlpContentPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromProjectDlpContentName', () => { + const result = client.matchProjectFromProjectDlpContentName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectDlpContentPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('projectDlpJob', async () => { + const fakePath = '/rendered/path/projectDlpJob'; + const expectedParameters = { + project: 'projectValue', + dlp_job: 'dlpJobValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectDlpJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectDlpJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectDlpJobPath', () => { + const result = client.projectDlpJobPath('projectValue', 'dlpJobValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.projectDlpJobPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromProjectDlpJobName', () => { + const result = client.matchProjectFromProjectDlpJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.projectDlpJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchDlpJobFromProjectDlpJobName', () => { + const result = client.matchDlpJobFromProjectDlpJobName(fakePath); + assert.strictEqual(result, 'dlpJobValue'); + assert( + (client.pathTemplates.projectDlpJobPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('projectInspectTemplate', async () => { + const fakePath = '/rendered/path/projectInspectTemplate'; + const expectedParameters = { + project: 'projectValue', + inspect_template: 'inspectTemplateValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectInspectTemplatePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectInspectTemplatePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectInspectTemplatePath', () => { + const result = client.projectInspectTemplatePath( + 'projectValue', + 'inspectTemplateValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectInspectTemplatePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromProjectInspectTemplateName', () => { + const result = + client.matchProjectFromProjectInspectTemplateName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectInspectTemplatePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInspectTemplateFromProjectInspectTemplateName', () => { + const result = + client.matchInspectTemplateFromProjectInspectTemplateName(fakePath); + assert.strictEqual(result, 'inspectTemplateValue'); + assert( + ( + client.pathTemplates.projectInspectTemplatePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('projectJobTrigger', async () => { + const fakePath = '/rendered/path/projectJobTrigger'; + const expectedParameters = { + project: 'projectValue', + job_trigger: 'jobTriggerValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectJobTriggerPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectJobTriggerPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectJobTriggerPath', () => { + const result = client.projectJobTriggerPath( + 'projectValue', + 'jobTriggerValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectJobTriggerPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromProjectJobTriggerName', () => { + const result = client.matchProjectFromProjectJobTriggerName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectJobTriggerPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchJobTriggerFromProjectJobTriggerName', () => { + const result = + client.matchJobTriggerFromProjectJobTriggerName(fakePath); + assert.strictEqual(result, 'jobTriggerValue'); + assert( + ( + client.pathTemplates.projectJobTriggerPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('projectLocationColumnDataProfile', async () => { + const fakePath = '/rendered/path/projectLocationColumnDataProfile'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + column_data_profile: 'columnDataProfileValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationColumnDataProfilePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationColumnDataProfilePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationColumnDataProfilePath', () => { + const result = client.projectLocationColumnDataProfilePath( + 'projectValue', + 'locationValue', + 'columnDataProfileValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationColumnDataProfilePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromProjectLocationColumnDataProfileName', () => { + const result = + client.matchProjectFromProjectLocationColumnDataProfileName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationColumnDataProfilePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromProjectLocationColumnDataProfileName', () => { + const result = + client.matchLocationFromProjectLocationColumnDataProfileName( + fakePath, + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationColumnDataProfilePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchColumnDataProfileFromProjectLocationColumnDataProfileName', () => { + const result = + client.matchColumnDataProfileFromProjectLocationColumnDataProfileName( + fakePath, + ); + assert.strictEqual(result, 'columnDataProfileValue'); + assert( + ( + client.pathTemplates.projectLocationColumnDataProfilePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('projectLocationConnection', async () => { + const fakePath = '/rendered/path/projectLocationConnection'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + connection: 'connectionValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationConnectionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationConnectionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationConnectionPath', () => { + const result = client.projectLocationConnectionPath( + 'projectValue', + 'locationValue', + 'connectionValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationConnectionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromProjectLocationConnectionName', () => { + const result = + client.matchProjectFromProjectLocationConnectionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationConnectionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromProjectLocationConnectionName', () => { + const result = + client.matchLocationFromProjectLocationConnectionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationConnectionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchConnectionFromProjectLocationConnectionName', () => { + const result = + client.matchConnectionFromProjectLocationConnectionName(fakePath); + assert.strictEqual(result, 'connectionValue'); + assert( + ( + client.pathTemplates.projectLocationConnectionPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('projectLocationDeidentifyTemplate', async () => { + const fakePath = '/rendered/path/projectLocationDeidentifyTemplate'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + deidentify_template: 'deidentifyTemplateValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationDeidentifyTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationDeidentifyTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationDeidentifyTemplatePath', () => { + const result = client.projectLocationDeidentifyTemplatePath( + 'projectValue', + 'locationValue', + 'deidentifyTemplateValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationDeidentifyTemplatePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromProjectLocationDeidentifyTemplateName', () => { + const result = + client.matchProjectFromProjectLocationDeidentifyTemplateName( + fakePath, + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationDeidentifyTemplatePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromProjectLocationDeidentifyTemplateName', () => { + const result = + client.matchLocationFromProjectLocationDeidentifyTemplateName( + fakePath, + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationDeidentifyTemplatePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchDeidentifyTemplateFromProjectLocationDeidentifyTemplateName', () => { + const result = + client.matchDeidentifyTemplateFromProjectLocationDeidentifyTemplateName( + fakePath, + ); + assert.strictEqual(result, 'deidentifyTemplateValue'); + assert( + ( + client.pathTemplates.projectLocationDeidentifyTemplatePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('projectLocationDlpJob', async () => { + const fakePath = '/rendered/path/projectLocationDlpJob'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + dlp_job: 'dlpJobValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationDlpJobPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationDlpJobPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationDlpJobPath', () => { + const result = client.projectLocationDlpJobPath( + 'projectValue', + 'locationValue', + 'dlpJobValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationDlpJobPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromProjectLocationDlpJobName', () => { + const result = + client.matchProjectFromProjectLocationDlpJobName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationDlpJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromProjectLocationDlpJobName', () => { + const result = + client.matchLocationFromProjectLocationDlpJobName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationDlpJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchDlpJobFromProjectLocationDlpJobName', () => { + const result = + client.matchDlpJobFromProjectLocationDlpJobName(fakePath); + assert.strictEqual(result, 'dlpJobValue'); + assert( + ( + client.pathTemplates.projectLocationDlpJobPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('projectLocationFileStoreDataProfile', async () => { + const fakePath = '/rendered/path/projectLocationFileStoreDataProfile'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + file_store_data_profile: 'fileStoreDataProfileValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFileStoreDataProfilePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFileStoreDataProfilePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFileStoreDataProfilePath', () => { + const result = client.projectLocationFileStoreDataProfilePath( + 'projectValue', + 'locationValue', + 'fileStoreDataProfileValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationFileStoreDataProfilePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromProjectLocationFileStoreDataProfileName', () => { + const result = + client.matchProjectFromProjectLocationFileStoreDataProfileName( + fakePath, + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationFileStoreDataProfilePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromProjectLocationFileStoreDataProfileName', () => { + const result = + client.matchLocationFromProjectLocationFileStoreDataProfileName( + fakePath, + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationFileStoreDataProfilePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchFileStoreDataProfileFromProjectLocationFileStoreDataProfileName', () => { + const result = + client.matchFileStoreDataProfileFromProjectLocationFileStoreDataProfileName( + fakePath, + ); + assert.strictEqual(result, 'fileStoreDataProfileValue'); + assert( + ( + client.pathTemplates.projectLocationFileStoreDataProfilePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('projectLocationInspectTemplate', async () => { + const fakePath = '/rendered/path/projectLocationInspectTemplate'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + inspect_template: 'inspectTemplateValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationInspectTemplatePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationInspectTemplatePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationInspectTemplatePath', () => { + const result = client.projectLocationInspectTemplatePath( + 'projectValue', + 'locationValue', + 'inspectTemplateValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationInspectTemplatePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromProjectLocationInspectTemplateName', () => { + const result = + client.matchProjectFromProjectLocationInspectTemplateName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationInspectTemplatePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromProjectLocationInspectTemplateName', () => { + const result = + client.matchLocationFromProjectLocationInspectTemplateName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationInspectTemplatePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchInspectTemplateFromProjectLocationInspectTemplateName', () => { + const result = + client.matchInspectTemplateFromProjectLocationInspectTemplateName( + fakePath, + ); + assert.strictEqual(result, 'inspectTemplateValue'); + assert( + ( + client.pathTemplates.projectLocationInspectTemplatePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('projectLocationJobTrigger', async () => { + const fakePath = '/rendered/path/projectLocationJobTrigger'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + job_trigger: 'jobTriggerValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationJobTriggerPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectLocationJobTriggerPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectLocationJobTriggerPath', () => { + const result = client.projectLocationJobTriggerPath( + 'projectValue', + 'locationValue', + 'jobTriggerValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationJobTriggerPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromProjectLocationJobTriggerName', () => { + const result = + client.matchProjectFromProjectLocationJobTriggerName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationJobTriggerPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromProjectLocationJobTriggerName', () => { + const result = + client.matchLocationFromProjectLocationJobTriggerName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationJobTriggerPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchJobTriggerFromProjectLocationJobTriggerName', () => { + const result = + client.matchJobTriggerFromProjectLocationJobTriggerName(fakePath); + assert.strictEqual(result, 'jobTriggerValue'); + assert( + ( + client.pathTemplates.projectLocationJobTriggerPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('projectLocationProjectDataProfile', async () => { + const fakePath = '/rendered/path/projectLocationProjectDataProfile'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + project_data_profile: 'projectDataProfileValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationProjectDataProfilePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationProjectDataProfilePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationProjectDataProfilePath', () => { + const result = client.projectLocationProjectDataProfilePath( + 'projectValue', + 'locationValue', + 'projectDataProfileValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationProjectDataProfilePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromProjectLocationProjectDataProfileName', () => { + const result = + client.matchProjectFromProjectLocationProjectDataProfileName( + fakePath, + ); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationProjectDataProfilePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromProjectLocationProjectDataProfileName', () => { + const result = + client.matchLocationFromProjectLocationProjectDataProfileName( + fakePath, + ); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationProjectDataProfilePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchProjectDataProfileFromProjectLocationProjectDataProfileName', () => { + const result = + client.matchProjectDataProfileFromProjectLocationProjectDataProfileName( + fakePath, + ); + assert.strictEqual(result, 'projectDataProfileValue'); + assert( + ( + client.pathTemplates.projectLocationProjectDataProfilePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('projectLocationStoredInfoType', async () => { + const fakePath = '/rendered/path/projectLocationStoredInfoType'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + stored_info_type: 'storedInfoTypeValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationStoredInfoTypePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationStoredInfoTypePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationStoredInfoTypePath', () => { + const result = client.projectLocationStoredInfoTypePath( + 'projectValue', + 'locationValue', + 'storedInfoTypeValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationStoredInfoTypePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromProjectLocationStoredInfoTypeName', () => { + const result = + client.matchProjectFromProjectLocationStoredInfoTypeName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationStoredInfoTypePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromProjectLocationStoredInfoTypeName', () => { + const result = + client.matchLocationFromProjectLocationStoredInfoTypeName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationStoredInfoTypePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchStoredInfoTypeFromProjectLocationStoredInfoTypeName', () => { + const result = + client.matchStoredInfoTypeFromProjectLocationStoredInfoTypeName( + fakePath, + ); + assert.strictEqual(result, 'storedInfoTypeValue'); + assert( + ( + client.pathTemplates.projectLocationStoredInfoTypePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('projectLocationTableDataProfile', async () => { + const fakePath = '/rendered/path/projectLocationTableDataProfile'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + table_data_profile: 'tableDataProfileValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationTableDataProfilePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationTableDataProfilePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationTableDataProfilePath', () => { + const result = client.projectLocationTableDataProfilePath( + 'projectValue', + 'locationValue', + 'tableDataProfileValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectLocationTableDataProfilePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromProjectLocationTableDataProfileName', () => { + const result = + client.matchProjectFromProjectLocationTableDataProfileName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectLocationTableDataProfilePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromProjectLocationTableDataProfileName', () => { + const result = + client.matchLocationFromProjectLocationTableDataProfileName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.projectLocationTableDataProfilePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchTableDataProfileFromProjectLocationTableDataProfileName', () => { + const result = + client.matchTableDataProfileFromProjectLocationTableDataProfileName( + fakePath, + ); + assert.strictEqual(result, 'tableDataProfileValue'); + assert( + ( + client.pathTemplates.projectLocationTableDataProfilePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('projectStoredInfoType', async () => { + const fakePath = '/rendered/path/projectStoredInfoType'; + const expectedParameters = { + project: 'projectValue', + stored_info_type: 'storedInfoTypeValue', + }; + const client = new dlpserviceModule.v2.DlpServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectStoredInfoTypePathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.projectStoredInfoTypePathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('projectStoredInfoTypePath', () => { + const result = client.projectStoredInfoTypePath( + 'projectValue', + 'storedInfoTypeValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.projectStoredInfoTypePathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromProjectStoredInfoTypeName', () => { + const result = + client.matchProjectFromProjectStoredInfoTypeName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.projectStoredInfoTypePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchStoredInfoTypeFromProjectStoredInfoTypeName', () => { + const result = + client.matchStoredInfoTypeFromProjectStoredInfoTypeName(fakePath); + assert.strictEqual(result, 'storedInfoTypeValue'); + assert( + ( + client.pathTemplates.projectStoredInfoTypePathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + }); +}); diff --git a/owl-bot-staging/dlp/v2/tsconfig.json b/owl-bot-staging/dlp/v2/tsconfig.json new file mode 100644 index 000000000..ca73e7bfc --- /dev/null +++ b/owl-bot-staging/dlp/v2/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2023", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts", + "src/**/*.json", + "samples/**/*.json", + "protos/protos.json" + ] +} diff --git a/owl-bot-staging/dlp/v2/webpack.config.js b/owl-bot-staging/dlp/v2/webpack.config.js new file mode 100644 index 000000000..4eaa37156 --- /dev/null +++ b/owl-bot-staging/dlp/v2/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// 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 +// +// https://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. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'DlpService', + filename: './dlp-service.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader' + }, + ], + }, + mode: 'production', +};